Codebase list cyrus-sasl2 / 3fd959d
Imported Upstream version 69-g4c8e3f2 Ondřej Surý 7 years ago
268 changed file(s) with 40306 addition(s) and 85509 deletion(s). Raw diff Collapse all Expand all
0 autom4te*.cache
1 stamp-h.in
2 config.h.in*
3 Makefile.in
4 aclocal.m4
5 configure
6 config.log
7 config.h
8 config.cache
9 libtool
10 config.status
11 stamp-h1
12 Makefile
0 -i2 -cli0 -bl -nce
4444 which is based on the IPv6 code written by KIKUCHI Takahiro
4545 <kick@kyoto.wide.ad.jp>
4646
47 $Id: AUTHORS,v 1.18 2006/12/01 17:34:58 mel Exp $
47 Igor Brezac <igor@ipass.net> has done a good deal of work on the saslauthd
48 LDAP module.
49
50 Jeremy Rumpf <jrumpf@heavyload.net> implemented the credential cache, unified
51 the different IPC methods under a common framework.
52
53 Fabian Knittel <fknittel@gmx.de> wrote auth_pam plugin, based on
54 Debian's pwcheck_pam daemon by Michael-John Turner <mj@debian.org>.
55
56 saslauthd was originally contributed by Lyndon Nerenberg on
57 behalf of MessagingDirect Ltd.
0 2012-10-12 Alexey Melnikov <alexey.melnikov@isode.com>
1 * Getting ready for 2.1.25.
0 2012-11-19 Alexey Melnikov <alexey.melnikov@isode.com>
1 * Final 2.1.26 tagged and released by Ken.
22
33 2012-07-06 Alexey Melnikov <alexey.melnikov@isode.com>
44 * saslauthd/auth_krb5.c: Fixed a crash in the auth_krb5.c
+0
-302
INSTALL less more
0 Installation Instructions
1 *************************
2
3 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
4 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5
6 This file is free documentation; the Free Software Foundation gives
7 unlimited permission to copy, distribute and modify it.
8
9 Basic Installation
10 ==================
11
12 Briefly, the shell commands `./configure; make; make install' should
13 configure, build, and install this package. The following
14 more-detailed instructions are generic; see the `README' file for
15 instructions specific to this package.
16
17 The `configure' shell script attempts to guess correct values for
18 various system-dependent variables used during compilation. It uses
19 those values to create a `Makefile' in each directory of the package.
20 It may also create one or more `.h' files containing system-dependent
21 definitions. Finally, it creates a shell script `config.status' that
22 you can run in the future to recreate the current configuration, and a
23 file `config.log' containing compiler output (useful mainly for
24 debugging `configure').
25
26 It can also use an optional file (typically called `config.cache'
27 and enabled with `--cache-file=config.cache' or simply `-C') that saves
28 the results of its tests to speed up reconfiguring. Caching is
29 disabled by default to prevent problems with accidental use of stale
30 cache files.
31
32 If you need to do unusual things to compile the package, please try
33 to figure out how `configure' could check whether to do them, and mail
34 diffs or instructions to the address given in the `README' so they can
35 be considered for the next release. If you are using the cache, and at
36 some point `config.cache' contains results you don't want to keep, you
37 may remove or edit it.
38
39 The file `configure.ac' (or `configure.in') is used to create
40 `configure' by a program called `autoconf'. You need `configure.ac' if
41 you want to change it or regenerate `configure' using a newer version
42 of `autoconf'.
43
44 The simplest way to compile this package is:
45
46 1. `cd' to the directory containing the package's source code and type
47 `./configure' to configure the package for your system.
48
49 Running `configure' might take a while. While running, it prints
50 some messages telling which features it is checking for.
51
52 2. Type `make' to compile the package.
53
54 3. Optionally, type `make check' to run any self-tests that come with
55 the package.
56
57 4. Type `make install' to install the programs and any data files and
58 documentation.
59
60 5. You can remove the program binaries and object files from the
61 source code directory by typing `make clean'. To also remove the
62 files that `configure' created (so you can compile the package for
63 a different kind of computer), type `make distclean'. There is
64 also a `make maintainer-clean' target, but that is intended mainly
65 for the package's developers. If you use it, you may have to get
66 all sorts of other programs in order to regenerate files that came
67 with the distribution.
68
69 6. Often, you can also type `make uninstall' to remove the installed
70 files again.
71
72 Compilers and Options
73 =====================
74
75 Some systems require unusual options for compilation or linking that
76 the `configure' script does not know about. Run `./configure --help'
77 for details on some of the pertinent environment variables.
78
79 You can give `configure' initial values for configuration parameters
80 by setting variables in the command line or in the environment. Here
81 is an example:
82
83 ./configure CC=c99 CFLAGS=-g LIBS=-lposix
84
85 *Note Defining Variables::, for more details.
86
87 Compiling For Multiple Architectures
88 ====================================
89
90 You can compile the package for more than one kind of computer at the
91 same time, by placing the object files for each architecture in their
92 own directory. To do this, you can use GNU `make'. `cd' to the
93 directory where you want the object files and executables to go and run
94 the `configure' script. `configure' automatically checks for the
95 source code in the directory that `configure' is in and in `..'.
96
97 With a non-GNU `make', it is safer to compile the package for one
98 architecture at a time in the source code directory. After you have
99 installed the package for one architecture, use `make distclean' before
100 reconfiguring for another architecture.
101
102 On MacOS X 10.5 and later systems, you can create libraries and
103 executables that work on multiple system types--known as "fat" or
104 "universal" binaries--by specifying multiple `-arch' options to the
105 compiler but only a single `-arch' option to the preprocessor. Like
106 this:
107
108 ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
109 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
110 CPP="gcc -E" CXXCPP="g++ -E"
111
112 This is not guaranteed to produce working output in all cases, you
113 may have to build one architecture at a time and combine the results
114 using the `lipo' tool if you have problems.
115
116 Installation Names
117 ==================
118
119 By default, `make install' installs the package's commands under
120 `/usr/local/bin', include files under `/usr/local/include', etc. You
121 can specify an installation prefix other than `/usr/local' by giving
122 `configure' the option `--prefix=PREFIX'.
123
124 You can specify separate installation prefixes for
125 architecture-specific files and architecture-independent files. If you
126 pass the option `--exec-prefix=PREFIX' to `configure', the package uses
127 PREFIX as the prefix for installing programs and libraries.
128 Documentation and other data files still use the regular prefix.
129
130 In addition, if you use an unusual directory layout you can give
131 options like `--bindir=DIR' to specify different values for particular
132 kinds of files. Run `configure --help' for a list of the directories
133 you can set and what kinds of files go in them.
134
135 If the package supports it, you can cause programs to be installed
136 with an extra prefix or suffix on their names by giving `configure' the
137 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
138
139 Optional Features
140 =================
141
142 Some packages pay attention to `--enable-FEATURE' options to
143 `configure', where FEATURE indicates an optional part of the package.
144 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
145 is something like `gnu-as' or `x' (for the X Window System). The
146 `README' should mention any `--enable-' and `--with-' options that the
147 package recognizes.
148
149 For packages that use the X Window System, `configure' can usually
150 find the X include and library files automatically, but if it doesn't,
151 you can use the `configure' options `--x-includes=DIR' and
152 `--x-libraries=DIR' to specify their locations.
153
154 Particular systems
155 ==================
156
157 On HP-UX, the default C compiler is not ANSI C compatible. If GNU
158 CC is not installed, it is recommended to use the following options in
159 order to use an ANSI C compiler:
160
161 ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
162
163 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
164
165 On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
166 parse its `<wchar.h>' header file. The option `-nodtk' can be used as
167 a workaround. If GNU CC is not installed, it is therefore recommended
168 to try
169
170 ./configure CC="cc"
171
172 and if that doesn't work, try
173
174 ./configure CC="cc -nodtk"
175
176 On Solaris, don't put `/usr/ucb' early in your `PATH'. This
177 directory contains several dysfunctional programs; working variants of
178 these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
179 in your `PATH', put it _after_ `/usr/bin'.
180
181 On Haiku, software installed for all users goes in `/boot/common',
182 not `/usr/local'. It is recommended to use the following options:
183
184 ./configure --prefix=/boot/common
185
186 Specifying the System Type
187 ==========================
188
189 There may be some features `configure' cannot figure out
190 automatically, but needs to determine by the type of machine the package
191 will run on. Usually, assuming the package is built to be run on the
192 _same_ architectures, `configure' can figure that out, but if it prints
193 a message saying it cannot guess the machine type, give it the
194 `--build=TYPE' option. TYPE can either be a short name for the system
195 type, such as `sun4', or a canonical name which has the form:
196
197 CPU-COMPANY-SYSTEM
198
199 where SYSTEM can have one of these forms:
200
201 OS
202 KERNEL-OS
203
204 See the file `config.sub' for the possible values of each field. If
205 `config.sub' isn't included in this package, then this package doesn't
206 need to know the machine type.
207
208 If you are _building_ compiler tools for cross-compiling, you should
209 use the option `--target=TYPE' to select the type of system they will
210 produce code for.
211
212 If you want to _use_ a cross compiler, that generates code for a
213 platform different from the build platform, you should specify the
214 "host" platform (i.e., that on which the generated programs will
215 eventually be run) with `--host=TYPE'.
216
217 Sharing Defaults
218 ================
219
220 If you want to set default values for `configure' scripts to share,
221 you can create a site shell script called `config.site' that gives
222 default values for variables like `CC', `cache_file', and `prefix'.
223 `configure' looks for `PREFIX/share/config.site' if it exists, then
224 `PREFIX/etc/config.site' if it exists. Or, you can set the
225 `CONFIG_SITE' environment variable to the location of the site script.
226 A warning: not all `configure' scripts look for a site script.
227
228 Defining Variables
229 ==================
230
231 Variables not defined in a site shell script can be set in the
232 environment passed to `configure'. However, some packages may run
233 configure again during the build, and the customized values of these
234 variables may be lost. In order to avoid this problem, you should set
235 them in the `configure' command line, using `VAR=value'. For example:
236
237 ./configure CC=/usr/local2/bin/gcc
238
239 causes the specified `gcc' to be used as the C compiler (unless it is
240 overridden in the site shell script).
241
242 Unfortunately, this technique does not work for `CONFIG_SHELL' due to
243 an Autoconf bug. Until the bug is fixed you can use this workaround:
244
245 CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
246
247 `configure' Invocation
248 ======================
249
250 `configure' recognizes the following options to control how it
251 operates.
252
253 `--help'
254 `-h'
255 Print a summary of all of the options to `configure', and exit.
256
257 `--help=short'
258 `--help=recursive'
259 Print a summary of the options unique to this package's
260 `configure', and exit. The `short' variant lists options used
261 only in the top level, while the `recursive' variant lists options
262 also present in any nested packages.
263
264 `--version'
265 `-V'
266 Print the version of Autoconf used to generate the `configure'
267 script, and exit.
268
269 `--cache-file=FILE'
270 Enable the cache: use and save the results of the tests in FILE,
271 traditionally `config.cache'. FILE defaults to `/dev/null' to
272 disable caching.
273
274 `--config-cache'
275 `-C'
276 Alias for `--cache-file=config.cache'.
277
278 `--quiet'
279 `--silent'
280 `-q'
281 Do not print messages saying which checks are being made. To
282 suppress all normal output, redirect it to `/dev/null' (any error
283 messages will still be shown).
284
285 `--srcdir=DIR'
286 Look for the package's source code in directory DIR. Usually
287 `configure' can determine that directory automatically.
288
289 `--prefix=DIR'
290 Use DIR as the installation prefix. *Note Installation Names::
291 for more details, including other options available for fine-tuning
292 the installation locations.
293
294 `--no-create'
295 `-n'
296 Run the configure checks, but stop before creating any output
297 files.
298
299 `configure' also accepts some other, not widely useful, options. Run
300 `configure --help' for more details.
301
00 AUTOMAKE_OPTIONS = 1.7
1 ACLOCAL_AMFLAGS = -I m4
12 # Top-level Makefile.am for SASL
23 # Rob Earhart
34 #
6970 endif
7071
7172 SUBDIRS=include sasldb lib plugins utils doc man $(PWC) $(SAM) $(JAV) $(SAD)
72 EXTRA_DIST=config cmulocal win32 mac dlcompat-20010505 NTMakefile INSTALL.TXT \
73 EXTRA_DIST=config win32 mac dlcompat-20010505 NTMakefile INSTALL.TXT \
7374 libsasl2.pc.in
7475
7576 pkgconfigdir = $(libdir)/pkgconfig
+0
-918
Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 VPATH = @srcdir@
18 pkgdatadir = $(datadir)/@PACKAGE@
19 pkgincludedir = $(includedir)/@PACKAGE@
20 pkglibdir = $(libdir)/@PACKAGE@
21 pkglibexecdir = $(libexecdir)/@PACKAGE@
22 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23 install_sh_DATA = $(install_sh) -c -m 644
24 install_sh_PROGRAM = $(install_sh) -c
25 install_sh_SCRIPT = $(install_sh) -c
26 INSTALL_HEADER = $(INSTALL_DATA)
27 transform = $(program_transform_name)
28 NORMAL_INSTALL = :
29 PRE_INSTALL = :
30 POST_INSTALL = :
31 NORMAL_UNINSTALL = :
32 PRE_UNINSTALL = :
33 POST_UNINSTALL = :
34 build_triplet = @build@
35 host_triplet = @host@
36 target_triplet = @target@
37 subdir = .
38 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
39 $(srcdir)/Makefile.in $(srcdir)/config.h.in \
40 $(srcdir)/libsasl2.pc.in $(top_srcdir)/configure AUTHORS \
41 COPYING ChangeLog INSTALL NEWS config/config.guess \
42 config/config.sub config/depcomp config/install-sh \
43 config/ltconfig config/ltmain.sh config/missing \
44 config/mkinstalldirs
45 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
46 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
47 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
48 $(top_srcdir)/config/sasldb.m4 \
49 $(top_srcdir)/cmulocal/berkdb.m4 \
50 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
51 $(top_srcdir)/cmulocal/c-attribute.m4 \
52 $(top_srcdir)/cmulocal/common.m4 \
53 $(top_srcdir)/cmulocal/cyrus.m4 \
54 $(top_srcdir)/cmulocal/init_automake.m4 \
55 $(top_srcdir)/cmulocal/ipv6.m4 \
56 $(top_srcdir)/cmulocal/openldap.m4 \
57 $(top_srcdir)/cmulocal/openssl.m4 \
58 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
59 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
60 $(ACLOCAL_M4)
61 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
62 configure.lineno config.status.lineno
63 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
64 CONFIG_HEADER = config.h
65 CONFIG_CLEAN_FILES = libsasl2.pc
66 CONFIG_CLEAN_VPATH_FILES =
67 SOURCES =
68 DIST_SOURCES =
69 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
70 html-recursive info-recursive install-data-recursive \
71 install-dvi-recursive install-exec-recursive \
72 install-html-recursive install-info-recursive \
73 install-pdf-recursive install-ps-recursive install-recursive \
74 installcheck-recursive installdirs-recursive pdf-recursive \
75 ps-recursive uninstall-recursive
76 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
77 am__vpath_adj = case $$p in \
78 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
79 *) f=$$p;; \
80 esac;
81 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
82 am__install_max = 40
83 am__nobase_strip_setup = \
84 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
85 am__nobase_strip = \
86 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
87 am__nobase_list = $(am__nobase_strip_setup); \
88 for p in $$list; do echo "$$p $$p"; done | \
89 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
90 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
91 if (++n[$$2] == $(am__install_max)) \
92 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
93 END { for (dir in files) print dir, files[dir] }'
94 am__base_list = \
95 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
96 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
97 am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
98 DATA = $(pkgconfig_DATA)
99 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
100 distclean-recursive maintainer-clean-recursive
101 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
102 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
103 distdir dist dist-all distcheck
104 ETAGS = etags
105 CTAGS = ctags
106 DIST_SUBDIRS = include sasldb lib plugins utils doc man pwcheck sample \
107 java saslauthd
108 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
109 distdir = $(PACKAGE)-$(VERSION)
110 top_distdir = $(distdir)
111 am__remove_distdir = \
112 { test ! -d "$(distdir)" \
113 || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
114 && rm -fr "$(distdir)"; }; }
115 am__relativize = \
116 dir0=`pwd`; \
117 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
118 sed_rest='s,^[^/]*/*,,'; \
119 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
120 sed_butlast='s,/*[^/]*$$,,'; \
121 while test -n "$$dir1"; do \
122 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
123 if test "$$first" != "."; then \
124 if test "$$first" = ".."; then \
125 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
126 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
127 else \
128 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
129 if test "$$first2" = "$$first"; then \
130 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
131 else \
132 dir2="../$$dir2"; \
133 fi; \
134 dir0="$$dir0"/"$$first"; \
135 fi; \
136 fi; \
137 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
138 done; \
139 reldir="$$dir2"
140 DIST_ARCHIVES = $(distdir).tar.gz
141 GZIP_ENV = --best
142 distuninstallcheck_listfiles = find . -type f -print
143 distcleancheck_listfiles = find . -type f -print
144 ACLOCAL = @ACLOCAL@
145 AMTAR = @AMTAR@
146 AUTOCONF = @AUTOCONF@
147 AUTOHEADER = @AUTOHEADER@
148 AUTOMAKE = @AUTOMAKE@
149 AWK = @AWK@
150 CC = @CC@
151 CCDEPMODE = @CCDEPMODE@
152 CFLAGS = @CFLAGS@
153 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
154 CPP = @CPP@
155 CPPFLAGS = @CPPFLAGS@
156 CYGPATH_W = @CYGPATH_W@
157 DEFS = @DEFS@
158 DEPDIR = @DEPDIR@
159 DIRS = @DIRS@
160 DMALLOC_LIBS = @DMALLOC_LIBS@
161 ECHO_C = @ECHO_C@
162 ECHO_N = @ECHO_N@
163 ECHO_T = @ECHO_T@
164 EGREP = @EGREP@
165 EXEEXT = @EXEEXT@
166 GETADDRINFOOBJS = @GETADDRINFOOBJS@
167 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
168 GETSUBOPT = @GETSUBOPT@
169 GREP = @GREP@
170 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
171 GSSAPI_LIBS = @GSSAPI_LIBS@
172 INSTALL = @INSTALL@
173 INSTALL_DATA = @INSTALL_DATA@
174 INSTALL_PROGRAM = @INSTALL_PROGRAM@
175 INSTALL_SCRIPT = @INSTALL_SCRIPT@
176 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
177 IPCTYPE = @IPCTYPE@
178 JAVAC = @JAVAC@
179 JAVADOC = @JAVADOC@
180 JAVAH = @JAVAH@
181 JAVAROOT = @JAVAROOT@
182 JAVA_INCLUDES = @JAVA_INCLUDES@
183 LDFLAGS = @LDFLAGS@
184 LIBOBJS = @LIBOBJS@
185 LIBS = @LIBS@
186 LIBTOOL = @LIBTOOL@
187 LIB_CRYPT = @LIB_CRYPT@
188 LIB_DES = @LIB_DES@
189 LIB_DOOR = @LIB_DOOR@
190 LIB_LDAP = @LIB_LDAP@
191 LIB_MYSQL = @LIB_MYSQL@
192 LIB_PGSQL = @LIB_PGSQL@
193 LIB_SOCKET = @LIB_SOCKET@
194 LIB_SQLITE = @LIB_SQLITE@
195 LIB_SQLITE3 = @LIB_SQLITE3@
196 LN_S = @LN_S@
197 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
198 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
199 LTLIBOBJS = @LTLIBOBJS@
200 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
201 MAKEINFO = @MAKEINFO@
202 MKDIR_P = @MKDIR_P@
203 NM = @NM@
204 NTLM_LIBS = @NTLM_LIBS@
205 OBJEXT = @OBJEXT@
206 OTP_LIBS = @OTP_LIBS@
207 PACKAGE = @PACKAGE@
208 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
209 PACKAGE_NAME = @PACKAGE_NAME@
210 PACKAGE_STRING = @PACKAGE_STRING@
211 PACKAGE_TARNAME = @PACKAGE_TARNAME@
212 PACKAGE_VERSION = @PACKAGE_VERSION@
213 PASSDSS_LIBS = @PASSDSS_LIBS@
214 PATH_SEPARATOR = @PATH_SEPARATOR@
215 PLAIN_LIBS = @PLAIN_LIBS@
216 PURECOV = @PURECOV@
217 PURIFY = @PURIFY@
218 PWCHECKMETH = @PWCHECKMETH@
219 RANLIB = @RANLIB@
220 SASL_DB_BACKEND = @SASL_DB_BACKEND@
221 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
222 SASL_DB_INC = @SASL_DB_INC@
223 SASL_DB_LIB = @SASL_DB_LIB@
224 SASL_DB_MANS = @SASL_DB_MANS@
225 SASL_DB_UTILS = @SASL_DB_UTILS@
226 SASL_DL_LIB = @SASL_DL_LIB@
227 SASL_KRB_LIB = @SASL_KRB_LIB@
228 SASL_MECHS = @SASL_MECHS@
229 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
230 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
231 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
232 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
233 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
234 SCRAM_LIBS = @SCRAM_LIBS@
235 SET_MAKE = @SET_MAKE@
236 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
237 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
238 SHELL = @SHELL@
239 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
240 SNPRINTFOBJS = @SNPRINTFOBJS@
241 SRP_LIBS = @SRP_LIBS@
242 STRIP = @STRIP@
243 VERSION = @VERSION@
244 abs_builddir = @abs_builddir@
245 abs_srcdir = @abs_srcdir@
246 abs_top_builddir = @abs_top_builddir@
247 abs_top_srcdir = @abs_top_srcdir@
248 ac_ct_CC = @ac_ct_CC@
249 am__include = @am__include@
250 am__leading_dot = @am__leading_dot@
251 am__quote = @am__quote@
252 am__tar = @am__tar@
253 am__untar = @am__untar@
254 bindir = @bindir@
255 build = @build@
256 build_alias = @build_alias@
257 build_cpu = @build_cpu@
258 build_os = @build_os@
259 build_vendor = @build_vendor@
260 builddir = @builddir@
261 configdir = @configdir@
262 datadir = @datadir@
263 datarootdir = @datarootdir@
264 docdir = @docdir@
265 dvidir = @dvidir@
266 exec_prefix = @exec_prefix@
267 host = @host@
268 host_alias = @host_alias@
269 host_cpu = @host_cpu@
270 host_os = @host_os@
271 host_vendor = @host_vendor@
272 htmldir = @htmldir@
273 includedir = @includedir@
274 infodir = @infodir@
275 install_sh = @install_sh@
276 libdir = @libdir@
277 libexecdir = @libexecdir@
278 localedir = @localedir@
279 localstatedir = @localstatedir@
280 mandir = @mandir@
281 mkdir_p = @mkdir_p@
282 oldincludedir = @oldincludedir@
283 pdfdir = @pdfdir@
284 plugindir = @plugindir@
285 prefix = @prefix@
286 program_transform_name = @program_transform_name@
287 psdir = @psdir@
288 sbindir = @sbindir@
289 sharedstatedir = @sharedstatedir@
290 srcdir = @srcdir@
291 subdirs = @subdirs@
292 sysconfdir = @sysconfdir@
293 target = @target@
294 target_alias = @target_alias@
295 target_cpu = @target_cpu@
296 target_os = @target_os@
297 target_vendor = @target_vendor@
298 top_build_prefix = @top_build_prefix@
299 top_builddir = @top_builddir@
300 top_srcdir = @top_srcdir@
301 AUTOMAKE_OPTIONS = 1.7
302 @SASLAUTHD_FALSE@SAD =
303 # Top-level Makefile.am for SASL
304 # Rob Earhart
305 #
306 ################################################################
307 # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
308 #
309 # Redistribution and use in source and binary forms, with or without
310 # modification, are permitted provided that the following conditions
311 # are met:
312 #
313 # 1. Redistributions of source code must retain the above copyright
314 # notice, this list of conditions and the following disclaimer.
315 #
316 # 2. Redistributions in binary form must reproduce the above copyright
317 # notice, this list of conditions and the following disclaimer in
318 # the documentation and/or other materials provided with the
319 # distribution.
320 #
321 # 3. The name "Carnegie Mellon University" must not be used to
322 # endorse or promote products derived from this software without
323 # prior written permission. For permission or any other legal
324 # details, please contact
325 # Office of Technology Transfer
326 # Carnegie Mellon University
327 # 5000 Forbes Avenue
328 # Pittsburgh, PA 15213-3890
329 # (412) 268-4387, fax: (412) 268-7395
330 # tech-transfer@andrew.cmu.edu
331 #
332 # 4. Redistributions of any form whatsoever must retain the following
333 # acknowledgment:
334 # "This product includes software developed by Computing Services
335 # at Carnegie Mellon University (http://www.cmu.edu/computing/)."
336 #
337 # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
338 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
339 # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
340 # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
341 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
342 # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
343 # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
344 #
345 ################################################################
346 @SASLAUTHD_TRUE@SAD = saslauthd
347 @PWCHECK_FALSE@PWC =
348 @PWCHECK_TRUE@PWC = pwcheck
349 @SAMPLE_FALSE@SAM =
350 @SAMPLE_TRUE@SAM = sample
351 @JAVA_FALSE@JAV =
352 @JAVA_TRUE@JAV = java
353 @MACOSX_FALSE@INSTALLOSX =
354 @MACOSX_TRUE@INSTALLOSX = install-exec-local-osx
355 SUBDIRS = include sasldb lib plugins utils doc man $(PWC) $(SAM) $(JAV) $(SAD)
356 EXTRA_DIST = config cmulocal win32 mac dlcompat-20010505 NTMakefile INSTALL.TXT \
357 libsasl2.pc.in
358
359 pkgconfigdir = $(libdir)/pkgconfig
360 pkgconfig_DATA = libsasl2.pc
361 framedir = /Library/Frameworks/SASL2.framework
362 all: config.h
363 $(MAKE) $(AM_MAKEFLAGS) all-recursive
364
365 .SUFFIXES:
366 am--refresh:
367 @:
368 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
369 @for dep in $?; do \
370 case '$(am__configure_deps)' in \
371 *$$dep*) \
372 echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
373 $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
374 && exit 0; \
375 exit 1;; \
376 esac; \
377 done; \
378 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
379 $(am__cd) $(top_srcdir) && \
380 $(AUTOMAKE) --gnu Makefile
381 .PRECIOUS: Makefile
382 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
383 @case '$?' in \
384 *config.status*) \
385 echo ' $(SHELL) ./config.status'; \
386 $(SHELL) ./config.status;; \
387 *) \
388 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
389 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
390 esac;
391
392 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
393 $(SHELL) ./config.status --recheck
394
395 $(top_srcdir)/configure: $(am__configure_deps)
396 $(am__cd) $(srcdir) && $(AUTOCONF)
397 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
398 $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
399 $(am__aclocal_m4_deps):
400
401 config.h: stamp-h1
402 @if test ! -f $@; then \
403 rm -f stamp-h1; \
404 $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
405 else :; fi
406
407 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
408 @rm -f stamp-h1
409 cd $(top_builddir) && $(SHELL) ./config.status config.h
410 $(srcdir)/config.h.in: $(am__configure_deps)
411 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
412 rm -f stamp-h1
413 touch $@
414
415 distclean-hdr:
416 -rm -f config.h stamp-h1
417 libsasl2.pc: $(top_builddir)/config.status $(srcdir)/libsasl2.pc.in
418 cd $(top_builddir) && $(SHELL) ./config.status $@
419
420 mostlyclean-libtool:
421 -rm -f *.lo
422
423 clean-libtool:
424 -rm -rf .libs _libs
425
426 distclean-libtool:
427 -rm -f libtool config.lt
428 install-pkgconfigDATA: $(pkgconfig_DATA)
429 @$(NORMAL_INSTALL)
430 test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
431 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
432 for p in $$list; do \
433 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
434 echo "$$d$$p"; \
435 done | $(am__base_list) | \
436 while read files; do \
437 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
438 $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
439 done
440
441 uninstall-pkgconfigDATA:
442 @$(NORMAL_UNINSTALL)
443 @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
444 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
445 test -n "$$files" || exit 0; \
446 echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
447 cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
448
449 # This directory's subdirectories are mostly independent; you can cd
450 # into them and run `make' without going through this Makefile.
451 # To change the values of `make' variables: instead of editing Makefiles,
452 # (1) if the variable is set in `config.status', edit `config.status'
453 # (which will cause the Makefiles to be regenerated when you run `make');
454 # (2) otherwise, pass the desired values on the `make' command line.
455 $(RECURSIVE_TARGETS):
456 @failcom='exit 1'; \
457 for f in x $$MAKEFLAGS; do \
458 case $$f in \
459 *=* | --[!k]*);; \
460 *k*) failcom='fail=yes';; \
461 esac; \
462 done; \
463 dot_seen=no; \
464 target=`echo $@ | sed s/-recursive//`; \
465 list='$(SUBDIRS)'; for subdir in $$list; do \
466 echo "Making $$target in $$subdir"; \
467 if test "$$subdir" = "."; then \
468 dot_seen=yes; \
469 local_target="$$target-am"; \
470 else \
471 local_target="$$target"; \
472 fi; \
473 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
474 || eval $$failcom; \
475 done; \
476 if test "$$dot_seen" = "no"; then \
477 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
478 fi; test -z "$$fail"
479
480 $(RECURSIVE_CLEAN_TARGETS):
481 @failcom='exit 1'; \
482 for f in x $$MAKEFLAGS; do \
483 case $$f in \
484 *=* | --[!k]*);; \
485 *k*) failcom='fail=yes';; \
486 esac; \
487 done; \
488 dot_seen=no; \
489 case "$@" in \
490 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
491 *) list='$(SUBDIRS)' ;; \
492 esac; \
493 rev=''; for subdir in $$list; do \
494 if test "$$subdir" = "."; then :; else \
495 rev="$$subdir $$rev"; \
496 fi; \
497 done; \
498 rev="$$rev ."; \
499 target=`echo $@ | sed s/-recursive//`; \
500 for subdir in $$rev; do \
501 echo "Making $$target in $$subdir"; \
502 if test "$$subdir" = "."; then \
503 local_target="$$target-am"; \
504 else \
505 local_target="$$target"; \
506 fi; \
507 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
508 || eval $$failcom; \
509 done && test -z "$$fail"
510 tags-recursive:
511 list='$(SUBDIRS)'; for subdir in $$list; do \
512 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
513 done
514 ctags-recursive:
515 list='$(SUBDIRS)'; for subdir in $$list; do \
516 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
517 done
518
519 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
520 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
521 unique=`for i in $$list; do \
522 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
523 done | \
524 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
525 END { if (nonempty) { for (i in files) print i; }; }'`; \
526 mkid -fID $$unique
527 tags: TAGS
528
529 TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
530 $(TAGS_FILES) $(LISP)
531 set x; \
532 here=`pwd`; \
533 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
534 include_option=--etags-include; \
535 empty_fix=.; \
536 else \
537 include_option=--include; \
538 empty_fix=; \
539 fi; \
540 list='$(SUBDIRS)'; for subdir in $$list; do \
541 if test "$$subdir" = .; then :; else \
542 test ! -f $$subdir/TAGS || \
543 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
544 fi; \
545 done; \
546 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
547 unique=`for i in $$list; do \
548 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
549 done | \
550 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
551 END { if (nonempty) { for (i in files) print i; }; }'`; \
552 shift; \
553 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
554 test -n "$$unique" || unique=$$empty_fix; \
555 if test $$# -gt 0; then \
556 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
557 "$$@" $$unique; \
558 else \
559 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
560 $$unique; \
561 fi; \
562 fi
563 ctags: CTAGS
564 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
565 $(TAGS_FILES) $(LISP)
566 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
567 unique=`for i in $$list; do \
568 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
569 done | \
570 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
571 END { if (nonempty) { for (i in files) print i; }; }'`; \
572 test -z "$(CTAGS_ARGS)$$unique" \
573 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
574 $$unique
575
576 GTAGS:
577 here=`$(am__cd) $(top_builddir) && pwd` \
578 && $(am__cd) $(top_srcdir) \
579 && gtags -i $(GTAGS_ARGS) "$$here"
580
581 distclean-tags:
582 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
583
584 distdir: $(DISTFILES)
585 $(am__remove_distdir)
586 test -d "$(distdir)" || mkdir "$(distdir)"
587 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
588 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
589 list='$(DISTFILES)'; \
590 dist_files=`for file in $$list; do echo $$file; done | \
591 sed -e "s|^$$srcdirstrip/||;t" \
592 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
593 case $$dist_files in \
594 */*) $(MKDIR_P) `echo "$$dist_files" | \
595 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
596 sort -u` ;; \
597 esac; \
598 for file in $$dist_files; do \
599 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
600 if test -d $$d/$$file; then \
601 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
602 if test -d "$(distdir)/$$file"; then \
603 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
604 fi; \
605 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
606 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
607 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
608 fi; \
609 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
610 else \
611 test -f "$(distdir)/$$file" \
612 || cp -p $$d/$$file "$(distdir)/$$file" \
613 || exit 1; \
614 fi; \
615 done
616 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
617 if test "$$subdir" = .; then :; else \
618 test -d "$(distdir)/$$subdir" \
619 || $(MKDIR_P) "$(distdir)/$$subdir" \
620 || exit 1; \
621 fi; \
622 done
623 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
624 if test "$$subdir" = .; then :; else \
625 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
626 $(am__relativize); \
627 new_distdir=$$reldir; \
628 dir1=$$subdir; dir2="$(top_distdir)"; \
629 $(am__relativize); \
630 new_top_distdir=$$reldir; \
631 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
632 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
633 ($(am__cd) $$subdir && \
634 $(MAKE) $(AM_MAKEFLAGS) \
635 top_distdir="$$new_top_distdir" \
636 distdir="$$new_distdir" \
637 am__remove_distdir=: \
638 am__skip_length_check=: \
639 am__skip_mode_fix=: \
640 distdir) \
641 || exit 1; \
642 fi; \
643 done
644 $(MAKE) $(AM_MAKEFLAGS) \
645 top_distdir="$(top_distdir)" distdir="$(distdir)" \
646 dist-hook
647 -test -n "$(am__skip_mode_fix)" \
648 || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
649 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
650 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
651 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
652 || chmod -R a+r "$(distdir)"
653 dist-gzip: distdir
654 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
655 $(am__remove_distdir)
656
657 dist-bzip2: distdir
658 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
659 $(am__remove_distdir)
660
661 dist-lzma: distdir
662 tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
663 $(am__remove_distdir)
664
665 dist-xz: distdir
666 tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
667 $(am__remove_distdir)
668
669 dist-tarZ: distdir
670 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
671 $(am__remove_distdir)
672
673 dist-shar: distdir
674 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
675 $(am__remove_distdir)
676
677 dist-zip: distdir
678 -rm -f $(distdir).zip
679 zip -rq $(distdir).zip $(distdir)
680 $(am__remove_distdir)
681
682 dist dist-all: distdir
683 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
684 $(am__remove_distdir)
685
686 # This target untars the dist file and tries a VPATH configuration. Then
687 # it guarantees that the distribution is self-contained by making another
688 # tarfile.
689 distcheck: dist
690 case '$(DIST_ARCHIVES)' in \
691 *.tar.gz*) \
692 GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
693 *.tar.bz2*) \
694 bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
695 *.tar.lzma*) \
696 unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
697 *.tar.xz*) \
698 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
699 *.tar.Z*) \
700 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
701 *.shar.gz*) \
702 GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
703 *.zip*) \
704 unzip $(distdir).zip ;;\
705 esac
706 chmod -R a-w $(distdir); chmod a+w $(distdir)
707 mkdir $(distdir)/_build
708 mkdir $(distdir)/_inst
709 chmod a-w $(distdir)
710 test -d $(distdir)/_build || exit 0; \
711 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
712 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
713 && am__cwd=`pwd` \
714 && $(am__cd) $(distdir)/_build \
715 && ../configure --srcdir=.. --prefix="$$dc_install_base" \
716 $(DISTCHECK_CONFIGURE_FLAGS) \
717 && $(MAKE) $(AM_MAKEFLAGS) \
718 && $(MAKE) $(AM_MAKEFLAGS) dvi \
719 && $(MAKE) $(AM_MAKEFLAGS) check \
720 && $(MAKE) $(AM_MAKEFLAGS) install \
721 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
722 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
723 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
724 distuninstallcheck \
725 && chmod -R a-w "$$dc_install_base" \
726 && ({ \
727 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
728 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
729 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
730 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
731 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
732 } || { rm -rf "$$dc_destdir"; exit 1; }) \
733 && rm -rf "$$dc_destdir" \
734 && $(MAKE) $(AM_MAKEFLAGS) dist \
735 && rm -rf $(DIST_ARCHIVES) \
736 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
737 && cd "$$am__cwd" \
738 || exit 1
739 $(am__remove_distdir)
740 @(echo "$(distdir) archives ready for distribution: "; \
741 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
742 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
743 distuninstallcheck:
744 @$(am__cd) '$(distuninstallcheck_dir)' \
745 && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
746 || { echo "ERROR: files left after uninstall:" ; \
747 if test -n "$(DESTDIR)"; then \
748 echo " (check DESTDIR support)"; \
749 fi ; \
750 $(distuninstallcheck_listfiles) ; \
751 exit 1; } >&2
752 distcleancheck: distclean
753 @if test '$(srcdir)' = . ; then \
754 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
755 exit 1 ; \
756 fi
757 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
758 || { echo "ERROR: files left in build directory after distclean:" ; \
759 $(distcleancheck_listfiles) ; \
760 exit 1; } >&2
761 check-am: all-am
762 check: check-recursive
763 all-am: Makefile $(DATA) config.h
764 installdirs: installdirs-recursive
765 installdirs-am:
766 for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
767 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
768 done
769 install: install-recursive
770 install-exec: install-exec-recursive
771 install-data: install-data-recursive
772 uninstall: uninstall-recursive
773
774 install-am: all-am
775 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
776
777 installcheck: installcheck-recursive
778 install-strip:
779 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
780 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
781 `test -z '$(STRIP)' || \
782 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
783 mostlyclean-generic:
784
785 clean-generic:
786
787 distclean-generic:
788 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
789 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
790
791 maintainer-clean-generic:
792 @echo "This command is intended for maintainers to use"
793 @echo "it deletes files that may require special tools to rebuild."
794 clean: clean-recursive
795
796 clean-am: clean-generic clean-libtool mostlyclean-am
797
798 distclean: distclean-recursive
799 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
800 -rm -f Makefile
801 distclean-am: clean-am distclean-generic distclean-hdr \
802 distclean-libtool distclean-tags
803
804 dvi: dvi-recursive
805
806 dvi-am:
807
808 html: html-recursive
809
810 html-am:
811
812 info: info-recursive
813
814 info-am:
815
816 install-data-am: install-pkgconfigDATA
817
818 install-dvi: install-dvi-recursive
819
820 install-dvi-am:
821
822 install-exec-am: install-exec-local
823
824 install-html: install-html-recursive
825
826 install-html-am:
827
828 install-info: install-info-recursive
829
830 install-info-am:
831
832 install-man:
833
834 install-pdf: install-pdf-recursive
835
836 install-pdf-am:
837
838 install-ps: install-ps-recursive
839
840 install-ps-am:
841
842 installcheck-am:
843
844 maintainer-clean: maintainer-clean-recursive
845 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
846 -rm -rf $(top_srcdir)/autom4te.cache
847 -rm -f Makefile
848 maintainer-clean-am: distclean-am maintainer-clean-generic
849
850 mostlyclean: mostlyclean-recursive
851
852 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
853
854 pdf: pdf-recursive
855
856 pdf-am:
857
858 ps: ps-recursive
859
860 ps-am:
861
862 uninstall-am: uninstall-pkgconfigDATA
863
864 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
865 ctags-recursive install-am install-strip tags-recursive
866
867 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
868 all all-am am--refresh check check-am clean clean-generic \
869 clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
870 dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \
871 dist-zip distcheck distclean distclean-generic distclean-hdr \
872 distclean-libtool distclean-tags distcleancheck distdir \
873 distuninstallcheck dvi dvi-am html html-am info info-am \
874 install install-am install-data install-data-am install-dvi \
875 install-dvi-am install-exec install-exec-am install-exec-local \
876 install-html install-html-am install-info install-info-am \
877 install-man install-pdf install-pdf-am install-pkgconfigDATA \
878 install-ps install-ps-am install-strip installcheck \
879 installcheck-am installdirs installdirs-am maintainer-clean \
880 maintainer-clean-generic mostlyclean mostlyclean-generic \
881 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
882 uninstall uninstall-am uninstall-pkgconfigDATA
883
884
885 dist-hook:
886 @find $(distdir) -exec chmod o+w {} ';'
887 @find $(distdir) -name CVS -print | xargs -t rm -rf
888 (cd $(distdir)/plugins && sh makeinit.sh)
889 install-exec-local: $(INSTALLOSX)
890 @if test "$(plugindir)" != "$(prefix)/lib/sasl2"; then \
891 echo "********************************************************"; \
892 echo "* WARNING:"; \
893 echo "* Plugins are being installed into $(prefix)/lib/sasl2,"; \
894 echo "* but the library will look for them in $(plugindir)."; \
895 echo "* You need to make sure that the plugins will eventually"; \
896 echo "* be in $(plugindir) -- the easiest way is to make a"; \
897 echo "* symbolic link from $(plugindir) to $(prefix)/lib/sasl2,"; \
898 echo "* but this may not be appropriate for your site, so this"; \
899 echo "* installation procedure won't do it for you."; \
900 echo "*"; \
901 echo "* If you don't want to do this for some reason, you can"; \
902 echo "* set the location where the library will look for plugins"; \
903 echo "* by setting the environment variable SASL_PATH to the path"; \
904 echo "* the library should use."; \
905 echo "********************************************************"; \
906 fi
907 install-exec-local-osx:
908 $(mkinstalldirs) $(framedir)/Versions/A/Headers
909 $(mkinstalldirs) $(framedir)/Versions/A/Resources
910 cd $(framedir)/Versions ; ln -fs A Current
911 cd $(framedir) ; ln -fs Versions/A/Headers .
912 cd $(framedir) ; ln -fs Versions/A/Resources .
913 $(INSTALL_DATA) $(srcdir)/config/Info.plist $(framedir)/Versions/A/Resources
914
915 # Tell versions [3.59,3.63) of GNU make to not export all variables.
916 # Otherwise a system limit (for SysV at least) may be exceeded.
917 .NOEXPORT:
0 To build the GS2 SASL mechanism, you need MIT Kerberos 1.9.
1
2 Please e-mail lukeh@padl.com with any bug reports.
0 #!/bin/sh
1 smake -gnu init install
2 exit 0
3
4 To wash, "smake -gnu wash install".
5
6 Use the vendor cc if possible on platforms which have purify (it has
7 problems dealing with code produced by gcc 2.8.1).
8
9 On IRIX, setenv CC cc and setenv CFLAGS -O2 - no -sopt for now
10 On Solaris, setenv CC cc and setenv CFLAGS -fast
11
12 ----
13 To release:
14 - run testsuite successfully
15 - compile successfully without kerberos or gssapi support
16 - compile successfully on all andrew systypes
17 - increment version in configure.in and saslauthd/configure.in
18 - synchronize version with include/sasl.h, win32/common.mak and
19 win32/include/config.h
20 - increment version in saslauthd/configure.in as needed
21 - modify library versions in lib/Makefile.am, sasldb/Makefile.am
22 and plugins/Makefile.am accordingly (see libtool info file for details)
23 - add release notice to ChangeLog
24 - add user visible changes to NEWS
25
26 - tag the GIT repository with sasl-Major_Minor_Revision
27 - check out the tag into a CLEAN repository
28 - to make tarball: make distcheck (make sure you are on a machine that
29 is not using GNU tar! Solaris tar seems to not get along with it well.)
30 - compile on non-andrew machine
31 - be sure to compile saslauthd as well
32
33 - copy to /afs/andrew/system/archive/cmu/anonftp/pub/cyrus-mail
34 - sign the distribution (pgp -sb foo.tar.gz)
35
36 - update asg.web.cmu.edu
37 - announce to:
38 cyrus-announce@lists.andrew.cmu.edu
39 info-cyrus@andrew.cmu.edu
40 cyrus-sasl@lists.andrew.cmu.edu
41
42 comp.os.linux.announce
43 comp.mail.imap
44 comp.mail.sendmail after 8.10 comes out
45
46 www.freshmeat.net
47
48 sample announcement:
49
50 To: cyrus-sasl@lists.andrew.cmu.edu, info-cyrus@andrew.cmu.edu
51 Subject: Beta release of Cyrus SASL 1.5.18
52 BCC: tmartin+sent@cyrus.andrew.cmu.edu
53 --text follows this line--
54
55 I'd like to announce the beta release of Cyrus SASL 1.5.18 on
56 ftp.andrew.cmu.edu. This version includes bug fixes, a java SASL
57 library that conforms to draft-weltman-java-sasl-02.txt, and man pages
58 for all functions. This is a beta release because it has not been
59 thoroughly tested against all applications that make use of it.
60
61 Please send any feedback either to cyrus-sasl@lists.andrew.cmu.edu
62 (public list) or to cyrus-bugs@andrew.cmu.edu.
63
64 Download at:
65 ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/BETA/cyrus-sasl-1.5.18.tar.gz
66
67 Thanks,
68 Tim Martin
69
70
71 To: post+comp.mail.imap@andrew.cmu.edu
72 Subject: Cyrus SASL 1.5.18 released (authentication library)
73 BCC: tmartin+sent@cyrus.andrew.cmu.edu
74 --text follows this line--
75
76 I'm pleased to announce the release of the Cyrus SASL library, version
77 1.5.18. This represents primarily a bugfix release with a few new
78 features, such as a java SASL library conforming to
79 draft-weltman-java-sasl-02.txt, and man pages for all functions.
80
81 The Cyrus SASL library is a generic library for SASL authentication,
82 as used in SMTP and IMAP protocols. It's used for authentication by
83 the Cyrus IMAP server as well as the Sendmail 8.10 release.
84
85 Make sure you read the README file.
86
87 Download at:
88 ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/BETA/cyrus-sasl-1.5.18.tar.gz
89
90
91 Please report bugs to cyrus-bugs@andrew.cmu.edu.
92
93 Join the cyrus-sasl@lists.andrew.cmu.edu mailing list by
94 cyrus-sasl-request@lists.andrew.cmu.edu
95
96 Thanks,
97 Tim Martin
98
99
100 X-Mailer: BatIMail version 3.2
101 To: post+comp.mail.sendmail@andrew.cmu.edu
102 Subject: Cyrus SASL 1.5.18 released (authentication library)
103 BCC: tmartin+sent@cyrus.andrew.cmu.edu
104 Mime-Version: 1.0 (generated by tm-edit 7.108)
105 Content-Type: text/plain; charset=US-ASCII
106 --text follows this line--
107
108 I'm pleased to announce the release of the Cyrus SASL library, version
109 1.5.18. This represents primarily a bugfix release with a few new
110 features, such as a java SASL library conforming to
111 draft-weltman-java-sasl-02.txt, and man pages for all functions.
112
113 The Cyrus SASL library is a generic library for SASL
114 authentication. It's used for authentication by the Sendmail 8.10
115 release as well as the Cyrus IMAP server.
116
117 Make sure you read the README file if you are upgrading.
118
119 Please report bugs to cyrus-bugs@andrew.cmu.edu.
120
121 Join the cyrus-sasl@lists.andrew.cmu.edu mailing list by
122 cyrus-sasl-request@lists.andrew.cmu.edu
123
124 Download at:
125 ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/BETA/cyrus-sasl-1.5.18.tar.gz
126
127
128 Thanks,
129 Tim Martin
0 ldapdb auxprop plugin is contributed to cyrus-sasl by the OpenLDAP Project
1 (http://www.openldap.org) under the license below. The code is written by
2 Howard Chu (hyc@openldap.org) and it is integrated to the cyrus-sasl
3 distribution by Igor Brezac (igor@ypass.net). See doc/options.html for the
4 plugin documentation.
5
6 The OpenLDAP Public License
7 Version 2.8, 17 August 2003
8
9 Redistribution and use of this software and associated documentation
10 ("Software"), with or without modification, are permitted provided
11 that the following conditions are met:
12
13 1. Redistributions in source form must retain copyright statements
14 and notices,
15
16 2. Redistributions in binary form must reproduce applicable copyright
17 statements and notices, this list of conditions, and the following
18 disclaimer in the documentation and/or other materials provided
19 with the distribution, and
20
21 3. Redistributions must contain a verbatim copy of this document.
22
23 The OpenLDAP Foundation may revise this license from time to time.
24 Each revision is distinguished by a version number. You may use
25 this Software under terms of this license revision or under the
26 terms of any subsequent revision of the license.
27
28 THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS
29 CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
30 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
31 AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
32 SHALL THE OPENLDAP FOUNDATION, ITS CONTRIBUTORS, OR THE AUTHOR(S)
33 OR OWNER(S) OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
34 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
35 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
36 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
37 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
39 ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40 POSSIBILITY OF SUCH DAMAGE.
41
42 The names of the authors and copyright holders must not be used in
43 advertising or otherwise to promote the sale, use or other dealing
44 in this Software without specific, written prior permission. Title
45 to copyright in this Software shall at all times remain with copyright
46 holders.
47
48 OpenLDAP is a registered trademark of the OpenLDAP Foundation.
49
50 Copyright 1999-2003 The OpenLDAP Foundation, Redwood City,
51 California, USA. All Rights Reserved. Permission to copy and
52 distribute verbatim copies of this document is granted.
0
1 CMU does not provide any binary distributions.
2
3 The following sites are known to have rpms:
4
5 http://home.teleport.ch/simix/
+0
-977
aclocal.m4 less more
0 # generated automatically by aclocal 1.11 -*- Autoconf -*-
1
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 # PARTICULAR PURPOSE.
12
13 m4_ifndef([AC_AUTOCONF_VERSION],
14 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
15 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
16 [m4_warning([this file was generated for autoconf 2.63.
17 You have another version of autoconf. It may work, but is not guaranteed to.
18 If you have problems, you may need to regenerate the build system entirely.
19 To do so, use the procedure documented by the package, typically `autoreconf'.])])
20
21 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
22 #
23 # This file is free software; the Free Software Foundation
24 # gives unlimited permission to copy and/or distribute it,
25 # with or without modifications, as long as this notice is preserved.
26
27 # AM_AUTOMAKE_VERSION(VERSION)
28 # ----------------------------
29 # Automake X.Y traces this macro to ensure aclocal.m4 has been
30 # generated from the m4 files accompanying Automake X.Y.
31 # (This private macro should not be called outside this file.)
32 AC_DEFUN([AM_AUTOMAKE_VERSION],
33 [am__api_version='1.11'
34 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
35 dnl require some minimum version. Point them to the right macro.
36 m4_if([$1], [1.11], [],
37 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
38 ])
39
40 # _AM_AUTOCONF_VERSION(VERSION)
41 # -----------------------------
42 # aclocal traces this macro to find the Autoconf version.
43 # This is a private macro too. Using m4_define simplifies
44 # the logic in aclocal, which can simply ignore this definition.
45 m4_define([_AM_AUTOCONF_VERSION], [])
46
47 # AM_SET_CURRENT_AUTOMAKE_VERSION
48 # -------------------------------
49 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
50 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
51 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
52 [AM_AUTOMAKE_VERSION([1.11])dnl
53 m4_ifndef([AC_AUTOCONF_VERSION],
54 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
55 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
56
57 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
58
59 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
60 #
61 # This file is free software; the Free Software Foundation
62 # gives unlimited permission to copy and/or distribute it,
63 # with or without modifications, as long as this notice is preserved.
64
65 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
66 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
67 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
68 #
69 # Of course, Automake must honor this variable whenever it calls a
70 # tool from the auxiliary directory. The problem is that $srcdir (and
71 # therefore $ac_aux_dir as well) can be either absolute or relative,
72 # depending on how configure is run. This is pretty annoying, since
73 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
74 # source directory, any form will work fine, but in subdirectories a
75 # relative path needs to be adjusted first.
76 #
77 # $ac_aux_dir/missing
78 # fails when called from a subdirectory if $ac_aux_dir is relative
79 # $top_srcdir/$ac_aux_dir/missing
80 # fails if $ac_aux_dir is absolute,
81 # fails when called from a subdirectory in a VPATH build with
82 # a relative $ac_aux_dir
83 #
84 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
85 # are both prefixed by $srcdir. In an in-source build this is usually
86 # harmless because $srcdir is `.', but things will broke when you
87 # start a VPATH build or use an absolute $srcdir.
88 #
89 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
90 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
91 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
92 # and then we would define $MISSING as
93 # MISSING="\${SHELL} $am_aux_dir/missing"
94 # This will work as long as MISSING is not called from configure, because
95 # unfortunately $(top_srcdir) has no meaning in configure.
96 # However there are other variables, like CC, which are often used in
97 # configure, and could therefore not use this "fixed" $ac_aux_dir.
98 #
99 # Another solution, used here, is to always expand $ac_aux_dir to an
100 # absolute PATH. The drawback is that using absolute paths prevent a
101 # configured tree to be moved without reconfiguration.
102
103 AC_DEFUN([AM_AUX_DIR_EXPAND],
104 [dnl Rely on autoconf to set up CDPATH properly.
105 AC_PREREQ([2.50])dnl
106 # expand $ac_aux_dir to an absolute path
107 am_aux_dir=`cd $ac_aux_dir && pwd`
108 ])
109
110 # AM_CONDITIONAL -*- Autoconf -*-
111
112 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
113 # Free Software Foundation, Inc.
114 #
115 # This file is free software; the Free Software Foundation
116 # gives unlimited permission to copy and/or distribute it,
117 # with or without modifications, as long as this notice is preserved.
118
119 # serial 9
120
121 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
122 # -------------------------------------
123 # Define a conditional.
124 AC_DEFUN([AM_CONDITIONAL],
125 [AC_PREREQ(2.52)dnl
126 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
127 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
128 AC_SUBST([$1_TRUE])dnl
129 AC_SUBST([$1_FALSE])dnl
130 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
131 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
132 m4_define([_AM_COND_VALUE_$1], [$2])dnl
133 if $2; then
134 $1_TRUE=
135 $1_FALSE='#'
136 else
137 $1_TRUE='#'
138 $1_FALSE=
139 fi
140 AC_CONFIG_COMMANDS_PRE(
141 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
142 AC_MSG_ERROR([[conditional "$1" was never defined.
143 Usually this means the macro was only invoked conditionally.]])
144 fi])])
145
146 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
147 # Free Software Foundation, Inc.
148 #
149 # This file is free software; the Free Software Foundation
150 # gives unlimited permission to copy and/or distribute it,
151 # with or without modifications, as long as this notice is preserved.
152
153 # serial 10
154
155 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
156 # written in clear, in which case automake, when reading aclocal.m4,
157 # will think it sees a *use*, and therefore will trigger all it's
158 # C support machinery. Also note that it means that autoscan, seeing
159 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
160
161
162 # _AM_DEPENDENCIES(NAME)
163 # ----------------------
164 # See how the compiler implements dependency checking.
165 # NAME is "CC", "CXX", "GCJ", or "OBJC".
166 # We try a few techniques and use that to set a single cache variable.
167 #
168 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
169 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
170 # dependency, and given that the user is not expected to run this macro,
171 # just rely on AC_PROG_CC.
172 AC_DEFUN([_AM_DEPENDENCIES],
173 [AC_REQUIRE([AM_SET_DEPDIR])dnl
174 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
175 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
176 AC_REQUIRE([AM_DEP_TRACK])dnl
177
178 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
179 [$1], CXX, [depcc="$CXX" am_compiler_list=],
180 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
181 [$1], UPC, [depcc="$UPC" am_compiler_list=],
182 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
183 [depcc="$$1" am_compiler_list=])
184
185 AC_CACHE_CHECK([dependency style of $depcc],
186 [am_cv_$1_dependencies_compiler_type],
187 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
188 # We make a subdir and do the tests there. Otherwise we can end up
189 # making bogus files that we don't know about and never remove. For
190 # instance it was reported that on HP-UX the gcc test will end up
191 # making a dummy file named `D' -- because `-MD' means `put the output
192 # in D'.
193 mkdir conftest.dir
194 # Copy depcomp to subdir because otherwise we won't find it if we're
195 # using a relative directory.
196 cp "$am_depcomp" conftest.dir
197 cd conftest.dir
198 # We will build objects and dependencies in a subdirectory because
199 # it helps to detect inapplicable dependency modes. For instance
200 # both Tru64's cc and ICC support -MD to output dependencies as a
201 # side effect of compilation, but ICC will put the dependencies in
202 # the current directory while Tru64 will put them in the object
203 # directory.
204 mkdir sub
205
206 am_cv_$1_dependencies_compiler_type=none
207 if test "$am_compiler_list" = ""; then
208 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
209 fi
210 am__universal=false
211 m4_case([$1], [CC],
212 [case " $depcc " in #(
213 *\ -arch\ *\ -arch\ *) am__universal=true ;;
214 esac],
215 [CXX],
216 [case " $depcc " in #(
217 *\ -arch\ *\ -arch\ *) am__universal=true ;;
218 esac])
219
220 for depmode in $am_compiler_list; do
221 # Setup a source with many dependencies, because some compilers
222 # like to wrap large dependency lists on column 80 (with \), and
223 # we should not choose a depcomp mode which is confused by this.
224 #
225 # We need to recreate these files for each test, as the compiler may
226 # overwrite some of them when testing with obscure command lines.
227 # This happens at least with the AIX C compiler.
228 : > sub/conftest.c
229 for i in 1 2 3 4 5 6; do
230 echo '#include "conftst'$i'.h"' >> sub/conftest.c
231 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
232 # Solaris 8's {/usr,}/bin/sh.
233 touch sub/conftst$i.h
234 done
235 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
236
237 # We check with `-c' and `-o' for the sake of the "dashmstdout"
238 # mode. It turns out that the SunPro C++ compiler does not properly
239 # handle `-M -o', and we need to detect this. Also, some Intel
240 # versions had trouble with output in subdirs
241 am__obj=sub/conftest.${OBJEXT-o}
242 am__minus_obj="-o $am__obj"
243 case $depmode in
244 gcc)
245 # This depmode causes a compiler race in universal mode.
246 test "$am__universal" = false || continue
247 ;;
248 nosideeffect)
249 # after this tag, mechanisms are not by side-effect, so they'll
250 # only be used when explicitly requested
251 if test "x$enable_dependency_tracking" = xyes; then
252 continue
253 else
254 break
255 fi
256 ;;
257 msvisualcpp | msvcmsys)
258 # This compiler won't grok `-c -o', but also, the minuso test has
259 # not run yet. These depmodes are late enough in the game, and
260 # so weak that their functioning should not be impacted.
261 am__obj=conftest.${OBJEXT-o}
262 am__minus_obj=
263 ;;
264 none) break ;;
265 esac
266 if depmode=$depmode \
267 source=sub/conftest.c object=$am__obj \
268 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
269 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
270 >/dev/null 2>conftest.err &&
271 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
272 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
273 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
274 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
275 # icc doesn't choke on unknown options, it will just issue warnings
276 # or remarks (even with -Werror). So we grep stderr for any message
277 # that says an option was ignored or not supported.
278 # When given -MP, icc 7.0 and 7.1 complain thusly:
279 # icc: Command line warning: ignoring option '-M'; no argument required
280 # The diagnosis changed in icc 8.0:
281 # icc: Command line remark: option '-MP' not supported
282 if (grep 'ignoring option' conftest.err ||
283 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
284 am_cv_$1_dependencies_compiler_type=$depmode
285 break
286 fi
287 fi
288 done
289
290 cd ..
291 rm -rf conftest.dir
292 else
293 am_cv_$1_dependencies_compiler_type=none
294 fi
295 ])
296 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
297 AM_CONDITIONAL([am__fastdep$1], [
298 test "x$enable_dependency_tracking" != xno \
299 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
300 ])
301
302
303 # AM_SET_DEPDIR
304 # -------------
305 # Choose a directory name for dependency files.
306 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
307 AC_DEFUN([AM_SET_DEPDIR],
308 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
309 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
310 ])
311
312
313 # AM_DEP_TRACK
314 # ------------
315 AC_DEFUN([AM_DEP_TRACK],
316 [AC_ARG_ENABLE(dependency-tracking,
317 [ --disable-dependency-tracking speeds up one-time build
318 --enable-dependency-tracking do not reject slow dependency extractors])
319 if test "x$enable_dependency_tracking" != xno; then
320 am_depcomp="$ac_aux_dir/depcomp"
321 AMDEPBACKSLASH='\'
322 fi
323 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
324 AC_SUBST([AMDEPBACKSLASH])dnl
325 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
326 ])
327
328 # Generate code to set up dependency tracking. -*- Autoconf -*-
329
330 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
331 # Free Software Foundation, Inc.
332 #
333 # This file is free software; the Free Software Foundation
334 # gives unlimited permission to copy and/or distribute it,
335 # with or without modifications, as long as this notice is preserved.
336
337 #serial 5
338
339 # _AM_OUTPUT_DEPENDENCY_COMMANDS
340 # ------------------------------
341 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
342 [{
343 # Autoconf 2.62 quotes --file arguments for eval, but not when files
344 # are listed without --file. Let's play safe and only enable the eval
345 # if we detect the quoting.
346 case $CONFIG_FILES in
347 *\'*) eval set x "$CONFIG_FILES" ;;
348 *) set x $CONFIG_FILES ;;
349 esac
350 shift
351 for mf
352 do
353 # Strip MF so we end up with the name of the file.
354 mf=`echo "$mf" | sed -e 's/:.*$//'`
355 # Check whether this is an Automake generated Makefile or not.
356 # We used to match only the files named `Makefile.in', but
357 # some people rename them; so instead we look at the file content.
358 # Grep'ing the first line is not enough: some people post-process
359 # each Makefile.in and add a new line on top of each file to say so.
360 # Grep'ing the whole file is not good either: AIX grep has a line
361 # limit of 2048, but all sed's we know have understand at least 4000.
362 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
363 dirpart=`AS_DIRNAME("$mf")`
364 else
365 continue
366 fi
367 # Extract the definition of DEPDIR, am__include, and am__quote
368 # from the Makefile without running `make'.
369 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
370 test -z "$DEPDIR" && continue
371 am__include=`sed -n 's/^am__include = //p' < "$mf"`
372 test -z "am__include" && continue
373 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
374 # When using ansi2knr, U may be empty or an underscore; expand it
375 U=`sed -n 's/^U = //p' < "$mf"`
376 # Find all dependency output files, they are included files with
377 # $(DEPDIR) in their names. We invoke sed twice because it is the
378 # simplest approach to changing $(DEPDIR) to its actual value in the
379 # expansion.
380 for file in `sed -n "
381 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
382 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
383 # Make sure the directory exists.
384 test -f "$dirpart/$file" && continue
385 fdir=`AS_DIRNAME(["$file"])`
386 AS_MKDIR_P([$dirpart/$fdir])
387 # echo "creating $dirpart/$file"
388 echo '# dummy' > "$dirpart/$file"
389 done
390 done
391 }
392 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
393
394
395 # AM_OUTPUT_DEPENDENCY_COMMANDS
396 # -----------------------------
397 # This macro should only be invoked once -- use via AC_REQUIRE.
398 #
399 # This code is only required when automatic dependency tracking
400 # is enabled. FIXME. This creates each `.P' file that we will
401 # need in order to bootstrap the dependency handling code.
402 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
403 [AC_CONFIG_COMMANDS([depfiles],
404 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
405 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
406 ])
407
408 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
409 # Free Software Foundation, Inc.
410 #
411 # This file is free software; the Free Software Foundation
412 # gives unlimited permission to copy and/or distribute it,
413 # with or without modifications, as long as this notice is preserved.
414
415 # serial 8
416
417 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
418 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
419
420 # Do all the work for Automake. -*- Autoconf -*-
421
422 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
423 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
424 #
425 # This file is free software; the Free Software Foundation
426 # gives unlimited permission to copy and/or distribute it,
427 # with or without modifications, as long as this notice is preserved.
428
429 # serial 16
430
431 # This macro actually does too much. Some checks are only needed if
432 # your package does certain things. But this isn't really a big deal.
433
434 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
435 # AM_INIT_AUTOMAKE([OPTIONS])
436 # -----------------------------------------------
437 # The call with PACKAGE and VERSION arguments is the old style
438 # call (pre autoconf-2.50), which is being phased out. PACKAGE
439 # and VERSION should now be passed to AC_INIT and removed from
440 # the call to AM_INIT_AUTOMAKE.
441 # We support both call styles for the transition. After
442 # the next Automake release, Autoconf can make the AC_INIT
443 # arguments mandatory, and then we can depend on a new Autoconf
444 # release and drop the old call support.
445 AC_DEFUN([AM_INIT_AUTOMAKE],
446 [AC_PREREQ([2.62])dnl
447 dnl Autoconf wants to disallow AM_ names. We explicitly allow
448 dnl the ones we care about.
449 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
450 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
451 AC_REQUIRE([AC_PROG_INSTALL])dnl
452 if test "`cd $srcdir && pwd`" != "`pwd`"; then
453 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
454 # is not polluted with repeated "-I."
455 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
456 # test to see if srcdir already configured
457 if test -f $srcdir/config.status; then
458 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
459 fi
460 fi
461
462 # test whether we have cygpath
463 if test -z "$CYGPATH_W"; then
464 if (cygpath --version) >/dev/null 2>/dev/null; then
465 CYGPATH_W='cygpath -w'
466 else
467 CYGPATH_W=echo
468 fi
469 fi
470 AC_SUBST([CYGPATH_W])
471
472 # Define the identity of the package.
473 dnl Distinguish between old-style and new-style calls.
474 m4_ifval([$2],
475 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
476 AC_SUBST([PACKAGE], [$1])dnl
477 AC_SUBST([VERSION], [$2])],
478 [_AM_SET_OPTIONS([$1])dnl
479 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
480 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
481 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
482 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
483 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
484
485 _AM_IF_OPTION([no-define],,
486 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
487 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
488
489 # Some tools Automake needs.
490 AC_REQUIRE([AM_SANITY_CHECK])dnl
491 AC_REQUIRE([AC_ARG_PROGRAM])dnl
492 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
493 AM_MISSING_PROG(AUTOCONF, autoconf)
494 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
495 AM_MISSING_PROG(AUTOHEADER, autoheader)
496 AM_MISSING_PROG(MAKEINFO, makeinfo)
497 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
498 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
499 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
500 # We need awk for the "check" target. The system "awk" is bad on
501 # some platforms.
502 AC_REQUIRE([AC_PROG_AWK])dnl
503 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
504 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
505 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
506 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
507 [_AM_PROG_TAR([v7])])])
508 _AM_IF_OPTION([no-dependencies],,
509 [AC_PROVIDE_IFELSE([AC_PROG_CC],
510 [_AM_DEPENDENCIES(CC)],
511 [define([AC_PROG_CC],
512 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
513 AC_PROVIDE_IFELSE([AC_PROG_CXX],
514 [_AM_DEPENDENCIES(CXX)],
515 [define([AC_PROG_CXX],
516 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
517 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
518 [_AM_DEPENDENCIES(OBJC)],
519 [define([AC_PROG_OBJC],
520 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
521 ])
522 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
523 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
524 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
525 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
526 AC_CONFIG_COMMANDS_PRE(dnl
527 [m4_provide_if([_AM_COMPILER_EXEEXT],
528 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
529 ])
530
531 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
532 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
533 dnl mangled by Autoconf and run in a shell conditional statement.
534 m4_define([_AC_COMPILER_EXEEXT],
535 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
536
537
538 # When config.status generates a header, we must update the stamp-h file.
539 # This file resides in the same directory as the config header
540 # that is generated. The stamp files are numbered to have different names.
541
542 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
543 # loop where config.status creates the headers, so we can generate
544 # our stamp files there.
545 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
546 [# Compute $1's index in $config_headers.
547 _am_arg=$1
548 _am_stamp_count=1
549 for _am_header in $config_headers :; do
550 case $_am_header in
551 $_am_arg | $_am_arg:* )
552 break ;;
553 * )
554 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
555 esac
556 done
557 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
558
559 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
560 #
561 # This file is free software; the Free Software Foundation
562 # gives unlimited permission to copy and/or distribute it,
563 # with or without modifications, as long as this notice is preserved.
564
565 # AM_PROG_INSTALL_SH
566 # ------------------
567 # Define $install_sh.
568 AC_DEFUN([AM_PROG_INSTALL_SH],
569 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
570 if test x"${install_sh}" != xset; then
571 case $am_aux_dir in
572 *\ * | *\ *)
573 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
574 *)
575 install_sh="\${SHELL} $am_aux_dir/install-sh"
576 esac
577 fi
578 AC_SUBST(install_sh)])
579
580 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
581 #
582 # This file is free software; the Free Software Foundation
583 # gives unlimited permission to copy and/or distribute it,
584 # with or without modifications, as long as this notice is preserved.
585
586 # serial 2
587
588 # Check whether the underlying file-system supports filenames
589 # with a leading dot. For instance MS-DOS doesn't.
590 AC_DEFUN([AM_SET_LEADING_DOT],
591 [rm -rf .tst 2>/dev/null
592 mkdir .tst 2>/dev/null
593 if test -d .tst; then
594 am__leading_dot=.
595 else
596 am__leading_dot=_
597 fi
598 rmdir .tst 2>/dev/null
599 AC_SUBST([am__leading_dot])])
600
601 # Check to see how 'make' treats includes. -*- Autoconf -*-
602
603 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
604 #
605 # This file is free software; the Free Software Foundation
606 # gives unlimited permission to copy and/or distribute it,
607 # with or without modifications, as long as this notice is preserved.
608
609 # serial 4
610
611 # AM_MAKE_INCLUDE()
612 # -----------------
613 # Check to see how make treats includes.
614 AC_DEFUN([AM_MAKE_INCLUDE],
615 [am_make=${MAKE-make}
616 cat > confinc << 'END'
617 am__doit:
618 @echo this is the am__doit target
619 .PHONY: am__doit
620 END
621 # If we don't find an include directive, just comment out the code.
622 AC_MSG_CHECKING([for style of include used by $am_make])
623 am__include="#"
624 am__quote=
625 _am_result=none
626 # First try GNU make style include.
627 echo "include confinc" > confmf
628 # Ignore all kinds of additional output from `make'.
629 case `$am_make -s -f confmf 2> /dev/null` in #(
630 *the\ am__doit\ target*)
631 am__include=include
632 am__quote=
633 _am_result=GNU
634 ;;
635 esac
636 # Now try BSD make style include.
637 if test "$am__include" = "#"; then
638 echo '.include "confinc"' > confmf
639 case `$am_make -s -f confmf 2> /dev/null` in #(
640 *the\ am__doit\ target*)
641 am__include=.include
642 am__quote="\""
643 _am_result=BSD
644 ;;
645 esac
646 fi
647 AC_SUBST([am__include])
648 AC_SUBST([am__quote])
649 AC_MSG_RESULT([$_am_result])
650 rm -f confinc confmf
651 ])
652
653 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
654
655 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
656 # Free Software Foundation, Inc.
657 #
658 # This file is free software; the Free Software Foundation
659 # gives unlimited permission to copy and/or distribute it,
660 # with or without modifications, as long as this notice is preserved.
661
662 # serial 6
663
664 # AM_MISSING_PROG(NAME, PROGRAM)
665 # ------------------------------
666 AC_DEFUN([AM_MISSING_PROG],
667 [AC_REQUIRE([AM_MISSING_HAS_RUN])
668 $1=${$1-"${am_missing_run}$2"}
669 AC_SUBST($1)])
670
671
672 # AM_MISSING_HAS_RUN
673 # ------------------
674 # Define MISSING if not defined so far and test if it supports --run.
675 # If it does, set am_missing_run to use it, otherwise, to nothing.
676 AC_DEFUN([AM_MISSING_HAS_RUN],
677 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
678 AC_REQUIRE_AUX_FILE([missing])dnl
679 if test x"${MISSING+set}" != xset; then
680 case $am_aux_dir in
681 *\ * | *\ *)
682 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
683 *)
684 MISSING="\${SHELL} $am_aux_dir/missing" ;;
685 esac
686 fi
687 # Use eval to expand $SHELL
688 if eval "$MISSING --run true"; then
689 am_missing_run="$MISSING --run "
690 else
691 am_missing_run=
692 AC_MSG_WARN([`missing' script is too old or missing])
693 fi
694 ])
695
696 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
697 #
698 # This file is free software; the Free Software Foundation
699 # gives unlimited permission to copy and/or distribute it,
700 # with or without modifications, as long as this notice is preserved.
701
702 # AM_PROG_MKDIR_P
703 # ---------------
704 # Check for `mkdir -p'.
705 AC_DEFUN([AM_PROG_MKDIR_P],
706 [AC_PREREQ([2.60])dnl
707 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
708 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
709 dnl while keeping a definition of mkdir_p for backward compatibility.
710 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
711 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
712 dnl Makefile.ins that do not define MKDIR_P, so we do our own
713 dnl adjustment using top_builddir (which is defined more often than
714 dnl MKDIR_P).
715 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
716 case $mkdir_p in
717 [[\\/$]]* | ?:[[\\/]]*) ;;
718 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
719 esac
720 ])
721
722 # Helper functions for option handling. -*- Autoconf -*-
723
724 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
725 #
726 # This file is free software; the Free Software Foundation
727 # gives unlimited permission to copy and/or distribute it,
728 # with or without modifications, as long as this notice is preserved.
729
730 # serial 4
731
732 # _AM_MANGLE_OPTION(NAME)
733 # -----------------------
734 AC_DEFUN([_AM_MANGLE_OPTION],
735 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
736
737 # _AM_SET_OPTION(NAME)
738 # ------------------------------
739 # Set option NAME. Presently that only means defining a flag for this option.
740 AC_DEFUN([_AM_SET_OPTION],
741 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
742
743 # _AM_SET_OPTIONS(OPTIONS)
744 # ----------------------------------
745 # OPTIONS is a space-separated list of Automake options.
746 AC_DEFUN([_AM_SET_OPTIONS],
747 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
748
749 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
750 # -------------------------------------------
751 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
752 AC_DEFUN([_AM_IF_OPTION],
753 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
754
755 # Check to make sure that the build environment is sane. -*- Autoconf -*-
756
757 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
758 # Free Software Foundation, Inc.
759 #
760 # This file is free software; the Free Software Foundation
761 # gives unlimited permission to copy and/or distribute it,
762 # with or without modifications, as long as this notice is preserved.
763
764 # serial 5
765
766 # AM_SANITY_CHECK
767 # ---------------
768 AC_DEFUN([AM_SANITY_CHECK],
769 [AC_MSG_CHECKING([whether build environment is sane])
770 # Just in case
771 sleep 1
772 echo timestamp > conftest.file
773 # Reject unsafe characters in $srcdir or the absolute working directory
774 # name. Accept space and tab only in the latter.
775 am_lf='
776 '
777 case `pwd` in
778 *[[\\\"\#\$\&\'\`$am_lf]]*)
779 AC_MSG_ERROR([unsafe absolute working directory name]);;
780 esac
781 case $srcdir in
782 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
783 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
784 esac
785
786 # Do `set' in a subshell so we don't clobber the current shell's
787 # arguments. Must try -L first in case configure is actually a
788 # symlink; some systems play weird games with the mod time of symlinks
789 # (eg FreeBSD returns the mod time of the symlink's containing
790 # directory).
791 if (
792 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
793 if test "$[*]" = "X"; then
794 # -L didn't work.
795 set X `ls -t "$srcdir/configure" conftest.file`
796 fi
797 rm -f conftest.file
798 if test "$[*]" != "X $srcdir/configure conftest.file" \
799 && test "$[*]" != "X conftest.file $srcdir/configure"; then
800
801 # If neither matched, then we have a broken ls. This can happen
802 # if, for instance, CONFIG_SHELL is bash and it inherits a
803 # broken ls alias from the environment. This has actually
804 # happened. Such a system could not be considered "sane".
805 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
806 alias in your environment])
807 fi
808
809 test "$[2]" = conftest.file
810 )
811 then
812 # Ok.
813 :
814 else
815 AC_MSG_ERROR([newly created file is older than distributed files!
816 Check your system clock])
817 fi
818 AC_MSG_RESULT(yes)])
819
820 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
821 #
822 # This file is free software; the Free Software Foundation
823 # gives unlimited permission to copy and/or distribute it,
824 # with or without modifications, as long as this notice is preserved.
825
826 # AM_PROG_INSTALL_STRIP
827 # ---------------------
828 # One issue with vendor `install' (even GNU) is that you can't
829 # specify the program used to strip binaries. This is especially
830 # annoying in cross-compiling environments, where the build's strip
831 # is unlikely to handle the host's binaries.
832 # Fortunately install-sh will honor a STRIPPROG variable, so we
833 # always use install-sh in `make install-strip', and initialize
834 # STRIPPROG with the value of the STRIP variable (set by the user).
835 AC_DEFUN([AM_PROG_INSTALL_STRIP],
836 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
837 # Installed binaries are usually stripped using `strip' when the user
838 # run `make install-strip'. However `strip' might not be the right
839 # tool to use in cross-compilation environments, therefore Automake
840 # will honor the `STRIP' environment variable to overrule this program.
841 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
842 if test "$cross_compiling" != no; then
843 AC_CHECK_TOOL([STRIP], [strip], :)
844 fi
845 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
846 AC_SUBST([INSTALL_STRIP_PROGRAM])])
847
848 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
849 #
850 # This file is free software; the Free Software Foundation
851 # gives unlimited permission to copy and/or distribute it,
852 # with or without modifications, as long as this notice is preserved.
853
854 # serial 2
855
856 # _AM_SUBST_NOTMAKE(VARIABLE)
857 # ---------------------------
858 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
859 # This macro is traced by Automake.
860 AC_DEFUN([_AM_SUBST_NOTMAKE])
861
862 # AM_SUBST_NOTMAKE(VARIABLE)
863 # ---------------------------
864 # Public sister of _AM_SUBST_NOTMAKE.
865 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
866
867 # Check how to create a tarball. -*- Autoconf -*-
868
869 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
870 #
871 # This file is free software; the Free Software Foundation
872 # gives unlimited permission to copy and/or distribute it,
873 # with or without modifications, as long as this notice is preserved.
874
875 # serial 2
876
877 # _AM_PROG_TAR(FORMAT)
878 # --------------------
879 # Check how to create a tarball in format FORMAT.
880 # FORMAT should be one of `v7', `ustar', or `pax'.
881 #
882 # Substitute a variable $(am__tar) that is a command
883 # writing to stdout a FORMAT-tarball containing the directory
884 # $tardir.
885 # tardir=directory && $(am__tar) > result.tar
886 #
887 # Substitute a variable $(am__untar) that extract such
888 # a tarball read from stdin.
889 # $(am__untar) < result.tar
890 AC_DEFUN([_AM_PROG_TAR],
891 [# Always define AMTAR for backward compatibility.
892 AM_MISSING_PROG([AMTAR], [tar])
893 m4_if([$1], [v7],
894 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
895 [m4_case([$1], [ustar],, [pax],,
896 [m4_fatal([Unknown tar format])])
897 AC_MSG_CHECKING([how to create a $1 tar archive])
898 # Loop over all known methods to create a tar archive until one works.
899 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
900 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
901 # Do not fold the above two line into one, because Tru64 sh and
902 # Solaris sh will not grok spaces in the rhs of `-'.
903 for _am_tool in $_am_tools
904 do
905 case $_am_tool in
906 gnutar)
907 for _am_tar in tar gnutar gtar;
908 do
909 AM_RUN_LOG([$_am_tar --version]) && break
910 done
911 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
912 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
913 am__untar="$_am_tar -xf -"
914 ;;
915 plaintar)
916 # Must skip GNU tar: if it does not support --format= it doesn't create
917 # ustar tarball either.
918 (tar --version) >/dev/null 2>&1 && continue
919 am__tar='tar chf - "$$tardir"'
920 am__tar_='tar chf - "$tardir"'
921 am__untar='tar xf -'
922 ;;
923 pax)
924 am__tar='pax -L -x $1 -w "$$tardir"'
925 am__tar_='pax -L -x $1 -w "$tardir"'
926 am__untar='pax -r'
927 ;;
928 cpio)
929 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
930 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
931 am__untar='cpio -i -H $1 -d'
932 ;;
933 none)
934 am__tar=false
935 am__tar_=false
936 am__untar=false
937 ;;
938 esac
939
940 # If the value was cached, stop now. We just wanted to have am__tar
941 # and am__untar set.
942 test -n "${am_cv_prog_tar_$1}" && break
943
944 # tar/untar a dummy directory, and stop if the command works
945 rm -rf conftest.dir
946 mkdir conftest.dir
947 echo GrepMe > conftest.dir/file
948 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
949 rm -rf conftest.dir
950 if test -s conftest.tar; then
951 AM_RUN_LOG([$am__untar <conftest.tar])
952 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
953 fi
954 done
955 rm -rf conftest.dir
956
957 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
958 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
959 AC_SUBST([am__tar])
960 AC_SUBST([am__untar])
961 ]) # _AM_PROG_TAR
962
963 m4_include([config/kerberos_v4.m4])
964 m4_include([config/libtool.m4])
965 m4_include([config/plain.m4])
966 m4_include([config/sasldb.m4])
967 m4_include([cmulocal/berkdb.m4])
968 m4_include([cmulocal/bsd_sockets.m4])
969 m4_include([cmulocal/c-attribute.m4])
970 m4_include([cmulocal/common.m4])
971 m4_include([cmulocal/cyrus.m4])
972 m4_include([cmulocal/init_automake.m4])
973 m4_include([cmulocal/ipv6.m4])
974 m4_include([cmulocal/openldap.m4])
975 m4_include([cmulocal/openssl.m4])
976 m4_include([cmulocal/sasl2.m4])
0 #!/bin/sh
1 # Run this to generate all the initial makefiles, etc.
2 test -n "$srcdir" || srcdir=`dirname "$0"`
3 test -n "$srcdir" || srcdir=.
4
5 olddir=`pwd`
6
7 cd $srcdir
8
9 (test -f configure.ac) || {
10 echo "*** ERROR: Directory "\`$srcdir\'" does not look like the top-level project directory ***"
11 exit 1
12 }
13
14 PKG_NAME=`autoconf --trace 'AC_INIT:$1' configure.ac`
15
16 if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
17 echo "*** WARNING: I am going to run \`configure' with no arguments." >&2
18 echo "*** If you wish to pass any to it, please specify them on the" >&2
19 echo "*** \`$0\' command line." >&2
20 echo "" >&2
21 fi
22
23 aclocal --install || exit 1
24 autoreconf --verbose --force --install -Wno-portability || exit 1
25
26 cd $olddir
27 if [ "$NOCONFIGURE" = "" ]; then
28 $srcdir/configure "$@" || exit 1
29
30 if [ "$1" = "--help" ]; then exit 0 else
31 echo "Now type \`make\' to compile $PKG_NAME" || exit 1
32 fi
33 else
34 echo "Skipping configure process."
35 fi
36
+0
-39
cmulocal/COPYING less more
0
1 Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved.
2
3 Redistribution and use in source and binary forms, with or without
4 modification, are permitted provided that the following conditions
5 are met:
6
7 1. Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
9
10 2. Redistributions in binary form must reproduce the above copyright
11 notice, this list of conditions and the following disclaimer in
12 the documentation and/or other materials provided with the
13 distribution.
14
15 3. The name "Carnegie Mellon University" must not be used to
16 endorse or promote products derived from this software without
17 prior written permission. For permission or any legal
18 details, please contact
19 Carnegie Mellon University
20 Center for Technology Transfer and Enterprise Creation
21 4615 Forbes Avenue
22 Suite 302
23 Pittsburgh, PA 15213
24 (412) 268-7393, fax: (412) 268-7395
25 innovation@andrew.cmu.edu
26
27 4. Redistributions of any form whatsoever must retain the following
28 acknowledgment:
29 "This product includes software developed by Computing Services
30 at Carnegie Mellon University (http://www.cmu.edu/computing/)."
31
32 CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
33 THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
34 AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
35 FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
36 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
37 AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
38 OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+0
-71
cmulocal/README.andrew less more
0 This is a collection of autoconf macros which've been written by
1 various people at CMU. To use it, use "aclocal -I cmulocal" (after
2 the first time, automake should automatically use the -I cmulocal, if
3 you've called CMU_INIT_AUTOMAKE in configure.in).
4
5 CMU_INIT_AUTOMAKE
6 If you use automake, you should call this after AM_INIT_AUTOMAKE.
7 It adds "-I cmulocal" to the aclocal command line, so that when
8 automake runs aclocal, aclocal'll continue to pick up these macros.
9
10 CMU_ADD_LIBPATH
11 Add -L(arg), and possibly -R(arg) (or whatever the runpath is) to
12 LDFLAGS.
13
14 CMU_ADD_LIBPATH_TO
15 Likewise to above, except adds it to the specified variable (arg 2).
16
17 CMU_GUESS_RUNPATH_SWITCH
18 Attempts to guess what the runpath switch is (-R or whatever).
19
20 CMU_COMERR
21 Requires that com_err exist in the collection (at CMU, do this by
22 running "cvs checkout com_err", and adding com_err to DIST_SUBDIRS
23 in your Makefile.am).
24
25 It sets the output variable COMPILE_ET to the compile_et program to
26 use, and adds the appropriate paths to LDFLAGS and CPPFLAGS.
27
28 It does *not* add -lcom_err to LIBS (this would cause later library
29 checks to fail if com_err needs to be built), so Makefiles need to
30 explicitly add -lcom_err (which, after all, should always exist as
31 long as the com_err compile doesn't blow up). Makefiles should do
32 this by using LIB_COMERR, which will substitute to the appropriate
33 magic to use to grab the library. (This may involve a libtool archive;
34 you should be using libtool to link your program if you distribute
35 libraries with it that the program may link against).
36
37 Note that com_err will only be compiled if the configure script
38 can't find compile_et or libcom_err; if the system already has them,
39 the configure script will use the system installation (although, due
40 to some autoconf wonkiness, com_err will still be configured; it just
41 won't show up in the @subdirs@ expansion).
42
43 CMU_NANA
44 Adds --with-nana, set by default; if set, attempts to link against
45 libnana. If not set, or if libnana is unavailable, or if we're not
46 using gcc, it defines WITHOUT_NANA.
47
48 CMU_PROG_LIBTOOL
49 Just like AM_PROG_LIBTOOL, except it performs a couple little hacks
50 to make sure that things don't break on picky vendor compilers
51 which whine about empty translation units. [DEPRECATED - DO NOT USE]
52
53 CMU_PTHREADS
54 This attempts to link against libpthread (failing if it can't be found),
55 and attempts to do any system-specific setup required for thread
56 support (for example, most things want _REENTRANT to be defined,
57 but Solaris wants _POSIX_PTHREAD_SEMANTICS and __EXTENSIONS__, IRIX
58 wants to see _SGI_REENTRANT_FUNCTIONS, etc).
59
60 CMU_SASL
61 This tries to find a SASL library, and calls AC_SUBST on LIB_SASL
62 if it finds one, or tells the user to go ftp it if it doesn't exist.
63
64 Provides --with-sasldir.
65
66 CMU_KRB4
67 This attempts to find Kerberos 4 libraries and set up CFLAGS and LIBS
68 appropriately. It also updates and substitutes RPATH for shared library
69 stuff.
70
+0
-314
cmulocal/afs.m4 less more
0 dnl afs.m4--AFS libraries, includes, and dependencies
1 dnl $Id: afs.m4,v 1.29 2005/04/26 19:14:07 shadow Exp $
2 dnl Chaskiel Grundman
3 dnl based on kerberos_v4.m4
4 dnl Derrick Brashear
5 dnl from KTH krb and Arla
6
7 AC_DEFUN([CMU_AFS_INC_WHERE1], [
8 cmu_save_CPPFLAGS=$CPPFLAGS
9 CPPFLAGS="$cmu_save_CPPFLAGS -I$1"
10 AC_TRY_COMPILE([#include <afs/param.h>],
11 [#ifndef SYS_NAME
12 choke me
13 #endif
14 int foo;],
15 ac_cv_found_afs_inc=yes,
16 ac_cv_found_afs_inc=no)
17 CPPFLAGS=$cmu_save_CPPFLAGS
18 ])
19
20 AC_DEFUN([CMU_AFS_LIB_WHERE1], [
21 save_LIBS="$LIBS"
22 save_LDFLAGS="$LDFLAGS"
23
24 LIBS="-lauth $1/afs/util.a $LIB_SOCKET $LIBS"
25 LDFLAGS="-L$1 -L$1/afs $LDFLAGS"
26 dnl suppress caching
27 AC_TRY_LINK([],[afsconf_Open();], ac_cv_found_afs_lib=yes, ac_cv_found_afs_lib=no)
28 LIBS="$save_LIBS"
29 LDFLAGS="$save_LDFLAGS"
30 ])
31
32 AC_DEFUN([CMU_AFS_WHERE], [
33 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
34 for i in $1; do
35 AC_MSG_CHECKING(for AFS in $i)
36 CMU_AFS_INC_WHERE1("$i/include")
37 ac_cv_found_lwp_inc=$ac_cv_found_afs_inc
38 CMU_TEST_INCPATH($i/include, lwp)
39 ac_cv_found_afs_inc=$ac_cv_found_lwp_inc
40 if test "$ac_cv_found_afs_inc" = "yes"; then
41 CMU_AFS_LIB_WHERE1("$i/$CMU_LIB_SUBDIR")
42 if test "$ac_cv_found_afs_lib" = "yes"; then
43 ac_cv_afs_where=$i
44 AC_MSG_RESULT(found)
45 break
46 else
47 AC_MSG_RESULT(not found)
48 fi
49 else
50 AC_MSG_RESULT(not found)
51 fi
52 done
53 ])
54
55 AC_DEFUN([CMU_AFS], [
56 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
57 AC_REQUIRE([CMU_SOCKETS])
58 AC_REQUIRE([CMU_LIBSSL])
59 AC_ARG_WITH(AFS,
60 [ --with-afs=PREFIX Compile with AFS support],
61 [if test "X$with_AFS" = "X"; then
62 with_AFS=yes
63 fi])
64
65 if test "X$with_AFS" != "X"; then
66 ac_cv_afs_where=$with_AFS
67 fi
68 if test "X$ac_cv_afs_where" = "X"; then
69 CMU_AFS_WHERE(/usr/afsws /usr/local /usr/athena /Library/OpenAFS/Tools)
70 fi
71
72 AC_MSG_CHECKING(whether to include AFS)
73 if test "X$ac_cv_afs_where" = "Xno" -o "X$ac_cv_afs_where" = "X"; then
74 ac_cv_found_afs=no
75 AC_MSG_RESULT(no)
76 else
77 ac_cv_found_afs=yes
78 AC_MSG_RESULT(yes)
79 AFS_INC_DIR="$ac_cv_afs_where/include"
80 AFS_LIB_DIR="$ac_cv_afs_where/$CMU_LIB_SUBDIR"
81 AFS_TOP_DIR="$ac_cv_afs_where"
82 AFS_INC_FLAGS="-I${AFS_INC_DIR}"
83 AFS_LIB_FLAGS="-L${AFS_LIB_DIR} -L${AFS_LIB_DIR}/afs"
84 cmu_save_LIBS="$LIBS"
85 cmu_save_CPPFLAGS="$CPPFLAGS"
86 CPPFLAGS="$CPPFLAGS ${AFS_INC_FLAGS}"
87 cmu_save_LDFLAGS="$LDFLAGS"
88 LDFLAGS="$cmu_save_LDFLAGS ${AFS_LIB_FLAGS}"
89
90 AC_CHECK_HEADERS(afs/stds.h)
91
92 AC_MSG_CHECKING([if libdes is needed])
93 AC_TRY_LINK([],[des_quad_cksum();],AFS_DES_LIB="",AFS_DES_LIB="maybe")
94 if test "X$AFS_DES_LIB" != "X"; then
95 LIBS="$cmu_save_LIBS -ldes"
96 AC_TRY_LINK([], [des_quad_cksum();],AFS_DES_LIB="yes")
97 if test "X$AFS_DES_LIB" = "Xyes"; then
98 AC_MSG_RESULT([yes])
99 AFS_LIBDES="-ldes"
100 AFS_LIBDESA="${AFS_LIB_DIR}/libdes.a"
101 else
102 LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS"
103 AC_TRY_LINK([],
104 [des_quad_cksum();],AFS_DES_LIB="libcrypto")
105 if test "X$AFS_DES_LIB" = "Xlibcrypto"; then
106 AC_MSG_RESULT([libcrypto])
107 AFS_LIBDES="$LIBSSL_LIB_FLAGS"
108 AFS_LIBDESA="$LIBSSL_LIB_FLAGS"
109 else
110 LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
111 AC_TRY_LINK([],
112 [des_quad_cksum();],AFS_DES_LIB="libcrypto+descompat")
113 if test "X$AFS_DES_LIB" = "Xlibcrypto+descompat"; then
114 AC_MSG_RESULT([libcrypto+descompat])
115 AFS_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
116 AFS_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
117 else
118 AC_MSG_RESULT([unknown])
119 AC_MSG_ERROR([Could not use -ldes])
120 fi
121 fi
122 fi
123 else
124 AC_MSG_RESULT([no])
125 fi
126
127
128 AFS_CLIENT_LIBS_STATIC="${AFS_LIB_DIR}/afs/libvolser.a ${AFS_LIB_DIR}/afs/libvldb.a ${AFS_LIB_DIR}/afs/libkauth.a ${AFS_LIB_DIR}/afs/libprot.a ${AFS_LIB_DIR}/libubik.a ${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/librxkad.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcmd.a ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a"
129 AFS_KTC_LIBS_STATIC="${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a"
130 AFS_CLIENT_LIBS="-lvolser -lvldb -lkauth -lprot -lubik -lauth -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a"
131 AFS_RX_LIBS="-lauth -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a"
132 AFS_KTC_LIBS="-lauth ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcom_err ${AFS_LIB_DIR}/afs/util.a"
133
134 LIBS="$cmu_save_LIBS $AFS_CLIENT_LIBS ${LIB_SOCKET}"
135 AC_CHECK_FUNC(des_pcbc_init)
136 if test "X$ac_cv_func_des_pcbc_init" != "Xyes"; then
137 AC_CHECK_LIB(descompat, des_pcbc_init, AFS_DESCOMPAT_LIB="-ldescompat")
138 if test "X$AFS_DESCOMPAT_LIB" != "X" ; then
139 AFS_CLIENT_LIBS_STATIC="$AFS_CLIENT_LIBS_STATIC $AFS_DESCOMPAT_LIB"
140 AFS_KTC_LIBS_STATIC="$AFS_KTC_LIBS_STATIC $AFS_DESCOMPAT_LIB"
141 AFS_CLIENT_LIBS="$AFS_CLIENT_LIBS $AFS_DESCOMPAT_LIB"
142 AFS_KTC_LIBS="$AFS_KTC_LIBS $AFS_DESCOMPAT_LIB"
143 else
144
145 AC_MSG_CHECKING([if rxkad needs des_pcbc_init])
146 AC_TRY_LINK(,[tkt_DecodeTicket();],RXKAD_PROBLEM=no,RXKAD_PROBLEM=maybe)
147 if test "$RXKAD_PROBLEM" = "maybe"; then
148 AC_TRY_LINK([int des_pcbc_init() { return 0;}],
149 [tkt_DecodeTicket();],RXKAD_PROBLEM=yes,RXKAD_PROBLEM=error)
150 if test "$RXKAD_PROBLEM" = "yes"; then
151 AC_MSG_RESULT([yes])
152 AC_MSG_ERROR([cannot use rxkad])
153 else
154 AC_MSG_RESULT([unknown])
155 AC_MSG_ERROR([Unknown error testing rxkad])
156 fi
157 else
158 AC_MSG_RESULT([no])
159 fi
160 fi
161 fi
162
163 LIBS="$cmu_save_LIBS"
164 AC_CHECK_FUNC(flock)
165 LIBS="$cmu_save_LIBS ${AFS_CLIENT_LIBS} ${LIB_SOCKET}"
166 if test "X$ac_cv_func_flock" != "Xyes"; then
167 AC_MSG_CHECKING([if AFS needs flock])
168 AC_TRY_LINK([#include <afs/param.h>
169 #ifdef HAVE_AFS_STDS_H
170 #include <afs/stds.h>
171 #endif
172 #include <ubik.h>
173 #include <afs/cellconfig.h>
174 #include <afs/auth.h>
175 #include <afs/volser.h>
176 struct ubik_client * cstruct;
177 int sigvec() {return 0;}
178 extern int UV_SetSecurity();],
179 [vsu_ClientInit(1,"","",0,
180 &cstruct,UV_SetSecurity)],
181 AFS_FLOCK=no,AFS_FLOCK=yes)
182 if test $AFS_FLOCK = "no"; then
183 AC_MSG_RESULT([no])
184 else
185 AC_MSG_RESULT([yes])
186 LDFLAGS="$LDFLAGS -L/usr/ucblib"
187 AC_CHECK_LIB(ucb, flock,:, [AC_CHECK_LIB(BSD, flock)])
188 fi
189 fi
190 LIBS="$cmu_save_LIBS"
191 AC_CHECK_FUNC(sigvec)
192 LIBS="$cmu_save_LIBS ${AFS_CLIENT_LIBS} ${LIB_SOCKET}"
193 if test "X$ac_cv_func_sigvec" != "Xyes"; then
194 AC_MSG_CHECKING([if AFS needs sigvec])
195 AC_TRY_LINK([#include <afs/param.h>
196 #ifdef HAVE_AFS_STDS_H
197 #include <afs/stds.h>
198 #endif
199 #include <ubik.h>
200 #include <afs/cellconfig.h>
201 #include <afs/auth.h>
202 #include <afs/volser.h>
203 struct ubik_client * cstruct;
204 int flock() {return 0;}
205 extern int UV_SetSecurity();],
206 [vsu_ClientInit(1,"","",0,
207 &cstruct,UV_SetSecurity)],
208 AFS_SIGVEC=no,AFS_SIGVEC=yes)
209 if test $AFS_SIGVEC = "no"; then
210 AC_MSG_RESULT([no])
211 else
212 AC_MSG_RESULT([yes])
213 LDFLAGS="$LDFLAGS -L/usr/ucblib"
214 AC_CHECK_LIB(ucb, sigvec,:,[AC_CHECK_LIB(BSD, sigvec)])
215 fi
216 fi
217 if test "$ac_cv_lib_ucb_flock" = "yes" -o "$ac_cv_lib_ucb_sigvec" = "yes"; then
218 AFS_LIB_FLAGS="${AFS_LIB_FLAGS} -L/usr/ucblib -R/usr/ucblib"
219 fi
220 if test "$ac_cv_lib_ucb_flock" = "yes" -o "$ac_cv_lib_ucb_sigvec" = "yes"; then
221 AFS_BSD_LIB="-lucb"
222 elif test "$ac_cv_lib_BSD_flock" = "yes" -o "$ac_cv_lib_BSD_sigvec" = "yes"; then
223 AFS_BSD_LIB="-lBSD"
224 fi
225 if test "X$AFS_BSD_LIB" != "X" ; then
226 AFS_CLIENT_LIBS_STATIC="$AFS_CLIENT_LIBS_STATIC $AFS_BSD_LIB"
227 AFS_KTC_LIBS_STATIC="$AFS_KTC_LIBS_STATIC $AFS_BSD_LIB"
228 AFS_CLIENT_LIBS="$AFS_CLIENT_LIBS $AFS_BSD_LIB"
229 AFS_RX_LIBS="$AFS_CLIENT_LIBS $AFS_BSD_LIB"
230 AFS_KTC_LIBS="$AFS_KTC_LIBS $AFS_BSD_LIB"
231 fi
232
233 AC_MSG_CHECKING([if libaudit is needed])
234 AFS_LIBAUDIT=""
235 LIBS="$cmu_save_LIBS $AFS_CLIENT_LIBS ${LIB_SOCKET}"
236 AC_TRY_LINK([#include <afs/param.h>
237 #ifdef HAVE_AFS_STDS_H
238 #include <afs/stds.h>
239 #endif
240 #include <afs/cellconfig.h>
241 #include <afs/auth.h>],
242 [afsconf_SuperUser();],AFS_AUDIT_LIB="",AFS_AUDIT_LIB="maybe")
243 if test "X$AFS_AUDIT_LIB" != "X"; then
244 LIBS="$cmu_save_LIBS -lvolser -lvldb -lkauth -lprot -lubik -lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB $LIB_SOCKET"
245 AC_TRY_LINK([#include <afs/param.h>
246 #ifdef HAVE_AFS_STDS_H
247 #include <afs/stds.h>
248 #endif
249 #include <afs/cellconfig.h>
250 #include <afs/auth.h>],
251 [afsconf_SuperUser();],AFS_AUDIT_LIB="yes")
252 if test "X$AFS_AUDIT_LIB" = "Xyes"; then
253 AC_MSG_RESULT([yes])
254 AFS_LIBAUDIT="-laudit"
255 AFS_CLIENT_LIBS_STATIC="${AFS_LIB_DIR}/afs/libvolser.a ${AFS_LIB_DIR}/afs/libvldb.a ${AFS_LIB_DIR}/afs/libkauth.a ${AFS_LIB_DIR}/afs/libprot.a ${AFS_LIB_DIR}/libubik.a ${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/afs/libaudit.a ${AFS_LIB_DIR}/librxkad.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcmd.a ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a"
256 AFS_CLIENT_LIBS="-lvolser -lvldb -lkauth -lprot -lubik -lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB"
257 AFS_RX_LIBS="-lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB"
258 else
259 AC_MSG_RESULT([unknown])
260 AC_MSG_ERROR([Could not use -lauth while testing for -laudit])
261 fi
262 else
263 AC_MSG_RESULT([no])
264 fi
265
266 AC_CHECK_FUNCS(VL_ProbeServer)
267 AC_MSG_CHECKING([if new-style afs_ integer types are defined])
268 AC_CACHE_VAL(ac_cv_afs_int32,
269 dnl The next few lines contain a quoted argument to egrep
270 dnl It is critical that there be no leading or trailing whitespace
271 dnl or newlines
272 [AC_EGREP_CPP(dnl
273 changequote(<<,>>)dnl
274 <<(^|[^a-zA-Z_0-9])afs_int32[^a-zA-Z_0-9]>>dnl
275 changequote([,]), [#include <afs/param.h>
276 #ifdef HAVE_AFS_STDS_H
277 #include <afs/stds.h>
278 #endif],
279 ac_cv_afs_int32=yes, ac_cv_afs_int32=no)])
280 AC_MSG_RESULT($ac_cv_afs_int32)
281 if test $ac_cv_afs_int32 = yes ; then
282 AC_DEFINE(HAVE_AFS_INT32,, [AFS provides new "unambiguous" type names])
283 else
284 AC_DEFINE(afs_int16, int16, [it's a type definition])
285 AC_DEFINE(afs_int32, int32, [it's a type definition])
286 AC_DEFINE(afs_uint16, u_int16, [it's a type definition])
287 AC_DEFINE(afs_uint32, u_int32, [it's a type definition])
288 fi
289
290 CPPFLAGS="${cmu_save_CPPFLAGS}"
291 LDFLAGS="${cmu_save_LDFLAGS}"
292 LIBS="${cmu_save_LIBS}"
293 AC_DEFINE(AFS_ENV,, [Use AFS. (find what needs this and nuke it)])
294 AC_DEFINE(AFS,, [Use AFS. (find what needs this and nuke it)])
295 AC_SUBST(AFS_CLIENT_LIBS_STATIC)
296 AC_SUBST(AFS_KTC_LIBS_STATIC)
297 AC_SUBST(AFS_CLIENT_LIBS)
298 AC_SUBST(AFS_RX_LIBS)
299 AC_SUBST(AFS_KTC_LIBS)
300 AC_SUBST(AFS_INC_FLAGS)
301 AC_SUBST(AFS_LIB_FLAGS)
302 AC_SUBST(AFS_TOP_DIR)
303 AC_SUBST(AFS_LIBAUDIT)
304 AC_SUBST(AFS_LIBDES)
305 AC_SUBST(AFS_LIBDESA)
306 fi
307 ])
308
309 AC_DEFUN([CMU_NEEDS_AFS],
310 [AC_REQUIRE([CMU_AFS])
311 if test "$ac_cv_found_afs" != "yes"; then
312 AC_ERROR([Cannot continue without AFS])
313 fi])
+0
-46
cmulocal/agentx.m4 less more
0 dnl agentx.m4--detect agentx libraries
1 dnl copied from x-unixrc
2 dnl Tim Martin
3 dnl $Id: agentx.m4,v 1.5 2003/10/08 20:35:24 rjs3 Exp $
4
5 AC_DEFUN([CMU_AGENTX], [
6
7 dnl
8 dnl CMU AgentX
9 dnl
10 AC_MSG_CHECKING([for AgentX])
11 AC_ARG_WITH(agentx, [ --with-agentx CMU AgentX libraries located in (val)], AGENTX_DIR="$withval", AGENTX_DIR=no)
12
13 found_agentx="no"
14
15 if test "${AGENTX_DIR}" != "no" &&
16 test -f $AGENTX_DIR/lib${ABILIBDIR}/libagentx.a &&
17 test -f $AGENTX_DIR/include/agentx.h; then
18 AGENTX_DIR="$AGENTX_DIR"
19 found_agentx="yes"
20 elif test -d /usr/local &&
21 test -f /usr/local/lib${ABILIBDIR}/libagentx.a &&
22 test -f /usr/local/include/agentx.h; then
23 AGENTX_DIR="/usr/local"
24 found_agentx="yes"
25
26 elif test -d /usr/ng &&
27 test -f /usr/ng/lib${ABILIBDIR}/libagentx.a &&
28 test -f /usr/ng/include/agentx.h; then
29 AGENTX_DIR="/usr/ng"
30 found_agentx="yes"
31 fi
32
33 if test "$found_agentx" = "no"; then
34 AC_MSG_WARN([Could not locate AgentX Libraries! http://www.net.cmu.edu/groups/netdev/agentx/])
35 else
36 LIB_AGENTX="-L$AGENTX_DIR/lib${ABILIBDIR} -lagentx"
37 AC_SUBST(LIB_AGENTX)
38 AGENTXFLAGS="-I$AGENTX_DIR/include"
39 AC_SUBST(AGENTXFLAGS)
40 AC_MSG_RESULT([found $AGENTX_DIR/lib${ABILIBDIR}/libagentx.a])
41 fi
42
43
44
45 ])
+0
-155
cmulocal/arx.m4 less more
0 dnl $Id: arx.m4,v 1.6 2005/04/26 19:14:07 shadow Exp $
1
2 AC_DEFUN([CMU_ARX_INC_WHERE1], [
3 saved_CPPFLAGS=$CPPFLAGS
4 CPPFLAGS="$saved_CPPFLAGS -I$1"
5 AC_TRY_COMPILE([#include <arx.h>],
6 [arx_context *foo;],
7 ac_cv_found_arx_inc=yes,
8 ac_cv_found_arx_inc=no)
9 CPPFLAGS=$saved_CPPFLAGS
10 ])
11
12 AC_DEFUN([CMU_ARX_INC_WHERE], [
13 for i in $1; do
14 AC_MSG_CHECKING(for arx headers in $i)
15 CMU_ARX_INC_WHERE1($i)
16 CMU_TEST_INCPATH($i, arx)
17 if test "$ac_cv_found_arx_inc" = "yes"; then
18 ac_cv_arx_where_inc=$i
19 AC_MSG_RESULT(found)
20 break
21 else
22 AC_MSG_RESULT(not found)
23 fi
24 done
25 ])
26
27 #
28 # Test for lib files
29 #
30
31 AC_DEFUN([CMU_ARX_LIB_WHERE1], [
32 AC_REQUIRE([CMU_AFS])
33 AC_REQUIRE([CMU_KRB4])
34 saved_LIBS=$LIBS
35 LIBS="$saved_LIBS -L$1 -larx $AFS_LIB_FLAGS $AFS_CLIENT_LIBS $KRB_LIB_FLAGS $LIB_SOCKET"
36 AC_TRY_LINK(,
37 [arx_Init();],
38 [ac_cv_found_arx_lib=yes],
39 ac_cv_found_arx_lib=no)
40 LIBS=$saved_LIBS
41 ])
42
43 AC_DEFUN([CMU_ARX_LIB_WHERE], [
44 for i in $1; do
45 AC_MSG_CHECKING(for arx libraries in $i)
46 CMU_ARX_LIB_WHERE1($i)
47 CMU_TEST_LIBPATH($i, arx)
48 if test "$ac_cv_found_arx_lib" = "yes" ; then
49 ac_cv_arx_where_lib=$i
50 AC_MSG_RESULT(found)
51 break
52 else
53 AC_MSG_RESULT(not found)
54 fi
55 done
56 ])
57
58 AC_DEFUN([CMU_USE_ARX], [
59 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
60 AC_ARG_WITH(arx,
61 [ --with-arx=PREFIX Compile with arx support],
62 [if test "X$with_arx" = "X"; then
63 with_arx=yes
64 fi])
65 AC_ARG_WITH(arx-lib,
66 [ --with-arx-lib=dir use arx libraries in dir],
67 [if test "$withval" = "yes" -o "$withval" = "no"; then
68 AC_MSG_ERROR([No argument for --with-arx-lib])
69 fi])
70 AC_ARG_WITH(arx-include,
71 [ --with-arx-include=dir use arx headers in dir],
72 [if test "$withval" = "yes" -o "$withval" = "no"; then
73 AC_MSG_ERROR([No argument for --with-arx-include])
74 fi])
75
76 if test "X$with_arx" != "X"; then
77 if test "$with_arx" != "yes"; then
78 ac_cv_arx_where_lib=$with_arx/${CMU_LIB_SUBDIR}
79 ac_cv_arx_where_inc=$with_arx/include
80 fi
81 fi
82
83 if test "X$with_arx_lib" != "X"; then
84 ac_cv_arx_where_lib=$with_arx_lib
85 fi
86 if test "X$ac_cv_arx_where_lib" = "X"; then
87 CMU_ARX_LIB_WHERE(/usr/athena/${CMU_LIB_SUBDIR} /usr/local/${CMU_LIB_SUBDIR} /usr/${CMU_LIB_SUBDIR})
88 fi
89
90 if test "X$with_arx_include" != "X"; then
91 ac_cv_arx_where_inc=$with_arx_include
92 fi
93 if test "X$ac_cv_arx_where_inc" = "X"; then
94 CMU_ARX_INC_WHERE(/usr/athena/include /usr/local/include)
95 fi
96
97 AC_MSG_CHECKING(whether to include arx)
98 if test "X$ac_cv_arx_where_lib" = "X" -o "X$ac_cv_arx_where_inc" = "X"; then
99 ac_cv_found_arx=no
100 AC_MSG_RESULT(no)
101 else
102 ac_cv_found_arx=yes
103 AC_MSG_RESULT(yes)
104 ARX_INC_DIR=$ac_cv_arx_where_inc
105 ARX_LIB_DIR=$ac_cv_arx_where_lib
106 ARX_INC_FLAGS="-I${ARX_INC_DIR}"
107 ARX_LIB_FLAGS="-L${ARX_LIB_DIR} -larx"
108 ARX_LD_FLAGS="-L${ARX_LIB_DIR}"
109 dnl Do not force configure.in to put these in CFLAGS and LIBS unconditionally
110 dnl Allow makefile substitutions....
111 AC_SUBST(ARX_INC_FLAGS)
112 AC_SUBST(ARX_LIB_FLAGS)
113 AC_SUBST(ARX_LD_FLAGS)
114 if test "X$RPATH" = "X"; then
115 RPATH=""
116 fi
117 case "${host}" in
118 *-*-linux*)
119 if test "X$RPATH" = "X"; then
120 RPATH="-Wl,-rpath,${ARX_LIB_DIR}"
121 else
122 RPATH="${RPATH}:${ARX_LIB_DIR}"
123 fi
124 ;;
125 *-*-hpux*)
126 if test "X$RPATH" = "X"; then
127 RPATH="-Wl,+b${ARX_LIB_DIR}"
128 else
129 RPATH="${RPATH}:${ARX_LIB_DIR}"
130 fi
131 ;;
132 *-*-irix*)
133 if test "X$RPATH" = "X"; then
134 RPATH="-Wl,-rpath,${ARX_LIB_DIR}"
135 else
136 RPATH="${RPATH}:${ARX_LIB_DIR}"
137 fi
138 ;;
139 *-*-solaris2*)
140 if test "$ac_cv_prog_gcc" = yes; then
141 if test "X$RPATH" = "X"; then
142 RPATH="-Wl,-R${ARX_LIB_DIR}"
143 else
144 RPATH="${RPATH}:${ARX_LIB_DIR}"
145 fi
146 else
147 RPATH="${RPATH} -R${ARX_LIB_DIR}"
148 fi
149 ;;
150 esac
151 AC_SUBST(RPATH)
152 fi
153 ])
154
+0
-566
cmulocal/ax_path_bdb.m4 less more
0 dnl @synopsis AX_PATH_BDB([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1 dnl
2 dnl This macro finds the latest version of Berkeley DB on the system,
3 dnl and ensures that the header file and library versions match. If
4 dnl MINIMUM-VERSION is specified, it will ensure that the library
5 dnl found is at least that version.
6 dnl
7 dnl It determines the name of the library as well as the path to the
8 dnl header file and library. It will check both the default environment
9 dnl as well as the default Berkeley DB install location. When found, it
10 dnl sets BDB_LIBS, BDB_CPPFLAGS, and BDB_LDFLAGS to the necessary values
11 dnl to add to LIBS, CPPFLAGS, and LDFLAGS, as well as setting BDB_VERSION
12 dnl to the version found. HAVE_DB_H is defined also.
13 dnl
14 dnl The option --with-bdb-dir=DIR can be used to specify a specific
15 dnl Berkeley DB installation to use.
16 dnl
17 dnl An example of it's use is:
18 dnl AX_PATH_BDB([3],[
19 dnl LIBS="$BDB_LIBS $LIBS"
20 dnl LDFLAGS="$BDB_LDFLAGS $LDFLAGS"
21 dnl CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS"
22 dnl ])
23 dnl which will locate the latest version of Berkeley DB on the system,
24 dnl and ensure that it is version 3.0 or higher.
25 dnl
26 dnl Details: This macro does not use either AC_CHECK_HEADERS or
27 dnl AC_CHECK_LIB because, first, the functions inside the library are
28 dnl sometimes renamed to contain a version code that is only available
29 dnl from the db.h on the system, and second, because it is common to
30 dnl have multiple db.h and libdb files on a system it is important to
31 dnl make sure the ones being used correspond to the same version.
32 dnl Additionally, there are many different possible names for libdb
33 dnl when installed by an OS distribution, and these need to be checked
34 dnl if db.h does not correspond to libdb.
35 dnl
36 dnl When cross compiling, only header versions are verified since it
37 dnl would be difficult to check the library version. Additionally
38 dnl the default Berkeley DB installation locations /usr/local/BerkeleyDB*
39 dnl are not searched for higher versions of the library.
40 dnl
41 dnl The format for the list of library names to search came from the
42 dnl Cyrus IMAP distribution, although they are generated dynamically
43 dnl here, and only for the version found in db.h.
44 dnl
45 dnl The macro AX_COMPARE_VERSION is required to use this macro, and
46 dnl should be available from the Autoconf Macro Archive.
47 dnl
48 dnl The author would like to acknowledge the generous and valuable feedback
49 dnl from Guido Draheim, without which this macro would be far less robust,
50 dnl and have poor and inconsistent cross compilation support.
51 dnl
52 dnl @version $Id: ax_path_bdb.m4,v 1.1 2005/01/06 20:24:52 shadow Exp $
53 dnl @author Tim Toolan <toolan@ele.uri.edu>
54 dnl
55
56 dnl #########################################################################
57 AC_DEFUN([AX_PATH_BDB], [
58 dnl # Used to indicate success or failure of this function.
59 ax_path_bdb_ok=no
60
61 # Add --with-bdb-dir option to configure.
62 AC_ARG_WITH([bdb-dir],
63 [AC_HELP_STRING([--with-bdb-dir=DIR],
64 [Berkeley DB installation directory])])
65
66 # Check if --with-bdb-dir was specified.
67 if test "x$with_bdb_dir" = "x" ; then
68 # No option specified, so just search the system.
69 AX_PATH_BDB_NO_OPTIONS([$1], [HIGHEST], [
70 ax_path_bdb_ok=yes
71 ])
72 else
73 # Set --with-bdb-dir option.
74 ax_path_bdb_INC="$with_bdb_dir/include"
75 ax_path_bdb_LIB="$with_bdb_dir/lib"
76
77 dnl # Save previous environment, and modify with new stuff.
78 ax_path_bdb_save_CPPFLAGS="$CPPFLAGS"
79 CPPFLAGS="-I$ax_path_bdb_INC $CPPFLAGS"
80
81 ax_path_bdb_save_LDFLAGS=$LDFLAGS
82 LDFLAGS="-L$ax_path_bdb_LIB $LDFLAGS"
83
84 # Check for specific header file db.h
85 AC_MSG_CHECKING([db.h presence in $ax_path_bdb_INC])
86 if test -f "$ax_path_bdb_INC/db.h" ; then
87 AC_MSG_RESULT([yes])
88 # Check for library
89 AX_PATH_BDB_NO_OPTIONS([$1], [ENVONLY], [
90 ax_path_bdb_ok=yes
91 BDB_CPPFLAGS="-I$ax_path_bdb_INC"
92 BDB_LDFLAGS="-L$ax_path_bdb_LIB"
93 ])
94 else
95 AC_MSG_RESULT([no])
96 AC_MSG_NOTICE([no usable Berkeley DB not found])
97 fi
98
99 dnl # Restore the environment.
100 CPPFLAGS="$ax_path_bdb_save_CPPFLAGS"
101 LDFLAGS="$ax_path_bdb_save_LDFLAGS"
102
103 fi
104
105 dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
106 if test "$ax_path_bdb_ok" = "yes" ; then
107 m4_ifvaln([$2],[$2],[:])dnl
108 m4_ifvaln([$3],[else $3])dnl
109 fi
110
111 ]) dnl AX_PATH_BDB
112
113 dnl #########################################################################
114 dnl Check for berkeley DB of at least MINIMUM-VERSION on system.
115 dnl
116 dnl The OPTION argument determines how the checks occur, and can be one of:
117 dnl
118 dnl HIGHEST - Check both the environment and the default installation
119 dnl directories for Berkeley DB and choose the version that
120 dnl is highest. (default)
121 dnl ENVFIRST - Check the environment first, and if no satisfactory
122 dnl library is found there check the default installation
123 dnl directories for Berkeley DB which is /usr/local/BerkeleyDB*
124 dnl ENVONLY - Check the current environment only.
125 dnl
126 dnl Requires AX_PATH_BDB_PATH_GET_VERSION, AX_PATH_BDB_PATH_FIND_HIGHEST,
127 dnl AX_PATH_BDB_ENV_CONFIRM_LIB, AX_PATH_BDB_ENV_GET_VERSION, and
128 dnl AX_COMPARE_VERSION macros.
129 dnl
130 dnl Result: sets ax_path_bdb_no_options_ok to yes or no
131 dnl sets BDB_LIBS, BDB_CPPFLAGS, BDB_LDFLAGS, BDB_VERSION
132 dnl
133 dnl AX_PATH_BDB_NO_OPTIONS([MINIMUM-VERSION], [OPTION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
134 AC_DEFUN([AX_PATH_BDB_NO_OPTIONS], [
135 dnl # Used to indicate success or failure of this function.
136 ax_path_bdb_no_options_ok=no
137
138 # Values to add to environment to use Berkeley DB.
139 BDB_VERSION=''
140 BDB_LIBS=''
141 BDB_CPPFLAGS=''
142 BDB_LDFLAGS=''
143
144 # Check cross compilation here.
145 if test "x$cross_compiling" = "xyes" ; then
146 # If cross compiling, can't use AC_RUN_IFELSE so do these tests.
147 # The AC_PREPROC_IFELSE confirms that db.h is preprocessable,
148 # and extracts the version number from it.
149 AC_MSG_CHECKING([for db.h])
150
151 AS_VAR_PUSHDEF([HEADER_VERSION],[ax_path_bdb_no_options_HEADER_VERSION])dnl
152 HEADER_VERSION=''
153 AC_PREPROC_IFELSE([
154 AC_LANG_SOURCE([[
155 #include <db.h>
156 AX_PATH_BDB_STUFF DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH
157 ]])
158 ],[
159 # Extract version from preprocessor output.
160 HEADER_VERSION=`eval "$ac_cpp conftest.$ac_ext" 2> /dev/null \
161 | grep AX_PATH_BDB_STUFF | sed 's/[[^0-9,]]//g;s/,/./g;1q'`
162 ],[])
163
164 if test "x$HEADER_VERSION" = "x" ; then
165 AC_MSG_RESULT([no])
166 else
167 AC_MSG_RESULT([$HEADER_VERSION])
168
169 # Check that version is high enough.
170 AX_COMPARE_VERSION([$HEADER_VERSION],[ge],[$1],[
171 # get major and minor version numbers
172 AS_VAR_PUSHDEF([MAJ],[ax_path_bdb_no_options_MAJOR])dnl
173 MAJ=`echo $HEADER_VERSION | sed 's,\..*,,'`
174 AS_VAR_PUSHDEF([MIN],[ax_path_bdb_no_options_MINOR])dnl
175 MIN=`echo $HEADER_VERSION | sed 's,^[[0-9]]*\.,,;s,\.[[0-9]]*$,,'`
176
177 dnl # Save LIBS.
178 ax_path_bdb_no_options_save_LIBS="$LIBS"
179
180 # Check that we can link with the library.
181 AC_SEARCH_LIBS([db_version],
182 [db db-$MAJ.$MIN db$MAJ.$MIN db$MAJ$MIN db-$MAJ db$MAJ],[
183 # Sucessfully found library.
184 ax_path_bdb_no_options_ok=yes
185 BDB_VERSION=$HEADER_VERSION
186
187 # Extract library from LIBS
188 ax_path_bdb_no_options_LEN=` \
189 echo "x$ax_path_bdb_no_options_save_LIBS" \
190 | awk '{print(length)}'`
191 BDB_LIBS=`echo "x$LIBS " \
192 | sed "s/.\{$ax_path_bdb_no_options_LEN\}\$//;s/^x//;s/ //g"`
193 ],[])
194
195 dnl # Restore LIBS
196 LIBS="$ax_path_bdb_no_options_save_LIBS"
197
198 AS_VAR_POPDEF([MAJ])dnl
199 AS_VAR_POPDEF([MIN])dnl
200 ])
201 fi
202
203 AS_VAR_POPDEF([HEADER_VERSION])dnl
204 else
205 # Not cross compiling.
206 # Check version of Berkeley DB in the current environment.
207 AX_PATH_BDB_ENV_GET_VERSION([
208 AX_COMPARE_VERSION([$ax_path_bdb_env_get_version_VERSION],[ge],[$1],[
209 # Found acceptable version in current environment.
210 ax_path_bdb_no_options_ok=yes
211 BDB_VERSION="$ax_path_bdb_env_get_version_VERSION"
212 BDB_LIBS="$ax_path_bdb_env_get_version_LIBS"
213 ])
214 ])
215
216 # Determine if we need to search /usr/local/BerkeleyDB*
217 ax_path_bdb_no_options_DONE=no
218 if test "x$2" = "xENVONLY" ; then
219 ax_path_bdb_no_options_DONE=yes
220 elif test "x$2" = "xENVFIRST" ; then
221 ax_path_bdb_no_options_DONE=$ax_path_bdb_no_options_ok
222 fi
223
224 if test "$ax_path_bdb_no_options_DONE" = "no" ; then
225 # Check for highest in /usr/local/BerkeleyDB*
226 AX_PATH_BDB_PATH_FIND_HIGHEST([
227 if test "$ax_path_bdb_no_options_ok" = "yes" ; then
228 # If we already have an acceptable version use this if higher.
229 AX_COMPARE_VERSION(
230 [$ax_path_bdb_path_find_highest_VERSION],[gt],[$BDB_VERSION])
231 else
232 # Since we didn't have an acceptable version check if this one is.
233 AX_COMPARE_VERSION(
234 [$ax_path_bdb_path_find_highest_VERSION],[ge],[$1])
235 fi
236 ])
237
238 dnl # If result from _AX_COMPARE_VERSION is true we want this version.
239 if test "$ax_compare_version" = "true" ; then
240 ax_path_bdb_no_options_ok=yes
241 BDB_LIBS="-ldb"
242 BDB_CPPFLAGS="-I$ax_path_bdb_path_find_highest_DIR/include"
243 BDB_LDFLAGS="-L$ax_path_bdb_path_find_highest_DIR/lib"
244 BDB_VERSION="$ax_path_bdb_path_find_highest_VERSION"
245 fi
246 fi
247 fi
248
249 dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
250 if test "$ax_path_bdb_no_options_ok" = "yes" ; then
251 AC_MSG_NOTICE([using Berkeley DB version $BDB_VERSION])
252 AC_DEFINE([HAVE_DB_H],[1],
253 [Define to 1 if you have the <db.h> header file.])
254 m4_ifvaln([$3],[$3])dnl
255 else
256 AC_MSG_NOTICE([no Berkeley DB version $1 or higher found])
257 m4_ifvaln([$4],[$4])dnl
258 fi
259 ]) dnl AX_PATH_BDB_NO_OPTIONS
260
261 dnl #########################################################################
262 dnl Check the default installation directory for Berkeley DB which is
263 dnl of the form /usr/local/BerkeleyDB* for the highest version.
264 dnl
265 dnl Result: sets ax_path_bdb_path_find_highest_ok to yes or no,
266 dnl sets ax_path_bdb_path_find_highest_VERSION to version,
267 dnl sets ax_path_bdb_path_find_highest_DIR to directory.
268 dnl
269 dnl AX_PATH_BDB_PATH_FIND_HIGHEST([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
270 AC_DEFUN([AX_PATH_BDB_PATH_FIND_HIGHEST], [
271 dnl # Used to indicate success or failure of this function.
272 ax_path_bdb_path_find_highest_ok=no
273
274 AS_VAR_PUSHDEF([VERSION],[ax_path_bdb_path_find_highest_VERSION])dnl
275 VERSION=''
276
277 ax_path_bdb_path_find_highest_DIR=''
278
279 # find highest verison in default install directory for Berkeley DB
280 AS_VAR_PUSHDEF([CURDIR],[ax_path_bdb_path_find_highest_CURDIR])dnl
281 AS_VAR_PUSHDEF([CUR_VERSION],[ax_path_bdb_path_get_version_VERSION])dnl
282
283 for CURDIR in `ls -d /usr/local/BerkeleyDB* 2> /dev/null`
284 do
285 AX_PATH_BDB_PATH_GET_VERSION([$CURDIR],[
286 AX_COMPARE_VERSION([$CUR_VERSION],[gt],[$VERSION],[
287 ax_path_bdb_path_find_highest_ok=yes
288 ax_path_bdb_path_find_highest_DIR="$CURDIR"
289 VERSION="$CUR_VERSION"
290 ])
291 ])
292 done
293
294 AS_VAR_POPDEF([VERSION])dnl
295 AS_VAR_POPDEF([CUR_VERSION])dnl
296 AS_VAR_POPDEF([CURDIR])dnl
297
298 dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
299 if test "$ax_path_bdb_path_find_highest_ok" = "yes" ; then
300 m4_ifvaln([$1],[$1],[:])dnl
301 m4_ifvaln([$2],[else $2])dnl
302 fi
303
304 ]) dnl AX_PATH_BDB_PATH_FIND_HIGHEST
305
306 dnl #########################################################################
307 dnl Checks for Berkeley DB in specified directory's lib and include
308 dnl subdirectories.
309 dnl
310 dnl Result: sets ax_path_bdb_path_get_version_ok to yes or no,
311 dnl sets ax_path_bdb_path_get_version_VERSION to version.
312 dnl
313 dnl AX_PATH_BDB_PATH_GET_VERSION(BDB-DIR, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
314 AC_DEFUN([AX_PATH_BDB_PATH_GET_VERSION], [
315 dnl # Used to indicate success or failure of this function.
316 ax_path_bdb_path_get_version_ok=no
317
318 # Indicate status of checking for Berkeley DB header.
319 AC_MSG_CHECKING([in $1/include for db.h])
320 ax_path_bdb_path_get_version_got_header=no
321 test -f "$1/include/db.h" && ax_path_bdb_path_get_version_got_header=yes
322 AC_MSG_RESULT([$ax_path_bdb_path_get_version_got_header])
323
324 # Indicate status of checking for Berkeley DB library.
325 AC_MSG_CHECKING([in $1/lib for library -ldb])
326
327 ax_path_bdb_path_get_version_VERSION=''
328
329 if test -d "$1/include" && test -d "$1/lib" &&
330 test "$ax_path_bdb_path_get_version_got_header" = "yes" ; then
331 dnl # save and modify environment
332 ax_path_bdb_path_get_version_save_CPPFLAGS="$CPPFLAGS"
333 CPPFLAGS="-I$1/include $CPPFLAGS"
334
335 ax_path_bdb_path_get_version_save_LIBS="$LIBS"
336 LIBS="$LIBS -ldb"
337
338 ax_path_bdb_path_get_version_save_LDFLAGS="$LDFLAGS"
339 LDFLAGS="-L$1/lib $LDFLAGS"
340
341 # Compile and run a program that compares the version defined in
342 # the header file with a version defined in the library function
343 # db_version.
344 AC_RUN_IFELSE([
345 AC_LANG_SOURCE([[
346 #include <stdio.h>
347 #include <db.h>
348 int main(int argc,char **argv)
349 {
350 int major,minor,patch;
351 db_version(&major,&minor,&patch);
352 if (argc > 1)
353 printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
354 if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
355 DB_VERSION_PATCH == patch)
356 return 0;
357 else
358 return 1;
359 }
360 ]])
361 ],[
362 # Program compiled and ran, so get version by adding argument.
363 ax_path_bdb_path_get_version_VERSION=`./conftest$ac_exeext x`
364 ax_path_bdb_path_get_version_ok=yes
365 ],[],[])
366
367 dnl # restore environment
368 CPPFLAGS="$ax_path_bdb_path_get_version_save_CPPFLAGS"
369 LIBS="$ax_path_bdb_path_get_version_save_LIBS"
370 LDFLAGS="$ax_path_bdb_path_get_version_save_LDFLAGS"
371 fi
372
373 dnl # Finally, execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
374 if test "$ax_path_bdb_path_get_version_ok" = "yes" ; then
375 AC_MSG_RESULT([$ax_path_bdb_path_get_version_VERSION])
376 m4_ifvaln([$2],[$2])dnl
377 else
378 AC_MSG_RESULT([no])
379 m4_ifvaln([$3],[$3])dnl
380 fi
381 ]) dnl AX_PATH_BDB_PATH_GET_VERSION
382
383 #############################################################################
384 dnl Checks if version of library and header match specified version.
385 dnl Only meant to be used by AX_PATH_BDB_ENV_GET_VERSION macro.
386 dnl
387 dnl Requires AX_COMPARE_VERSION macro.
388 dnl
389 dnl Result: sets ax_path_bdb_env_confirm_lib_ok to yes or no.
390 dnl
391 dnl AX_PATH_BDB_ENV_CONFIRM_LIB(VERSION, [LIBNAME])
392 AC_DEFUN([AX_PATH_BDB_ENV_CONFIRM_LIB], [
393 dnl # Used to indicate success or failure of this function.
394 ax_path_bdb_env_confirm_lib_ok=no
395
396 dnl # save and modify environment to link with library LIBNAME
397 ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
398 LIBS="$LIBS $2"
399
400 # Compile and run a program that compares the version defined in
401 # the header file with a version defined in the library function
402 # db_version.
403 AC_RUN_IFELSE([
404 AC_LANG_SOURCE([[
405 #include <stdio.h>
406 #include <db.h>
407 int main(int argc,char **argv)
408 {
409 int major,minor,patch;
410 db_version(&major,&minor,&patch);
411 if (argc > 1)
412 printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
413 if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
414 DB_VERSION_PATCH == patch)
415 return 0;
416 else
417 return 1;
418 }
419 ]])
420 ],[
421 # Program compiled and ran, so get version by giving an argument,
422 # which will tell the program to print the output.
423 ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
424
425 # If the versions all match up, indicate success.
426 AX_COMPARE_VERSION([$ax_path_bdb_env_confirm_lib_VERSION],[eq],[$1],[
427 ax_path_bdb_env_confirm_lib_ok=yes
428 ])
429 ],[],[])
430
431 dnl # restore environment
432 LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
433
434 ]) dnl AX_PATH_BDB_ENV_CONFIRM_LIB
435
436 #############################################################################
437 dnl Finds the version and library name for Berkeley DB in the
438 dnl current environment. Tries many different names for library.
439 dnl
440 dnl Requires AX_PATH_BDB_ENV_CONFIRM_LIB macro.
441 dnl
442 dnl Result: set ax_path_bdb_env_get_version_ok to yes or no,
443 dnl set ax_path_bdb_env_get_version_VERSION to the version found,
444 dnl and ax_path_bdb_env_get_version_LIBNAME to the library name.
445 dnl
446 dnl AX_PATH_BDB_ENV_GET_VERSION([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
447 AC_DEFUN([AX_PATH_BDB_ENV_GET_VERSION], [
448 dnl # Used to indicate success or failure of this function.
449 ax_path_bdb_env_get_version_ok=no
450
451 ax_path_bdb_env_get_version_VERSION=''
452 ax_path_bdb_env_get_version_LIBS=''
453
454 AS_VAR_PUSHDEF([HEADER_VERSION],[ax_path_bdb_env_get_version_HEADER_VERSION])dnl
455 AS_VAR_PUSHDEF([TEST_LIBNAME],[ax_path_bdb_env_get_version_TEST_LIBNAME])dnl
456
457 # Indicate status of checking for Berkeley DB library.
458 AC_MSG_CHECKING([for db.h])
459
460 # Compile and run a program that determines the Berkeley DB version
461 # in the header file db.h.
462 HEADER_VERSION=''
463 AC_RUN_IFELSE([
464 AC_LANG_SOURCE([[
465 #include <stdio.h>
466 #include <db.h>
467 int main(int argc,char **argv)
468 {
469 if (argc > 1)
470 printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
471 return 0;
472 }
473 ]])
474 ],[
475 # Program compiled and ran, so get version by adding an argument.
476 HEADER_VERSION=`./conftest$ac_exeext x`
477 AC_MSG_RESULT([$HEADER_VERSION])
478 ],[AC_MSG_RESULT([no])],[AC_MSG_RESULT([no])])
479
480 # Have header version, so try to find corresponding library.
481 # Looks for library names in the order:
482 # nothing, db, db-X.Y, dbX.Y, dbXY, db-X, dbX
483 # and stops when it finds the first one that matches the version
484 # of the header file.
485 if test "x$HEADER_VERSION" != "x" ; then
486 AC_MSG_CHECKING([for library containing Berkeley DB $HEADER_VERSION])
487
488 AS_VAR_PUSHDEF([MAJOR],[ax_path_bdb_env_get_version_MAJOR])dnl
489 AS_VAR_PUSHDEF([MINOR],[ax_path_bdb_env_get_version_MINOR])dnl
490
491 # get major and minor version numbers
492 MAJOR=`echo $HEADER_VERSION | sed 's,\..*,,'`
493 MINOR=`echo $HEADER_VERSION | sed 's,^[[0-9]]*\.,,;s,\.[[0-9]]*$,,'`
494
495 # see if it is already specified in LIBS
496 TEST_LIBNAME=''
497 AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
498
499 if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
500 # try format "db"
501 TEST_LIBNAME='-ldb'
502 AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
503 fi
504
505 if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
506 # try format "db-X.Y"
507 TEST_LIBNAME="-ldb-${MAJOR}.$MINOR"
508 AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
509 fi
510
511 if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
512 # try format "dbX.Y"
513 TEST_LIBNAME="-ldb${MAJOR}.$MINOR"
514 AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
515 fi
516
517 if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
518 # try format "dbXY"
519 TEST_LIBNAME="-ldb$MAJOR$MINOR"
520 AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
521 fi
522
523 if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
524 # try format "db-X"
525 TEST_LIBNAME="-ldb-$MAJOR"
526 AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
527 fi
528
529 if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
530 # try format "dbX"
531 TEST_LIBNAME="-ldb$MAJOR"
532 AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
533 fi
534
535 dnl # Found a valid library.
536 if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then
537 if test "x$TEST_LIBNAME" = "x" ; then
538 AC_MSG_RESULT([none required])
539 else
540 AC_MSG_RESULT([$TEST_LIBNAME])
541 fi
542 ax_path_bdb_env_get_version_VERSION="$HEADER_VERSION"
543 ax_path_bdb_env_get_version_LIBS="$TEST_LIBNAME"
544 ax_path_bdb_env_get_version_ok=yes
545 else
546 AC_MSG_RESULT([no])
547 fi
548
549 AS_VAR_POPDEF([MAJOR])dnl
550 AS_VAR_POPDEF([MINOR])dnl
551 fi
552
553 AS_VAR_POPDEF([HEADER_VERSION])dnl
554 AS_VAR_POPDEF([TEST_LIBNAME])dnl
555
556 dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
557 if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then
558 m4_ifvaln([$1],[$1],[:])dnl
559 m4_ifvaln([$2],[else $2])dnl
560 fi
561
562 ]) dnl BDB_ENV_GET_VERSION
563
564 #############################################################################
565
+0
-288
cmulocal/berkdb.m4 less more
0 dnl $Id: berkdb.m4,v 1.24 2010/01/06 17:01:27 murch Exp $
1
2 AC_DEFUN([CMU_DB_INC_WHERE1], [
3 saved_CPPFLAGS=$CPPFLAGS
4 CPPFLAGS="$saved_CPPFLAGS -I$1"
5 AC_TRY_COMPILE([#include <db.h>],
6 [DB *db;
7 db_create(&db, NULL, 0);
8 db->open(db, "foo.db", NULL, DB_UNKNOWN, DB_RDONLY, 0644);],
9 ac_cv_found_db_inc=yes,
10 ac_cv_found_db_inc=no)
11 CPPFLAGS=$saved_CPPFLAGS
12 ])
13
14 AC_DEFUN([CMU_DB_INC_WHERE], [
15 for i in $1; do
16 AC_MSG_CHECKING(for db headers in $i)
17 CMU_DB_INC_WHERE1($i)
18 CMU_TEST_INCPATH($i, db)
19 if test "$ac_cv_found_db_inc" = "yes"; then
20 ac_cv_db_where_inc=$i
21 AC_MSG_RESULT(found)
22 break
23 else
24 AC_MSG_RESULT(not found)
25 fi
26 done
27 ])
28
29 #
30 # Test for lib files
31 #
32
33 AC_DEFUN([CMU_DB3_LIB_WHERE1], [
34 AC_REQUIRE([CMU_AFS])
35 AC_REQUIRE([CMU_KRB4])
36 saved_LIBS=$LIBS
37 LIBS="$saved_LIBS -L$1 -ldb-3"
38 AC_TRY_LINK([#include <db.h>],
39 [db_env_create(NULL, 0);],
40 [ac_cv_found_db_3_lib=yes],
41 ac_cv_found_db_3_lib=no)
42 LIBS=$saved_LIBS
43 ])
44 AC_DEFUN([CMU_DB4_LIB_WHERE1], [
45 AC_REQUIRE([CMU_AFS])
46 AC_REQUIRE([CMU_KRB4])
47 saved_LIBS=$LIBS
48 LIBS="$saved_LIBS -L$1 -ldb-4"
49 AC_TRY_LINK([#include <db.h>],
50 [db_env_create(NULL, 0);],
51 [ac_cv_found_db_4_lib=yes],
52 ac_cv_found_db_4_lib=no)
53 LIBS=$saved_LIBS
54 ])
55
56 AC_DEFUN([CMU_DB_LIB_WHERE], [
57 for i in $1; do
58 AC_MSG_CHECKING(for db libraries in $i)
59 if test "$enable_db4" = "yes"; then
60 CMU_DB4_LIB_WHERE1($i)
61 CMU_TEST_LIBPATH($i, [db-4])
62 ac_cv_found_db_lib=$ac_cv_found_db_4_lib
63 else
64 CMU_DB3_LIB_WHERE1($i)
65 CMU_TEST_LIBPATH($i, [db-3])
66 ac_cv_found_db_lib=$ac_cv_found_db_3_lib
67 fi
68 if test "$ac_cv_found_db_lib" = "yes" ; then
69 ac_cv_db_where_lib=$i
70 AC_MSG_RESULT(found)
71 break
72 else
73 AC_MSG_RESULT(not found)
74 fi
75 done
76 ])
77
78 AC_DEFUN([CMU_USE_DB], [
79 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
80 AC_ARG_WITH(db,
81 [ --with-db=PREFIX Compile with db support],
82 [if test "X$with_db" = "X"; then
83 with_db=yes
84 fi])
85 AC_ARG_WITH(db-lib,
86 [ --with-db-lib=dir use db libraries in dir],
87 [if test "$withval" = "yes" -o "$withval" = "no"; then
88 AC_MSG_ERROR([No argument for --with-db-lib])
89 fi])
90 AC_ARG_WITH(db-include,
91 [ --with-db-include=dir use db headers in dir],
92 [if test "$withval" = "yes" -o "$withval" = "no"; then
93 AC_MSG_ERROR([No argument for --with-db-include])
94 fi])
95 AC_ARG_ENABLE(db4,
96 [ --enable-db4 use db 4.x libraries])
97
98 if test "X$with_db" != "X"; then
99 if test "$with_db" != "yes"; then
100 ac_cv_db_where_lib=$with_db/$CMU_LIB_SUBDIR
101 ac_cv_db_where_inc=$with_db/include
102 fi
103 fi
104
105 if test "X$with_db_lib" != "X"; then
106 ac_cv_db_where_lib=$with_db_lib
107 fi
108 if test "X$ac_cv_db_where_lib" = "X"; then
109 CMU_DB_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
110 fi
111
112 if test "X$with_db_include" != "X"; then
113 ac_cv_db_where_inc=$with_db_include
114 fi
115 if test "X$ac_cv_db_where_inc" = "X"; then
116 CMU_DB_INC_WHERE(/usr/athena/include /usr/local/include)
117 fi
118
119 AC_MSG_CHECKING(whether to include db)
120 if test "X$ac_cv_db_where_lib" = "X" -o "X$ac_cv_db_where_inc" = "X"; then
121 ac_cv_found_db=no
122 AC_MSG_RESULT(no)
123 else
124 ac_cv_found_db=yes
125 AC_MSG_RESULT(yes)
126 DB_INC_DIR=$ac_cv_db_where_inc
127 DB_LIB_DIR=$ac_cv_db_where_lib
128 DB_INC_FLAGS="-I${DB_INC_DIR}"
129 if test "$enable_db4" = "yes"; then
130 DB_LIB_FLAGS="-L${DB_LIB_DIR} -ldb-4"
131 else
132 DB_LIB_FLAGS="-L${DB_LIB_DIR} -ldb-3"
133 fi
134 dnl Do not force configure.in to put these in CFLAGS and LIBS unconditionally
135 dnl Allow makefile substitutions....
136 AC_SUBST(DB_INC_FLAGS)
137 AC_SUBST(DB_LIB_FLAGS)
138 if test "X$RPATH" = "X"; then
139 RPATH=""
140 fi
141 case "${host}" in
142 *-*-linux*)
143 if test "X$RPATH" = "X"; then
144 RPATH="-Wl,-rpath,${DB_LIB_DIR}"
145 else
146 RPATH="${RPATH}:${DB_LIB_DIR}"
147 fi
148 ;;
149 *-*-hpux*)
150 if test "X$RPATH" = "X"; then
151 RPATH="-Wl,+b${DB_LIB_DIR}"
152 else
153 RPATH="${RPATH}:${DB_LIB_DIR}"
154 fi
155 ;;
156 *-*-irix*)
157 if test "X$RPATH" = "X"; then
158 RPATH="-Wl,-rpath,${DB_LIB_DIR}"
159 else
160 RPATH="${RPATH}:${DB_LIB_DIR}"
161 fi
162 ;;
163 *-*-solaris2*)
164 if test "$ac_cv_prog_gcc" = yes; then
165 if test "X$RPATH" = "X"; then
166 RPATH="-Wl,-R${DB_LIB_DIR}"
167 else
168 RPATH="${RPATH}:${DB_LIB_DIR}"
169 fi
170 else
171 RPATH="${RPATH} -R${DB_LIB_DIR}"
172 fi
173 ;;
174 esac
175 AC_SUBST(RPATH)
176 fi
177 ])
178
179
180
181 dnl ---- CUT HERE ---
182
183 dnl These are the Cyrus Berkeley DB macros. In an ideal world these would be
184 dnl identical to the above.
185
186 dnl They are here so that they can be shared between Cyrus IMAPd
187 dnl and Cyrus SASL with relative ease.
188
189 dnl The big difference between this and the ones above is that we don't assume
190 dnl that we know the name of the library, and we try a lot of permutations
191 dnl instead. We also assume that DB4 is acceptable.
192
193 dnl When we're done, there will be a BDB_LIBADD and a BDB_INCADD which should
194 dnl be used when necessary. We should probably be smarter about our RPATH
195 dnl handling.
196
197 dnl Call these with BERKELEY_DB_CHK.
198
199 dnl We will also set $dblib to "berkeley" if we are successful, "no" otherwise.
200
201 dnl this is unbelievably painful due to confusion over what db-3 should be
202 dnl named and where the db-3 header file is located. arg.
203 AC_DEFUN([CYRUS_BERKELEY_DB_CHK_LIB],
204 [
205 BDB_SAVE_LDFLAGS=$LDFLAGS
206
207 if test -d $with_bdb_lib; then
208 CMU_ADD_LIBPATH_TO($with_bdb_lib, LDFLAGS)
209 CMU_ADD_LIBPATH_TO($with_bdb_lib, BDB_LIBADD)
210 else
211 BDB_LIBADD=""
212 fi
213
214 saved_LIBS=$LIBS
215 for dbname in ${with_bdb} \
216 db-5.2 db5.2 db52 \
217 db-5.1 db5.2 db51 \
218 db-5.0 db5.2 db50 \
219 db-4.8 db4.8 db48 \
220 db-4.7 db4.7 db47 \
221 db-4.6 db4.6 db46 \
222 db-4.5 db4.5 db45 \
223 db-4.4 db4.4 db44 \
224 db-4.3 db4.3 db43 \
225 db-4.2 db4.2 db42 \
226 db-4.1 db4.1 db41 \
227 db-4.0 db4.0 db40 db-4 db4 \
228 db-3.3 db3.3 db33 \
229 db-3.2 db3.2 db32 \
230 db-3.1 db3.1 db31 \
231 db-3.0 db3.0 db30 db-3 db3 \
232 db
233 do
234 LIBS="$saved_LIBS -l$dbname"
235 AC_TRY_LINK([#include <stdio.h>
236 #include <db.h>],
237 [db_create(NULL, NULL, 0);],
238 BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db,
239 dblib="no")
240 if test "$dblib" = "berkeley"; then break; fi
241 done
242 if test "$dblib" = "no"; then
243 LIBS="$saved_LIBS -ldb"
244 AC_TRY_LINK([#include <stdio.h>
245 #include <db.h>],
246 [db_open(NULL, 0, 0, 0, NULL, NULL, NULL);],
247 BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db,
248 dblib="no")
249 fi
250 LIBS=$saved_LIBS
251
252 LDFLAGS=$BDB_SAVE_LDFLAGS
253 ])
254
255 AC_DEFUN([CYRUS_BERKELEY_DB_OPTS],
256 [
257 AC_ARG_WITH(bdb-libdir,
258 [ --with-bdb-libdir=DIR Berkeley DB lib files are in DIR],
259 with_bdb_lib=$withval,
260 [ test "${with_bdb_lib+set}" = set || with_bdb_lib=none])
261 AC_ARG_WITH(bdb-incdir,
262 [ --with-bdb-incdir=DIR Berkeley DB include files are in DIR],
263 with_bdb_inc=$withval,
264 [ test "${with_bdb_inc+set}" = set || with_bdb_inc=none ])
265 ])
266
267 AC_DEFUN([CYRUS_BERKELEY_DB_CHK],
268 [
269 AC_REQUIRE([CYRUS_BERKELEY_DB_OPTS])
270
271 cmu_save_CPPFLAGS=$CPPFLAGS
272
273 if test -d $with_bdb_inc; then
274 CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
275 BDB_INCADD="-I$with_bdb_inc"
276 else
277 BDB_INCADD=""
278 fi
279
280 dnl Note that FreeBSD puts it in a wierd place
281 dnl (but they should use with-bdb-incdir)
282 AC_CHECK_HEADER(db.h,
283 [CYRUS_BERKELEY_DB_CHK_LIB()],
284 dblib="no")
285
286 CPPFLAGS=$cmu_save_CPPFLAGS
287 ])
+0
-39
cmulocal/bsd_sockets.m4 less more
0 dnl bsd_sockets.m4--which socket libraries do we need?
1 dnl Derrick Brashear
2 dnl from Zephyr
3 dnl $Id: bsd_sockets.m4,v 1.11 2010/02/18 16:19:07 murch Exp $
4
5 dnl Hacked on by Rob Earhart to not just toss stuff in LIBS
6 dnl It now puts everything required for sockets into LIB_SOCKET
7
8 AC_DEFUN([CMU_SOCKETS], [
9 save_LIBS="$LIBS"
10 LIB_SOCKET=""
11 AC_CHECK_FUNC(connect, :,
12 [AC_CHECK_LIB(nsl, gethostbyname,
13 LIB_SOCKET="-lnsl $LIB_SOCKET")
14 AC_CHECK_LIB(socket, connect,
15 LIB_SOCKET="-lsocket $LIB_SOCKET")]
16 )
17 LIBS="$LIB_SOCKET $save_LIBS"
18 AC_CHECK_FUNC(res_search, :,
19 [LIBS="-lresolv $LIB_SOCKET $save_LIBS"
20 AC_TRY_LINK([[
21 #include <sys/types.h>
22 #include <netinet/in.h>
23 #include <arpa/nameser.h>
24 #ifdef HAVE_ARPA_NAMESER_COMPAT_H
25 #include <arpa/nameser_compat.h>
26 #endif
27 #include <resolv.h>]],[[
28 const char host[12]="openafs.org";
29 u_char ans[1024];
30 res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans));
31 return 0;
32 ]], LIB_SOCKET="-lresolv $LIB_SOCKET")
33 ])
34 LIBS="$LIB_SOCKET $save_LIBS"
35 AC_CHECK_FUNCS(dn_expand dns_lookup)
36 LIBS="$save_LIBS"
37 AC_SUBST(LIB_SOCKET)
38 ])
+0
-31
cmulocal/c-attribute.m4 less more
0 dnl
1 dnl $Id: c-attribute.m4,v 1.5 2010/01/06 17:01:27 murch Exp $
2 dnl
3
4 dnl
5 dnl Test for __attribute__
6 dnl
7
8 AC_DEFUN([CMU_C___ATTRIBUTE__], [
9 AC_MSG_CHECKING(for __attribute__)
10 AC_CACHE_VAL(ac_cv___attribute__, [
11 AC_TRY_COMPILE([
12 #include <stdlib.h>
13 static void foo(void) __attribute__ ((noreturn));
14
15 static void
16 foo(void)
17 {
18 exit(1);
19 }
20 ],
21 [
22 ],
23 ac_cv___attribute__=yes,
24 ac_cv___attribute__=no)])
25 if test "$ac_cv___attribute__" = "yes"; then
26 AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
27 fi
28 AC_MSG_RESULT($ac_cv___attribute__)
29 ])
30
+0
-35
cmulocal/c-fpic.m4 less more
0 dnl
1 dnl $Id: c-fpic.m4,v 1.4 2010/01/06 17:01:27 murch Exp $
2 dnl
3
4 dnl
5 dnl Test for -fPIC
6 dnl
7
8 AC_DEFUN([CMU_C_FPIC], [
9 AC_MSG_CHECKING(if compiler supports -fPIC)
10 AC_CACHE_VAL(ac_cv_fpic, [
11 save_CFLAGS=$CFLAGS
12 CFLAGS="${CFLAGS} -fPIC"
13 AC_TRY_COMPILE([
14 #include <stdlib.h>
15 static void
16 foo(void)
17 {
18 exit(1);
19 }
20 ],
21 [
22 ],
23 ac_cv_fpic=yes,
24 ac_cv_fpic=no)
25 CFLAGS=$save_CFLAGS
26 ])
27 if test "$ac_cv_fpic" = "yes"; then
28 FPIC_CFLAGS="-fPIC"
29 else
30 FPIC_CFLAGS=""
31 fi
32 AC_MSG_RESULT($ac_cv_fpic)
33 ])
34
+0
-35
cmulocal/clamav.m4 less more
0 dnl
1 dnl macros for configure.in to detect clamav library
2 dnl $Id: clamav.m4,v 1.2 2005/05/28 02:26:59 shadow Exp $
3 dnl
4
5 AC_DEFUN([CMU_CLAMAV], [
6 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
7 AC_ARG_WITH(clamav,[ --with-clamav=PATH use ClamAV - PATH to clamav-config (yes)],
8 with_clamav=$withval, with_clamav=yes)
9 have_clamav=no
10 if test "$with_clamav" != no; then
11
12 if test -d $with_clamav; then
13 clamav_path=${with_clamav}:${with_clamav}/bin
14 else
15 clamav_path=/usr/local/bin:/usr/bin:$PATH
16 fi
17 AC_PATH_PROG(CLAMAV_CONFIG,clamav-config,,[$clamav_path])
18
19 if test -x "$CLAMAV_CONFIG"; then
20 LIB_CLAMAV="`$CLAMAV_CONFIG --libs` -lclamav"
21 CFLAGS_CLAMAV=`$CLAMAV_CONFIG --cflags`
22
23 if test -n "$LIB_CLAMAV"; then
24 have_clamav=yes
25 test -n "$CFLAGS_CLAMAV" && CPPFLAGS="$CPPFLAGS $CFLAGS_CLAMAV"
26 AC_DEFINE(HAVE_CLAMAV,[],[Do we have ClamAV?])
27 AC_SUBST(LIB_CLAMAV)
28 fi
29 fi
30 fi
31
32 AC_MSG_CHECKING(ClamAV support)
33 AC_MSG_RESULT($have_clamav)
34 ])
+0
-28
cmulocal/com_err.m4 less more
0 dnl com_err.m4--com_err detection macro
1 dnl Rob Earhart
2 dnl $Id: com_err.m4,v 1.6 2003/10/08 20:35:24 rjs3 Exp $
3
4 AC_DEFUN([CMU_COMERR], [
5 cmu_need_compile_et=no
6 AC_CHECK_PROGS(COMPILE_ET, compile_et, no)
7 if test "$COMPILE_ET" = no; then
8 COMPILE_ET="\$(top_builddir)/com_err/compile_et"
9 cmu_need_to_compile_com_err=yes
10 fi
11 AC_CHECK_HEADER(com_err.h,,CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/com_err")
12 cmu_save_LIBS="$LIBS"
13 AC_CHECK_LIB(com_err, com_err,
14 LIB_COMERR="-lcom_err",
15 LDFLAGS="$LDFLAGS -L`pwd`/com_err"
16 LIB_COMERR="\$(top_builddir)/com_err/libcom_err.la"
17 cmu_need_to_compile_com_err=yes)
18 AC_SUBST(LIB_COMERR)
19 LIBS="$cmu_save_LIBS"
20 AC_MSG_CHECKING(whether we need to compile com_err)
21 if test "$cmu_need_to_compile_com_err" = yes; then
22 AC_MSG_RESULT(yes)
23 AC_CONFIG_SUBDIRS(com_err)
24 else
25 AC_MSG_RESULT(no)
26 fi
27 ])
+0
-157
cmulocal/com_err_link.m4 less more
0 dnl damnit, i don't want to figure out if I need to build an integral com_err
1 dnl library with the collection, I just want to know where it's installed,
2 dnl so don't bitch, Rob...
3 dnl Derrick Brashear
4 dnl $Id: com_err_link.m4,v 1.9 2006/02/25 18:32:46 cg2v Exp $
5
6
7 AC_DEFUN([CMU_COMERR_INC_WHERE1], [
8 saved_CPPFLAGS=$CPPFLAGS
9 CPPFLAGS="$saved_CPPFLAGS -I$1"
10 AC_TRY_COMPILE([#include <com_err.h>],
11 [int foo;],
12 ac_cv_found_com_err_inc=yes,
13 ac_cv_found_com_err_inc=no)
14 CPPFLAGS=$saved_CPPFLAGS
15 ])
16
17 AC_DEFUN([CMU_COMERR_INC_WHERE], [
18 for i in $1; do
19 AC_MSG_CHECKING(for com_err headers in $i)
20 CMU_COMERR_INC_WHERE1($i)
21 CMU_TEST_INCPATH($i, com_err)
22 if test "$ac_cv_found_com_err_inc" = "yes"; then
23 ac_cv_comerr_where_inc=$i
24 AC_MSG_RESULT(found)
25 break
26 else
27 AC_MSG_RESULT(not found)
28 fi
29 done
30 ])
31
32 #
33 # Test for lib files
34 #
35
36 AC_DEFUN([CMU_COMERR_LIB_WHERE1], [
37 saved_LIBS=$LIBS
38 LIBS="$saved_LIBS -L$1 -lcom_err"
39 AC_TRY_LINK(,
40 [com_err();],
41 [ac_cv_found_com_err_lib=yes],
42 ac_cv_found_com_err_lib=no)
43 LIBS=$saved_LIBS
44 ])
45
46 AC_DEFUN([CMU_COMERR_LIB_WHERE], [
47 for i in $1; do
48 AC_MSG_CHECKING(for com_err libraries in $i)
49 CMU_COMERR_LIB_WHERE1($i)
50 CMU_TEST_LIBPATH($i, com_err)
51 if test "$ac_cv_found_com_err_lib" = "yes" ; then
52 ac_cv_comerr_where_lib=$i
53 AC_MSG_RESULT(found)
54 break
55 else
56 AC_MSG_RESULT(not found)
57 fi
58 done
59 ])
60
61 AC_DEFUN([CMU_USE_COMERR], [
62 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
63 AC_ARG_WITH(comerr,
64 [ --with-comerr=PREFIX Compile with com_err support],
65 [if test "X$with_comerr" = "X"; then
66 with_comerr=yes
67 fi])
68 AC_ARG_WITH(comerr-lib,
69 [ --with-comerr-lib=dir use com_err libraries in dir],
70 [if test "$withval" = "yes" -o "$withval" = "no"; then
71 AC_MSG_ERROR([No argument for --with-comerr-lib])
72 fi])
73 AC_ARG_WITH(comerr-include,
74 [ --with-comerr-include=dir use com_err headers in dir],
75 [if test "$withval" = "yes" -o "$withval" = "no"; then
76 AC_MSG_ERROR([No argument for --with-comerr-include])
77 fi])
78
79 if test "X$with_comerr" != "X"; then
80 if test "$with_comerr" != "yes"; then
81 ac_cv_comerr_where_lib=$with_comerr/$CMU_LIB_SUBDIR
82 ac_cv_comerr_where_inc=$with_comerr/include
83 fi
84 fi
85
86 if test "X$with_comerr_lib" != "X"; then
87 ac_cv_comerr_where_lib=$with_comerr_lib
88 fi
89 if test "X$ac_cv_comerr_where_lib" = "X"; then
90 CMU_COMERR_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
91 fi
92
93 if test "X$with_comerr_include" != "X"; then
94 ac_cv_comerr_where_inc=$with_comerr_include
95 fi
96 if test "X$ac_cv_comerr_where_inc" = "X"; then
97 CMU_COMERR_INC_WHERE(/usr/athena/include /usr/local/include)
98 fi
99
100 AC_MSG_CHECKING(whether to include com_err)
101 if test "X$ac_cv_comerr_where_lib" = "X" -a "X$ac_cv_comerr_where_inc" = "X"; then
102 ac_cv_found_com_err=no
103 AC_MSG_RESULT(no)
104 else
105 ac_cv_found_com_err=yes
106 AC_MSG_RESULT(yes)
107 COMERR_INC_DIR=$ac_cv_comerr_where_inc
108 COMERR_LIB_DIR=$ac_cv_comerr_where_lib
109 test "$COMERR_INC_DIR" && COMERR_INC_FLAGS="-I${COMERR_INC_DIR}"
110 COMERR_LIB_FLAGS="-lcom_err"
111 test "$COMERR_LIB_DIR" && COMERR_LIB_FLAGS="-L${COMERR_LIB_DIR} -lcom_err"
112 dnl Do not force configure.in to put these in CFLAGS and LIBS unconditionally
113 dnl Allow makefile substitutions....
114 AC_SUBST(COMERR_INC_FLAGS)
115 AC_SUBST(COMERR_LIB_FLAGS)
116 if test "X$RPATH" = "X"; then
117 RPATH=""
118 fi
119 case "${host}" in
120 *-*-linux*)
121 if test "X$RPATH" = "X"; then
122 RPATH="-Wl,-rpath,${COMERR_LIB_DIR}"
123 else
124 RPATH="${RPATH}:${COMERR_LIB_DIR}"
125 fi
126 ;;
127 *-*-hpux*)
128 if test "X$RPATH" = "X"; then
129 RPATH="-Wl,+b${COMERR_LIB_DIR}"
130 else
131 RPATH="${RPATH}:${COMERR_LIB_DIR}"
132 fi
133 ;;
134 *-*-irix*)
135 if test "X$RPATH" = "X"; then
136 RPATH="-Wl,-rpath,${COMERR_LIB_DIR}"
137 else
138 RPATH="${RPATH}:${COMERR_LIB_DIR}"
139 fi
140 ;;
141 *-*-solaris2*)
142 if test "$ac_cv_prog_gcc" = yes; then
143 if test "X$RPATH" = "X"; then
144 RPATH="-Wl,-R${COMERR_LIB_DIR}"
145 else
146 RPATH="${RPATH}:${COMERR_LIB_DIR}"
147 fi
148 else
149 RPATH="${RPATH} -R${COMERR_LIB_DIR}"
150 fi
151 ;;
152 esac
153 AC_SUBST(RPATH)
154 fi
155 ])
156
+0
-61
cmulocal/common.m4 less more
0 dnl $Id: common.m4,v 1.13 2006/02/25 18:29:46 cg2v Exp $
1
2 AC_DEFUN([CMU_TEST_LIBPATH], [
3 changequote(<<, >>)
4 define(<<CMU_AC_CV_FOUND>>, translit(ac_cv_found_$2_lib, <<- *>>, <<__p>>))
5 changequote([, ])
6 if test "$CMU_AC_CV_FOUND" = "yes"; then
7 if test \! -r "$1/lib$2.a" -a \! -r "$1/lib$2.so" -a \! -r "$1/lib$2.sl" -a \! -r "$1/lib$2.dylib"; then
8 CMU_AC_CV_FOUND=no
9 fi
10 fi
11 ])
12
13 AC_DEFUN([CMU_TEST_INCPATH], [
14 changequote(<<, >>)
15 define(<<CMU_AC_CV_FOUND>>, translit(ac_cv_found_$2_inc, [ *], [_p]))
16 changequote([, ])
17 if test "$CMU_AC_CV_FOUND" = "yes"; then
18 if test \! -r "$1/$2.h"; then
19 CMU_AC_CV_FOUND=no
20 fi
21 fi
22 ])
23
24 dnl CMU_CHECK_HEADER_NOCACHE(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
25 AC_DEFUN([CMU_CHECK_HEADER_NOCACHE],
26 [dnl Do the transliteration at runtime so arg 1 can be a shell variable.
27 ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
28 AC_MSG_CHECKING([for $1])
29 AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes",
30 eval "ac_cv_header_$ac_safe=no")
31 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
32 AC_MSG_RESULT(yes)
33 ifelse([$2], , :, [$2])
34 else
35 AC_MSG_RESULT(no)
36 ifelse([$3], , , [$3
37 ])dnl
38 fi
39 ])
40
41 AC_DEFUN([CMU_FIND_LIB_SUBDIR],
42 [dnl
43 AC_ARG_WITH([lib-subdir], AC_HELP_STRING([--with-lib-subdir=DIR],[Find libraries in DIR instead of lib]))
44 AC_CHECK_SIZEOF(long)
45 AC_CACHE_CHECK([what directory libraries are found in], [ac_cv_cmu_lib_subdir],
46 [test "X$with_lib_subdir" = "Xyes" && with_lib_subdir=
47 test "X$with_lib_subdir" = "Xno" && with_lib_subdir=
48 if test "X$with_lib_subdir" = "X" ; then
49 ac_cv_cmu_lib_subdir=lib
50 if test $ac_cv_sizeof_long -eq 4 ; then
51 test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32
52 fi
53 if test $ac_cv_sizeof_long -eq 8 ; then
54 test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64
55 fi
56 else
57 ac_cv_cmu_lib_subdir=$with_lib_subdir
58 fi])
59 AC_SUBST(CMU_LIB_SUBDIR, $ac_cv_cmu_lib_subdir)
60 ])
+0
-45
cmulocal/cyrus.m4 less more
0 dnl
1 dnl Additional macros for configure.in packaged up for easier theft.
2 dnl $Id: cyrus.m4,v 1.6 2010/01/06 17:01:27 murch Exp $
3 dnl tjs@andrew.cmu.edu 6-may-1998
4 dnl
5
6 dnl It would be good if ANDREW_ADD_LIBPATH could detect if something was
7 dnl already there and not redundantly add it if it is.
8
9 dnl add -L(arg), and possibly (runpath switch)(arg), to LDFLAGS
10 dnl (so the runpath for shared libraries is set).
11 AC_DEFUN([CMU_ADD_LIBPATH], [
12 # this is CMU ADD LIBPATH
13 if test "$andrew_cv_runpath_switch" = "none" ; then
14 LDFLAGS="-L$1 ${LDFLAGS}"
15 else
16 LDFLAGS="-L$1 $andrew_cv_runpath_switch$1 ${LDFLAGS}"
17 fi
18 ])
19
20 dnl add -L(1st arg), and possibly (runpath switch)(1st arg), to (2nd arg)
21 dnl (so the runpath for shared libraries is set).
22 AC_DEFUN([CMU_ADD_LIBPATH_TO], [
23 # this is CMU ADD LIBPATH TO
24 if test "$andrew_cv_runpath_switch" = "none" ; then
25 $2="-L$1 ${$2}"
26 else
27 $2="-L$1 ${$2} $andrew_cv_runpath_switch$1"
28 fi
29 ])
30
31 dnl runpath initialization
32 AC_DEFUN([CMU_GUESS_RUNPATH_SWITCH], [
33 # CMU GUESS RUNPATH SWITCH
34 AC_CACHE_CHECK(for runpath switch, andrew_cv_runpath_switch, [
35 # first, try -R
36 SAVE_LDFLAGS="${LDFLAGS}"
37 LDFLAGS="-R /usr/lib"
38 AC_TRY_LINK([],[],[andrew_cv_runpath_switch="-R"], [
39 LDFLAGS="-Wl,-rpath,/usr/lib"
40 AC_TRY_LINK([],[],[andrew_cv_runpath_switch="-Wl,-rpath,"],
41 [andrew_cv_runpath_switch="none"])
42 ])
43 LDFLAGS="${SAVE_LDFLAGS}"
44 ])])
+0
-46
cmulocal/db.m4 less more
0 dnl $Id: db.m4,v 1.2 2004/02/14 21:16:18 cg2v Exp $
1 dnl
2 dnl tests for various db libraries
3 dnl
4 AC_DEFUN([rk_DB],[berkeley_db=db
5 AC_ARG_WITH(berkeley-db,
6 [ --without-berkeley-db if you don't want berkeley db],[
7 if test "$withval" = no; then
8 berkeley_db=""
9 fi
10 ])
11 if test "$berkeley_db"; then
12 AC_CHECK_HEADERS([ \
13 db.h \
14 db_185.h \
15 ])
16 fi
17
18 AC_FIND_FUNC_NO_LIBS2(dbopen, $berkeley_db, [
19 #include <stdio.h>
20 #if defined(HAVE_DB_185_H)
21 #include <db_185.h>
22 #elif defined(HAVE_DB_H)
23 #include <db.h>
24 #endif
25 ],[NULL, 0, 0, 0, NULL])
26
27 AC_FIND_FUNC_NO_LIBS(dbm_firstkey, $berkeley_db gdbm ndbm)
28 AC_FIND_FUNC_NO_LIBS2(db_create, $berkeley_db, [
29 #include <stdio.h>
30 #if defined(HAVE_DB_H)
31 #include <db.h>
32 #endif
33 ],[NULL, NULL, 0])
34
35
36 DBLIB="$LIB_dbopen"
37 if test "$LIB_dbopen" != "$LIB_db_create"; then
38 DBLIB="$DBLIB $LIB_db_create"
39 fi
40 if test "$LIB_dbopen" != "$LIB_dbm_firstkey"; then
41 DBLIB="$DBLIB $LIB_dbm_firstkey"
42 fi
43 AC_SUBST(DBLIB)dnl
44
45 ])
+0
-9
cmulocal/find-func-no-libs.m4 less more
0 dnl $Id: find-func-no-libs.m4,v 1.2 2003/10/08 20:35:24 rjs3 Exp $
1 dnl
2 dnl
3 dnl Look for function in any of the specified libraries
4 dnl
5
6 dnl AC_FIND_FUNC_NO_LIBS(func, libraries, includes, arguments, extra libs, extra args)
7 AC_DEFUN([AC_FIND_FUNC_NO_LIBS], [
8 AC_FIND_FUNC_NO_LIBS2([$1], ["" $2], [$3], [$4], [$5], [$6])])
+0
-61
cmulocal/find-func-no-libs2.m4 less more
0 dnl $Id: find-func-no-libs2.m4,v 1.2 2003/10/08 20:35:24 rjs3 Exp $
1 dnl
2 dnl
3 dnl Look for function in any of the specified libraries
4 dnl
5
6 dnl AC_FIND_FUNC_NO_LIBS2(func, libraries, includes, arguments, extra libs, extra args)
7 AC_DEFUN([AC_FIND_FUNC_NO_LIBS2], [
8
9 AC_MSG_CHECKING([for $1])
10 AC_CACHE_VAL(ac_cv_funclib_$1,
11 [
12 if eval "test \"\$ac_cv_func_$1\" != yes" ; then
13 ac_save_LIBS="$LIBS"
14 for ac_lib in $2; do
15 if test -n "$ac_lib"; then
16 ac_lib="-l$ac_lib"
17 else
18 ac_lib=""
19 fi
20 LIBS="$6 $ac_lib $5 $ac_save_LIBS"
21 AC_TRY_LINK([$3],[$1($4)],eval "if test -n \"$ac_lib\";then ac_cv_funclib_$1=$ac_lib; else ac_cv_funclib_$1=yes; fi";break)
22 done
23 eval "ac_cv_funclib_$1=\${ac_cv_funclib_$1-no}"
24 LIBS="$ac_save_LIBS"
25 fi
26 ])
27
28 eval "ac_res=\$ac_cv_funclib_$1"
29
30 if false; then
31 AC_CHECK_FUNCS($1)
32 dnl AC_CHECK_LIBS($2, foo)
33 fi
34 # $1
35 ac_tr_func=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
36 ac_tr_lib=HAVE_LIB_`echo $ac_res |sed 's/-l//' | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
37 eval "LIB_$1=$ac_res"
38
39 case "$ac_res" in
40 yes)
41 eval "ac_cv_func_$1=yes"
42 eval "LIB_$1="
43 AC_DEFINE_UNQUOTED($ac_tr_func)
44 AC_MSG_RESULT([yes])
45 ;;
46 no)
47 eval "ac_cv_func_$1=no"
48 eval "LIB_$1="
49 AC_MSG_RESULT([no])
50 ;;
51 *)
52 eval "ac_cv_func_$1=yes"
53 eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
54 AC_DEFINE_UNQUOTED($ac_tr_func)
55 AC_DEFINE_UNQUOTED($ac_tr_lib)
56 AC_MSG_RESULT([yes, in $ac_res])
57 ;;
58 esac
59 AC_SUBST(LIB_$1)
60 ])
+0
-9
cmulocal/find-func.m4 less more
0 dnl $Id: find-func.m4,v 1.2 2003/10/08 20:35:24 rjs3 Exp $
1 dnl
2 dnl AC_FIND_FUNC(func, libraries, includes, arguments)
3 AC_DEFUN([AC_FIND_FUNC], [
4 AC_FIND_FUNC_NO_LIBS([$1], [$2], [$3], [$4])
5 if test -n "$LIB_$1"; then
6 LIBS="$LIB_$1 $LIBS"
7 fi
8 ])
+0
-197
cmulocal/heimdal.m4 less more
0 dnl kerberos_v5.m4--Kerberos 5 libraries and includes
1 dnl Derrick Brashear
2 dnl from KTH krb and Arla
3 dnl $Id: heimdal.m4,v 1.9 2005/04/26 19:14:07 shadow Exp $
4
5 AC_DEFUN([CMU_LIBHEIMDAL_INC_WHERE1], [
6 saved_CPPFLAGS=$CPPFLAGS
7 CPPFLAGS="$saved_CPPFLAGS -I$1"
8 AC_TRY_COMPILE([#include <krb5.h>],
9 [krb5_keyblock foo;],
10 ac_cv_found_libheimdal_inc=yes,
11 ac_cv_found_libheimdal_inc=no)
12 CPPFLAGS=$saved_CPPFLAGS
13 ])
14
15 AC_DEFUN([CMU_LIBHEIMDAL_INC_WHERE], [
16 for i in $1; do
17 AC_MSG_CHECKING(for heimdal headers in $i)
18 CMU_LIBHEIMDAL_INC_WHERE1($i)
19 CMU_TEST_INCPATH($i, krb5)
20 if test "$ac_cv_found_libheimdal_inc" = "yes"; then
21 ac_cv_libheimdal_where_inc=$i
22 AC_MSG_RESULT(found)
23 break
24 else
25 AC_MSG_RESULT(not found)
26 fi
27 done
28 ])
29
30 #
31 # Test for kerberos lib files
32 #
33
34 AC_DEFUN([CMU_LIBHEIMDAL_LIB_WHERE1], [
35 AC_REQUIRE([CMU_SOCKETS])
36 saved_LIBS=$LIBS
37 LIBS="$saved_LIBS -L$1 -lkadm5clnt -lkrb5 -lasn1 -lkadm5clnt -lroken $LIB_SOCKET"
38 AC_TRY_LINK(,
39 [krb5_get_in_tkt();],
40 [ac_cv_found_libheimdal_lib=yes],
41 ac_cv_found_libheimdal_lib=no)
42 LIBS=$saved_LIBS
43 ])
44
45 AC_DEFUN([CMU_LIBHEIMDAL_LIB_WHERE], [
46 for i in $1; do
47 AC_MSG_CHECKING(for heimdal libraries in $i)
48 CMU_LIBHEIMDAL_LIB_WHERE1($i)
49 CMU_TEST_LIBPATH($i, krb5)
50 if test "$ac_cv_found_libheimdal_lib" = "yes" ; then
51 ac_cv_libheimdal_where_lib=$i
52 AC_MSG_RESULT(found)
53 break
54 else
55 AC_MSG_RESULT(not found)
56 fi
57 done
58 ])
59
60 AC_DEFUN([CMU_LIBHEIMDAL_LIBDES], [
61 AC_REQUIRE([CMU_LIBSSL])
62 cmu_save_LIBS=$LIBS
63 AC_MSG_CHECKING([if libdes is needed])
64 AC_TRY_LINK([],[des_quad_cksum();],HEIM_DES_LIB="",HEIM_DES_LIB="maybe")
65 if test "X$HEIM_DES_LIB" != "X"; then
66 LIBS="$cmu_save_LIBS -L$1 -ldes"
67 AC_TRY_LINK([], [des_quad_cksum();],HEIM_DES_LIB="yes")
68 if test "X$HEIM_DES_LIB" = "Xyes"; then
69 AC_MSG_RESULT([yes])
70 HEIM_LIBDES="-ldes"
71 HEIM_LIBDESA="$1/libdes.a"
72 else
73 LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS"
74 AC_TRY_LINK([],
75 [des_quad_cksum();],HEIM_DES_LIB="libcrypto")
76 if test "X$HEIM_DES_LIB" = "Xlibcrypto"; then
77 AC_MSG_RESULT([libcrypto])
78 HEIM_LIBDES="$LIBSSL_LIB_FLAGS"
79 HEIM_LIBDESA="$LIBSSL_LIB_FLAGS"
80 else
81 LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
82 AC_TRY_LINK([],
83 [des_quad_cksum();],HEIM_DES_LIB="libcrypto+descompat")
84 if test "X$HEIM_DES_LIB" = "Xlibcrypto+descompat"; then
85 AC_MSG_RESULT([libcrypto+descompat])
86 HEIM_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
87 HEIM_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
88 else
89 AC_MSG_RESULT([unknown])
90 AC_MSG_ERROR([Could not use -ldes])
91 fi
92 fi
93 fi
94 else
95 AC_MSG_RESULT([no])
96 fi
97 ])
98
99 AC_DEFUN([CMU_LIBHEIMDAL], [
100 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
101 AC_REQUIRE([CMU_SOCKETS])
102 AC_REQUIRE([CMU_USE_COMERR])
103 AC_ARG_WITH(LIBHEIMDAL,
104 [ --with-libheimdal=PREFIX Compile with Heimdal support],
105 [if test "X$with_libheimdal" = "X"; then
106 with_libheimdal=yes
107 fi])
108 AC_ARG_WITH(libheimdal-lib,
109 [ --with-libheimdal-lib=dir use heimdal libraries in dir],
110 [if test "$withval" = "yes" -o "$withval" = "no"; then
111 AC_MSG_ERROR([No argument for --with-libheimdal-lib])
112 fi])
113 AC_ARG_WITH(libheimdal-include,
114 [ --with-libheimdal-include=dir use heimdal headers in dir],
115 [if test "$withval" = "yes" -o "$withval" = "no"; then
116 AC_MSG_ERROR([No argument for --with-libheimdal-include])
117 fi])
118
119 if test "X$with_libheimdal" != "X"; then
120 if test "$with_libheimdal" != "yes" -a "$with_libheimdal" != "no"; then
121 ac_cv_libheimdal_where_lib=$with_libheimdal/$CMU_LIB_SUBDIR
122 ac_cv_libheimdal_where_inc=$with_libheimdal/include
123 fi
124 fi
125
126 if test "$with_libheimdal" != "no"; then
127 if test "X$with_libheimdal_lib" != "X"; then
128 ac_cv_libheimdal_where_lib=$with_libheimdal_lib
129 fi
130 if test "X$ac_cv_libheimdal_where_lib" = "X"; then
131 CMU_LIBHEIMDAL_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/heimdal/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
132 fi
133
134 if test "X$with_libheimdal_include" != "X"; then
135 ac_cv_libheimdal_where_inc=$with_libheimdal_include
136 fi
137 if test "X$ac_cv_libheimdal_where_inc" = "X"; then
138 CMU_LIBHEIMDAL_INC_WHERE(/usr/athena/include /usr/heimdal/include /usr/local/include)
139 fi
140 fi
141
142 AC_MSG_CHECKING(whether to include heimdal)
143 if test "X$ac_cv_libheimdal_where_lib" = "X" -a "X$ac_cv_libheimdal_where_inc" = "X"; then
144 ac_cv_found_libheimdal=no
145 AC_MSG_RESULT(no)
146 else
147 ac_cv_found_libheimdal=yes
148 AC_MSG_RESULT(yes)
149 LIBHEIMDAL_INC_DIR=$ac_cv_libheimdal_where_inc
150 LIBHEIMDAL_LIB_DIR=$ac_cv_libheimdal_where_lib
151 CMU_LIBHEIMDAL_LIBDES($LIBHEIMDAL_LIB_DIR)
152 LIBHEIMDAL_INC_FLAGS="-I${LIBHEIMDAL_INC_DIR}"
153 LIBHEIMDAL_LIB_FLAGS="-L${LIBHEIMDAL_LIB_DIR} -lkadm5clnt -lkrb5 -lasn1 ${HEIM_LIBDES} -lroken $LIB_SOCKET"
154 AC_SUBST(LIBHEIMDAL_INC_FLAGS)
155 AC_SUBST(LIBHEIMDAL_LIB_FLAGS)
156 if test "X$RPATH" = "X"; then
157 RPATH=""
158 fi
159 case "${host}" in
160 *-*-linux*)
161 if test "X$RPATH" = "X"; then
162 RPATH="-Wl,-rpath,${LIBHEIMDAL_LIB_DIR}"
163 else
164 RPATH="${RPATH}:${LIBHEIMDAL_LIB_DIR}"
165 fi
166 ;;
167 *-*-hpux*)
168 if test "X$RPATH" = "X"; then
169 RPATH="-Wl,+b${LIBHEIMDAL_LIB_DIR}"
170 else
171 RPATH="${RPATH}:${LIBHEIMDAL_LIB_DIR}"
172 fi
173 ;;
174 *-*-irix*)
175 if test "X$RPATH" = "X"; then
176 RPATH="-Wl,-rpath,${LIBHEIMDAL_LIB_DIR}"
177 else
178 RPATH="${RPATH}:${LIBHEIMDAL_LIB_DIR}"
179 fi
180 ;;
181 *-*-solaris2*)
182 if test "$ac_cv_prog_gcc" = yes; then
183 if test "X$RPATH" = "X"; then
184 RPATH="-Wl,-R${LIBHEIMDAL_LIB_DIR}"
185 else
186 RPATH="${RPATH}:${LIBHEIMDAL_LIB_DIR}"
187 fi
188 else
189 RPATH="${RPATH} -R${LIBHEIMDAL_LIB_DIR}"
190 fi
191 ;;
192 esac
193 AC_SUBST(RPATH)
194 fi
195 ])
196
+0
-8
cmulocal/init_automake.m4 less more
0 dnl init_automake.m4--cmulocal automake setup macro
1 dnl Rob Earhart
2 dnl $Id: init_automake.m4,v 1.4 2003/10/08 20:35:24 rjs3 Exp $
3
4 AC_DEFUN([CMU_INIT_AUTOMAKE], [
5 AC_REQUIRE([AM_INIT_AUTOMAKE])
6 ACLOCAL="$ACLOCAL -I \$(top_srcdir)/cmulocal"
7 ])
+0
-111
cmulocal/ipv6.m4 less more
0 dnl See whether we can use IPv6 related functions
1 dnl contributed by Hajimu UMEMOTO
2
3 AC_DEFUN([IPv6_CHECK_FUNC], [
4 AC_CHECK_FUNC($1, [dnl
5 ac_cv_lib_socket_$1=no
6 ac_cv_lib_inet6_$1=no
7 ], [dnl
8 AC_CHECK_LIB(socket, $1, [dnl
9 LIBS="$LIBS -lsocket"
10 ac_cv_lib_inet6_$1=no
11 ], [dnl
12 AC_MSG_CHECKING([whether your system has IPv6 directory])
13 AC_CACHE_VAL(ipv6_cv_dir, [dnl
14 for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
15 if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
16 break
17 fi
18 done])dnl
19 AC_MSG_RESULT($ipv6_cv_dir)
20 if test $ipv6_cv_dir = no; then
21 ac_cv_lib_inet6_$1=no
22 else
23 if test x$ipv6_libinet6 = x; then
24 ipv6_libinet6=no
25 SAVELDFLAGS="$LDFLAGS"
26 LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
27 fi
28 AC_CHECK_LIB(inet6, $1, [dnl
29 if test $ipv6_libinet6 = no; then
30 ipv6_libinet6=yes
31 LIBS="$LIBS -linet6"
32 fi],)dnl
33 if test $ipv6_libinet6 = no; then
34 LDFLAGS="$SAVELDFLAGS"
35 fi
36 fi])dnl
37 ])dnl
38 ipv6_cv_$1=no
39 if test $ac_cv_func_$1 = yes -o $ac_cv_lib_socket_$1 = yes \
40 -o $ac_cv_lib_inet6_$1 = yes
41 then
42 ipv6_cv_$1=yes
43 fi
44 if test $ipv6_cv_$1 = no; then
45 if test $1 = getaddrinfo; then
46 for ipv6_cv_pfx in o n; do
47 AC_EGREP_HEADER(${ipv6_cv_pfx}$1, netdb.h,
48 [AC_CHECK_FUNC(${ipv6_cv_pfx}$1)])
49 if eval test X\$ac_cv_func_${ipv6_cv_pfx}$1 = Xyes; then
50 AC_DEFINE(HAVE_GETADDRINFO,[],[Do we have a getaddrinfo?])
51 ipv6_cv_$1=yes
52 break
53 fi
54 done
55 fi
56 fi
57 if test $ipv6_cv_$1 = yes; then
58 ifelse([$2], , :, [$2])
59 else
60 ifelse([$3], , :, [$3])
61 fi])
62
63
64 dnl See whether we have ss_family in sockaddr_storage
65 AC_DEFUN([IPv6_CHECK_SS_FAMILY], [
66 AC_MSG_CHECKING([whether you have ss_family in struct sockaddr_storage])
67 AC_CACHE_VAL(ipv6_cv_ss_family, [dnl
68 AC_TRY_COMPILE([#include <sys/types.h>
69 #include <sys/socket.h>],
70 [struct sockaddr_storage ss; int i = ss.ss_family;],
71 [ipv6_cv_ss_family=yes], [ipv6_cv_ss_family=no])])dnl
72 if test $ipv6_cv_ss_family = yes; then
73 ifelse([$1], , AC_DEFINE(HAVE_SS_FAMILY,[],[Is there an ss_family in sockaddr_storage?]), [$1])
74 else
75 ifelse([$2], , :, [$2])
76 fi
77 AC_MSG_RESULT($ipv6_cv_ss_family)])
78
79
80 dnl whether you have sa_len in struct sockaddr
81 AC_DEFUN([IPv6_CHECK_SA_LEN], [
82 AC_MSG_CHECKING([whether you have sa_len in struct sockaddr])
83 AC_CACHE_VAL(ipv6_cv_sa_len, [dnl
84 AC_TRY_COMPILE([#include <sys/types.h>
85 #include <sys/socket.h>],
86 [struct sockaddr sa; int i = sa.sa_len;],
87 [ipv6_cv_sa_len=yes], [ipv6_cv_sa_len=no])])dnl
88 if test $ipv6_cv_sa_len = yes; then
89 ifelse([$1], , AC_DEFINE(HAVE_SOCKADDR_SA_LEN,[],[Does sockaddr have an sa_len?]), [$1])
90 else
91 ifelse([$2], , :, [$2])
92 fi
93 AC_MSG_RESULT($ipv6_cv_sa_len)])
94
95
96 dnl See whether sys/socket.h has socklen_t
97 AC_DEFUN([IPv6_CHECK_SOCKLEN_T], [
98 AC_MSG_CHECKING(for socklen_t)
99 AC_CACHE_VAL(ipv6_cv_socklen_t, [dnl
100 AC_TRY_LINK([#include <sys/types.h>
101 #include <sys/socket.h>],
102 [socklen_t len = 0;],
103 [ipv6_cv_socklen_t=yes], [ipv6_cv_socklen_t=no])])dnl
104 if test $ipv6_cv_socklen_t = yes; then
105 ifelse([$1], , AC_DEFINE(HAVE_SOCKLEN_T,[],[Do we have a socklen_t?]), [$1])
106 else
107 ifelse([$2], , :, [$2])
108 fi
109 AC_MSG_RESULT($ipv6_cv_socklen_t)])
110
+0
-167
cmulocal/kafs.m4 less more
0 dnl kerberos_v4.m4--Kafs libraries and includes
1 dnl Derrick Brashear
2 dnl from KTH kafs and Arla
3 dnl $Id: kafs.m4,v 1.7 2005/04/26 19:14:07 shadow Exp $
4
5 AC_DEFUN([CMU_KAFS_INC_WHERE1], [
6 saved_CPPFLAGS=$CPPFLAGS
7 CPPFLAGS="$saved_CPPFLAGS -I$1"
8 AC_TRY_COMPILE([
9 #include <krb.h>
10 #include <sys/ioctl.h>
11 #include <kafs.h>
12 ],
13 [struct ClearToken foo;],
14 ac_cv_found_kafs_inc=yes,
15 ac_cv_found_kafs_inc=no)
16 if test "$ac_cv_found_kafs_inc" = "no"; then
17 CPPFLAGS="$saved_CPPFLAGS -I$1 -I$1/kerberosIV"
18 AC_TRY_COMPILE([
19 #include <krb.h>
20 #include <sys/ioctl.h>
21 #include <kafs.h>
22 ],
23 [struct ClearToken foo;],
24 [ac_cv_found_kafs_inc=yes],
25 ac_cv_found_kafs_inc=no)
26 fi
27 CPPFLAGS=$saved_CPPFLAGS
28 ])
29
30 AC_DEFUN([CMU_KAFS_INC_WHERE], [
31 for i in $1; do
32 AC_MSG_CHECKING(for kafs headers in $i)
33 CMU_KAFS_INC_WHERE1($i)
34 CMU_TEST_INCPATH($i, kafs)
35 if test "$ac_cv_found_kafs_inc" = "yes"; then
36 ac_cv_kafs_where_inc=$i
37 AC_MSG_RESULT(found)
38 break
39 else
40 AC_MSG_RESULT(not found)
41 fi
42 done
43 ])
44
45 AC_DEFUN([CMU_KAFS_LIB_WHERE1], [
46 saved_LIBS=$LIBS
47 LIBS="$saved_LIBS -L$1 -lkafs $KRB_LIB_FLAGS $KRB5_LIB_FLAGS"
48 AC_TRY_LINK(,
49 [krb_afslog();],
50 [ac_cv_found_kafs_lib=yes],
51 ac_cv_found_kafs_lib=no)
52 LIBS=$saved_LIBS
53 ])
54
55 AC_DEFUN([CMU_KAFS_LIB_WHERE], [
56 for i in $1; do
57 AC_MSG_CHECKING(for kafs libraries in $i)
58 CMU_KAFS_LIB_WHERE1($i)
59 dnl deal with false positives from implicit link paths
60 CMU_TEST_LIBPATH($i, kafs)
61 if test "$ac_cv_found_kafs_lib" = "yes" ; then
62 ac_cv_kafs_where_lib=$i
63 AC_MSG_RESULT(found)
64 break
65 else
66 AC_MSG_RESULT(not found)
67 fi
68 done
69 ])
70
71 AC_DEFUN([CMU_KAFS], [
72 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
73 AC_REQUIRE([CMU_SOCKETS])
74 AC_REQUIRE([CMU_KRB4])
75 AC_REQUIRE([CMU_KRB5])
76 AC_ARG_WITH(kafs,
77 [ --with-kafs=PREFIX Compile with Kafs support],
78 [if test "X$with_kafs" = "X"; then
79 with_kafs=yes
80 fi])
81 AC_ARG_WITH(kafs-lib,
82 [ --with-kafs-lib=dir use kafs libraries in dir],
83 [if test "$withval" = "yes" -o "$withval" = "no"; then
84 AC_MSG_ERROR([No argument for --with-kafs-lib])
85 fi])
86 AC_ARG_WITH(kafs-include,
87 [ --with-kafs-include=dir use kafs headers in dir],
88 [if test "$withval" = "yes" -o "$withval" = "no"; then
89 AC_MSG_ERROR([No argument for --with-kafs-include])
90 fi])
91
92 if test "X$with_kafs" != "X"; then
93 if test "$with_kafs" != "yes" -a "$with_kafs" != no; then
94 ac_cv_kafs_where_lib=$with_kafs/$CMU_LIB_SUBDIR
95 ac_cv_kafs_where_inc=$with_kafs/include
96 fi
97 fi
98
99 if test "$with_kafs" != "no"; then
100 if test "X$with_kafs_lib" != "X"; then
101 ac_cv_kafs_where_lib=$with_kafs_lib
102 fi
103 if test "X$ac_cv_kafs_where_lib" = "X"; then
104 CMU_KAFS_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
105 fi
106
107 if test "X$with_kafs_include" != "X"; then
108 ac_cv_kafs_where_inc=$with_kafs_include
109 fi
110 if test "X$ac_cv_kafs_where_inc" = "X"; then
111 CMU_KAFS_INC_WHERE(/usr/athena/include /usr/include/kerberosIV /usr/local/include /usr/include/kerberos)
112 fi
113 fi
114
115 AC_MSG_CHECKING(whether to include kafs)
116 if test "X$ac_cv_kafs_where_lib" = "X" -a "X$ac_cv_kafs_where_inc" = "X"; then
117 ac_cv_found_kafs=no
118 AC_MSG_RESULT(no)
119 else
120 ac_cv_found_kafs=yes
121 AC_MSG_RESULT(yes)
122 KAFS_INC_DIR=$ac_cv_kafs_where_inc
123 KAFS_LIB_DIR=$ac_cv_kafs_where_lib
124 KAFS_INC_FLAGS="-I${KAFS_INC_DIR}"
125 KAFS_LIB_FLAGS="-L${KAFS_LIB_DIR} -lkafs"
126 if test "X$RPATH" = "X"; then
127 RPATH=""
128 fi
129 case "${host}" in
130 *-*-linux*)
131 if test "X$RPATH" = "X"; then
132 RPATH="-Wl,-rpath,${KAFS_LIB_DIR}"
133 else
134 RPATH="${RPATH}:${KAFS_LIB_DIR}"
135 fi
136 ;;
137 *-*-hpux*)
138 if test "X$RPATH" = "X"; then
139 RPATH="-Wl,+b${KAFS_LIB_DIR}"
140 else
141 RPATH="${RPATH}:${KAFS_LIB_DIR}"
142 fi
143 ;;
144 *-*-irix*)
145 if test "X$RPATH" = "X"; then
146 RPATH="-Wl,-rpath,${KAFS_LIB_DIR}"
147 else
148 RPATH="${RPATH}:${KAFS_LIB_DIR}"
149 fi
150 ;;
151 *-*-solaris2*)
152 if test "$ac_cv_prog_gcc" = yes; then
153 if test "X$RPATH" = "X"; then
154 RPATH="-Wl,-R${KAFS_LIB_DIR}"
155 else
156 RPATH="${RPATH}:${KAFS_LIB_DIR}"
157 fi
158 else
159 RPATH="${RPATH} -R${KAFS_LIB_DIR}"
160 fi
161 ;;
162 esac
163 AC_SUBST(RPATH)
164 fi
165 ])
166
+0
-285
cmulocal/kerberos_v4.m4 less more
0 dnl kerberos_v4.m4--Kerberos 4 libraries and includes
1 dnl Derrick Brashear
2 dnl from KTH krb and Arla
3 dnl $Id: kerberos_v4.m4,v 1.28 2005/04/26 19:14:08 shadow Exp $
4
5 AC_DEFUN([CMU_KRB_SENDAUTH_PROTO], [
6 AC_MSG_CHECKING(for krb_sendauth prototype)
7 AC_TRY_COMPILE(
8 [#include <krb.h>
9 int krb_sendauth (long options, int fd, KTEXT ktext, char *service,
10 char *inst, char *realm, u_long checksum,
11 MSG_DAT *msg_data, CREDENTIALS *cred,
12 Key_schedule schedule, struct sockaddr_in *laddr,
13 struct sockaddr_in *faddr, char *version);],
14 [int foo = krb_sendauth(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); ],
15 ac_cv_krb_sendauth_proto=no,
16 ac_cv_krb_sendauth_proto=yes)
17 AC_MSG_RESULT($ac_cv_krb_sendauth_proto)
18 if test "$ac_cv_krb_sendauth_proto" = yes; then
19 AC_DEFINE(HAVE_KRB_SENDAUTH_PROTO)dnl
20 fi
21 AC_MSG_RESULT($ac_cv_krb_sendauth_proto)
22 ])
23
24 AC_DEFUN([CMU_KRB_SET_KEY_PROTO], [
25 AC_MSG_CHECKING(for krb_set_key prototype)
26 AC_CACHE_VAL(ac_cv_krb_set_key_proto, [
27 cmu_save_CPPFLAGS="$CPPFLAGS"
28 CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}"
29 AC_TRY_COMPILE(
30 [#include <krb.h>
31 int krb_set_key(char *key, int cvt);],
32 [int foo = krb_set_key(0, 0);],
33 ac_cv_krb_set_key_proto=no,
34 ac_cv_krb_set_key_proto=yes)
35 ])
36 CPPFLAGS="${cmu_save_CPPFLAGS}"
37 if test "$ac_cv_krb_set_key_proto" = yes; then
38 AC_DEFINE(HAVE_KRB_SET_KEY_PROTO)dnl
39 fi
40 AC_MSG_RESULT($ac_cv_krb_set_key_proto)
41 ])
42
43 AC_DEFUN([CMU_KRB4_32_DEFN], [
44 AC_MSG_CHECKING(for KRB4_32 definition)
45 AC_CACHE_VAL(ac_cv_krb4_32_defn, [
46 cmu_save_CPPFLAGS="$CPPFLAGS"
47 CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}"
48 AC_TRY_COMPILE(
49 [#include <krb.h>
50 ],
51 [KRB4_32 foo = 1;],
52 ac_cv_krb4_32_defn=yes,
53 ac_cv_krb4_32_defn=no)
54 ])
55 CPPFLAGS="${cmu_save_CPPFLAGS}"
56 if test "$ac_cv_krb4_32_defn" = yes; then
57 AC_DEFINE(HAVE_KRB4_32_DEFINE)dnl
58 fi
59 AC_MSG_RESULT($ac_cv_krb4_32_defn)
60 ])
61
62 AC_DEFUN([CMU_KRB_RD_REQ_PROTO], [
63 AC_MSG_CHECKING(for krb_rd_req prototype)
64 AC_CACHE_VAL(ac_cv_krb_rd_req_proto, [
65 cmu_save_CPPFLAGS="$CPPFLAGS"
66 CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}"
67 AC_TRY_COMPILE(
68 [#include <krb.h>
69 int krb_rd_req(KTEXT authent, char *service, char *instance,
70 unsigned KRB_INT32 from_addr, AUTH_DAT *ad, char *fn);],
71 [int foo = krb_rd_req(0,0,0,0,0,0);],
72 ac_cv_krb_rd_req_proto=no,
73 ac_cv_krb_rd_req_proto=yes)
74 ])
75 CPPFLAGS="${cmu_save_CPPFLAGS}"
76 if test "$ac_cv_krb_rd_req_proto" = yes; then
77 AC_DEFINE(HAVE_KRB_RD_REQ_PROTO)dnl
78 fi
79 AC_MSG_RESULT($ac_cv_krb_rd_req_proto)
80 ])
81
82 AC_DEFUN([CMU_KRB_INC_WHERE1], [
83 saved_CPPFLAGS=$CPPFLAGS
84 CPPFLAGS="$saved_CPPFLAGS -I$1"
85 AC_TRY_COMPILE([#include <krb.h>],
86 [struct ktext foo;],
87 ac_cv_found_krb_inc=yes,
88 ac_cv_found_krb_inc=no)
89 if test "$ac_cv_found_krb_inc" = "no"; then
90 CPPFLAGS="$saved_CPPFLAGS -I$1 -I$1/kerberosIV"
91 AC_TRY_COMPILE([#include <krb.h>],
92 [struct ktext foo;],
93 [ac_cv_found_krb_inc=yes],
94 ac_cv_found_krb_inc=no)
95 fi
96 CPPFLAGS=$saved_CPPFLAGS
97 ])
98
99 AC_DEFUN([CMU_KRB_INC_WHERE], [
100 for i in $1; do
101 AC_MSG_CHECKING(for kerberos headers in $i)
102 CMU_KRB_INC_WHERE1($i)
103 CMU_TEST_INCPATH($i, krb)
104 if test "$ac_cv_found_krb_inc" = "yes"; then
105 ac_cv_krb_where_inc=$i
106 AC_MSG_RESULT(found)
107 break
108 else
109 AC_MSG_RESULT(not found)
110 fi
111 done
112 ])
113
114 #
115 # Test for kerberos lib files
116 #
117
118 AC_DEFUN([CMU_KRB_LIB_WHERE1], [
119 saved_LIBS=$LIBS
120 LIBS="$saved_LIBS -L$1 -lkrb ${KRB_LIBDES}"
121 AC_TRY_LINK(,
122 [dest_tkt();],
123 [ac_cv_found_krb_lib=yes],
124 ac_cv_found_krb_lib=no)
125 LIBS=$saved_LIBS
126 ])
127
128 AC_DEFUN([CMU_KRB_LIB_WHERE], [
129 for i in $1; do
130 AC_MSG_CHECKING(for kerberos libraries in $i)
131 CMU_KRB_LIB_WHERE1($i)
132 dnl deal with false positives from implicit link paths
133 CMU_TEST_LIBPATH($i, krb)
134 if test "$ac_cv_found_krb_lib" = "yes" ; then
135 ac_cv_krb_where_lib=$i
136 AC_MSG_RESULT(found)
137 break
138 else
139 AC_MSG_RESULT(not found)
140 fi
141 done
142 ])
143
144 AC_DEFUN([CMU_KRB4], [
145 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
146 AC_REQUIRE([CMU_SOCKETS])
147 AC_REQUIRE([CMU_LIBSSL])
148 AC_ARG_WITH(krb4,
149 [ --with-krb4=PREFIX Compile with Kerberos 4 support],
150 [if test "X$with_krb4" = "X"; then
151 with_krb4=yes
152 fi])
153 AC_ARG_WITH(krb4-lib,
154 [ --with-krb4-lib=dir use kerberos 4 libraries in dir],
155 [if test "$withval" = "yes" -o "$withval" = "no"; then
156 AC_MSG_ERROR([No argument for --with-krb4-lib])
157 fi])
158 AC_ARG_WITH(krb4-include,
159 [ --with-krb4-include=dir use kerberos 4 headers in dir],
160 [if test "$withval" = "yes" -o "$withval" = "no"; then
161 AC_MSG_ERROR([No argument for --with-krb4-include])
162 fi])
163
164 if test "X$with_krb4" != "X"; then
165 if test "$with_krb4" != "yes" -a "$with_krb4" != "no"; then
166 ac_cv_krb_where_lib=$with_krb4/$CMU_LIB_SUBDIR
167 ac_cv_krb_where_inc=$with_krb4/include
168 fi
169 fi
170
171 if test "$with_krb4" != "no"; then
172 if test "X$with_krb4_lib" != "X"; then
173 ac_cv_krb_where_lib=$with_krb4_lib
174 fi
175 if test "X$with_krb4_include" != "X"; then
176 ac_cv_krb_where_inc=$with_krb4_include
177 fi
178 if test "X$ac_cv_krb_where_inc" = "X"; then
179 CMU_KRB_INC_WHERE(/usr/athena/include /usr/include/kerberosIV /usr/local/include /usr/include/kerberos)
180 fi
181
182 AC_MSG_CHECKING([if libdes is needed])
183 AC_TRY_LINK([],[des_quad_cksum();],KRB_DES_LIB="",KRB_DES_LIB="maybe")
184 if test "X$KRB_DES_LIB" != "X"; then
185 LIBS="$cmu_save_LIBS -ldes"
186 AC_TRY_LINK([], [des_quad_cksum();],KRB_DES_LIB="yes")
187 if test "X$KRB_DES_LIB" = "Xyes"; then
188 AC_MSG_RESULT([yes])
189 KRB_LIBDES="-ldes"
190 KRB_LIBDESA='$(KRB_LIB_DIR)/libdes.a'
191 else
192 LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS"
193 AC_TRY_LINK([],
194 [des_quad_cksum();],KRB_DES_LIB="libcrypto")
195 if test "X$KRB_DES_LIB" = "Xlibcrypto"; then
196 AC_MSG_RESULT([libcrypto])
197 KRB_LIBDES="$LIBSSL_LIB_FLAGS"
198 KRB_LIBDESA="$LIBSSL_LIB_FLAGS"
199 else
200 LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
201 AC_TRY_LINK([],
202 [des_quad_cksum();],KRB_DES_LIB="libcrypto+descompat")
203 if test "X$KRB_DES_LIB" = "Xlibcrypto+descompat"; then
204 AC_MSG_RESULT([libcrypto+descompat])
205 KRB_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
206 KRB_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS"
207 else
208 AC_MSG_RESULT([unknown])
209 AC_MSG_ERROR([Could not use -ldes])
210 fi
211 fi
212 fi
213 else
214 AC_MSG_RESULT([no])
215 fi
216 if test "X$ac_cv_krb_where_lib" = "X"; then
217 CMU_KRB_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
218 fi
219 fi
220 LIBS="${cmu_save_LIBS}"
221
222
223 AC_MSG_CHECKING([whether to include kerberos 4])
224 if test "X$ac_cv_krb_where_lib" = "X" -o "X$ac_cv_krb_where_inc" = "X"; then
225 ac_cv_found_krb=no
226 AC_MSG_RESULT(no)
227 else
228 ac_cv_found_krb=yes
229 AC_MSG_RESULT(yes)
230 KRB_INC_DIR=$ac_cv_krb_where_inc
231 KRB_LIB_DIR=$ac_cv_krb_where_lib
232 KRB_INC_FLAGS="-I${KRB_INC_DIR}"
233 KRB_LIB_FLAGS="-L${KRB_LIB_DIR} -lkrb ${KRB_LIBDES}"
234 LIBS="${cmu_save_LIBS} ${KRB_LIB_FLAGS}"
235 AC_CHECK_LIB(resolv, dns_lookup, KRB_LIB_FLAGS="${KRB_LIB_FLAGS} -lresolv",,"${KRB_LIB_FLAGS}")
236 AC_CHECK_LIB(crypt, crypt, KRB_LIB_FLAGS="${KRB_LIB_FLAGS} -lcrypt",,"${KRB_LIB_FLAGS}")
237 LIBS="${LIBS} ${KRB_LIB_FLAGS}"
238 AC_CHECK_FUNCS(krb_get_int krb_life_to_time)
239 AC_SUBST(KRB_INC_FLAGS)
240 AC_SUBST(KRB_LIB_FLAGS)
241 LIBS="${cmu_save_LIBS}"
242 AC_DEFINE(HAVE_KRB4,,[Kerberos V4 is present])dnl zephyr uses this
243 AC_DEFINE(KERBEROS,,[Use kerberos 4. find out what needs this symbol])
244 if test "X$RPATH" = "X"; then
245 RPATH=""
246 fi
247 case "${host}" in
248 *-*-linux*)
249 if test "X$RPATH" = "X"; then
250 RPATH="-Wl,-rpath,${KRB_LIB_DIR}"
251 else
252 RPATH="${RPATH}:${KRB_LIB_DIR}"
253 fi
254 ;;
255 *-*-hpux*)
256 if test "X$RPATH" = "X"; then
257 RPATH="-Wl,+b${KRB_LIB_DIR}"
258 else
259 RPATH="${RPATH}:${KRB_LIB_DIR}"
260 fi
261 ;;
262 *-*-irix*)
263 if test "X$RPATH" = "X"; then
264 RPATH="-Wl,-rpath,${KRB_LIB_DIR}"
265 else
266 RPATH="${RPATH}:${KRB_LIB_DIR}"
267 fi
268 ;;
269 *-*-solaris2*)
270 if test "$ac_cv_prog_gcc" = yes; then
271 if test "X$RPATH" = "X"; then
272 RPATH="-Wl,-R${KRB_LIB_DIR}"
273 else
274 RPATH="${RPATH}:${KRB_LIB_DIR}"
275 fi
276 else
277 RPATH="${RPATH} -R${KRB_LIB_DIR}"
278 fi
279 ;;
280 esac
281 AC_SUBST(RPATH)
282 fi
283 ])
284
+0
-185
cmulocal/kerberos_v5.m4 less more
0 dnl kerberos_v5.m4--Kerberos 5 libraries and includes
1 dnl Derrick Brashear
2 dnl from KTH krb and Arla
3 dnl $Id: kerberos_v5.m4,v 1.9 2005/04/26 19:14:08 shadow Exp $
4
5 AC_DEFUN([CMU_KRB5_INC_WHERE1], [
6 saved_CPPFLAGS=$CPPFLAGS
7 CPPFLAGS="$saved_CPPFLAGS -I$1"
8 AC_TRY_COMPILE([#include <krb5.h>],
9 [krb5_keyblock foo;],
10 ac_cv_found_krb5_inc=yes,
11 ac_cv_found_krb5_inc=no)
12 CPPFLAGS=$saved_CPPFLAGS
13 ])
14
15 AC_DEFUN([CMU_KRB5_INC_WHERE], [
16 for i in $1; do
17 AC_MSG_CHECKING(for krb5 headers in $i)
18 CMU_KRB5_INC_WHERE1($i)
19 CMU_TEST_INCPATH($i, krb5)
20 if test "$ac_cv_found_krb5_inc" = "yes"; then
21 ac_cv_krb5_where_inc=$i
22 AC_MSG_RESULT(found)
23 break
24 else
25 AC_MSG_RESULT(not found)
26 fi
27 done
28 ])
29
30 #
31 # Test for kerberos lib files
32 #
33
34 AC_DEFUN([CMU_KRB5_LIB_WHERE1], [
35 saved_LIBS=$LIBS
36 LIBS="$saved_LIBS -L$1 -lkrb5 -lk5crypto"
37 AC_TRY_LINK(,
38 [krb5_get_in_tkt();],
39 [ac_cv_found_krb5_lib=yes],
40 ac_cv_found_krb5_lib=no)
41 LIBS=$saved_LIBS
42 ])
43
44 AC_DEFUN([CMU_KRB5_LIB_WHERE], [
45 for i in $1; do
46 AC_MSG_CHECKING(for krb5 libraries in $i)
47 CMU_KRB5_LIB_WHERE1($i)
48 CMU_TEST_LIBPATH($i, krb5)
49 if test "$ac_cv_found_krb5_lib" = "yes" ; then
50 ac_cv_krb5_where_lib=$i
51 AC_MSG_RESULT(found)
52 break
53 else
54 AC_MSG_RESULT(not found)
55 fi
56 done
57 ])
58
59 AC_DEFUN([CMU_KRB5], [
60 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
61 AC_REQUIRE([CMU_SOCKETS])
62 AC_REQUIRE([CMU_USE_COMERR])
63 AC_ARG_WITH(krb5,
64 [ --with-krb5=PREFIX Compile with Kerberos 5 support],
65 [if test "X$with_krb5" = "X"; then
66 with_krb5=yes
67 fi])
68 AC_ARG_WITH(krb5-lib,
69 [ --with-krb5-lib=dir use kerberos 5 libraries in dir],
70 [if test "$withval" = "yes" -o "$withval" = "no"; then
71 AC_MSG_ERROR([No argument for --with-krb5-lib])
72 fi])
73 AC_ARG_WITH(krb5-include,
74 [ --with-krb5-include=dir use kerberos 5 headers in dir],
75 [if test "$withval" = "yes" -o "$withval" = "no"; then
76 AC_MSG_ERROR([No argument for --with-krb5-include])
77 fi])
78 AC_ARG_WITH(krb5-impl,
79 [ --with-krb5-impl=heimdal use heimdal kerberos 5 libraries
80 --with-krb5-impl=mit use MIT kerberos 5 libraries],
81 [if test "$withval" != "heimdal" -a "$withval" != "mit"; then
82 AC_MSG_ERROR([Invalid argument for --with-krb5-impl])
83 fi])
84
85 if test "X$with_krb5" != "X"; then
86 if test "$with_krb5" != "yes" -a "$with_krb5" != "no"; then
87 ac_cv_krb5_where_lib=$with_krb5/$CMU_LIB_SUBDIR
88 ac_cv_krb5_where_inc=$with_krb5/include
89 ac_cv_krb5_impl=mit
90 fi
91 fi
92
93 if test "$with_krb5" != "no"; then
94 if test "X$with_krb5_lib" != "X"; then
95 ac_cv_krb5_where_lib=$with_krb5_lib
96 ac_cv_krb5_impl=mit
97 fi
98 if test "X$with_krb5_impl" != "X"; then
99 ac_cv_krb5_impl=$with_krb5_impl
100 fi
101 if test "X$ac_cv_krb5_where_lib" = "X" -a "X$with_krb5_impl" != "Xheimdal"; then
102 CMU_KRB5_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
103 if test "X$ac_cv_krb5_where_lib" != "X"; then
104 ac_cv_krb5_impl=mit
105 fi
106 fi
107 if test "X$ac_cv_krb5_where_lib" = "X" -a "X$with_krb5_impl" != "Xmit"; then
108 CMU_LIBHEIMDAL_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/heimdal/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
109 if test "X$ac_cv_libheimdal_where_lib" != "X"; then
110 ac_cv_krb5_where_lib=$ac_cv_libheimdal_where_lib
111 ac_cv_krb5_impl=heimdal
112 fi
113 fi
114
115 if test "X$with_krb5_include" != "X"; then
116 ac_cv_krb5_where_inc=$with_krb5_include
117 fi
118 if test "X$ac_cv_krb5_where_inc" = "X"; then
119 CMU_KRB5_INC_WHERE(/usr/athena/include /usr/include/kerberos /usr/local/include /usr/include)
120 fi
121 fi
122
123 AC_MSG_CHECKING(whether to include kerberos 5)
124 if test "X$ac_cv_krb5_where_lib" = "X" -o "X$ac_cv_krb5_where_inc" = "X"; then
125 ac_cv_found_krb5=no
126 AC_MSG_RESULT(no)
127 else
128 ac_cv_found_krb5=yes
129 AC_MSG_RESULT(yes)
130 KRB5_INC_DIR=$ac_cv_krb5_where_inc
131 KRB5_LIB_DIR=$ac_cv_krb5_where_lib
132 if test "X$ac_cv_krb5_impl" != "Xheimdal"; then
133 KRB5_LIB_FLAGS="-L${KRB5_LIB_DIR} -lkrb5 -lk5crypto"
134 else
135 CMU_LIBHEIMDAL_LIBDES($KRB5_LIB_DIR)
136 KRB5_LIB_FLAGS="-L${KRB5_LIB_DIR} -lkadm5clnt -lkrb5 -lasn1 ${HEIM_LIBDES} -lroken $LIB_SOCKET"
137 AC_DEFINE(HEIMDAL,,[we found heimdal krb5 and not MIT krb5])
138 fi
139 KRB5_INC_FLAGS="-I${KRB5_INC_DIR}"
140 AC_SUBST(KRB5_INC_FLAGS)
141 AC_SUBST(KRB5_LIB_FLAGS)
142 AC_DEFINE(HAVE_KRB5,,[Kerberos V5 is present])dnl zephyr uses this
143 AC_DEFINE(KRB5,,[Use Kerberos 5. (maybe find what needs this and nuke it)])
144 if test "X$RPATH" = "X"; then
145 RPATH=""
146 fi
147 case "${host}" in
148 *-*-linux*)
149 if test "X$RPATH" = "X"; then
150 RPATH="-Wl,-rpath,${KRB5_LIB_DIR}"
151 else
152 RPATH="${RPATH}:${KRB5_LIB_DIR}"
153 fi
154 ;;
155 *-*-hpux*)
156 if test "X$RPATH" = "X"; then
157 RPATH="-Wl,+b${KRB5_LIB_DIR}"
158 else
159 RPATH="${RPATH}:${KRB5_LIB_DIR}"
160 fi
161 ;;
162 *-*-irix*)
163 if test "X$RPATH" = "X"; then
164 RPATH="-Wl,-rpath,${KRB5_LIB_DIR}"
165 else
166 RPATH="${RPATH}:${KRB5_LIB_DIR}"
167 fi
168 ;;
169 *-*-solaris2*)
170 if test "$ac_cv_prog_gcc" = yes; then
171 if test "X$RPATH" = "X"; then
172 RPATH="-Wl,-R${KRB5_LIB_DIR}"
173 else
174 RPATH="${RPATH}:${KRB5_LIB_DIR}"
175 fi
176 else
177 RPATH="${RPATH} -R${KRB5_LIB_DIR}"
178 fi
179 ;;
180 esac
181 AC_SUBST(RPATH)
182 fi
183 ])
184
+0
-147
cmulocal/libXau.m4 less more
0 dnl $Id: libXau.m4,v 1.5 2005/04/26 19:14:08 shadow Exp $
1
2 AC_DEFUN([CMU_XAU_INC_WHERE1], [
3 saved_CPPFLAGS=$CPPFLAGS
4 CPPFLAGS="$saved_CPPFLAGS -I$1"
5 AC_TRY_COMPILE([
6 #include <X11/Xauth.h>
7 ],
8 [Xauth foo;],
9 ac_cv_found_Xau_inc=yes,
10 ac_cv_found_Xau_inc=no)
11 CPPFLAGS=$saved_CPPFLAGS
12 ])
13
14 AC_DEFUN([CMU_XAU_INC_WHERE], [
15 for i in $1; do
16 AC_MSG_CHECKING(for Xau headers in $i)
17 CMU_XAU_INC_WHERE1($i)
18 CMU_TEST_INCPATH($i, X11/Xauth)
19 if test "$ac_cv_found_Xau_inc" = "yes"; then
20 ac_cv_Xau_where_inc=$i
21 AC_MSG_RESULT(found)
22 break
23 else
24 AC_MSG_RESULT(not found)
25 fi
26 done
27 ])
28
29 AC_DEFUN([CMU_XAU_LIB_WHERE1], [
30 saved_LIBS=$LIBS
31 LIBS="$saved_LIBS -L$1 -lXau $LIB_SOCKET"
32 AC_TRY_LINK(,
33 [XauDisposeAuth();],
34 [ac_cv_found_Xau_lib=yes],
35 ac_cv_found_Xau_lib=no)
36 LIBS=$saved_LIBS
37 ])
38
39 AC_DEFUN([CMU_XAU_LIB_WHERE], [
40 for i in $1; do
41 AC_MSG_CHECKING(for Xau libraries in $i)
42 CMU_XAU_LIB_WHERE1($i)
43 dnl deal with false positives from implicit link paths
44 CMU_TEST_LIBPATH($i, Xau)
45 if test "$ac_cv_found_Xau_lib" = "yes" ; then
46 ac_cv_Xau_where_lib=$i
47 AC_MSG_RESULT(found)
48 break
49 else
50 AC_MSG_RESULT(not found)
51 fi
52 done
53 ])
54
55 AC_DEFUN([CMU_XAU], [
56 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
57 AC_REQUIRE([CMU_SOCKETS])
58 AC_ARG_WITH(Xau,
59 [ --with-Xau=PREFIX Compile with Xau support],
60 [if test "X$with_Xau" = "X"; then
61 with_Xau=yes
62 fi])
63 AC_ARG_WITH(Xau-lib,
64 [ --with-Xau-lib=dir use Xau libraries in dir],
65 [if test "$withval" = "yes" -o "$withval" = "no"; then
66 AC_MSG_ERROR([No argument for --with-Xau-lib])
67 fi])
68 AC_ARG_WITH(Xau-include,
69 [ --with-Xau-include=dir use Xau headers in dir],
70 [if test "$withval" = "yes" -o "$withval" = "no"; then
71 AC_MSG_ERROR([No argument for --with-Xau-include])
72 fi])
73
74 if test "X$with_Xau" != "X"; then
75 if test "$with_Xau" != "yes"; then
76 ac_cv_Xau_where_lib=$with_Xau/$CMU_LIB_SUBDIR
77 ac_cv_Xau_where_inc=$with_Xau/include
78 fi
79 fi
80
81 if test "X$with_Xau_lib" != "X"; then
82 ac_cv_Xau_where_lib=$with_Xau_lib
83 fi
84 if test "X$ac_cv_Xau_where_lib" = "X"; then
85 CMU_XAU_LIB_WHERE(/usr/X11R6/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/openwin/$CMU_LIB_SUBDIR)
86 fi
87
88 if test "X$with_Xau_include" != "X"; then
89 ac_cv_Xau_where_inc=$with_Xau_include
90 fi
91 if test "X$ac_cv_Xau_where_inc" = "X"; then
92 CMU_XAU_INC_WHERE(/usr/X11R6/include /usr/local/include /usr/openwin/include)
93 fi
94
95 AC_MSG_CHECKING(whether to include Xau)
96 if test "X$ac_cv_Xau_where_lib" = "X" -a "X$ac_cv_Xau_where_inc" = "X"; then
97 ac_cv_found_Xau=no
98 AC_MSG_RESULT(no)
99 else
100 ac_cv_found_Xau=yes
101 AC_MSG_RESULT(yes)
102 XAU_INC_DIR=$ac_cv_Xau_where_inc
103 XAU_LIB_DIR=$ac_cv_Xau_where_lib
104 XAU_INC_FLAGS="-I${XAU_INC_DIR}"
105 XAU_LIB_FLAGS="-L${XAU_LIB_DIR} -lXau"
106 if test "X$RPATH" = "X"; then
107 RPATH=""
108 fi
109 case "${host}" in
110 *-*-linux*)
111 if test "X$RPATH" = "X"; then
112 RPATH="-Wl,-rpath,${XAU_LIB_DIR}"
113 else
114 RPATH="${RPATH}:${XAU_LIB_DIR}"
115 fi
116 ;;
117 *-*-hpux*)
118 if test "X$RPATH" = "X"; then
119 RPATH="-Wl,+b${XAU_LIB_DIR}"
120 else
121 RPATH="${RPATH}:${XAU_LIB_DIR}"
122 fi
123 ;;
124 *-*-irix*)
125 if test "X$RPATH" = "X"; then
126 RPATH="-Wl,-rpath,${XAU_LIB_DIR}"
127 else
128 RPATH="${RPATH}:${XAU_LIB_DIR}"
129 fi
130 ;;
131 *-*-solaris2*)
132 if test "$ac_cv_prog_gcc" = yes; then
133 if test "X$RPATH" = "X"; then
134 RPATH="-Wl,-R${XAU_LIB_DIR}"
135 else
136 RPATH="${RPATH}:${XAU_LIB_DIR}"
137 fi
138 else
139 RPATH="${RPATH} -R${XAU_LIB_DIR}"
140 fi
141 ;;
142 esac
143 AC_SUBST(RPATH)
144 fi
145 ])
146
+0
-155
cmulocal/libcyrus.m4 less more
0 dnl libcyrus.m4--Cyrus libraries and includes
1 dnl Derrick Brashear
2 dnl from KTH kafs and Arla
3 dnl $Id: libcyrus.m4,v 1.20 2005/04/26 19:14:08 shadow Exp $
4
5 AC_DEFUN([CMU_LIBCYRUS_INC_WHERE1], [
6 saved_CPPFLAGS=$CPPFLAGS
7 CPPFLAGS="$saved_CPPFLAGS -I$1 $SASLFLAGS"
8 CMU_CHECK_HEADER_NOCACHE(cyrus/imclient.h,
9 ac_cv_found_cyrus_inc=yes,
10 ac_cv_found_cyrus_inc=no)
11 CPPFLAGS=$saved_CPPFLAGS
12 ])
13
14 AC_DEFUN([CMU_LIBCYRUS_INC_WHERE], [
15 for i in $1; do
16 AC_MSG_CHECKING(for libcyrus headers in $i)
17 CMU_LIBCYRUS_INC_WHERE1($i)
18 CMU_TEST_INCPATH($i, imclient)
19 if test "$ac_cv_found_cyrus_inc" = "yes"; then
20 ac_cv_cyrus_where_inc=$i
21 AC_MSG_RESULT(found)
22 break
23 else
24 AC_MSG_RESULT(not found)
25 fi
26 done
27 ])
28
29 AC_DEFUN([CMU_LIBCYRUS_LIB_WHERE1], [
30 saved_LIBS=$LIBS
31 LIBS="$saved_LIBS -L$1 -lcyrus ${LIB_SASL} ${LIBSSL_LIB_FLAGS} ${LIB_SOCKET}"
32 AC_TRY_LINK([void fatal(){}],
33 [imclient_authenticate();],
34 [ac_cv_found_cyrus_lib=yes],
35 ac_cv_found_cyrus_lib=no)
36 LIBS=$saved_LIBS
37 ])
38
39 AC_DEFUN([CMU_LIBCYRUS_LIB_WHERE], [
40 for i in $1; do
41 AC_MSG_CHECKING(for libcyrus libraries in $i)
42 CMU_LIBCYRUS_LIB_WHERE1($i)
43 dnl deal with false positives from implicit link paths
44 CMU_TEST_LIBPATH($i, cyrus)
45 if test "$ac_cv_found_cyrus_lib" = "yes" ; then
46 ac_cv_cyrus_where_lib=$i
47 AC_MSG_RESULT(found)
48 break
49 else
50 AC_MSG_RESULT(not found)
51 fi
52 done
53 ])
54
55 AC_DEFUN([CMU_LIBCYRUS], [
56 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
57 AC_REQUIRE([CMU_SOCKETS])
58 AC_REQUIRE([CMU_SASL2])
59 AC_REQUIRE([CMU_LIBSSL])
60 AC_ARG_WITH(libcyrus,
61 [ --with-libcyrus=PREFIX Compile with Libcyrus support],
62 [if test "X$with_libcyrus" = "X"; then
63 with_libcyrus=yes
64 fi])
65 AC_ARG_WITH(libcyrus-lib,
66 [ --with-libcyrus-lib=dir use libcyrus libraries in dir],
67 [if test "$withval" = "yes" -o "$withval" = "no"; then
68 AC_MSG_ERROR([No argument for --with-libcyrus-lib])
69 fi])
70 AC_ARG_WITH(libcyrus-include,
71 [ --with-libcyrus-include=dir use libcyrus headers in dir],
72 [if test "$withval" = "yes" -o "$withval" = "no"; then
73 AC_MSG_ERROR([No argument for --with-libcyrus-include])
74 fi])
75
76 if test "X$with_libcyrus" != "X"; then
77 if test "$with_libcyrus" != "yes" -a "$with_libcyrus" != no; then
78 ac_cv_cyrus_where_lib=$with_libcyrus/$CMU_LIB_SUBDIR
79 ac_cv_cyrus_where_inc=$with_libcyrus/include
80 fi
81 fi
82
83 if test "$with_libcyrus" != "no"; then
84 if test "X$with_libcyrus_lib" != "X"; then
85 ac_cv_cyrus_where_lib=$with_libcyrus_lib
86 fi
87 if test "X$ac_cv_cyrus_where_lib" = "X"; then
88 CMU_LIBCYRUS_LIB_WHERE(/usr/cyrus/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
89 fi
90
91 if test "X$with_libcyrus_include" != "X"; then
92 ac_cv_cyrus_where_inc=$with_libcyrus_include
93 fi
94 if test "X$ac_cv_cyrus_where_inc" = "X"; then
95 CMU_LIBCYRUS_INC_WHERE(/usr/cyrus/include /usr/local/include /usr/local/include/cyrus /usr/include/cyrus)
96 fi
97 fi
98
99 AC_MSG_CHECKING(whether to include libcyrus)
100 if test "X$ac_cv_cyrus_where_lib" = "X" -o "X$ac_cv_cyrus_where_inc" = "X"; then
101 ac_cv_found_cyrus=no
102 AC_MSG_RESULT(no)
103 else
104 ac_cv_found_cyrus=yes
105 AC_MSG_RESULT(yes)
106 LIBCYRUS_INC_DIR=$ac_cv_cyrus_where_inc
107 LIBCYRUS_LIB_DIR=$ac_cv_cyrus_where_lib
108 LIBCYRUS_INC_FLAGS="-I${LIBCYRUS_INC_DIR}"
109 LIBCYRUS_LIB_FLAGS="-L${LIBCYRUS_LIB_DIR} -lcyrus"
110 if test "X$RPATH" = "X"; then
111 RPATH=""
112 fi
113 case "${host}" in
114 *-*-linux*)
115 if test "X$RPATH" = "X"; then
116 RPATH="-Wl,-rpath,${LIBCYRUS_LIB_DIR}"
117 else
118 RPATH="${RPATH}:${LIBCYRUS_LIB_DIR}"
119 fi
120 ;;
121 *-*-hpux*)
122 if test "X$RPATH" = "X"; then
123 RPATH="-Wl,+b${LIBCYRUS_LIB_DIR}"
124 else
125 RPATH="${RPATH}:${LIBCYRUS_LIB_DIR}"
126 fi
127 ;;
128 *-*-irix*)
129 if test "X$RPATH" = "X"; then
130 RPATH="-Wl,-rpath,${LIBCYRUS_LIB_DIR}"
131 else
132 RPATH="${RPATH}:${LIBCYRUS_LIB_DIR}"
133 fi
134 ;;
135 *-*-solaris2*)
136 if test "$ac_cv_prog_gcc" = yes; then
137 if test "X$RPATH" = "X"; then
138 RPATH="-Wl,-R${LIBCYRUS_LIB_DIR}"
139 else
140 RPATH="${RPATH}:${LIBCYRUS_LIB_DIR}"
141 fi
142 else
143 RPATH="${RPATH} -R${LIBCYRUS_LIB_DIR}"
144 fi
145 ;;
146 esac
147 AC_SUBST(RPATH)
148 fi
149 AC_SUBST(LIBCYRUS_INC_DIR)
150 AC_SUBST(LIBCYRUS_LIB_DIR)
151 AC_SUBST(LIBCYRUS_INC_FLAGS)
152 AC_SUBST(LIBCYRUS_LIB_FLAGS)
153 ])
154
+0
-103
cmulocal/libloguse.m4 less more
0 dnl libloguse.m4--LOGUSE libraries and includes
1 dnl Derrick Brashear
2 dnl from KTH krb and Arla
3 dnl $Id: libloguse.m4,v 1.7 2006/02/25 18:26:22 cg2v Exp $
4
5 AC_DEFUN([CMU_LOGUSE_LIB_WHERE1], [
6 saved_LIBS=$LIBS
7 LIBS="$saved_LIBS -L$1 -lloguse"
8 AC_TRY_LINK(,
9 [loguse("","","");],
10 [ac_cv_found_loguse_lib=yes],
11 ac_cv_found_loguse_lib=no)
12 LIBS=$saved_LIBS
13 ])
14
15 AC_DEFUN([CMU_LOGUSE_LIB_WHERE], [
16 for i in $1; do
17 AC_MSG_CHECKING(for loguse library in $i)
18 CMU_LOGUSE_LIB_WHERE1($i)
19 CMU_TEST_LIBPATH($i, loguse)
20 if test "$ac_cv_found_loguse_lib" = "yes" ; then
21 ac_cv_loguse_where_lib=$i
22 AC_MSG_RESULT(found)
23 break
24 else
25 AC_MSG_RESULT(no found)
26 fi
27 done
28 ])
29
30 AC_DEFUN([CMU_LOGUSE], [
31 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
32 AC_REQUIRE([CMU_SOCKETS])
33 AC_ARG_WITH(loguse,
34 [ --with-loguse=PREFIX Compile with LOGUSE support],
35 [if test "X$with_loguse" = "X"; then
36 with_loguse=yes
37 fi])
38
39 if test "X$with_loguse" != "X"; then
40 if test "$with_loguse" != "yes"; then
41 ac_cv_loguse_where_lib=$with_loguse/$CMU_LIB_SUBDIR
42 fi
43 fi
44
45 if test "X$with_loguse_lib" != "X"; then
46 ac_cv_loguse_where_lib=$with_loguse_lib
47 fi
48 if test "X$ac_cv_loguse_where_lib" = "X"; then
49 CMU_LOGUSE_LIB_WHERE(/usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
50 fi
51
52 AC_MSG_CHECKING(whether to include loguse)
53 if test "X$ac_cv_loguse_where_lib" = "X"; then
54 ac_cv_found_loguse=no
55 AC_MSG_RESULT(no)
56 else
57 ac_cv_found_loguse=yes
58 AC_DEFINE(HAVE_LOGUSE,, [Use libloguse])
59 AC_MSG_RESULT(yes)
60 LOGUSE_LIB_DIR=$ac_cv_loguse_where_lib
61 LOGUSE_LIB_FLAGS="-L${LOGUSE_LIB_DIR} -lloguse"
62 if test "X$RPATH" = "X"; then
63 RPATH=""
64 fi
65 case "${host}" in
66 *-*-linux*)
67 if test "X$RPATH" = "X"; then
68 RPATH="-Wl,-rpath,${LOGUSE_LIB_DIR}"
69 else
70 RPATH="${RPATH}:${LOGUSE_LIB_DIR}"
71 fi
72 ;;
73 *-*-hpux*)
74 if test "X$RPATH" = "X"; then
75 RPATH="-Wl,+b${LOGUSE_LIB_DIR}"
76 else
77 RPATH="${RPATH}:${LOGUSE_LIB_DIR}"
78 fi
79 ;;
80 *-*-irix*)
81 if test "X$RPATH" = "X"; then
82 RPATH="-Wl,-rpath,${LOGUSE_LIB_DIR}"
83 else
84 RPATH="${RPATH}:${LOGUSE_LIB_DIR}"
85 fi
86 ;;
87 *-*-solaris2*)
88 if test "$ac_cv_prog_gcc" = yes; then
89 if test "X$RPATH" = "X"; then
90 RPATH="-Wl,-R${LOGUSE_LIB_DIR}"
91 else
92 RPATH="${RPATH}:${LOGUSE_LIB_DIR}"
93 fi
94 else
95 RPATH="${RPATH} -R${LOGUSE_LIB_DIR}"
96 fi
97 ;;
98 esac
99 AC_SUBST(RPATH)
100 fi
101 ])
102
+0
-192
cmulocal/libnet.m4 less more
0 dnl libnet.m4--libnet and includes
1 dnl Derrick Brashear
2 dnl from KTH krb and Arla
3 dnl $Id: libnet.m4,v 1.8 2005/04/26 19:14:08 shadow Exp $
4
5 AC_DEFUN([CMU_LIBNET_CFG_WHERE1], [
6 ac_cv_found_libnet_bin=no
7 if test -f "$1/libnet-config" ; then
8 ac_cv_found_libnet_cfg=yes
9 fi
10 ])
11
12 AC_DEFUN([CMU_LIBNET_CFG_WHERE], [
13 for i in $1; do
14 AC_MSG_CHECKING(for libnet config in $i)
15 CMU_LIBNET_CFG_WHERE1($i)
16 if test "$ac_cv_found_libnet_cfg" = "yes"; then
17 ac_cv_libnet_where_cfg=$i
18 AC_MSG_RESULT(found)
19 break
20 else
21 AC_MSG_RESULT(not found)
22 fi
23 done
24 ])
25
26 AC_DEFUN([CMU_LIBNET_INC_WHERE1], [
27 ac_cv_found_libnet_inc=no
28 if test -f "$1/libnet.h" ; then
29 ac_cv_found_libnet_inc=yes
30 fi
31 ])
32
33 AC_DEFUN([CMU_LIBNET_INC_WHERE], [
34 for i in $1; do
35 AC_MSG_CHECKING(for libnet header in $i)
36 CMU_LIBNET_INC_WHERE1($i)
37 if test "$ac_cv_found_libnet_inc" = "yes"; then
38 ac_cv_libnet_where_inc=$i
39 AC_MSG_RESULT(found)
40 break
41 else
42 AC_MSG_RESULT(not found)
43 fi
44 done
45 ])
46
47 AC_DEFUN([CMU_LIBNET_LIB_WHERE1], [
48 saved_LIBS=$LIBS
49 LIBS="$saved_LIBS -L$1 -lnet"
50 AC_TRY_LINK(,
51 [open_link_interface("","");],
52 [ac_cv_found_libnet_lib=yes],
53 AC_TRY_LINK(,
54 [libnet_open_link_interface("","");],
55 [
56 CMU_LIBNET_CFLAGS_ADD="-DNEW_LIBNET_INTERFACE"
57 ac_cv_found_libnet_lib=yes
58 ],
59 ac_cv_found_libnet_lib=no)
60 )
61 LIBS=$saved_LIBS
62 ])
63
64 AC_DEFUN([CMU_LIBNET_LIB_WHERE], [
65 for i in $1; do
66 AC_MSG_CHECKING(for libnet library in $i)
67 CMU_LIBNET_LIB_WHERE1($i)
68 CMU_TEST_LIBPATH($i, net)
69 if test "$ac_cv_found_libnet_lib" = "yes" ; then
70 ac_cv_libnet_where_lib=$i
71 AC_MSG_RESULT(found)
72 break
73 else
74 AC_MSG_RESULT(not found)
75 fi
76 done
77 ])
78
79 AC_DEFUN([CMU_LIBNET], [
80 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
81 AC_ARG_WITH(libnet,
82 [ --with-libnet=PREFIX Compile with LIBNET support],
83 [if test "X$with_libnet" = "X"; then
84 with_libnet=yes
85 fi])
86 AC_ARG_WITH(libnet-config,
87 [ --with-libnet-config=dir use libnet config program in dir],
88 [if test "$withval" = "yes" -o "$withval" = "no"; then
89 AC_MSG_ERROR([No argument for --with-libnet-config])
90 fi])
91 AC_ARG_WITH(libnet-lib,
92 [ --with-libnet-lib=dir use libnet libraries in dir],
93 [if test "$withval" = "yes" -o "$withval" = "no"; then
94 AC_MSG_ERROR([No argument for --with-libnet-lib])
95 fi])
96 AC_ARG_WITH(libnet-include,
97 [ --with-libnet-include=dir use libnet headers in dir],
98 [if test "$withval" = "yes" -o "$withval" = "no"; then
99 AC_MSG_ERROR([No argument for --with-libnet-include])
100 fi])
101
102 if test "X$with_libnet" != "X"; then
103 if test "$with_libnet" != "yes"; then
104 if test -f "$with_libnet/libnet-config"; then
105 ac_cv_libnet_where_cfg=$with_libnet
106 else
107 ac_cv_libnet_where_cfg=$with_libnet/bin
108 fi
109 ac_cv_libnet_where_lib=$with_libnet/$CMU_LIB_SUBDIR
110 ac_cv_libnet_where_inc=$with_libnet/include
111 fi
112 fi
113
114 if test "X$with_libnet_cfg" != "X"; then
115 ac_cv_libnet_where_cfg=$with_libnet_cfg
116 fi
117 if test "X$ac_cv_libnet_where_cfg" = "X"; then
118 CMU_LIBNET_CFG_WHERE(/usr/ng/bin /usr/bin /usr/local/bin)
119 fi
120
121 if test "X$with_libnet_lib" != "X"; then
122 ac_cv_libnet_where_lib=$with_libnet_lib
123 fi
124 if test "X$ac_cv_libnet_where_lib" = "X"; then
125 CMU_LIBNET_LIB_WHERE(/usr/ng/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
126 fi
127
128 if test "X$with_libnet_include" != "X"; then
129 ac_cv_libnet_where_inc=$with_libnet_include
130 fi
131 if test "X$ac_cv_libnet_where_inc" = "X"; then
132 CMU_LIBNET_INC_WHERE(/usr/ng/include /usr/include /usr/local/include)
133 fi
134
135 AC_MSG_CHECKING(whether to include libnet)
136 if test "X$ac_cv_libnet_where_lib" = "X" -o "X$ac_cv_libnet_where_inc" = "X" -o "X$ac_cv_libnet_where_cfg" = "X"; then
137 ac_cv_found_libnet=no
138 AC_MSG_RESULT(no)
139 else
140 ac_cv_found_libnet=yes
141 AC_MSG_RESULT(yes)
142 LIBNET_CONFIG=$ac_cv_libnet_where_cfg/libnet-config
143 LIBNET_INC_DIR=$ac_cv_libnet_where_inc
144 LIBNET_LIB_DIR=$ac_cv_libnet_where_lib
145
146 LIBNET_CFLAGS="`$LIBNET_CONFIG --cflags` ${CMU_LIBNET_CFLAGS_ADD}"
147 LIBNET_DEF_FLAGS="`$LIBNET_CONFIG --defines`"
148 LIBNET_INC_FLAGS="-I${LIBNET_INC_DIR}"
149 LIBNET_LIB_FLAGS="-L${LIBNET_LIB_DIR} `${LIBNET_CONFIG} --libs`"
150
151 if test "X$RPATH" = "X"; then
152 RPATH=""
153 fi
154 case "${host}" in
155 *-*-linux*)
156 if test "X$RPATH" = "X"; then
157 RPATH="-Wl,-rpath,${LIBNET_LIB_DIR}"
158 else
159 RPATH="${RPATH}:${LIBNET_LIB_DIR}"
160 fi
161 ;;
162 *-*-hpux*)
163 if test "X$RPATH" = "X"; then
164 RPATH="-Wl,+b${LIBNET_LIB_DIR}"
165 else
166 RPATH="${RPATH}:${LIBNET_LIB_DIR}"
167 fi
168 ;;
169 *-*-irix*)
170 if test "X$RPATH" = "X"; then
171 RPATH="-Wl,-rpath,${LIBNET_LIB_DIR}"
172 else
173 RPATH="${RPATH}:${LIBNET_LIB_DIR}"
174 fi
175 ;;
176 *-*-solaris2*)
177 if test "$ac_cv_prog_gcc" = yes; then
178 if test "X$RPATH" = "X"; then
179 RPATH="-Wl,-R${LIBNET_LIB_DIR}"
180 else
181 RPATH="${RPATH}:${LIBNET_LIB_DIR}"
182 fi
183 else
184 RPATH="${RPATH} -R${LIBNET_LIB_DIR}"
185 fi
186 ;;
187 esac
188 AC_SUBST(RPATH)
189 fi
190 ])
191
+0
-142
cmulocal/libpcap.m4 less more
0 dnl libpcap.m4--PCAP libraries and includes
1 dnl Derrick Brashear
2 dnl from KTH krb and Arla
3 dnl $Id: libpcap.m4,v 1.9 2005/04/26 19:14:08 shadow Exp $
4
5 AC_DEFUN([CMU_PCAP_INC_WHERE1], [
6 ac_cv_found_pcap_inc=no
7 if test -f "$1/pcap.h" ; then
8 ac_cv_found_pcap_inc=yes
9 fi
10 ])
11
12 AC_DEFUN([CMU_PCAP_INC_WHERE], [
13 for i in $1; do
14 AC_MSG_CHECKING(for pcap header in $i)
15 CMU_PCAP_INC_WHERE1($i)
16 if test "$ac_cv_found_pcap_inc" = "yes"; then
17 ac_cv_pcap_where_inc=$i
18 AC_MSG_RESULT(found)
19 break
20 else
21 AC_MSG_RESULT(no found)
22 fi
23 done
24 ])
25
26 AC_DEFUN([CMU_PCAP_LIB_WHERE1], [
27 saved_LIBS=$LIBS
28 LIBS="$saved_LIBS -L$1 -lpcap"
29 AC_TRY_LINK(,
30 [pcap_lookupdev("");],
31 [ac_cv_found_pcap_lib=yes],
32 ac_cv_found_pcap_lib=no)
33 LIBS=$saved_LIBS
34 ])
35
36 AC_DEFUN([CMU_PCAP_LIB_WHERE], [
37 for i in $1; do
38 AC_MSG_CHECKING(for pcap library in $i)
39 CMU_PCAP_LIB_WHERE1($i)
40 CMU_TEST_LIBPATH($i, pcap)
41 if test "$ac_cv_found_pcap_lib" = "yes" ; then
42 ac_cv_pcap_where_lib=$i
43 AC_MSG_RESULT(found)
44 break
45 else
46 AC_MSG_RESULT(no found)
47 fi
48 done
49 ])
50
51 AC_DEFUN([CMU_PCAP], [
52 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
53 AC_ARG_WITH(pcap,
54 [ --with-pcap=PREFIX Compile with PCAP support],
55 [if test "X$with_pcap" = "X"; then
56 with_pcap=yes
57 fi])
58 AC_ARG_WITH(pcap-lib,
59 [ --with-pcap-lib=dir use pcap libraries in dir],
60 [if test "$withval" = "yes" -o "$withval" = "no"; then
61 AC_MSG_ERROR([No argument for --with-pcap-lib])
62 fi])
63 AC_ARG_WITH(pcap-include,
64 [ --with-pcap-include=dir use pcap headers in dir],
65 [if test "$withval" = "yes" -o "$withval" = "no"; then
66 AC_MSG_ERROR([No argument for --with-pcap-include])
67 fi])
68
69 if test "X$with_pcap" != "X"; then
70 if test "$with_pcap" != "yes"; then
71 ac_cv_pcap_where_lib=$with_pcap/$CMU_LIB_SUBDIR
72 ac_cv_pcap_where_inc=$with_pcap/include
73 fi
74 fi
75
76 if test "X$with_pcap_lib" != "X"; then
77 ac_cv_pcap_where_lib=$with_pcap_lib
78 fi
79 if test "X$ac_cv_pcap_where_lib" = "X"; then
80 CMU_PCAP_LIB_WHERE(/usr/ng/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
81 fi
82
83 if test "X$with_pcap_include" != "X"; then
84 ac_cv_pcap_where_inc=$with_pcap_include
85 fi
86 if test "X$ac_cv_pcap_where_inc" = "X"; then
87 CMU_PCAP_INC_WHERE(/usr/ng/include /usr/include /usr/local/include)
88 fi
89
90 AC_MSG_CHECKING(whether to include pcap)
91 if test "X$ac_cv_pcap_where_lib" = "X" -a "X$ac_cv_pcap_where_inc" = "X"; then
92 ac_cv_found_pcap=no
93 AC_MSG_RESULT(no)
94 else
95 ac_cv_found_pcap=yes
96 AC_MSG_RESULT(yes)
97 PCAP_INC_DIR=$ac_cv_pcap_where_inc
98 PCAP_LIB_DIR=$ac_cv_pcap_where_lib
99 PCAP_INC_FLAGS="-I${PCAP_INC_DIR}"
100 PCAP_LIB_FLAGS="-L${PCAP_LIB_DIR} -lpcap"
101 if test "X$RPATH" = "X"; then
102 RPATH=""
103 fi
104 case "${host}" in
105 *-*-linux*)
106 if test "X$RPATH" = "X"; then
107 RPATH="-Wl,-rpath,${PCAP_LIB_DIR}"
108 else
109 RPATH="${RPATH}:${PCAP_LIB_DIR}"
110 fi
111 ;;
112 *-*-hpux*)
113 if test "X$RPATH" = "X"; then
114 RPATH="-Wl,+b${PCAP_LIB_DIR}"
115 else
116 RPATH="${RPATH}:${PCAP_LIB_DIR}"
117 fi
118 ;;
119 *-*-irix*)
120 if test "X$RPATH" = "X"; then
121 RPATH="-Wl,-rpath,${PCAP_LIB_DIR}"
122 else
123 RPATH="${RPATH}:${PCAP_LIB_DIR}"
124 fi
125 ;;
126 *-*-solaris2*)
127 if test "$ac_cv_prog_gcc" = yes; then
128 if test "X$RPATH" = "X"; then
129 RPATH="-Wl,-R${PCAP_LIB_DIR}"
130 else
131 RPATH="${RPATH}:${PCAP_LIB_DIR}"
132 fi
133 else
134 RPATH="${RPATH} -R${PCAP_LIB_DIR}"
135 fi
136 ;;
137 esac
138 AC_SUBST(RPATH)
139 fi
140 ])
141
+0
-102
cmulocal/librestrict.m4 less more
0 dnl librestrict.m4--restrict libraries and includes
1 dnl Derrick Brashear
2 dnl from KTH krb and Arla
3 dnl $Id: librestrict.m4,v 1.6 2006/02/25 18:26:22 cg2v Exp $
4
5 AC_DEFUN([CMU_RESTRICT_LIB_WHERE1], [
6 saved_LIBS=$LIBS
7 LIBS="$saved_LIBS -L$1 -lrestrict"
8 AC_TRY_LINK(,
9 [ConsoleInUse();],
10 [ac_cv_found_restrict_lib=yes],
11 ac_cv_found_restrict_lib=no)
12 LIBS=$saved_LIBS
13 ])
14
15 AC_DEFUN([CMU_RESTRICT_LIB_WHERE], [
16 for i in $1; do
17 AC_MSG_CHECKING(for restrict library in $i)
18 CMU_RESTRICT_LIB_WHERE1($i)
19 CMU_TEST_LIBPATH($i, restrict)
20 if test "$ac_cv_found_restrict_lib" = "yes" ; then
21 ac_cv_restrict_where_lib=$i
22 AC_MSG_RESULT(found)
23 break
24 else
25 AC_MSG_RESULT(no found)
26 fi
27 done
28 ])
29
30 AC_DEFUN([CMU_RESTRICT], [
31 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
32 AC_ARG_WITH(restrict,
33 [ --with-restrict=PREFIX Compile with RESTRICT support],
34 [if test "X$with_restrict" = "X"; then
35 with_restrict=yes
36 fi])
37
38 if test "X$with_restrict" != "X"; then
39 if test "$with_restrict" != "yes"; then
40 ac_cv_restrict_where_lib=$with_restrict/$CMU_LIB_SUBDIR
41 fi
42 fi
43
44 if test "X$with_restrict_lib" != "X"; then
45 ac_cv_restrict_where_lib=$with_restrict_lib
46 fi
47 if test "X$ac_cv_restrict_where_lib" = "X"; then
48 CMU_RESTRICT_LIB_WHERE(/usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
49 fi
50
51 AC_MSG_CHECKING(whether to include restrict)
52 if test "X$ac_cv_restrict_where_lib" = "X"; then
53 ac_cv_found_restrict=no
54 AC_MSG_RESULT(no)
55 else
56 ac_cv_found_restrict=yes
57 AC_DEFINE(HAVE_RESTRICT,, [Use librestrict])
58 AC_MSG_RESULT(yes)
59 RESTRICT_LIB_DIR=$ac_cv_restrict_where_lib
60 RESTRICT_LIB_FLAGS="-L${RESTRICT_LIB_DIR} -lrestrict"
61 if test "X$RPATH" = "X"; then
62 RPATH=""
63 fi
64 case "${host}" in
65 *-*-linux*)
66 if test "X$RPATH" = "X"; then
67 RPATH="-Wl,-rpath,${RESTRICT_LIB_DIR}"
68 else
69 RPATH="${RPATH}:${RESTRICT_LIB_DIR}"
70 fi
71 ;;
72 *-*-hpux*)
73 if test "X$RPATH" = "X"; then
74 RPATH="-Wl,+b${RESTRICT_LIB_DIR}"
75 else
76 RPATH="${RPATH}:${RESTRICT_LIB_DIR}"
77 fi
78 ;;
79 *-*-irix*)
80 if test "X$RPATH" = "X"; then
81 RPATH="-Wl,-rpath,${RESTRICT_LIB_DIR}"
82 else
83 RPATH="${RPATH}:${RESTRICT_LIB_DIR}"
84 fi
85 ;;
86 *-*-solaris2*)
87 if test "$ac_cv_prog_gcc" = yes; then
88 if test "X$RPATH" = "X"; then
89 RPATH="-Wl,-R${RESTRICT_LIB_DIR}"
90 else
91 RPATH="${RPATH}:${RESTRICT_LIB_DIR}"
92 fi
93 else
94 RPATH="${RPATH} -R${RESTRICT_LIB_DIR}"
95 fi
96 ;;
97 esac
98 AC_SUBST(RPATH)
99 fi
100 ])
101
+0
-153
cmulocal/libssl.m4 less more
0 dnl libssl.m4--Ssl libraries and includes
1 dnl Derrick Brashear
2 dnl from KTH kafs and Arla
3 dnl $Id: libssl.m4,v 1.10 2005/04/26 19:14:08 shadow Exp $
4
5 AC_DEFUN([CMU_LIBSSL_INC_WHERE1], [
6 saved_CPPFLAGS=$CPPFLAGS
7 CPPFLAGS="$saved_CPPFLAGS -I$1"
8 CMU_CHECK_HEADER_NOCACHE(openssl/ssl.h,
9 ac_cv_found_libssl_inc=yes,
10 ac_cv_found_libssl_inc=no)
11 CPPFLAGS=$saved_CPPFLAGS
12 ])
13
14 AC_DEFUN([CMU_LIBSSL_INC_WHERE], [
15 for i in $1; do
16 AC_MSG_CHECKING(for libssl headers in $i)
17 CMU_LIBSSL_INC_WHERE1($i)
18 CMU_TEST_INCPATH($i, ssl)
19 if test "$ac_cv_found_libssl_inc" = "yes"; then
20 ac_cv_libssl_where_inc=$i
21 AC_MSG_RESULT(found)
22 break
23 else
24 AC_MSG_RESULT(not found)
25 fi
26 done
27 ])
28
29 AC_DEFUN([CMU_LIBSSL_LIB_WHERE1], [
30 saved_LIBS=$LIBS
31 LIBS="$saved_LIBS -L$1 -lssl -lcrypto $LIB_SOCKET"
32 AC_TRY_LINK(,
33 [SSL_write();],
34 [ac_cv_found_ssl_lib=yes],
35 ac_cv_found_ssl_lib=no)
36 LIBS=$saved_LIBS
37 ])
38
39 AC_DEFUN([CMU_LIBSSL_LIB_WHERE], [
40 for i in $1; do
41 AC_MSG_CHECKING(for libssl libraries in $i)
42 CMU_LIBSSL_LIB_WHERE1($i)
43 dnl deal with false positives from implicit link paths
44 CMU_TEST_LIBPATH($i, ssl)
45 if test "$ac_cv_found_ssl_lib" = "yes" ; then
46 ac_cv_libssl_where_lib=$i
47 AC_MSG_RESULT(found)
48 break
49 else
50 AC_MSG_RESULT(not found)
51 fi
52 done
53 ])
54
55 AC_DEFUN([CMU_LIBSSL], [
56 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
57 AC_REQUIRE([CMU_SOCKETS])
58 AC_ARG_WITH(libssl,
59 [ --with-libssl=PREFIX Compile with Libssl support],
60 [if test "X$with_libssl" = "X"; then
61 with_libssl=yes
62 fi])
63 AC_ARG_WITH(libssl-lib,
64 [ --with-libssl-lib=dir use libssl libraries in dir],
65 [if test "$withval" = "yes" -o "$withval" = "no"; then
66 AC_MSG_ERROR([No argument for --with-libssl-lib])
67 fi])
68 AC_ARG_WITH(libssl-include,
69 [ --with-libssl-include=dir use libssl headers in dir],
70 [if test "$withval" = "yes" -o "$withval" = "no"; then
71 AC_MSG_ERROR([No argument for --with-libssl-include])
72 fi])
73
74 if test "X$with_libssl" != "X"; then
75 if test "$with_libssl" != "yes" -a "$with_libssl" != no; then
76 ac_cv_libssl_where_lib=$with_libssl/$CMU_LIB_SUBDIR
77 ac_cv_libssl_where_inc=$with_libssl/include
78 fi
79 fi
80
81 if test "$with_libssl" != "no"; then
82 if test "X$with_libssl_lib" != "X"; then
83 ac_cv_libssl_where_lib=$with_libssl_lib
84 fi
85 if test "X$ac_cv_libssl_where_lib" = "X"; then
86 CMU_LIBSSL_LIB_WHERE(/usr/local/$CMU_LIB_SUBDIR/openssl /usr/$CMU_LIB_SUBDIR/openssl /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
87 fi
88
89 if test "X$with_libssl_include" != "X"; then
90 ac_cv_libssl_where_inc=$with_libssl_include
91 fi
92 if test "X$ac_cv_libssl_where_inc" = "X"; then
93 CMU_LIBSSL_INC_WHERE(/usr/local/include /usr/include)
94 fi
95 fi
96
97 AC_MSG_CHECKING(whether to include libssl)
98 if test "X$ac_cv_libssl_where_lib" = "X" -a "X$ac_cv_libssl_where_inc" = "X"; then
99 ac_cv_found_libssl=no
100 AC_MSG_RESULT(no)
101 else
102 ac_cv_found_libssl=yes
103 AC_MSG_RESULT(yes)
104 LIBSSL_INC_DIR=$ac_cv_libssl_where_inc
105 LIBSSL_LIB_DIR=$ac_cv_libssl_where_lib
106 LIBSSL_INC_FLAGS="-I${LIBSSL_INC_DIR}"
107 LIBSSL_LIB_FLAGS="-L${LIBSSL_LIB_DIR} -lssl -lcrypto"
108 if test "X$RPATH" = "X"; then
109 RPATH=""
110 fi
111 case "${host}" in
112 *-*-linux*)
113 if test "X$RPATH" = "X"; then
114 RPATH="-Wl,-rpath,${LIBSSL_LIB_DIR}"
115 else
116 RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
117 fi
118 ;;
119 *-*-hpux*)
120 if test "X$RPATH" = "X"; then
121 RPATH="-Wl,+b${LIBSSL_LIB_DIR}"
122 else
123 RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
124 fi
125 ;;
126 *-*-irix*)
127 if test "X$RPATH" = "X"; then
128 RPATH="-Wl,-rpath,${LIBSSL_LIB_DIR}"
129 else
130 RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
131 fi
132 ;;
133 *-*-solaris2*)
134 if test "$ac_cv_prog_gcc" = yes; then
135 if test "X$RPATH" = "X"; then
136 RPATH="-Wl,-R${LIBSSL_LIB_DIR}"
137 else
138 RPATH="${RPATH}:${LIBSSL_LIB_DIR}"
139 fi
140 else
141 RPATH="${RPATH} -R${LIBSSL_LIB_DIR}"
142 fi
143 ;;
144 esac
145 AC_SUBST(RPATH)
146 fi
147 AC_SUBST(LIBSSL_INC_DIR)
148 AC_SUBST(LIBSSL_LIB_DIR)
149 AC_SUBST(LIBSSL_INC_FLAGS)
150 AC_SUBST(LIBSSL_LIB_FLAGS)
151 ])
152
+0
-33
cmulocal/libtoolhack.m4 less more
0 dnl libtoolhack.m4--hack to make libtool behave better
1 dnl Rob Earhart
2 dnl $Id: libtoolhack.m4,v 1.4 2003/10/08 20:35:25 rjs3 Exp $
3
4 dnl Libtool tries to compile an empty file to see whether it can build
5 dnl shared libraries, and treats *any* warning as a problem.
6 dnl Solaris's and HP's cc complains about the empty file. So we hack
7 dnl the CFLAGS to make cc not complain.
8
9 AC_DEFUN([CMU_PROG_LIBTOOL], [
10 AC_REQUIRE([AC_PROG_CC])
11 if test "$ac_cv_prog_gcc" = no; then
12 case "$host_os" in
13 solaris2*)
14 save_cflags="${CFLAGS}"
15 CFLAGS="-erroff=E_EMPTY_TRANSLATION_UNIT ${CFLAGS}"
16 ;;
17 hpux*)
18 save_cflags="${CFLAGS}"
19 CFLAGS="-w"
20 ;;
21 esac
22 fi
23
24 AC_PROG_LIBTOOL
25
26 if test "$ac_cv_prog_gcc" = no; then
27 case "$host_os" in
28 solaris2*|hpux*)
29 CFLAGS="${save_cflags}"
30 esac
31 fi
32 ])
+0
-30
cmulocal/libwrap.m4 less more
0 dnl libwrap.m4 --- do we have libwrap, the access control library?
1 dnl $Id: libwrap.m4,v 1.10 2005/04/26 19:14:08 shadow Exp $
2
3 AC_DEFUN([CMU_LIBWRAP], [
4 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
5 AC_REQUIRE([CMU_SOCKETS])
6 AC_ARG_WITH(libwrap,
7 [ --with-libwrap=DIR use libwrap (rooted in DIR) [yes] ],
8 with_libwrap=$withval, with_libwrap=yes)
9 if test "$with_libwrap" != no; then
10 if test -d "$with_libwrap"; then
11 CPPFLAGS="$CPPFLAGS -I${with_libwrap}/include"
12 LDFLAGS="$LDFLAGS -L${with_libwrap}/$CMU_LIB_SUBDIR"
13 fi
14 cmu_save_LIBS="$LIBS"
15 AC_CHECK_LIB(wrap, request_init, [
16 AC_CHECK_HEADER(tcpd.h,, with_libwrap=no)],
17 with_libwrap=no, ${LIB_SOCKET})
18 LIBS="$cmu_save_LIBS"
19 fi
20 AC_MSG_CHECKING(libwrap support)
21 AC_MSG_RESULT($with_libwrap)
22 LIB_WRAP=""
23 if test "$with_libwrap" != no; then
24 AC_DEFINE(HAVE_LIBWRAP,[],[Do we have TCP wrappers?])
25 LIB_WRAP="-lwrap"
26 AC_CHECK_LIB(nsl, yp_get_default_domain, LIB_WRAP="${LIB_WRAP} -lnsl")
27 fi
28 AC_SUBST(LIB_WRAP)
29 ])
+0
-93
cmulocal/mips-abi.m4 less more
0 dnl mips-abi.m4--Check for MIPS/IRIX ABI flags. Sets $abi and $abilibdirext
1 dnl to some value
2 dnl Derrick Brashear
3 dnl from KTH krb (from CMU)
4 dnl $Id: mips-abi.m4,v 1.5 2003/10/08 20:35:25 rjs3 Exp $
5
6 AC_DEFUN([AC_MIPS_ABI], [
7 AC_ARG_WITH(mips_abi,
8 [ --with-mips-abi=abi ABI to use for IRIX (32, n32, or 64)])
9
10 case "$host_os" in
11 irix*)
12 with_mips_abi="${with_mips_abi:-yes}"
13 if test -n "$GCC"; then
14
15 # GCC < 2.8 only supports the O32 ABI. GCC >= 2.8 has a flag to select
16 # which ABI to use, but only supports (as of 2.8.1) the N32 and 64 ABIs.
17 #
18 # Default to N32, but if GCC doesn't grok -mabi=n32, we assume an old
19 # GCC and revert back to O32. The same goes if O32 is asked for - old
20 # GCCs doesn't like the -mabi option, and new GCCs can't output O32.
21 #
22 # Don't you just love *all* the different SGI ABIs?
23
24 case "${with_mips_abi}" in
25 32|o32) abi='-mabi=32'; abilibdirext='' ;;
26 n32|yes) abi='-mabi=n32'; abilibdirext='32' ;;
27 64) abi='-mabi=64'; abilibdirext='64' ;;
28 no) abi=''; abilibdirext='';;
29 *) AC_ERROR("Invalid ABI specified") ;;
30 esac
31 if test -n "$abi" ; then
32 ac_foo=krb_cv_gcc_`echo $abi | tr =- __`
33 dnl
34 dnl can't use AC_CACHE_CHECK here, since it doesn't quote CACHE-ID to
35 dnl AC_MSG_RESULT
36 dnl
37 AC_MSG_CHECKING([if $CC supports the $abi option])
38 AC_CACHE_VAL($ac_foo, [
39 save_CFLAGS="$CFLAGS"
40 CFLAGS="$CFLAGS $abi"
41 AC_TRY_COMPILE(,int x;, eval $ac_foo=yes, eval $ac_foo=no)
42 CFLAGS="$save_CFLAGS"
43 ])
44 ac_res=`eval echo \\\$$ac_foo`
45 AC_MSG_RESULT($ac_res)
46 if test $ac_res = no; then
47 # Try to figure out why that failed...
48 case $abi in
49 -mabi=32)
50 save_CFLAGS="$CFLAGS"
51 CFLAGS="$CFLAGS -mabi=n32"
52 AC_TRY_COMPILE(,int x;, ac_res=yes, ac_res=no)
53 CLAGS="$save_CFLAGS"
54 if test $ac_res = yes; then
55 # New GCC
56 AC_ERROR([$CC does not support the $with_mips_abi ABI])
57 fi
58 # Old GCC
59 abi=''
60 abilibdirext=''
61 ;;
62 -mabi=n32|-mabi=64)
63 if test $with_mips_abi = yes; then
64 # Old GCC, default to O32
65 abi=''
66 abilibdirext=''
67 else
68 # Some broken GCC
69 AC_ERROR([$CC does not support the $with_mips_abi ABI])
70 fi
71 ;;
72 esac
73 fi #if test $ac_res = no; then
74 fi #if test -n "$abi" ; then
75 else
76 case "${with_mips_abi}" in
77 32|o32) abi='-32'; abilibdirext='' ;;
78 n32|yes) abi='-n32'; abilibdirext='32' ;;
79 64) abi='-64'; abilibdirext='64' ;;
80 no) abi=''; abilibdirext='';;
81 *) AC_ERROR("Invalid ABI specified") ;;
82 esac
83 fi #if test -n "$GCC"; then
84 ;;
85 esac
86
87 dnl And then we munge variables to make things work
88 CFLAGS="${CFLAGS} $abi"
89 libdir=`echo $libdir | sed 's,/*$,$abilibdirext,'`
90 LDFLAGS=`echo $LDFLAGS | sed -e "s,/lib$,/lib$abilibdirext," -e "s,\\\(/lib[^a-zA-Z]\\\),\\\1$abilibdirext,g"`
91
92 ])
+0
-164
cmulocal/nadine.m4 less more
0 dnl nadine.m4--The nadine event library
1 dnl Derrick Brashear
2 dnl from KTH kafs and Arla
3 dnl $Id: nadine.m4,v 1.6 2003/10/08 20:35:25 rjs3 Exp $
4
5 AC_DEFUN([CMU_NADINE_INC_WHERE1], [
6 saved_CPPFLAGS=$CPPFLAGS
7 CPPFLAGS="$saved_CPPFLAGS -I$1"
8 CMU_CHECK_HEADER_NOCACHE(libevent/libevent.h,
9 ac_cv_found_event_inc=yes,
10 ac_cv_found_event_inc=no)
11 CPPFLAGS=$saved_CPPFLAGS
12 ])
13
14 AC_DEFUN([CMU_NADINE_INC_WHERE], [
15 for i in $1; do
16 AC_MSG_CHECKING(for nadine headers in $i)
17 CMU_NADINE_INC_WHERE1($i)
18 dnl CMU_TEST_INCPATH($i, ssl)
19 dnl CMU_TEST_INCPATH isn't very versatile
20 if test "$ac_cv_found_event_inc" = "yes"; then
21 if test \! -f $i/libevent/libevent.h ; then
22 ac_cv_found_event_inc=no
23 fi
24 fi
25 if test "$ac_cv_found_event_inc" = "yes"; then
26 ac_cv_event_where_inc=$i
27 AC_MSG_RESULT(found)
28 break
29 else
30 AC_MSG_RESULT(not found)
31 fi
32 done
33 ])
34
35 AC_DEFUN([CMU_NADINE_LIB_WHERE1], [
36 saved_LIBS=$LIBS
37 LIBS="$saved_LIBS -L$1 -levent"
38 AC_TRY_LINK(,
39 [libevent_Initialize();],
40 [ac_cv_found_event_lib=yes],
41 ac_cv_found_event_lib=no)
42 LIBS=$saved_LIBS
43 ])
44
45 AC_DEFUN([CMU_NADINE_LIB_WHERE], [
46 for i in $1; do
47 AC_MSG_CHECKING(for event libraries in $i)
48 CMU_NADINE_LIB_WHERE1($i)
49 dnl deal with false positives from implicit link paths
50 CMU_TEST_LIBPATH($i, event)
51 if test "$ac_cv_found_event_lib" = "yes" ; then
52 ac_cv_event_where_lib=$i
53 AC_MSG_RESULT(found)
54 break
55 else
56 AC_MSG_RESULT(not found)
57 fi
58 done
59 ])
60
61 AC_DEFUN([CMU_NADINE], [
62 AC_REQUIRE([CMU_SOCKETS])
63 AC_ARG_WITH(nadine,
64 [ --with-nadine=PREFIX Compile with nadine libevent support],
65 [if test "X$with_nadine" = "X"; then
66 with_nadine=yes
67 fi])
68 AC_ARG_WITH(nadine-lib,
69 [ --with-nadine-lib=dir use nadine libraries in dir],
70 [if test "$withval" = "yes" -o "$withval" = "no"; then
71 AC_MSG_ERROR([No argument for --with-nadine-lib])
72 fi])
73 AC_ARG_WITH(nadine-include,
74 [ --with-nadine-include=dir use nadine headers in dir],
75 [if test "$withval" = "yes" -o "$withval" = "no"; then
76 AC_MSG_ERROR([No argument for --with-nadine-include])
77 fi])
78
79 if test "$with_ucdsnmp" = "no" ; then
80 AC_MSG_WARN([Nadine requires UCD SNMP. Disabling Nadine support])
81 with_nadine=no
82 with_nadine_lib=no
83 with_nadine_include=no
84 fi
85 if test "X$with_nadine" != "X"; then
86 if test "$with_nadine" != "yes" -a "$with_nadine" != no; then
87 ac_cv_event_where_lib=$with_nadine/lib
88 ac_cv_event_where_inc=$with_nadine/include
89 fi
90 fi
91
92 if test "$with_nadine" != "no"; then
93 if test "X$with_nadine_lib" != "X"; then
94 ac_cv_event_where_lib=$with_nadine_lib
95 fi
96 if test "X$ac_cv_event_where_lib" = "X"; then
97 CMU_NADINE_LIB_WHERE(/usr/local/lib /usr/ng/lib /usr/lib)
98 fi
99
100 if test "X$with_nadine_include" != "X"; then
101 ac_cv_event_where_inc=$with_nadine_include
102 fi
103 if test "X$ac_cv_event_where_inc" = "X"; then
104 CMU_NADINE_INC_WHERE(/usr/local/include /usr/ng/include /usr/include)
105 fi
106 fi
107
108 AC_MSG_CHECKING(whether to include nadine)
109 if test "X$ac_cv_event_where_lib" = "X" -a "X$ac_cv_event_where_inc" = "X"; then
110 ac_cv_found_event=no
111 AC_MSG_RESULT(no)
112 else
113 ac_cv_found_event=yes
114 AC_MSG_RESULT(yes)
115 NADINE_INC_DIR=$ac_cv_event_where_inc
116 NADINE_LIB_DIR=$ac_cv_event_where_lib
117 NADINE_INC_FLAGS="-I${NADINE_INC_DIR}"
118 NADINE_LIB_FLAGS="-L${NADINE_LIB_DIR} -levent"
119 if test "X$RPATH" = "X"; then
120 RPATH=""
121 fi
122 case "${host}" in
123 *-*-linux*)
124 if test "X$RPATH" = "X"; then
125 RPATH="-Wl,-rpath,${NADINE_LIB_DIR}"
126 else
127 RPATH="${RPATH}:${NADINE_LIB_DIR}"
128 fi
129 ;;
130 *-*-hpux*)
131 if test "X$RPATH" = "X"; then
132 RPATH="-Wl,+b${NADINE_LIB_DIR}"
133 else
134 RPATH="${RPATH}:${NADINE_LIB_DIR}"
135 fi
136 ;;
137 *-*-irix*)
138 if test "X$RPATH" = "X"; then
139 RPATH="-Wl,-rpath,${NADINE_LIB_DIR}"
140 else
141 RPATH="${RPATH}:${NADINE_LIB_DIR}"
142 fi
143 ;;
144 *-*-solaris2*)
145 if test "$ac_cv_prog_gcc" = yes; then
146 if test "X$RPATH" = "X"; then
147 RPATH="-Wl,-R${NADINE_LIB_DIR}"
148 else
149 RPATH="${RPATH}:${NADINE_LIB_DIR}"
150 fi
151 else
152 RPATH="${RPATH} -R${NADINE_LIB_DIR}"
153 fi
154 ;;
155 esac
156 AC_SUBST(RPATH)
157 fi
158 AC_SUBST(NADINE_INC_DIR)
159 AC_SUBST(NADINE_LIB_DIR)
160 AC_SUBST(NADINE_INC_FLAGS)
161 AC_SUBST(NADINE_LIB_FLAGS)
162 ])
163
+0
-27
cmulocal/nana.m4 less more
0 dnl nana.m4--nana macro
1 dnl Rob Earhart
2 dnl $Id: nana.m4,v 1.5 2003/10/08 20:35:25 rjs3 Exp $
3
4 AC_DEFUN([CMU_NANA], [
5 AC_REQUIRE([AC_PROG_CC])
6 AC_ARG_WITH(nana, [[ --with-nana use NANA [yes] ]],,with_nana=yes)
7 if test "$GCC" != yes; then
8 with_nana=no
9 elif test "$with_nana" = yes; then
10 AC_CHECK_PROGS(NANA, nana, :)
11 if test "$NANA" = ":"; then
12 with_nana=no
13 else
14 AC_CHECK_HEADER(nana.h,
15 AC_CHECK_LIB(nana, nana_error,,with_nana=no),
16 with_nana=no)
17 fi
18 else
19 with_nana=no
20 fi
21 AC_MSG_CHECKING([whether to use NANA])
22 AC_MSG_RESULT($with_nana)
23 if test "$with_nana" != yes; then
24 AC_DEFINE(WITHOUT_NANA)
25 fi
26 ])
+0
-71
cmulocal/opendkim.m4 less more
0 dnl These are the Cyrus OpenDKIM macros.
1
2 dnl They are here so that they can be shared between Cyrus IMAPd
3 dnl and Cyrus SASL with relative ease.
4
5 dnl When we're done, there will be a DKIM_CFLAGS and a DKIM_LIBS which
6 dnl should be used when necessary.
7 dnl We should probably be smarter about our RPATH dnl handling.
8
9 dnl Call these with CYRUS_SQLITE_CHK.
10
11 dnl We will also set $opendkimlib to "yes" if we are successful, "no" otherwise.
12
13 AC_DEFUN([CYRUS_OPENDKIM_CHK_LIB],
14 [
15 OPENDKIM_SAVE_LDFLAGS=$LDFLAGS
16
17 if test -d $with_opendkim_lib; then
18 CMU_ADD_LIBPATH_TO($with_opendkim_lib, LDFLAGS)
19 CMU_ADD_LIBPATH_TO($with_opendkim_lib, OPENDKIM_LIBADD)
20 else
21 DKIM_LIBS=""
22 fi
23
24 saved_LIBS=$LIBS
25 for libname in ${with_opendkim} opendkim
26 do
27 LIBS="$saved_LIBS -l$libname"
28 AC_TRY_LINK([#include <stdio.h>
29 #include <dkim.h>],
30 [dkim_init(NULL, NULL);],
31 DKIM_LIBS="$DKIM_LIBS -l$libname"; opendkimlib="yes",
32 opendkimlib="no")
33 if test "$opendkimlib" = "yes"; then break; fi
34 done
35 LIBS=$saved_LIBS
36
37 LDFLAGS=$OPENDKIM_SAVE_LDFLAGS
38 ])
39
40 AC_DEFUN([CYRUS_OPENDKIM_OPTS],
41 [
42 AC_ARG_WITH(opendkim-libdir,
43 [ --with-opendkim-libdir=DIR Opendkim lib files are in DIR],
44 with_opendkim_lib=$withval,
45 [ test "${with_opendkim_lib+set}" = set || with_opendkim_lib=none])
46 AC_ARG_WITH(opendkim-incdir,
47 [ --with-opendkim-incdir=DIR Opendkim include files are in DIR],
48 with_opendkim_inc=$withval,
49 [ test "${with_opendkim_inc+set}" = set || with_opendkim_inc=none ])
50 ])
51
52 AC_DEFUN([CYRUS_OPENDKIM_CHK],
53 [
54 AC_REQUIRE([CYRUS_OPENDKIM_OPTS])
55
56 cmu_save_CPPFLAGS=$CPPFLAGS
57
58 if test -d $with_opendkim_inc; then
59 CPPFLAGS="$CPPFLAGS -I$with_opendkim_inc"
60 DKIM_CFLAGS="-I$with_opendkim_inc"
61 else
62 DKIM_CFLAGS=""
63 fi
64
65 AC_CHECK_HEADER(dkim.h,
66 [CYRUS_OPENDKIM_CHK_LIB()],
67 opendkimlib="no")
68
69 CPPFLAGS=$cmu_save_CPPFLAGS
70 ])
+0
-36
cmulocal/openldap.m4 less more
0 dnl
1 dnl macros for configure.in to detect openldap
2 dnl $Id: openldap.m4,v 1.2 2006/03/13 19:16:11 mel Exp $
3 dnl
4
5 dnl
6 dnl Check for OpenLDAP version compatility
7 AC_DEFUN([CMU_OPENLDAP_API],
8 [AC_CACHE_CHECK([OpenLDAP api], [cmu_cv_openldap_api],[
9 AC_EGREP_CPP(__openldap_api,[
10 #include <ldap.h>
11
12 #ifdef LDAP_API_FEATURE_X_OPENLDAP
13 char *__openldap_api = LDAP_API_FEATURE_X_OPENLDAP;
14 #endif
15 ], [cmu_cv_openldap_api=yes], [cmu_cv_openldap_api=no])])
16 ])
17
18 dnl
19 dnl Check for OpenLDAP version compatility
20 AC_DEFUN([CMU_OPENLDAP_COMPAT],
21 [AC_CACHE_CHECK([OpenLDAP version], [cmu_cv_openldap_compat],[
22 AC_EGREP_CPP(__openldap_compat,[
23 #include <ldap.h>
24
25 /* Require 2.1.27+ and 2.2.6+ */
26 #if LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR == 1 && LDAP_VENDOR_VERSION_PATCH > 26
27 char *__openldap_compat = "2.1.27 or better okay";
28 #elif LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR == 2 && LDAP_VENDOR_VERSION_PATCH > 5
29 char *__openldap_compat = "2.2.6 or better okay";
30 #elif LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR > 2
31 char *__openldap_compat = "2.3 or better okay"
32 #endif
33 ], [cmu_cv_openldap_compat=yes], [cmu_cv_openldap_compat=no])])
34 ])
35
+0
-47
cmulocal/openssl.m4 less more
0 dnl
1 dnl macros for configure.in to detect openssl
2 dnl $Id: openssl.m4,v 1.11 2006/05/17 18:30:19 murch Exp $
3 dnl
4
5 AC_DEFUN([CMU_HAVE_OPENSSL], [
6 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
7 AC_ARG_WITH(openssl,[ --with-openssl=PATH use OpenSSL from PATH],
8 with_openssl=$withval, with_openssl="yes")
9
10 save_CPPFLAGS=$CPPFLAGS
11 save_LDFLAGS=$LDFLAGS
12
13 if test -d $with_openssl; then
14 CPPFLAGS="${CPPFLAGS} -I${with_openssl}/include"
15 CMU_ADD_LIBPATH(${with_openssl}/$CMU_LIB_SUBDIR)
16 fi
17
18 case "$with_openssl" in
19 no)
20 with_openssl="no";;
21 *)
22 dnl if openssl has been compiled with the rsaref2 libraries,
23 dnl we need to include the rsaref libraries in the crypto check
24 LIB_RSAREF=""
25 AC_CHECK_LIB(rsaref, RSAPublicEncrypt,
26 cmu_have_rsaref=yes;
27 [AC_CHECK_LIB(RSAglue, RSAPublicEncrypt,
28 LIB_RSAREF="-lRSAglue -lrsaref",
29 LIB_RSAREF="-lrsaref")],
30 cmu_have_rsaref=no)
31
32 AC_CHECK_HEADER(openssl/evp.h, [
33 AC_CHECK_LIB(crypto, EVP_DigestInit,
34 with_openssl="yes",
35 with_openssl="no", $LIB_RSAREF)],
36 with_openssl=no)
37 ;;
38 esac
39
40 if test "$with_openssl" != "no"; then
41 AC_DEFINE(HAVE_OPENSSL,[],[Do we have OpenSSL?])
42 else
43 CPPFLAGS=$save_CPPFLAGS
44 LDFLAGS=$save_LDFLAGS
45 fi
46 ])
+0
-23
cmulocal/pthreads.m4 less more
0 dnl pthreads.m4--pthreads setup macro
1 dnl Rob Earhart
2 dnl $Id: pthreads.m4,v 1.11 2003/10/08 20:35:25 rjs3 Exp $
3
4 AC_DEFUN([CMU_PTHREADS], [
5 AC_REQUIRE([AC_CANONICAL_HOST])
6 cmu_save_LIBS="$LIBS"
7 AC_CHECK_LIB(pthread, pthread_create,LIB_PTHREAD="-lpthread",
8 AC_CHECK_LIB(c_r, pthread_create,LIB_PTHREAD="-lc_r",
9 AC_ERROR([Can't compile without pthreads])))
10 LIBS="$cmu_save_LIBS"
11 AC_SUBST(LIB_PTHREAD)
12 AC_DEFINE(_REENTRANT)
13 case "$host_os" in
14 solaris2*)
15 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
16 AC_DEFINE(__EXTENSIONS__)
17 ;;
18 irix6*)
19 AC_DEFINE(_SGI_REENTRANT_FUNCTIONS)
20 ;;
21 esac
22 ])
+0
-94
cmulocal/sasl.m4 less more
0 dnl sasl.m4--sasl libraries and includes
1 dnl Derrick Brashear
2 dnl from KTH sasl and Arla
3 dnl $Id: sasl.m4,v 1.23 2005/04/26 19:14:08 shadow Exp $
4
5 AC_DEFUN([CMU_SASL_INC_WHERE1], [
6 saved_CPPFLAGS=$CPPFLAGS
7 CPPFLAGS="$saved_CPPFLAGS -I$1"
8 CMU_CHECK_HEADER_NOCACHE(sasl.h,
9 ac_cv_found_sasl_inc=yes,
10 ac_cv_found_sasl_inc=no)
11 CPPFLAGS=$saved_CPPFLAGS
12 ])
13
14 AC_DEFUN([CMU_SASL_INC_WHERE], [
15 for i in $1; do
16 CMU_SASL_INC_WHERE1($i)
17 CMU_TEST_INCPATH($i, sasl)
18 if test "$ac_cv_found_sasl_inc" = "yes"; then
19 ac_cv_sasl_where_inc=$i
20 break
21 fi
22 done
23 ])
24
25 AC_DEFUN([CMU_SASL_LIB_WHERE1], [
26 saved_LIBS=$LIBS
27 LIBS="$saved_LIBS -L$1 -lsasl"
28 AC_TRY_LINK(,
29 [sasl_getprop();],
30 [ac_cv_found_sasl_lib=yes],
31 ac_cv_found_sasl_lib=no)
32 LIBS=$saved_LIBS
33 ])
34
35 AC_DEFUN([CMU_SASL_LIB_WHERE], [
36 for i in $1; do
37 CMU_SASL_LIB_WHERE1($i)
38 dnl deal with false positives from implicit link paths
39 CMU_TEST_LIBPATH($i, sasl)
40 if test "$ac_cv_found_sasl_lib" = "yes" ; then
41 ac_cv_sasl_where_lib=$i
42 break
43 fi
44 done
45 ])
46
47 AC_DEFUN([CMU_SASL], [
48 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
49 AC_ARG_WITH(sasl,
50 [ --with-sasl=DIR Compile with libsasl in <DIR>],
51 with_sasl="$withval",
52 with_sasl="yes")
53
54 SASLFLAGS=""
55 LIB_SASL=""
56
57 cmu_saved_CPPFLAGS=$CPPFLAGS
58 cmu_saved_LDFLAGS=$LDFLAGS
59 cmu_saved_LIBS=$LIBS
60 if test -d ${with_sasl}; then
61 ac_cv_sasl_where_lib=${with_sasl}/$CMU_LIB_SUBDIR
62 ac_cv_sasl_where_inc=${with_sasl}/include
63
64 SASLFLAGS="-I$ac_cv_sasl_where_inc"
65 LIB_SASL="-L$ac_cv_sasl_where_lib"
66 CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
67 LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
68 fi
69
70 AC_CHECK_HEADER(sasl.h,
71 AC_CHECK_LIB(sasl, sasl_getprop,
72 ac_cv_found_sasl=yes,
73 ac_cv_found_sasl=no), ac_cv_found_sasl=no)
74
75 LIBS="$cmu_saved_LIBS"
76 LDFLAGS="$cmu_saved_LDFLAGS"
77 CPPFLAGS="$cmu_saved_CPPFLAGS"
78 if test "$ac_cv_found_sasl" = yes; then
79 LIB_SASL="$LIB_SASL -lsasl"
80 else
81 LIB_SASL=""
82 SASLFLAGS=""
83 fi
84 AC_SUBST(LIB_SASL)
85 AC_SUBST(SASLFLAGS)
86 ])
87
88 AC_DEFUN([CMU_SASL_REQUIRED],
89 [AC_REQUIRE([CMU_SASL])
90 if test "$ac_cv_found_sasl" != "yes"; then
91 AC_ERROR([Cannot continue without libsasl.
92 Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.])
93 fi])
+0
-522
cmulocal/sasl2.m4 less more
0 # sasl2.m4--sasl2 libraries and includes
1 # Rob Siemborski
2 # $Id: sasl2.m4,v 1.61 2011/11/09 15:49:47 murch Exp $
3
4 # SASL2_CRYPT_CHK
5 # ---------------
6 AC_DEFUN([SASL_GSSAPI_CHK],
7 [AC_REQUIRE([SASL2_CRYPT_CHK])
8 AC_REQUIRE([CMU_SOCKETS])
9 AC_ARG_ENABLE([gssapi],
10 [AC_HELP_STRING([--enable-gssapi=<DIR>],
11 [enable GSSAPI authentication [yes]])],
12 [gssapi=$enableval],
13 [gssapi=yes])
14 AC_ARG_WITH([gss_impl],
15 [AC_HELP_STRING([--with-gss_impl={heimdal|mit|cybersafe|seam|auto}],
16 [choose specific GSSAPI implementation [[auto]]])],
17 [gss_impl=$withval],
18 [gss_impl=auto])
19
20 if test "$gssapi" != no; then
21 platform=
22 case "${host}" in
23 *-*-linux*)
24 platform=__linux
25 ;;
26 *-*-hpux*)
27 platform=__hpux
28 ;;
29 *-*-irix*)
30 platform=__irix
31 ;;
32 *-*-solaris2*)
33 # When should we use __sunos?
34 platform=__solaris
35 ;;
36 *-*-aix*)
37 ###_AIX
38 platform=__aix
39 ;;
40 *)
41 AC_WARN([The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script])
42 if test "$gss_impl" = "cybersafe"; then
43 AC_ERROR([CyberSafe was forced, cannot continue as platform is not supported])
44 fi
45 ;;
46 esac
47
48 cmu_saved_CPPFLAGS=$CPPFLAGS
49
50 if test -d ${gssapi}; then
51 CPPFLAGS="$CPPFLAGS -I$gssapi/include"
52 # We want to keep -I in our CPPFLAGS, but only if we succeed
53 cmu_saved_CPPFLAGS=$CPPFLAGS
54 ### I am not sure how useful is this (and whether this is required at all
55 ### especially when we have to provide two -L flags for new CyberSafe
56 LDFLAGS="$LDFLAGS -L$gssapi/lib"
57
58 if test -n "$platform"; then
59 if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
60 CPPFLAGS="$CPPFLAGS -D$platform"
61 if test -d "${gssapi}/appsec-sdk/include"; then
62 CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
63 fi
64 fi
65 fi
66 fi
67 AC_CHECK_HEADER([gssapi.h],,
68 [AC_CHECK_HEADER([gssapi/gssapi.h],,
69 [AC_WARN([Disabling GSSAPI - no include files found]); gssapi=no])])
70 AC_CHECK_HEADERS(gssapi/gssapi_ext.h)
71 CPPFLAGS=$cmu_saved_CPPFLAGS
72
73 fi
74
75 if test "$gssapi" != no; then
76 if test "$ac_cv_header_gssapi_h" = "yes" -o "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
77 AC_DEFINE(HAVE_GSSAPI_H,,[Define if you have the gssapi.h header file])
78 fi
79
80 # We need to find out which gssapi implementation we are
81 # using. Supported alternatives are: MIT Kerberos 5,
82 # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal),
83 # CyberSafe Kerberos 5 (http://www.cybersafe.com/)
84 # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/)
85 #
86 # The choice is reflected in GSSAPIBASE_LIBS
87
88 AC_CHECK_LIB(resolv,res_search)
89 if test -d ${gssapi}; then
90 gssapi_dir="${gssapi}/lib"
91 GSSAPIBASE_LIBS="-L$gssapi_dir"
92 GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir"
93 else
94 # FIXME: This is only used for building cyrus, and then only as
95 # a real hack. it needs to be fixed.
96 gssapi_dir="/usr/local/lib"
97 fi
98
99 # Check a full link against the Heimdal libraries.
100 # If this fails, check a full link against the MIT libraries.
101 # If this fails, check a full link against the CyberSafe libraries.
102 # If this fails, check a full link against the Solaris 8 and up libgss.
103
104 if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then
105 gss_failed=0
106 AC_CHECK_LIB(gssapi,gss_unwrap,gss_impl="heimdal",gss_failed=1,
107 ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET})
108 if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
109 gss_impl="failed"
110 fi
111 fi
112
113 if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
114 # check for libkrb5support first
115 AC_CHECK_LIB(krb5support,krb5int_getspecific,K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a,,${LIB_SOCKET})
116
117 gss_failed=0
118 AC_CHECK_LIB(gssapi_krb5,gss_unwrap,gss_impl="mit",gss_failed=1,
119 ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET})
120 if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
121 gss_impl="failed"
122 fi
123 fi
124
125 # For Cybersafe one has to set a platform define in order to make compilation work
126 if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
127
128 cmu_saved_CPPFLAGS=$CPPFLAGS
129 cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS
130 # FIXME - Note that the libraries are in .../lib64 for 64bit kernels
131 if test -d "${gssapi}/appsec-rt/lib"; then
132 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib"
133 fi
134 CPPFLAGS="$CPPFLAGS -D$platform"
135 if test -d "${gssapi}/appsec-sdk/include"; then
136 CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
137 fi
138
139 gss_failed=0
140
141 # Check for CyberSafe with two libraries first, than fall back to a single
142 # library (older CyberSafe)
143
144 unset ac_cv_lib_gss_csf_gss_acq_user
145 AC_CHECK_LIB(gss,csf_gss_acq_user,gss_impl="cybersafe03",
146 [unset ac_cv_lib_gss_csf_gss_acq_user;
147 AC_CHECK_LIB(gss,csf_gss_acq_user,gss_impl="cybersafe",
148 gss_failed=1,$GSSAPIBASE_LIBS -lgss)],
149 [${GSSAPIBASE_LIBS} -lgss -lcstbk5])
150
151 if test "$gss_failed" = "1"; then
152 # Restore variables
153 GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS
154 CPPFLAGS=$cmu_saved_CPPFLAGS
155
156 if test "$gss_impl" != "auto"; then
157 gss_impl="failed"
158 fi
159 fi
160 fi
161
162 if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then
163 gss_failed=0
164 AC_CHECK_LIB(gss,gss_unwrap,gss_impl="seam",gss_failed=1,-lgss)
165 if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
166 gss_impl="failed"
167 fi
168 fi
169
170 if test "$gss_impl" = "mit"; then
171 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}"
172 GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
173 elif test "$gss_impl" = "heimdal"; then
174 CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
175 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
176 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}"
177 elif test "$gss_impl" = "cybersafe03"; then
178 # Version of CyberSafe with two libraries
179 CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
180 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5"
181 # there is no static libgss for CyberSafe
182 GSSAPIBASE_STATIC_LIBS=none
183 elif test "$gss_impl" = "cybersafe"; then
184 CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
185 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss"
186 # there is no static libgss for CyberSafe
187 GSSAPIBASE_STATIC_LIBS=none
188 elif test "$gss_impl" = "seam"; then
189 GSSAPIBASE_LIBS=-lgss
190 # there is no static libgss on Solaris 8 and up
191 GSSAPIBASE_STATIC_LIBS=none
192 elif test "$gss_impl" = "failed"; then
193 gssapi="no"
194 GSSAPIBASE_LIBS=
195 GSSAPIBASE_STATIC_LIBS=
196 AC_WARN([Disabling GSSAPI - specified library not found])
197 else
198 gssapi="no"
199 GSSAPIBASE_LIBS=
200 GSSAPIBASE_STATIC_LIBS=
201 AC_WARN([Disabling GSSAPI - no library])
202 fi
203 fi
204
205 #
206 # Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME
207 # in gssapi\rfckrb5.h
208 #
209 if test "$gssapi" != "no"; then
210 if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
211 AC_EGREP_CPP(hostbased_service_gss_nt_yes,
212 [#include <gssapi/gssapi.h>
213 #ifdef GSS_C_NT_HOSTBASED_SERVICE
214 hostbased_service_gss_nt_yes
215 #endif],
216 [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
217 [Define if your GSSAPI implementation defines GSS_C_NT_HOSTBASED_SERVICE])],
218 [AC_WARN([Cybersafe define not found])])
219
220 elif test "$ac_cv_header_gssapi_h" = "yes"; then
221 AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi.h,
222 [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
223 [Define if your GSSAPI implementation defines GSS_C_NT_HOSTBASED_SERVICE])])
224 elif test "$ac_cv_header_gssapi_gssapi_h"; then
225 AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi/gssapi.h,
226 [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
227 [Define if your GSSAPI implementation defines GSS_C_NT_HOSTBASED_SERVICE])])
228 fi
229
230 if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
231 AC_EGREP_CPP(user_name_yes_gss_nt,
232 [#include <gssapi/gssapi.h>
233 #ifdef GSS_C_NT_USER_NAME
234 user_name_yes_gss_nt
235 #endif],
236 [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,,
237 [Define if your GSSAPI implementation defines GSS_C_NT_USER_NAME])],
238 [AC_WARN([Cybersafe define not found])])
239 elif test "$ac_cv_header_gssapi_h" = "yes"; then
240 AC_EGREP_HEADER(GSS_C_NT_USER_NAME, gssapi.h,
241 [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,,
242 [Define if your GSSAPI implementation defines GSS_C_NT_USER_NAME])])
243 AC_EGREP_HEADER(gss_inquire_attrs_for_mech, gssapi.h, rfc5587=yes)
244 AC_EGREP_HEADER(gss_inquire_mech_for_saslname, gssapi.h, rfc5801=yes)
245 elif test "$ac_cv_header_gssapi_gssapi_h"; then
246 AC_EGREP_HEADER(GSS_C_NT_USER_NAME, gssapi/gssapi.h,
247 [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,,
248 [Define if your GSSAPI implementation defines GSS_C_NT_USER_NAME])])
249 AC_EGREP_HEADER(gss_inquire_attrs_for_mech, gssapi/gssapi.h, rfc5587=yes)
250 AC_EGREP_HEADER(gss_inquire_mech_for_saslname, gssapi.h, rfc5801=yes)
251 fi
252 fi
253
254 GSSAPI_LIBS=""
255 AC_MSG_CHECKING([GSSAPI])
256 if test "$gssapi" != no; then
257 AC_MSG_RESULT([with implementation ${gss_impl}])
258 AC_CHECK_LIB(resolv,res_search,GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv")
259 SASL_MECHS="$SASL_MECHS libgssapiv2.la"
260 SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o"
261 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/gssapi.c"
262 if test "$rfc5587" = "yes" -a "$rfc5801" = "yes"; then
263 SASL_MECHS="$SASL_MECHS libgs2.la"
264 SASL_STATIC_OBJS="$SASL_STATIC_OBJS gs2.o"
265 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/gs2.c"
266 fi
267
268 cmu_save_LIBS="$LIBS"
269 LIBS="$LIBS $GSSAPIBASE_LIBS"
270 AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity)
271 AC_CHECK_FUNCS(gss_decapsulate_token)
272 AC_CHECK_FUNCS(gss_encapsulate_token)
273 AC_CHECK_FUNCS(gss_oid_equal)
274 LIBS="$cmu_save_LIBS"
275
276 cmu_save_LIBS="$LIBS"
277 LIBS="$LIBS $GSSAPIBASE_LIBS"
278 AC_CHECK_FUNCS(gss_get_name_attribute)
279 LIBS="$cmu_save_LIBS"
280
281 cmu_save_LIBS="$LIBS"
282 LIBS="$LIBS $GSSAPIBASE_LIBS"
283 AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries])
284 AC_TRY_RUN([
285 #ifdef HAVE_GSSAPI_H
286 #include <gssapi.h>
287 #else
288 #include <gssapi/gssapi.h>
289 #endif
290
291 int main(void)
292 {
293 gss_OID_desc spnego_oid = { 6, (void *) "\x2b\x06\x01\x05\x05\x02" };
294 gss_OID_set mech_set;
295 OM_uint32 min_stat;
296 int have_spnego = 0;
297
298 if (gss_indicate_mechs(&min_stat, &mech_set) == GSS_S_COMPLETE) {
299 gss_test_oid_set_member(&min_stat, &spnego_oid, mech_set, &have_spnego);
300 gss_release_oid_set(&min_stat, &mech_set);
301 }
302
303 return (!have_spnego); // 0 = success, 1 = failure
304 }
305 ],
306 [ AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO])
307 AC_MSG_RESULT(yes) ],
308 AC_MSG_RESULT(no))
309 LIBS="$cmu_save_LIBS"
310
311 else
312 AC_MSG_RESULT([disabled])
313 fi
314 AC_SUBST(GSSAPI_LIBS)
315 AC_SUBST(GSSAPIBASE_LIBS)
316 ])# SASL_GSSAPI_CHK
317
318
319 # SASL_SET_GSSAPI_LIBS
320 # --------------------
321 AC_DEFUN([SASL_SET_GSSAPI_LIBS],
322 [SASL_GSSAPI_LIBS_SET="yes"
323 ])
324
325
326 # CMU_SASL2
327 # ---------
328 # What we want to do here is setup LIB_SASL with what one would
329 # generally want to have (e.g. if static is requested, make it that,
330 # otherwise make it dynamic.
331 #
332 # We also want to create LIB_DYN_SASL and DYNSASLFLAGS.
333 #
334 # Also sets using_static_sasl to "no" "static" or "staticonly"
335 #
336 AC_DEFUN([CMU_SASL2],
337 [AC_REQUIRE([SASL_GSSAPI_CHK])
338
339 AC_ARG_WITH(sasl,
340 [AC_HELP_STRING([--with-sasl=DIR],[Compile with libsasl2 in <DIR>])],
341 with_sasl="$withval",
342 with_sasl="yes")
343
344 AC_ARG_WITH(staticsasl,
345 [AC_HELP_STRING([--with-staticsasl=DIR],
346 [Compile with staticly linked libsasl2 in <DIR>])],
347 [with_staticsasl="$withval";
348 if test $with_staticsasl != "no"; then
349 using_static_sasl="static"
350 fi],
351 [with_staticsasl="no"; using_static_sasl="no"])
352
353 SASLFLAGS=""
354 LIB_SASL=""
355
356 cmu_saved_CPPFLAGS=$CPPFLAGS
357 cmu_saved_LDFLAGS=$LDFLAGS
358 cmu_saved_LIBS=$LIBS
359
360 if test ${with_staticsasl} != "no"; then
361 if test -d ${with_staticsasl}; then
362 if test -d ${with_staticsasl}/lib64 ; then
363 ac_cv_sasl_where_lib=${with_staticsasl}/lib64
364 else
365 ac_cv_sasl_where_lib=${with_staticsasl}/lib
366 fi
367 ac_cv_sasl_where_lib=${with_staticsasl}/lib
368 ac_cv_sasl_where_inc=${with_staticsasl}/include
369
370 SASLFLAGS="-I$ac_cv_sasl_where_inc"
371 LIB_SASL="-L$ac_cv_sasl_where_lib"
372 CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
373 LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
374 else
375 with_staticsasl="/usr"
376 fi
377
378 AC_CHECK_HEADER(sasl/sasl.h,
379 [AC_CHECK_HEADER(sasl/saslutil.h,
380 [for i42 in lib64 lib; do
381 if test -r ${with_staticsasl}/$i42/libsasl2.a; then
382 ac_cv_found_sasl=yes
383 AC_MSG_CHECKING([for static libsasl])
384 LIB_SASL="$LIB_SASL ${with_staticsasl}/$i42/libsasl2.a"
385 fi
386 done
387 if test ! "$ac_cv_found_sasl" = "yes"; then
388 AC_MSG_CHECKING([for static libsasl])
389 AC_ERROR([Could not find ${with_staticsasl}/lib*/libsasl2.a])
390 fi])])
391
392 AC_MSG_RESULT([found])
393
394 if test "x$SASL_GSSAPI_LIBS_SET" = "x"; then
395 LIB_SASL="$LIB_SASL $GSSAPIBASE_STATIC_LIBS"
396 else
397 SASL_GSSAPI_LIBS_SET=""
398 cmu_saved_LIBS="$GSSAPIBASE_STATIC_LIBS $cmu_saved_LIBS"
399 fi
400 fi
401
402 if test -d ${with_sasl}; then
403 ac_cv_sasl_where_lib=${with_sasl}/lib
404 ac_cv_sasl_where_inc=${with_sasl}/include
405
406 DYNSASLFLAGS="-I$ac_cv_sasl_where_inc"
407 if test "$ac_cv_sasl_where_lib" != ""; then
408 CMU_ADD_LIBPATH_TO($ac_cv_sasl_where_lib, LIB_DYN_SASL)
409 fi
410 LIB_DYN_SASL="$LIB_DYN_SASL -lsasl2"
411 CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
412 LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
413 fi
414
415 # be sure to check for a SASLv2 specific function
416 AC_CHECK_HEADER(sasl/sasl.h,
417 [AC_CHECK_HEADER(sasl/saslutil.h,
418 [AC_CHECK_LIB(sasl2, prop_get,
419 ac_cv_found_sasl=yes,
420 ac_cv_found_sasl=no)],
421 ac_cv_found_sasl=no)],
422 ac_cv_found_sasl=no)
423
424 if test "$ac_cv_found_sasl" = "yes"; then
425 if test "$ac_cv_sasl_where_lib" != ""; then
426 CMU_ADD_LIBPATH_TO($ac_cv_sasl_where_lib, DYNLIB_SASL)
427 fi
428 DYNLIB_SASL="$DYNLIB_SASL -lsasl2"
429 if test "$using_static_sasl" != "static"; then
430 LIB_SASL=$DYNLIB_SASL
431 SASLFLAGS=$DYNSASLFLAGS
432 fi
433 else
434 DYNLIB_SASL=""
435 DYNSASLFLAGS=""
436 using_static_sasl="staticonly"
437 fi
438
439 if test "x$SASL_GSSAPI_LIBS_SET" != "x"; then
440 SASL_GSSAPI_LIBS_SET=""
441 cmu_saved_LIBS="$GSSAPIBASE_LIBS $cmu_saved_LIBS"
442 fi
443
444 LIBS="$cmu_saved_LIBS"
445 LDFLAGS="$cmu_saved_LDFLAGS"
446 CPPFLAGS="$cmu_saved_CPPFLAGS"
447
448 AC_SUBST(LIB_DYN_SASL)
449 AC_SUBST(DYNSASLFLAGS)
450 AC_SUBST(LIB_SASL)
451 AC_SUBST(SASLFLAGS)
452 ])# CMU_SASL2
453
454
455 # CMU_SASL2_REQUIRED
456 # ------------------
457 AC_DEFUN([CMU_SASL2_REQUIRED],
458 [AC_REQUIRE([CMU_SASL2])
459 if test "$ac_cv_found_sasl" != "yes"; then
460 AC_ERROR([Cannot continue without libsasl2.
461 Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.])
462 fi])
463
464
465 # CMU_SASL2_REQUIRE_VER
466 # ---------------------
467 AC_DEFUN([CMU_SASL2_REQUIRE_VER],
468 [AC_REQUIRE([CMU_SASL2_REQUIRED])
469
470 cmu_saved_CPPFLAGS=$CPPFLAGS
471 CPPFLAGS="$CPPFLAGS $SASLFLAGS"
472
473 AC_TRY_CPP([
474 #include <sasl/sasl.h>
475
476 #ifndef SASL_VERSION_MAJOR
477 #error SASL_VERSION_MAJOR not defined
478 #endif
479 #ifndef SASL_VERSION_MINOR
480 #error SASL_VERSION_MINOR not defined
481 #endif
482 #ifndef SASL_VERSION_STEP
483 #error SASL_VERSION_STEP not defined
484 #endif
485
486 #if SASL_VERSION_MAJOR < $1 || SASL_VERSION_MINOR < $2 || SASL_VERSION_STEP < $3
487 #error SASL version is less than $1.$2.$3
488 #endif
489 ],,
490 [AC_ERROR([Incorrect SASL headers found. This package requires SASL $1.$2.$3 or newer.])])
491
492 CPPFLAGS=$cmu_saved_CPPFLAGS
493 ])# CMU_SASL2_REQUIRE_VER
494
495
496 # CMU_SASL2_CHECKAPOP_REQUIRED
497 # ----------------------------
498 AC_DEFUN([CMU_SASL2_CHECKAPOP_REQUIRED],
499 [AC_REQUIRE([CMU_SASL2_REQUIRED])
500
501 cmu_saved_LDFLAGS=$LDFLAGS
502
503 LDFLAGS="$LDFLAGS $LIB_SASL"
504
505 AC_CHECK_LIB(sasl2, sasl_checkapop,
506 [AC_DEFINE(HAVE_APOP,[],[Does SASL support APOP?])],
507 [AC_MSG_ERROR([libsasl2 without working sasl_checkapop. Cannot continue.])])
508
509 LDFLAGS=$cmu_saved_LDFLAGS
510 ])# CMU_SASL2_CHECKAPOP_REQUIRED
511
512
513 # SASL2_CRYPT_CHK
514 # ---------------
515 AC_DEFUN([SASL2_CRYPT_CHK],
516 [AC_CHECK_FUNC(crypt, cmu_have_crypt=yes,
517 [AC_CHECK_LIB(crypt, crypt,
518 LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes,
519 cmu_have_crypt=no)])
520 AC_SUBST(LIB_CRYPT)
521 ])# SASL2_CRYPT_CHK
+0
-221
cmulocal/sql.m4 less more
0 dnl $Id: sql.m4,v 1.2 2010/01/06 17:01:28 murch Exp $
1
2 dnl These are the Cyrus MySQL macros.
3
4 dnl They are here so that they can be shared between Cyrus IMAPd
5 dnl and Cyrus SASL with relative ease.
6
7 dnl When we're done, there will be a MYSQL_LIBADD and a MYSQL_INCADD which
8 dnl should dnl be used when necessary.
9 dnl We should probably be smarter about our RPATH dnl handling.
10
11 dnl Call these with CYRUS_MYSQL_CHK.
12
13 dnl We will also set $mysqllib to "yes" if we are successful, "no" otherwise.
14
15 AC_DEFUN([CYRUS_MYSQL_CHK_LIB],
16 [
17 MYSQL_SAVE_LDFLAGS=$LDFLAGS
18
19 if test -d $with_mysql_lib; then
20 CMU_ADD_LIBPATH_TO($with_mysql_lib, LDFLAGS)
21 CMU_ADD_LIBPATH_TO($with_mysql_lib, MYSQL_LIBADD)
22 else
23 MYSQL_LIBADD=""
24 fi
25
26 saved_LIBS=$LIBS
27 for libname in ${with_mysql} mysqlclient
28 do
29 LIBS="$saved_LIBS -l$libname"
30 AC_TRY_LINK([#include <stdio.h>
31 #include <mysql.h>],
32 [mysql_select_db(NULL, NULL);],
33 MYSQL_LIBADD="$MYSQL_LIBADD -l$libname"; mysqllib="yes",
34 mysqllib="no")
35 if test "$mysqllib" = "yes"; then break; fi
36 done
37 LIBS=$saved_LIBS
38
39 LDFLAGS=$MYSQL_SAVE_LDFLAGS
40 ])
41
42 AC_DEFUN([CYRUS_MYSQL_OPTS],
43 [
44 AC_ARG_WITH(mysql-libdir,
45 [ --with-mysql-libdir=DIR MySQL lib files are in DIR],
46 with_mysql_lib=$withval,
47 [ test "${with_mysql_lib+set}" = set || with_mysql_lib=none])
48 AC_ARG_WITH(mysql-incdir,
49 [ --with-mysql-incdir=DIR MySQL include files are in DIR],
50 with_mysql_inc=$withval,
51 [ test "${with_mysql_inc+set}" = set || with_mysql_inc=none ])
52 ])
53
54 AC_DEFUN([CYRUS_MYSQL_CHK],
55 [
56 AC_REQUIRE([CYRUS_MYSQL_OPTS])
57
58 cmu_save_CPPFLAGS=$CPPFLAGS
59
60 if test -d $with_mysql_inc; then
61 CPPFLAGS="$CPPFLAGS -I$with_mysql_inc"
62 MYSQL_INCADD="-I$with_mysql_inc"
63 else
64 MYSQL_INCADD=""
65 fi
66
67 AC_CHECK_HEADER(mysql.h,
68 [CYRUS_MYSQL_CHK_LIB()],
69 mysqllib="no")
70
71 CPPFLAGS=$cmu_save_CPPFLAGS
72 ])
73
74
75
76 dnl These are the Cyrus PgSQL macros.
77
78 dnl They are here so that they can be shared between Cyrus IMAPd
79 dnl and Cyrus SASL with relative ease.
80
81 dnl When we're done, there will be a PGSQL_LIBADD and a PGSQL_INCADD which
82 dnl should dnl be used when necessary.
83 dnl We should probably be smarter about our RPATH dnl handling.
84
85 dnl Call these with CYRUS_PGSQL_CHK.
86
87 dnl We will also set $pgsqllib to "yes" if we are successful, "no" otherwise.
88
89 AC_DEFUN([CYRUS_PGSQL_CHK_LIB],
90 [
91 PGSQL_SAVE_LDFLAGS=$LDFLAGS
92
93 if test -d $with_pgsql_lib; then
94 CMU_ADD_LIBPATH_TO($with_pgsql_lib, LDFLAGS)
95 CMU_ADD_LIBPATH_TO($with_pgsql_lib, PGSQL_LIBADD)
96 else
97 PGSQL_LIBADD=""
98 fi
99
100 saved_LIBS=$LIBS
101 for libname in ${with_pgsql} pq
102 do
103 LIBS="$saved_LIBS -l$libname"
104 AC_TRY_LINK([#include <stdio.h>
105 #include <libpq-fe.h>],
106 [PQconnectdb(NULL);],
107 PGSQL_LIBADD="$PGSQL_LIBADD -l$libname"; pgsqllib="yes",
108 pgsqllib="no")
109 if test "$pgsqllib" = "yes"; then break; fi
110 done
111 LIBS=$saved_LIBS
112
113 LDFLAGS=$PGSQL_SAVE_LDFLAGS
114 ])
115
116 AC_DEFUN([CYRUS_PGSQL_OPTS],
117 [
118 AC_ARG_WITH(pgsql-libdir,
119 [ --with-pgsql-libdir=DIR Pgsql lib files are in DIR],
120 with_pgsql_lib=$withval,
121 [ test "${with_pgsql_lib+set}" = set || with_pgsql_lib=none])
122 AC_ARG_WITH(pgsql-incdir,
123 [ --with-pgsql-incdir=DIR Pgsql include files are in DIR],
124 with_pgsql_inc=$withval,
125 [ test "${with_pgsql_inc+set}" = set || with_pgsql_inc=none ])
126 ])
127
128 AC_DEFUN([CYRUS_PGSQL_CHK],
129 [
130 AC_REQUIRE([CYRUS_PGSQL_OPTS])
131
132 cmu_save_CPPFLAGS=$CPPFLAGS
133
134 if test -d $with_pgsql_inc; then
135 CPPFLAGS="$CPPFLAGS -I$with_pgsql_inc"
136 PGSQL_INCADD="-I$with_pgsql_inc"
137 else
138 PGSQL_INCADD=""
139 fi
140
141 AC_CHECK_HEADER(libpq-fe.h,
142 [CYRUS_PGSQL_CHK_LIB()],
143 pgsqllib="no")
144
145 CPPFLAGS=$cmu_save_CPPFLAGS
146 ])
147
148
149
150 dnl These are the Cyrus SQLite macros.
151
152 dnl They are here so that they can be shared between Cyrus IMAPd
153 dnl and Cyrus SASL with relative ease.
154
155 dnl When we're done, there will be a SQLITE_LIBADD and a SQLITE_INCADD which
156 dnl should dnl be used when necessary.
157 dnl We should probably be smarter about our RPATH dnl handling.
158
159 dnl Call these with CYRUS_SQLITE_CHK.
160
161 dnl We will also set $sqlitelib to "yes" if we are successful, "no" otherwise.
162
163 AC_DEFUN([CYRUS_SQLITE_CHK_LIB],
164 [
165 SQLITE_SAVE_LDFLAGS=$LDFLAGS
166
167 if test -d $with_sqlite_lib; then
168 CMU_ADD_LIBPATH_TO($with_sqlite_lib, LDFLAGS)
169 CMU_ADD_LIBPATH_TO($with_sqlite_lib, SQLITE_LIBADD)
170 else
171 SQLITE_LIBADD=""
172 fi
173
174 saved_LIBS=$LIBS
175 for libname in ${with_sqlite} sqlite3
176 do
177 LIBS="$saved_LIBS -l$libname"
178 AC_TRY_LINK([#include <stdio.h>
179 #include <sqlite3.h>],
180 [sqlite3_open(NULL, NULL);],
181 SQLITE_LIBADD="$SQLITE_LIBADD -l$libname"; sqlitelib="yes",
182 sqlitelib="no")
183 if test "$sqlitelib" = "yes"; then break; fi
184 done
185 LIBS=$saved_LIBS
186
187 LDFLAGS=$SQLITE_SAVE_LDFLAGS
188 ])
189
190 AC_DEFUN([CYRUS_SQLITE_OPTS],
191 [
192 AC_ARG_WITH(sqlite-libdir,
193 [ --with-sqlite-libdir=DIR SQLite lib files are in DIR],
194 with_sqlite_lib=$withval,
195 [ test "${with_sqlite_lib+set}" = set || with_sqlite_lib=none])
196 AC_ARG_WITH(sqlite-incdir,
197 [ --with-sqlite-incdir=DIR SQLite include files are in DIR],
198 with_sqlite_inc=$withval,
199 [ test "${with_sqlite_inc+set}" = set || with_sqlite_inc=none ])
200 ])
201
202 AC_DEFUN([CYRUS_SQLITE_CHK],
203 [
204 AC_REQUIRE([CYRUS_SQLITE_OPTS])
205
206 cmu_save_CPPFLAGS=$CPPFLAGS
207
208 if test -d $with_sqlite_inc; then
209 CPPFLAGS="$CPPFLAGS -I$with_sqlite_inc"
210 SQLITE_INCADD="-I$with_sqlite_inc"
211 else
212 SQLITE_INCADD=""
213 fi
214
215 AC_CHECK_HEADER(sqlite3.h,
216 [CYRUS_SQLITE_CHK_LIB()],
217 sqlitelib="no")
218
219 CPPFLAGS=$cmu_save_CPPFLAGS
220 ])
+0
-160
cmulocal/tcl.m4 less more
0 dnl FIRST PASS AFTER STEALING THIS FROM CYRUS!
1 dnl USE AT YOUR OWN PERIL!
2 dnl I MEAN IT!
3 dnl
4 dnl tcl.m4: an autoconf Tcl locator
5 dnl $Id: tcl.m4,v 1.4 2003/10/08 20:35:25 rjs3 Exp $
6 dnl
7 dnl This is rob's Tcl macro, fixed by tjs. It may need occasional tweaking,
8 dnl but until the next impediment to compilation, it's fill-in-the-blank,
9 dnl and it should be able to do reasonable things with user input.
10 dnl
11 dnl This will probably just work on Andrew systems, but given the variety
12 dnl and apparent creativity of people who compile Tcl elsewhere, I don't know
13 dnl what it will do. I have yet to see an autoconf Tcl test that users were
14 dnl happy with.
15 dnl
16 dnl BUGS
17 dnl The command-line arguments are overcomplicated.
18 dnl There are doubtlessly others...
19
20 dnl To use this macro, just do CMU_TCL. It outputs
21 dnl TCL_LIBS, TCL_CPPFLAGS, and TCL_DEFS and SUBSTs them.
22 dnl If successful, these have stuff in them. If not, they're empty.
23 dnl If not successful, with_tcl has the value "no".
24
25 AC_DEFUN([CMU_TCL], [
26 # --- BEGIN CMU_TCL ---
27 dnl To link against Tcl, configure does several things to make my life
28 dnl "easier".
29 dnl
30 dnl * maybe ask the user where they think Tcl lives, and try to find it
31 dnl * maybe ask the user what "tclsh" is called this week (i.e., "tclsh8.0")
32 dnl * run tclsh, ask it for a path, then run that path through sed
33 dnl * sanity check its result (many installs are a little broken)
34 dnl * try to figure out where Tcl is based on this result
35 dnl * try to guess where the Tcl include files are
36 dnl
37 dnl Notes from previous incarnations:
38 dnl > XXX MUST CHECK FOR TCL BEFORE KERBEROS V4 XXX
39 dnl > This is because some genius at MIT named one of the Kerberos v4
40 dnl > library functions log(). This of course conflicts with the
41 dnl > logarithm function in the standard math library, used by Tcl.
42 dnl
43 dnl > Checking for Tcl first puts -lm before -lkrb on the library list.
44 dnl
45
46 dnl Check for some information from the user on what the world looks like
47 AC_ARG_WITH(tclconfig,[ --with-tclconfig=PATH use tclConfig.sh from PATH
48 (configure gets Tcl configuration from here)],
49 dnl trim tclConfig.sh off the end so we can add it back on later.
50 TclLibBase=`echo ${withval} | sed s/tclConfig.sh\$//`)
51 AC_ARG_WITH(tcl, [ --with-tcl=PATH use Tcl from PATH],
52 TclLibBase="${withval}/lib")
53 AC_ARG_WITH(tclsh, [ --with-tclsh=TCLSH use TCLSH as the tclsh program
54 (let configure find Tcl using this program)],
55 TCLSH="${withval}")
56
57 if test "$TCLSH" = "no" -o "$with_tclconfig" = "no" ; then
58 AC_MSG_WARN([Tcl disabled because tclsh or tclconfig specified as "no"])
59 with_tcl=no
60 fi
61
62 if test "$with_tcl" != "no"; then
63 if test \! -z "$with_tclconfig" -a \! -d "$with_tclconfig" ; then
64 AC_MSG_ERROR([--with-tclconfig requires a directory argument.])
65 fi
66
67 if test \! -z "$TCLSH" -a \! -x "$TCLSH" ; then
68 AC_MSG_ERROR([--with-tclsh must specify an executable file.])
69 fi
70
71 if test -z "$TclLibBase"; then # do we already know?
72 # No? Run tclsh and ask it where it lives.
73
74 # Do we know where a tclsh lives?
75 if test -z "$TCLSH"; then
76 # Try and find tclsh. Any tclsh.
77 # If a new version of tcl comes out and unfortunately adds another
78 # filename, it should be safe to add it (to the front of the line --
79 # somef vendors have older, badly installed tclshs that we want to avoid
80 # if we can)
81 AC_PATH_PROGS(TCLSH, [tclsh8.1 tclsh8.0 tclsh], "unknown")
82 fi
83
84 # Do we know where to get a tclsh?
85 if test "${TCLSH}" != "unknown"; then
86 AC_MSG_CHECKING([where Tcl says it lives])
87 TclLibBase=`echo puts \\\$tcl_library | ${TCLSH} | sed -e 's,[^/]*$,,'`
88 AC_MSG_RESULT($TclLibBase)
89 fi
90 fi
91
92 if test -z "$TclLibBase" ; then
93 AC_MSG_RESULT([can't find tclsh])
94 AC_MSG_WARN([can't find Tcl installtion; use of Tcl disabled.])
95 with_tcl=no
96 else
97 AC_MSG_CHECKING([for tclConfig.sh])
98 # Check a list of places where the tclConfig.sh file might be.
99 for tcldir in "${TclLibBase}" \
100 "${TclLibBase}/.." \
101 "${TclLibBase}"`echo ${TCLSH} | sed s/sh//` ; do
102 if test -f "${tcldir}/tclConfig.sh"; then
103 TclLibBase="${tcldir}"
104 break
105 fi
106 done
107
108 if test -z "${TclLibBase}" ; then
109 AC_MSG_RESULT("unknown")
110 AC_MSG_WARN([can't find Tcl configuration; use of Tcl disabled.])
111 with_tcl=no
112 else
113 AC_MSG_RESULT(${TclLibBase}/)
114 fi
115
116 if test "${with_tcl}" != no ; then
117 AC_MSG_CHECKING([Tcl configuration on what Tcl needs to compile])
118 . ${TclLibBase}/tclConfig.sh
119 AC_MSG_RESULT(ok)
120 dnl no TK stuff for us.
121 dnl . ${TclLibBase}/tkConfig.sh
122 fi
123
124 if test "${with_tcl}" != no ; then
125 dnl Now, hunt for the Tcl include files, since we don't strictly
126 dnl know where they are; some folks put them (properly) in the
127 dnl default include path, or maybe in /usr/local; the *BSD folks
128 dnl put them in other places.
129 AC_MSG_CHECKING([where Tcl includes are])
130 for tclinclude in "${TCL_PREFIX}/include/tcl${TCL_VERSION}" \
131 "${TCL_PREFIX}/include/tcl" \
132 "${TCL_PREFIX}/include" ; do
133 if test -r "${tclinclude}/tcl.h" ; then
134 TCL_CPPFLAGS="-I${tclinclude}"
135 break
136 fi
137 done
138 if test -z "${TCL_CPPFLAGS}" ; then
139 AC_MSG_WARN(can't find Tcl includes; use of Tcl disabled.)
140 with_tcl=no
141 fi
142 AC_MSG_RESULT(${TCL_CPPFLAGS})
143 fi
144
145 # Finally, pick up the Tcl configuration if we haven't found an
146 # excuse not to.
147 if test "${with_tcl}" != no; then
148 dnl TCL_LIBS="${TK_LIB_SPEC} ${TK_XLIBSW} ${TCL_LD_SEARCH_FLAGS} ${TCL_LIB_SPEC}"
149 TCL_LIBS="${TCL_LD_SEARCH_FLAGS} ${TCL_LIB_SPEC} ${TCL_LIBS}"
150 fi
151 fi
152 fi
153
154 AC_SUBST(TCL_DEFS)
155 AC_SUBST(TCL_LIBS)
156 AC_SUBST(TCL_CPPFLAGS)
157
158 # --- END CMU_TCL ---
159 ]) dnl CMU_TCL
+0
-180
cmulocal/telnet.m4 less more
0 dnl telnet.m4--telnet special macros
1 dnl Derrick Brashear
2 dnl $Id: telnet.m4,v 1.13 2006/02/25 18:36:36 cg2v Exp $
3
4 AC_DEFUN([CMU_TELNET_WHICH_TERM], [
5 AC_CHECK_LIB(termlib, setupterm, [
6 AC_DEFINE(HAVE_SETUPTERM,, [Define to 1 if you have the `setupterm' function.])
7 AC_CHECK_LIB(c, setupterm, TCLIB="/usr/ccs/lib/libtermlib.a",TCLIB="-ltermlib","/usr/ccs/lib/libtermlib.a")
8 ], TCLIB="-ltermcap")
9 ])
10
11 AC_DEFUN([CMU_TELNET_CC_T],
12 [
13 AC_MSG_CHECKING(for cc_t definition)
14 AC_CACHE_VAL(cmu_cv_cc_t_definition, [
15 AC_TRY_COMPILE(
16 [
17 #ifdef HAVE_SYS_TERMIOS_H
18 #include <sys/termios.h>
19 #else
20 #ifdef HAVE_SYS_TERMIO_H
21 #include <sys/termio.h>
22 #endif
23 #endif
24 ],
25 [cc_t ffoo;],
26 cmu_cv_cc_t_definition=yes,
27 cmu_cv_cc_t_definition=no)
28 ])
29 if test "$cmu_cv_cc_t_definition" = "no"; then
30 AC_DEFINE(NO_CC_T,, [The type `cc_t' is not available])
31 fi
32 AC_MSG_RESULT($cmu_cv_cc_t_definition)
33 ])
34
35 AC_DEFUN([CMU_STREAMS], [
36 if test "$ac_cv_header_sys_stropts_h" = "yes" -o "$ac_cv_header_stropts_h" = "yes"; then
37 AC_DEFINE(HAVE_STREAMS,, [STREAMS are available])dnl
38 fi
39 ])
40
41 AC_DEFUN([CMU_TERMIO_MODEL], [
42 if test "$ac_cv_header_sys_termio_h" = "yes" -o "$ac_cv_header_sys_termios_h" = "yes"; then
43 AC_DEFINE(USE_TERMIO,, [Use termios for tty configuration])dnl
44 if test "$ac_cv_header_sys_termios_h" = "no"; then
45 AC_DEFINE(SYSV_TERMIO,, [Use SysV termios])dnl
46 fi
47 fi
48 ])
49
50 AC_DEFUN([CMU_TELNET_DES_STRING_TO_KEY_PROTO], [
51 AC_MSG_CHECKING(for des_string_to_key prototype)
52 AC_CACHE_VAL(cmu_cv_des_string_to_key_proto, [
53 AC_TRY_COMPILE(
54 [#include <des.h>
55 typedef unsigned char Block[8];
56 int des_string_to_key(char *, Block);],
57 [int foo = des_string_to_key(NULL, NULL);],
58 cmu_cv_des_string_to_key_proto=no,
59 cmu_cv_des_string_to_key_proto=yes)
60 ])
61 if test "$cmu_cv_des_string_to_key_proto" = yes; then
62 AC_DEFINE(HAVE_DES_STRING_TO_KEY_PROTO,, [define to 1 if `des_string_to_key' has a prototype])dnl
63 fi
64 AC_MSG_RESULT($cmu_cv_des_string_to_key_proto)
65 ])
66
67 AC_DEFUN([CMU_TELNET_DES_KEY_SCHED_PROTO], [
68 AC_MSG_CHECKING(for des_key_sched prototype)
69 AC_CACHE_VAL(cmu_cv_des_key_sched_proto, [
70 AC_TRY_COMPILE(
71 [
72 #include <des.h>
73 char des_key_sched(int foo, int bar);
74 ],
75 [des_key_sched(NULL, NULL);],
76 cmu_cv_des_key_sched_proto=no,
77 cmu_cv_des_key_sched_proto=yes)
78 ])
79 if test "$cmu_cv_des_key_sched_proto" = yes; then
80 AC_DEFINE(HAVE_DES_KEY_SCHED_PROTO,, [define to 1 if `des_key_sched' has a prototype])dnl
81 fi
82 AC_MSG_RESULT($cmu_cv_des_key_sched_proto)
83 ])
84
85 AC_DEFUN([CMU_TELNET_DES_SET_RANDOM_GENERATOR_SEED_PROTO], [
86 AC_MSG_CHECKING(for des_set_random_generator_seed prototype)
87 AC_CACHE_VAL(cmu_cv_des_set_random_generator_seed_proto, [
88 AC_TRY_COMPILE(
89 [
90 #include <des.h>
91 char des_set_random_generator_seed(int foo, int bar);
92 ],
93 [des_set_random_generator_seed(NULL, NULL);],
94 cmu_cv_des_set_random_generator_seed_proto=no,
95 cmu_cv_des_set_random_generator_seed_proto=yes)
96 ])
97 if test "$cmu_cv_des_set_random_generator_seed_proto" = yes; then
98 AC_DEFINE(HAVE_DES_SET_RANDOM_GENERATOR_SEED_PROTO,, [define to 1 if `des_set_random_generator_seed' has a prototype])dnl
99 fi
100 AC_MSG_RESULT($cmu_cv_des_set_random_generator_seed_proto)
101 ])
102
103 AC_DEFUN([CMU_TELNET_DES_NEW_RANDOM_KEY_PROTO], [
104 AC_MSG_CHECKING(for des_new_random_key prototype)
105 AC_CACHE_VAL(cmu_cv_des_new_random_key_proto, [
106 AC_TRY_COMPILE(
107 [
108 #include <des.h>
109 char des_new_random_key(int foo, int bar);
110 ],
111 [des_new_random_key(NULL, NULL);],
112 cmu_cv_des_new_random_key_proto=no,
113 cmu_cv_des_new_random_key_proto=yes)
114 ])
115 if test "$cmu_cv_des_new_random_key_proto" = yes; then
116 AC_DEFINE(HAVE_DES_NEW_RANDOM_KEY_PROTO,, [define to 1 if `des_new_random_key' has a prototype])dnl
117 fi
118 AC_MSG_RESULT($cmu_cv_des_new_random_key_proto)
119 ])
120
121 AC_DEFUN([CMU_TELNET_DES_ECB_ENCRYPT_PROTO], [
122 AC_MSG_CHECKING(for des_ecb_encrypt prototype)
123 AC_CACHE_VAL(cmu_cv_des_ecb_encrypt_proto, [
124 AC_TRY_COMPILE(
125 [#include <des.h>
126 typedef unsigned char Block[8];
127 typedef struct { Block _; } Schedule[16];
128 void des_ecb_encrypt(Block, Block, Schedule, int);],
129 [int foo = des_ecb_encrypt(NULL, NULL, NULL, 0);],
130 cmu_cv_des_ecb_encrypt_proto=no,
131 cmu_cv_des_ecb_encrypt_proto=yes)
132 ])
133 if test "$cmu_cv_des_ecb_encrypt_proto" = yes; then
134 AC_DEFINE(HAVE_DES_ECB_ENCRYPT_PROTO,, [define to 1 if `des_ecb_encrypt' has a prototype])dnl
135 fi
136 AC_MSG_RESULT($cmu_cv_des_ecb_encrypt_proto)
137 ])
138
139 AC_DEFUN([CMU_TELNET_GETTYTAB], [
140 if test -f "/etc/gettytab"; then
141 AC_CHECK_FUNCS(getent getstr)
142 if test "X$ac_cv_func_getent" != "Xyes"; then
143 AC_DEFINE(HAVE_GETTYTAB,, [gettytab support is present])
144 if test "X$ac_cv_func_getstr" = "Xyes"; then
145 CFLAGS="$CFLAGS -Dgetstr=ggetstr"
146 fi
147 fi
148 else
149 AC_CHECK_FUNCS(cgetent)
150 fi
151 ])
152
153 AC_DEFUN([CMU_TELNET_ISSUE], [
154 if test -f "/etc/issue.net"; then
155 AC_DEFINE(ISSUE_FILE, "/etc/issue.net", [path of issue file to use])
156 else
157 if test -f "/etc/issue"; then
158 AC_DEFINE(ISSUE_FILE, "/etc/issue", [path of issue file to use])
159 fi
160 fi
161 ])
162
163 AC_DEFUN([CMU_TELNET_PTYDIR], [
164
165 if test -d /dev/pts -o -d /dev/pty; then
166 case "${host}" in
167 *-*-irix*)
168 ;;
169 *-*-linux*)
170 AC_DEFINE(PTYDIR,, [Has /dev/ptX and pty allocation funcs])
171 ;;
172 *)
173 AC_DEFINE(PTYDIR,, [Has /dev/ptX and pty allocation funcs])
174 AC_DEFINE(STREAMSPTY,, [ptys are streams devices])
175 ;;
176 esac
177 fi
178 ])
179
+0
-72
cmulocal/ucdsnmp.m4 less more
0 dnl look for the (ucd|net)snmp libraries
1 dnl $Id: ucdsnmp.m4,v 1.13 2010/01/06 17:01:28 murch Exp $
2
3 AC_DEFUN([CMU_UCDSNMP], [
4 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
5 AC_REQUIRE([CMU_SOCKETS])
6 AC_ARG_WITH(snmp,
7 [ --with-snmp=DIR use ucd|net snmp (rooted in DIR) [yes] ],
8 with_snmp=$withval, with_snmp=yes)
9
10 dnl
11 dnl Maintain backwards compatibility with old --with-ucdsnmp option
12 dnl
13 AC_ARG_WITH(ucdsnmp,, with_snmp=$withval,)
14
15 if test "$with_snmp" != "no"; then
16
17 dnl
18 dnl Try net-snmp first
19 dnl
20 if test "$with_snmp" = "yes"; then
21 AC_PATH_PROG(SNMP_CONFIG,net-snmp-config,,[/usr/local/bin:$PATH])
22 else
23 SNMP_CONFIG="$with_snmp/bin/net-snmp-config"
24 fi
25
26 if test -x "$SNMP_CONFIG"; then
27 AC_MSG_CHECKING(NET SNMP libraries)
28
29 SNMP_LIBS=`$SNMP_CONFIG --agent-libs`
30 SNMP_PREFIX=`$SNMP_CONFIG --prefix`
31
32 if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
33 CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
34 LIB_UCDSNMP=$SNMP_LIBS
35 AC_DEFINE(HAVE_NETSNMP,1,[Do we have Net-SNMP support?])
36 AC_SUBST(LIB_UCDSNMP)
37 AC_MSG_RESULT(yes)
38 AC_CHECK_HEADERS(net-snmp/agent/agent_module_config.h,,)
39 else
40 AC_MSG_RESULT(no)
41 AC_MSG_WARN([Could not find the required paths. Please check your net-snmp installation.])
42 fi
43 else
44 dnl
45 dnl Try ucd-snmp if net-snmp test failed
46 dnl
47 if test "$with_snmp" != no; then
48 if test -d "$with_snmp"; then
49 CPPFLAGS="$CPPFLAGS -I${with_snmp}/include"
50 LDFLAGS="$LDFLAGS -L${with_snmp}/$CMU_LIB_SUBDIR"
51 fi
52 cmu_save_LIBS="$LIBS"
53 AC_CHECK_LIB(snmp, sprint_objid, [
54 AC_CHECK_HEADER(ucd-snmp/version.h,, with_snmp=no)],
55 with_snmp=no, ${LIB_SOCKET})
56 LIBS="$cmu_save_LIBS"
57 fi
58 AC_MSG_CHECKING(UCD SNMP libraries)
59 AC_MSG_RESULT($with_snmp)
60 LIB_UCDSNMP=""
61 if test "$with_snmp" != no; then
62 AC_DEFINE(HAVE_UCDSNMP,1,[Do we have UCD-SNMP support?])
63 LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp"
64 AC_CHECK_LIB(rpm, rpmdbOpen,
65 LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt",,-lpopt)
66 fi
67 AC_SUBST(LIB_UCDSNMP)
68 fi
69 fi
70
71 ])
+0
-73
cmulocal/util.m4 less more
0 dnl util.m4--robutil macro
1 dnl Rob Earhart
2 dnl $Id: util.m4,v 1.10 2003/10/08 20:35:26 rjs3 Exp $
3
4 dnl robutil is a collection of stuff I (Rob Earhart) have found useful
5 dnl to have around when writing code; it's the stuff I wind up rewriting
6 dnl every time I start a project. This does the autoconf setup
7 dnl necessary for it.
8
9 dnl This is a helper macro, here because there're times when I
10 dnl want to know if a type exists or not, but don't want to define
11 dnl it to something else (the way AC_CHECK_TYPE does).
12
13 AC_DEFUN([CMU_CHECK_TYPE_EXISTS], [
14 changequote(<<, >>)
15 define(<<CMU_TYPE_NAME>>, translit(CMU_HAVE_$1, [a-z *], [A-Z_P]))
16 define(<<CMU_CV_NAME>>, translit(cmu_cv_type_$1, [ *], [_p]))
17 changequote([, ])
18 AC_REQUIRE([AC_HEADER_STDC])
19 AC_MSG_CHECKING(for $1)
20 AC_CACHE_VAL(CMU_CV_NAME, [
21 AC_EGREP_CPP([$1[[^a-zA-Z_0-9]]], [
22 #include <sys/types.h>
23 #if STDC_HEADERS
24 #include <stdlib.h>
25 #include <stddef.h>
26 #endif
27 ], CMU_CV_NAME=yes, CMU_CV_NAME=no)])
28 AC_MSG_RESULT($CMU_CV_NAME)
29 if test $CMU_CV_NAME = yes; then
30 AC_DEFINE(CMU_TYPE_NAME)
31 fi
32 ])
33
34 AC_DEFUN([CMU_UTIL], [
35 AC_REQUIRE([AC_PROG_CC])
36 AC_REQUIRE([AM_PROG_CC_STDC])
37 AC_REQUIRE([AC_PROG_RANLIB])
38 AC_REQUIRE([CMU_NANA])
39 AC_REQUIRE([CMU_COMERR])
40 AC_REQUIRE([AC_HEADER_STDC])
41 AC_REQUIRE([AC_TYPE_MODE_T])
42 AC_REQUIRE([AC_C_CONST])
43 AC_CHECK_HEADERS(sys/sysmacros.h)
44 AC_CHECK_HEADER(inttypes.h, AC_DEFINE(HAVE_INTTYPES_H),
45 CMU_CHECK_TYPE_EXISTS(int8_t)
46 CMU_CHECK_TYPE_EXISTS(uint8_t)
47 CMU_CHECK_TYPE_EXISTS(u_int8_t)
48 CMU_CHECK_TYPE_EXISTS(int16_t)
49 CMU_CHECK_TYPE_EXISTS(uint16_t)
50 CMU_CHECK_TYPE_EXISTS(u_int16_t)
51 CMU_CHECK_TYPE_EXISTS(int32_t)
52 CMU_CHECK_TYPE_EXISTS(uint32_t)
53 CMU_CHECK_TYPE_EXISTS(u_int32_t)
54 )
55 dnl I'm not sure why autoconf gets so annoyed when these
56 dnl are embedded as part of the inttypes check, but, whatever,
57 dnl this works.
58 if test "$ac_cv_header_inttypes_h" = no; then
59 AC_CHECK_SIZEOF(short)
60 AC_CHECK_SIZEOF(int)
61 AC_CHECK_SIZEOF(long)
62 fi
63
64 AC_CHECK_TYPE(ssize_t, signed)
65 THREADED_UTIL_OBJECTS=""
66 AC_SUBST(THREADED_UTIL_OBJECTS)
67 ])
68
69 AC_DEFUN([CMU_THREAD_UTIL], [
70 AC_REQUIRE([CMU_UTIL])
71 THREADED_UTIL_OBJECTS="refcache.o rselock.o"
72 ])
+0
-155
cmulocal/zephyr.m4 less more
0 dnl zephyr.m4--Zephyr libraries and includes
1 dnl based on kafs.m4, by
2 dnl Derrick Brashear
3 dnl from KTH kafs and Arla
4 dnl $Id: zephyr.m4,v 1.2 2005/04/26 19:14:08 shadow Exp $
5
6 AC_DEFUN([CMU_ZEPHYR_INC_WHERE1], [
7 saved_CPPFLAGS=$CPPFLAGS
8 CPPFLAGS="$saved_CPPFLAGS -I$1"
9 AC_TRY_COMPILE(
10 [#include <zephyr/zephyr.h>],
11 [ZNotice_t foo;],
12 ac_cv_found_zephyr_inc=yes,
13 ac_cv_found_zephyr_inc=no)
14 CPPFLAGS=$saved_CPPFLAGS
15 ])
16
17 AC_DEFUN([CMU_ZEPHYR_INC_WHERE], [
18 for i in $1; do
19 AC_MSG_CHECKING(for zephyr headers in $i)
20 CMU_ZEPHYR_INC_WHERE1($i)
21 CMU_TEST_INCPATH($i, zephyr/zephyr)
22 if test "$ac_cv_found_zephyr_inc" = "yes"; then
23 ac_cv_zephyr_where_inc=$i
24 AC_MSG_RESULT(found)
25 break
26 else
27 AC_MSG_RESULT(not found)
28 fi
29 done
30 ])
31
32 AC_DEFUN([CMU_ZEPHYR_LIB_WHERE1], [
33 saved_LIBS=$LIBS
34 LIBS="$saved_LIBS -L$1 -lzephyr $KRB_LIB_FLAGS"
35 AC_TRY_LINK(,
36 [ZInitialize();],
37 [ac_cv_found_zephyr_lib=yes],
38 ac_cv_found_zephyr_lib=no)
39 LIBS=$saved_LIBS
40 ])
41
42 AC_DEFUN([CMU_ZEPHYR_LIB_WHERE], [
43 for i in $1; do
44 AC_MSG_CHECKING(for zephyr libraries in $i)
45 CMU_ZEPHYR_LIB_WHERE1($i)
46 dnl deal with false positives from implicit link paths
47 CMU_TEST_LIBPATH($i, zephyr)
48 if test "$ac_cv_found_zephyr_lib" = "yes" ; then
49 ac_cv_zephyr_where_lib=$i
50 AC_MSG_RESULT(found)
51 break
52 else
53 AC_MSG_RESULT(not found)
54 fi
55 done
56 ])
57
58 AC_DEFUN([CMU_ZEPHYR], [
59 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
60 AC_REQUIRE([CMU_SOCKETS])
61 AC_REQUIRE([CMU_KRB4])
62 AC_ARG_WITH(zephyr,
63 [ --with-zephyr=PREFIX Compile with Zephyr support],
64 [if test "X$with_zephyr" = "X"; then
65 with_zephyr=yes
66 fi])
67 AC_ARG_WITH(zephyr-lib,
68 [ --with-zephyr-lib=dir use zephyr libraries in dir],
69 [if test "$withval" = "yes" -o "$withval" = "no"; then
70 AC_MSG_ERROR([No argument for --with-zephyr-lib])
71 fi])
72 AC_ARG_WITH(zephyr-include,
73 [ --with-zephyr-include=dir use zephyr headers in dir],
74 [if test "$withval" = "yes" -o "$withval" = "no"; then
75 AC_MSG_ERROR([No argument for --with-zephyr-include])
76 fi])
77
78 if test "X$with_zephyr" != "X"; then
79 if test "$with_zephyr" != "yes" -a "$with_zephyr" != no; then
80 ac_cv_zephyr_where_lib=$with_zephyr/$CMU_LIB_SUBDIR
81 ac_cv_zephyr_where_inc=$with_zephyr/include
82 fi
83 fi
84
85 if test "$with_zephyr" != "no"; then
86 if test "X$with_zephyr_lib" != "X"; then
87 ac_cv_zephyr_where_lib=$with_zephyr_lib
88 fi
89 if test "X$ac_cv_zephyr_where_lib" = "X"; then
90 CMU_ZEPHYR_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR)
91 fi
92
93 if test "X$with_zephyr_include" != "X"; then
94 ac_cv_zephyr_where_inc=$with_zephyr_include
95 fi
96 if test "X$ac_cv_zephyr_where_inc" = "X"; then
97 CMU_ZEPHYR_INC_WHERE(/usr/athena/include /usr/local/include /usr/include)
98 fi
99 fi
100
101 AC_MSG_CHECKING(whether to include zephyr)
102 if test "X$ac_cv_zephyr_where_lib" = "X" -a "X$ac_cv_zephyr_where_inc" = "X"; then
103 ac_cv_found_zephyr=no
104 AC_MSG_RESULT(no)
105 else
106 ac_cv_found_zephyr=yes
107 AC_MSG_RESULT(yes)
108 ZEPHYR_INC_DIR=$ac_cv_zephyr_where_inc
109 ZEPHYR_LIB_DIR=$ac_cv_zephyr_where_lib
110 ZEPHYR_INC_FLAGS="-I${ZEPHYR_INC_DIR}"
111 ZEPHYR_LIB_FLAGS="-L${ZEPHYR_LIB_DIR} -lzephyr"
112 AC_SUBST(ZEPHYT_INC_FLAGS)
113 AC_SUBST(ZEPHYR_LIB_FLAGS)
114 if test "X$RPATH" = "X"; then
115 RPATH=""
116 fi
117 case "${host}" in
118 *-*-linux*)
119 if test "X$RPATH" = "X"; then
120 RPATH="-Wl,-rpath,${ZEPHYR_LIB_DIR}"
121 else
122 RPATH="${RPATH}:${ZEPHYR_LIB_DIR}"
123 fi
124 ;;
125 *-*-hpux*)
126 if test "X$RPATH" = "X"; then
127 RPATH="-Wl,+b${ZEPHYR_LIB_DIR}"
128 else
129 RPATH="${RPATH}:${ZEPHYR_LIB_DIR}"
130 fi
131 ;;
132 *-*-irix*)
133 if test "X$RPATH" = "X"; then
134 RPATH="-Wl,-rpath,${ZEPHYR_LIB_DIR}"
135 else
136 RPATH="${RPATH}:${ZEPHYR_LIB_DIR}"
137 fi
138 ;;
139 *-*-solaris2*)
140 if test "$ac_cv_prog_gcc" = yes; then
141 if test "X$RPATH" = "X"; then
142 RPATH="-Wl,-R${ZEPHYR_LIB_DIR}"
143 else
144 RPATH="${RPATH}:${ZEPHYR_LIB_DIR}"
145 fi
146 else
147 RPATH="${RPATH} -R${ZEPHYR_LIB_DIR}"
148 fi
149 ;;
150 esac
151 AC_SUBST(RPATH)
152 fi
153 ])
154
+0
-39
cmulocal/zlib.m4 less more
0 dnl
1 dnl macros for configure.in to detect zlib
2 dnl $Id: zlib.m4,v 1.4 2010/01/06 17:01:28 murch Exp $
3 dnl
4
5 AC_DEFUN([CMU_HAVE_ZLIB], [
6 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
7 AC_ARG_WITH(zlib,[ --with-zlib=PATH use zlib from PATH],
8 with_zlib=$withval, with_zlib="yes")
9
10 save_CPPFLAGS=$CPPFLAGS
11 save_LDFLAGS=$LDFLAGS
12
13 if test -d $with_zlib; then
14 CPPFLAGS="${CPPFLAGS} -I${with_lib}/include"
15 CMU_ADD_LIBPATH(${with_zlib}/$CMU_LIB_SUBDIR)
16 fi
17
18 ZLIB=""
19 case "$with_zlib" in
20 no)
21 with_zlib="no";;
22 *)
23 AC_CHECK_HEADER(zlib.h, [
24 AC_CHECK_LIB(z, deflate,
25 LIBS="${LIBS} -lz"; with_zlib="yes",
26 with_zlib="no",)],
27 with_zlib=no)
28 ;;
29 esac
30
31 if test "$with_zlib" != "no"; then
32 AC_DEFINE(HAVE_ZLIB,[],[Do we have zlib?])
33 ZLIB="-lz"
34 else
35 CPPFLAGS=$save_CPPFLAGS
36 LDFLAGS=$save_LDFLAGS
37 fi
38 ])
0 # Ignore everything in this directory
1 *
2 # Except this file
3 !.gitignore
+0
-1516
config/config.guess less more
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
4 # 2011 Free Software Foundation, Inc.
5
6 timestamp='2011-08-20'
7
8 # This file is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
21 # 02110-1301, USA.
22 #
23 # As a special exception to the GNU General Public License, if you
24 # distribute this file as part of a program that contains a
25 # configuration script generated by Autoconf, you may include it under
26 # the same distribution terms that you use for the rest of that program.
27
28
29 # Originally written by Per Bothner. Please send patches (context
30 # diff format) to <config-patches@gnu.org> and include a ChangeLog
31 # entry.
32 #
33 # This script attempts to guess a canonical system name similar to
34 # config.sub. If it succeeds, it prints the system name on stdout, and
35 # exits with 0. Otherwise, it exits with 1.
36 #
37 # You can get the latest version of this script from:
38 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
39
40 me=`echo "$0" | sed -e 's,.*/,,'`
41
42 usage="\
43 Usage: $0 [OPTION]
44
45 Output the configuration name of the system \`$me' is run on.
46
47 Operation modes:
48 -h, --help print this help, then exit
49 -t, --time-stamp print date of last modification, then exit
50 -v, --version print version number, then exit
51
52 Report bugs and patches to <config-patches@gnu.org>."
53
54 version="\
55 GNU config.guess ($timestamp)
56
57 Originally written by Per Bothner.
58 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
59 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
60 Software Foundation, Inc.
61
62 This is free software; see the source for copying conditions. There is NO
63 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
64
65 help="
66 Try \`$me --help' for more information."
67
68 # Parse command line
69 while test $# -gt 0 ; do
70 case $1 in
71 --time-stamp | --time* | -t )
72 echo "$timestamp" ; exit ;;
73 --version | -v )
74 echo "$version" ; exit ;;
75 --help | --h* | -h )
76 echo "$usage"; exit ;;
77 -- ) # Stop option processing
78 shift; break ;;
79 - ) # Use stdin as input.
80 break ;;
81 -* )
82 echo "$me: invalid option $1$help" >&2
83 exit 1 ;;
84 * )
85 break ;;
86 esac
87 done
88
89 if test $# != 0; then
90 echo "$me: too many arguments$help" >&2
91 exit 1
92 fi
93
94 trap 'exit 1' 1 2 15
95
96 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
97 # compiler to aid in system detection is discouraged as it requires
98 # temporary files to be created and, as you can see below, it is a
99 # headache to deal with in a portable fashion.
100
101 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
102 # use `HOST_CC' if defined, but it is deprecated.
103
104 # Portable tmp directory creation inspired by the Autoconf team.
105
106 set_cc_for_build='
107 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
108 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
109 : ${TMPDIR=/tmp} ;
110 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
111 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
112 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
113 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
114 dummy=$tmp/dummy ;
115 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
116 case $CC_FOR_BUILD,$HOST_CC,$CC in
117 ,,) echo "int x;" > $dummy.c ;
118 for c in cc gcc c89 c99 ; do
119 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
120 CC_FOR_BUILD="$c"; break ;
121 fi ;
122 done ;
123 if test x"$CC_FOR_BUILD" = x ; then
124 CC_FOR_BUILD=no_compiler_found ;
125 fi
126 ;;
127 ,,*) CC_FOR_BUILD=$CC ;;
128 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
129 esac ; set_cc_for_build= ;'
130
131 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
132 # (ghazi@noc.rutgers.edu 1994-08-24)
133 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
134 PATH=$PATH:/.attbin ; export PATH
135 fi
136
137 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
138 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
139 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
140 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
141
142 # Note: order is significant - the case branches are not exclusive.
143
144 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
145 *:NetBSD:*:*)
146 # NetBSD (nbsd) targets should (where applicable) match one or
147 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
148 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
149 # switched to ELF, *-*-netbsd* would select the old
150 # object file format. This provides both forward
151 # compatibility and a consistent mechanism for selecting the
152 # object file format.
153 #
154 # Note: NetBSD doesn't particularly care about the vendor
155 # portion of the name. We always set it to "unknown".
156 sysctl="sysctl -n hw.machine_arch"
157 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
158 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
159 case "${UNAME_MACHINE_ARCH}" in
160 armeb) machine=armeb-unknown ;;
161 arm*) machine=arm-unknown ;;
162 sh3el) machine=shl-unknown ;;
163 sh3eb) machine=sh-unknown ;;
164 sh5el) machine=sh5le-unknown ;;
165 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
166 esac
167 # The Operating System including object format, if it has switched
168 # to ELF recently, or will in the future.
169 case "${UNAME_MACHINE_ARCH}" in
170 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
171 eval $set_cc_for_build
172 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
173 | grep -q __ELF__
174 then
175 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
176 # Return netbsd for either. FIX?
177 os=netbsd
178 else
179 os=netbsdelf
180 fi
181 ;;
182 *)
183 os=netbsd
184 ;;
185 esac
186 # The OS release
187 # Debian GNU/NetBSD machines have a different userland, and
188 # thus, need a distinct triplet. However, they do not need
189 # kernel version information, so it can be replaced with a
190 # suitable tag, in the style of linux-gnu.
191 case "${UNAME_VERSION}" in
192 Debian*)
193 release='-gnu'
194 ;;
195 *)
196 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
197 ;;
198 esac
199 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
200 # contains redundant information, the shorter form:
201 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
202 echo "${machine}-${os}${release}"
203 exit ;;
204 *:OpenBSD:*:*)
205 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
206 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
207 exit ;;
208 *:ekkoBSD:*:*)
209 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
210 exit ;;
211 *:SolidBSD:*:*)
212 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
213 exit ;;
214 macppc:MirBSD:*:*)
215 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
216 exit ;;
217 *:MirBSD:*:*)
218 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
219 exit ;;
220 alpha:OSF1:*:*)
221 case $UNAME_RELEASE in
222 *4.0)
223 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
224 ;;
225 *5.*)
226 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
227 ;;
228 esac
229 # According to Compaq, /usr/sbin/psrinfo has been available on
230 # OSF/1 and Tru64 systems produced since 1995. I hope that
231 # covers most systems running today. This code pipes the CPU
232 # types through head -n 1, so we only detect the type of CPU 0.
233 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
234 case "$ALPHA_CPU_TYPE" in
235 "EV4 (21064)")
236 UNAME_MACHINE="alpha" ;;
237 "EV4.5 (21064)")
238 UNAME_MACHINE="alpha" ;;
239 "LCA4 (21066/21068)")
240 UNAME_MACHINE="alpha" ;;
241 "EV5 (21164)")
242 UNAME_MACHINE="alphaev5" ;;
243 "EV5.6 (21164A)")
244 UNAME_MACHINE="alphaev56" ;;
245 "EV5.6 (21164PC)")
246 UNAME_MACHINE="alphapca56" ;;
247 "EV5.7 (21164PC)")
248 UNAME_MACHINE="alphapca57" ;;
249 "EV6 (21264)")
250 UNAME_MACHINE="alphaev6" ;;
251 "EV6.7 (21264A)")
252 UNAME_MACHINE="alphaev67" ;;
253 "EV6.8CB (21264C)")
254 UNAME_MACHINE="alphaev68" ;;
255 "EV6.8AL (21264B)")
256 UNAME_MACHINE="alphaev68" ;;
257 "EV6.8CX (21264D)")
258 UNAME_MACHINE="alphaev68" ;;
259 "EV6.9A (21264/EV69A)")
260 UNAME_MACHINE="alphaev69" ;;
261 "EV7 (21364)")
262 UNAME_MACHINE="alphaev7" ;;
263 "EV7.9 (21364A)")
264 UNAME_MACHINE="alphaev79" ;;
265 esac
266 # A Pn.n version is a patched version.
267 # A Vn.n version is a released version.
268 # A Tn.n version is a released field test version.
269 # A Xn.n version is an unreleased experimental baselevel.
270 # 1.2 uses "1.2" for uname -r.
271 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
272 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
273 exitcode=$?
274 trap '' 0
275 exit $exitcode ;;
276 Alpha\ *:Windows_NT*:*)
277 # How do we know it's Interix rather than the generic POSIX subsystem?
278 # Should we change UNAME_MACHINE based on the output of uname instead
279 # of the specific Alpha model?
280 echo alpha-pc-interix
281 exit ;;
282 21064:Windows_NT:50:3)
283 echo alpha-dec-winnt3.5
284 exit ;;
285 Amiga*:UNIX_System_V:4.0:*)
286 echo m68k-unknown-sysv4
287 exit ;;
288 *:[Aa]miga[Oo][Ss]:*:*)
289 echo ${UNAME_MACHINE}-unknown-amigaos
290 exit ;;
291 *:[Mm]orph[Oo][Ss]:*:*)
292 echo ${UNAME_MACHINE}-unknown-morphos
293 exit ;;
294 *:OS/390:*:*)
295 echo i370-ibm-openedition
296 exit ;;
297 *:z/VM:*:*)
298 echo s390-ibm-zvmoe
299 exit ;;
300 *:OS400:*:*)
301 echo powerpc-ibm-os400
302 exit ;;
303 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
304 echo arm-acorn-riscix${UNAME_RELEASE}
305 exit ;;
306 arm:riscos:*:*|arm:RISCOS:*:*)
307 echo arm-unknown-riscos
308 exit ;;
309 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
310 echo hppa1.1-hitachi-hiuxmpp
311 exit ;;
312 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
313 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
314 if test "`(/bin/universe) 2>/dev/null`" = att ; then
315 echo pyramid-pyramid-sysv3
316 else
317 echo pyramid-pyramid-bsd
318 fi
319 exit ;;
320 NILE*:*:*:dcosx)
321 echo pyramid-pyramid-svr4
322 exit ;;
323 DRS?6000:unix:4.0:6*)
324 echo sparc-icl-nx6
325 exit ;;
326 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
327 case `/usr/bin/uname -p` in
328 sparc) echo sparc-icl-nx7; exit ;;
329 esac ;;
330 s390x:SunOS:*:*)
331 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
332 exit ;;
333 sun4H:SunOS:5.*:*)
334 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335 exit ;;
336 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
337 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
338 exit ;;
339 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
340 echo i386-pc-auroraux${UNAME_RELEASE}
341 exit ;;
342 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
343 eval $set_cc_for_build
344 SUN_ARCH="i386"
345 # If there is a compiler, see if it is configured for 64-bit objects.
346 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
347 # This test works for both compilers.
348 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
349 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
350 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
351 grep IS_64BIT_ARCH >/dev/null
352 then
353 SUN_ARCH="x86_64"
354 fi
355 fi
356 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
357 exit ;;
358 sun4*:SunOS:6*:*)
359 # According to config.sub, this is the proper way to canonicalize
360 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
361 # it's likely to be more like Solaris than SunOS4.
362 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
363 exit ;;
364 sun4*:SunOS:*:*)
365 case "`/usr/bin/arch -k`" in
366 Series*|S4*)
367 UNAME_RELEASE=`uname -v`
368 ;;
369 esac
370 # Japanese Language versions have a version number like `4.1.3-JL'.
371 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
372 exit ;;
373 sun3*:SunOS:*:*)
374 echo m68k-sun-sunos${UNAME_RELEASE}
375 exit ;;
376 sun*:*:4.2BSD:*)
377 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
378 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
379 case "`/bin/arch`" in
380 sun3)
381 echo m68k-sun-sunos${UNAME_RELEASE}
382 ;;
383 sun4)
384 echo sparc-sun-sunos${UNAME_RELEASE}
385 ;;
386 esac
387 exit ;;
388 aushp:SunOS:*:*)
389 echo sparc-auspex-sunos${UNAME_RELEASE}
390 exit ;;
391 # The situation for MiNT is a little confusing. The machine name
392 # can be virtually everything (everything which is not
393 # "atarist" or "atariste" at least should have a processor
394 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
395 # to the lowercase version "mint" (or "freemint"). Finally
396 # the system name "TOS" denotes a system which is actually not
397 # MiNT. But MiNT is downward compatible to TOS, so this should
398 # be no problem.
399 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
400 echo m68k-atari-mint${UNAME_RELEASE}
401 exit ;;
402 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
403 echo m68k-atari-mint${UNAME_RELEASE}
404 exit ;;
405 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
406 echo m68k-atari-mint${UNAME_RELEASE}
407 exit ;;
408 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
409 echo m68k-milan-mint${UNAME_RELEASE}
410 exit ;;
411 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
412 echo m68k-hades-mint${UNAME_RELEASE}
413 exit ;;
414 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
415 echo m68k-unknown-mint${UNAME_RELEASE}
416 exit ;;
417 m68k:machten:*:*)
418 echo m68k-apple-machten${UNAME_RELEASE}
419 exit ;;
420 powerpc:machten:*:*)
421 echo powerpc-apple-machten${UNAME_RELEASE}
422 exit ;;
423 RISC*:Mach:*:*)
424 echo mips-dec-mach_bsd4.3
425 exit ;;
426 RISC*:ULTRIX:*:*)
427 echo mips-dec-ultrix${UNAME_RELEASE}
428 exit ;;
429 VAX*:ULTRIX*:*:*)
430 echo vax-dec-ultrix${UNAME_RELEASE}
431 exit ;;
432 2020:CLIX:*:* | 2430:CLIX:*:*)
433 echo clipper-intergraph-clix${UNAME_RELEASE}
434 exit ;;
435 mips:*:*:UMIPS | mips:*:*:RISCos)
436 eval $set_cc_for_build
437 sed 's/^ //' << EOF >$dummy.c
438 #ifdef __cplusplus
439 #include <stdio.h> /* for printf() prototype */
440 int main (int argc, char *argv[]) {
441 #else
442 int main (argc, argv) int argc; char *argv[]; {
443 #endif
444 #if defined (host_mips) && defined (MIPSEB)
445 #if defined (SYSTYPE_SYSV)
446 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
447 #endif
448 #if defined (SYSTYPE_SVR4)
449 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
450 #endif
451 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
452 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
453 #endif
454 #endif
455 exit (-1);
456 }
457 EOF
458 $CC_FOR_BUILD -o $dummy $dummy.c &&
459 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
460 SYSTEM_NAME=`$dummy $dummyarg` &&
461 { echo "$SYSTEM_NAME"; exit; }
462 echo mips-mips-riscos${UNAME_RELEASE}
463 exit ;;
464 Motorola:PowerMAX_OS:*:*)
465 echo powerpc-motorola-powermax
466 exit ;;
467 Motorola:*:4.3:PL8-*)
468 echo powerpc-harris-powermax
469 exit ;;
470 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
471 echo powerpc-harris-powermax
472 exit ;;
473 Night_Hawk:Power_UNIX:*:*)
474 echo powerpc-harris-powerunix
475 exit ;;
476 m88k:CX/UX:7*:*)
477 echo m88k-harris-cxux7
478 exit ;;
479 m88k:*:4*:R4*)
480 echo m88k-motorola-sysv4
481 exit ;;
482 m88k:*:3*:R3*)
483 echo m88k-motorola-sysv3
484 exit ;;
485 AViiON:dgux:*:*)
486 # DG/UX returns AViiON for all architectures
487 UNAME_PROCESSOR=`/usr/bin/uname -p`
488 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
489 then
490 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
491 [ ${TARGET_BINARY_INTERFACE}x = x ]
492 then
493 echo m88k-dg-dgux${UNAME_RELEASE}
494 else
495 echo m88k-dg-dguxbcs${UNAME_RELEASE}
496 fi
497 else
498 echo i586-dg-dgux${UNAME_RELEASE}
499 fi
500 exit ;;
501 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
502 echo m88k-dolphin-sysv3
503 exit ;;
504 M88*:*:R3*:*)
505 # Delta 88k system running SVR3
506 echo m88k-motorola-sysv3
507 exit ;;
508 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
509 echo m88k-tektronix-sysv3
510 exit ;;
511 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
512 echo m68k-tektronix-bsd
513 exit ;;
514 *:IRIX*:*:*)
515 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
516 exit ;;
517 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
518 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
519 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
520 i*86:AIX:*:*)
521 echo i386-ibm-aix
522 exit ;;
523 ia64:AIX:*:*)
524 if [ -x /usr/bin/oslevel ] ; then
525 IBM_REV=`/usr/bin/oslevel`
526 else
527 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
528 fi
529 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
530 exit ;;
531 *:AIX:2:3)
532 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
533 eval $set_cc_for_build
534 sed 's/^ //' << EOF >$dummy.c
535 #include <sys/systemcfg.h>
536
537 main()
538 {
539 if (!__power_pc())
540 exit(1);
541 puts("powerpc-ibm-aix3.2.5");
542 exit(0);
543 }
544 EOF
545 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
546 then
547 echo "$SYSTEM_NAME"
548 else
549 echo rs6000-ibm-aix3.2.5
550 fi
551 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
552 echo rs6000-ibm-aix3.2.4
553 else
554 echo rs6000-ibm-aix3.2
555 fi
556 exit ;;
557 *:AIX:*:[4567])
558 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
559 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
560 IBM_ARCH=rs6000
561 else
562 IBM_ARCH=powerpc
563 fi
564 if [ -x /usr/bin/oslevel ] ; then
565 IBM_REV=`/usr/bin/oslevel`
566 else
567 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
568 fi
569 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
570 exit ;;
571 *:AIX:*:*)
572 echo rs6000-ibm-aix
573 exit ;;
574 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
575 echo romp-ibm-bsd4.4
576 exit ;;
577 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
578 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
579 exit ;; # report: romp-ibm BSD 4.3
580 *:BOSX:*:*)
581 echo rs6000-bull-bosx
582 exit ;;
583 DPX/2?00:B.O.S.:*:*)
584 echo m68k-bull-sysv3
585 exit ;;
586 9000/[34]??:4.3bsd:1.*:*)
587 echo m68k-hp-bsd
588 exit ;;
589 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
590 echo m68k-hp-bsd4.4
591 exit ;;
592 9000/[34678]??:HP-UX:*:*)
593 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
594 case "${UNAME_MACHINE}" in
595 9000/31? ) HP_ARCH=m68000 ;;
596 9000/[34]?? ) HP_ARCH=m68k ;;
597 9000/[678][0-9][0-9])
598 if [ -x /usr/bin/getconf ]; then
599 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
600 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
601 case "${sc_cpu_version}" in
602 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
603 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
604 532) # CPU_PA_RISC2_0
605 case "${sc_kernel_bits}" in
606 32) HP_ARCH="hppa2.0n" ;;
607 64) HP_ARCH="hppa2.0w" ;;
608 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
609 esac ;;
610 esac
611 fi
612 if [ "${HP_ARCH}" = "" ]; then
613 eval $set_cc_for_build
614 sed 's/^ //' << EOF >$dummy.c
615
616 #define _HPUX_SOURCE
617 #include <stdlib.h>
618 #include <unistd.h>
619
620 int main ()
621 {
622 #if defined(_SC_KERNEL_BITS)
623 long bits = sysconf(_SC_KERNEL_BITS);
624 #endif
625 long cpu = sysconf (_SC_CPU_VERSION);
626
627 switch (cpu)
628 {
629 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
630 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
631 case CPU_PA_RISC2_0:
632 #if defined(_SC_KERNEL_BITS)
633 switch (bits)
634 {
635 case 64: puts ("hppa2.0w"); break;
636 case 32: puts ("hppa2.0n"); break;
637 default: puts ("hppa2.0"); break;
638 } break;
639 #else /* !defined(_SC_KERNEL_BITS) */
640 puts ("hppa2.0"); break;
641 #endif
642 default: puts ("hppa1.0"); break;
643 }
644 exit (0);
645 }
646 EOF
647 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
648 test -z "$HP_ARCH" && HP_ARCH=hppa
649 fi ;;
650 esac
651 if [ ${HP_ARCH} = "hppa2.0w" ]
652 then
653 eval $set_cc_for_build
654
655 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
656 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
657 # generating 64-bit code. GNU and HP use different nomenclature:
658 #
659 # $ CC_FOR_BUILD=cc ./config.guess
660 # => hppa2.0w-hp-hpux11.23
661 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
662 # => hppa64-hp-hpux11.23
663
664 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
665 grep -q __LP64__
666 then
667 HP_ARCH="hppa2.0w"
668 else
669 HP_ARCH="hppa64"
670 fi
671 fi
672 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
673 exit ;;
674 ia64:HP-UX:*:*)
675 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
676 echo ia64-hp-hpux${HPUX_REV}
677 exit ;;
678 3050*:HI-UX:*:*)
679 eval $set_cc_for_build
680 sed 's/^ //' << EOF >$dummy.c
681 #include <unistd.h>
682 int
683 main ()
684 {
685 long cpu = sysconf (_SC_CPU_VERSION);
686 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
687 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
688 results, however. */
689 if (CPU_IS_PA_RISC (cpu))
690 {
691 switch (cpu)
692 {
693 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
694 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
695 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
696 default: puts ("hppa-hitachi-hiuxwe2"); break;
697 }
698 }
699 else if (CPU_IS_HP_MC68K (cpu))
700 puts ("m68k-hitachi-hiuxwe2");
701 else puts ("unknown-hitachi-hiuxwe2");
702 exit (0);
703 }
704 EOF
705 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
706 { echo "$SYSTEM_NAME"; exit; }
707 echo unknown-hitachi-hiuxwe2
708 exit ;;
709 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
710 echo hppa1.1-hp-bsd
711 exit ;;
712 9000/8??:4.3bsd:*:*)
713 echo hppa1.0-hp-bsd
714 exit ;;
715 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
716 echo hppa1.0-hp-mpeix
717 exit ;;
718 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
719 echo hppa1.1-hp-osf
720 exit ;;
721 hp8??:OSF1:*:*)
722 echo hppa1.0-hp-osf
723 exit ;;
724 i*86:OSF1:*:*)
725 if [ -x /usr/sbin/sysversion ] ; then
726 echo ${UNAME_MACHINE}-unknown-osf1mk
727 else
728 echo ${UNAME_MACHINE}-unknown-osf1
729 fi
730 exit ;;
731 parisc*:Lites*:*:*)
732 echo hppa1.1-hp-lites
733 exit ;;
734 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
735 echo c1-convex-bsd
736 exit ;;
737 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
738 if getsysinfo -f scalar_acc
739 then echo c32-convex-bsd
740 else echo c2-convex-bsd
741 fi
742 exit ;;
743 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
744 echo c34-convex-bsd
745 exit ;;
746 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
747 echo c38-convex-bsd
748 exit ;;
749 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
750 echo c4-convex-bsd
751 exit ;;
752 CRAY*Y-MP:*:*:*)
753 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
754 exit ;;
755 CRAY*[A-Z]90:*:*:*)
756 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
757 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
758 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
759 -e 's/\.[^.]*$/.X/'
760 exit ;;
761 CRAY*TS:*:*:*)
762 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
763 exit ;;
764 CRAY*T3E:*:*:*)
765 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
766 exit ;;
767 CRAY*SV1:*:*:*)
768 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
769 exit ;;
770 *:UNICOS/mp:*:*)
771 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
772 exit ;;
773 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
774 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
775 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
776 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
777 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
778 exit ;;
779 5000:UNIX_System_V:4.*:*)
780 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
781 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
782 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
783 exit ;;
784 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
785 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
786 exit ;;
787 sparc*:BSD/OS:*:*)
788 echo sparc-unknown-bsdi${UNAME_RELEASE}
789 exit ;;
790 *:BSD/OS:*:*)
791 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
792 exit ;;
793 *:FreeBSD:*:*)
794 UNAME_PROCESSOR=`/usr/bin/uname -p`
795 case ${UNAME_PROCESSOR} in
796 amd64)
797 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
798 *)
799 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
800 esac
801 exit ;;
802 i*:CYGWIN*:*)
803 echo ${UNAME_MACHINE}-pc-cygwin
804 exit ;;
805 *:MINGW*:*)
806 echo ${UNAME_MACHINE}-pc-mingw32
807 exit ;;
808 i*:windows32*:*)
809 # uname -m includes "-pc" on this system.
810 echo ${UNAME_MACHINE}-mingw32
811 exit ;;
812 i*:PW*:*)
813 echo ${UNAME_MACHINE}-pc-pw32
814 exit ;;
815 *:Interix*:*)
816 case ${UNAME_MACHINE} in
817 x86)
818 echo i586-pc-interix${UNAME_RELEASE}
819 exit ;;
820 authenticamd | genuineintel | EM64T)
821 echo x86_64-unknown-interix${UNAME_RELEASE}
822 exit ;;
823 IA64)
824 echo ia64-unknown-interix${UNAME_RELEASE}
825 exit ;;
826 esac ;;
827 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
828 echo i${UNAME_MACHINE}-pc-mks
829 exit ;;
830 8664:Windows_NT:*)
831 echo x86_64-pc-mks
832 exit ;;
833 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
834 # How do we know it's Interix rather than the generic POSIX subsystem?
835 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
836 # UNAME_MACHINE based on the output of uname instead of i386?
837 echo i586-pc-interix
838 exit ;;
839 i*:UWIN*:*)
840 echo ${UNAME_MACHINE}-pc-uwin
841 exit ;;
842 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
843 echo x86_64-unknown-cygwin
844 exit ;;
845 p*:CYGWIN*:*)
846 echo powerpcle-unknown-cygwin
847 exit ;;
848 prep*:SunOS:5.*:*)
849 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
850 exit ;;
851 *:GNU:*:*)
852 # the GNU system
853 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
854 exit ;;
855 *:GNU/*:*:*)
856 # other systems with GNU libc and userland
857 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
858 exit ;;
859 i*86:Minix:*:*)
860 echo ${UNAME_MACHINE}-pc-minix
861 exit ;;
862 alpha:Linux:*:*)
863 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
864 EV5) UNAME_MACHINE=alphaev5 ;;
865 EV56) UNAME_MACHINE=alphaev56 ;;
866 PCA56) UNAME_MACHINE=alphapca56 ;;
867 PCA57) UNAME_MACHINE=alphapca56 ;;
868 EV6) UNAME_MACHINE=alphaev6 ;;
869 EV67) UNAME_MACHINE=alphaev67 ;;
870 EV68*) UNAME_MACHINE=alphaev68 ;;
871 esac
872 objdump --private-headers /bin/sh | grep -q ld.so.1
873 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
874 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
875 exit ;;
876 arm*:Linux:*:*)
877 eval $set_cc_for_build
878 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
879 | grep -q __ARM_EABI__
880 then
881 echo ${UNAME_MACHINE}-unknown-linux-gnu
882 else
883 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
884 | grep -q __ARM_PCS_VFP
885 then
886 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
887 else
888 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
889 fi
890 fi
891 exit ;;
892 avr32*:Linux:*:*)
893 echo ${UNAME_MACHINE}-unknown-linux-gnu
894 exit ;;
895 cris:Linux:*:*)
896 echo cris-axis-linux-gnu
897 exit ;;
898 crisv32:Linux:*:*)
899 echo crisv32-axis-linux-gnu
900 exit ;;
901 frv:Linux:*:*)
902 echo frv-unknown-linux-gnu
903 exit ;;
904 i*86:Linux:*:*)
905 LIBC=gnu
906 eval $set_cc_for_build
907 sed 's/^ //' << EOF >$dummy.c
908 #ifdef __dietlibc__
909 LIBC=dietlibc
910 #endif
911 EOF
912 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
913 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
914 exit ;;
915 ia64:Linux:*:*)
916 echo ${UNAME_MACHINE}-unknown-linux-gnu
917 exit ;;
918 m32r*:Linux:*:*)
919 echo ${UNAME_MACHINE}-unknown-linux-gnu
920 exit ;;
921 m68*:Linux:*:*)
922 echo ${UNAME_MACHINE}-unknown-linux-gnu
923 exit ;;
924 mips:Linux:*:* | mips64:Linux:*:*)
925 eval $set_cc_for_build
926 sed 's/^ //' << EOF >$dummy.c
927 #undef CPU
928 #undef ${UNAME_MACHINE}
929 #undef ${UNAME_MACHINE}el
930 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
931 CPU=${UNAME_MACHINE}el
932 #else
933 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
934 CPU=${UNAME_MACHINE}
935 #else
936 CPU=
937 #endif
938 #endif
939 EOF
940 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
941 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
942 ;;
943 or32:Linux:*:*)
944 echo or32-unknown-linux-gnu
945 exit ;;
946 padre:Linux:*:*)
947 echo sparc-unknown-linux-gnu
948 exit ;;
949 parisc64:Linux:*:* | hppa64:Linux:*:*)
950 echo hppa64-unknown-linux-gnu
951 exit ;;
952 parisc:Linux:*:* | hppa:Linux:*:*)
953 # Look for CPU level
954 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
955 PA7*) echo hppa1.1-unknown-linux-gnu ;;
956 PA8*) echo hppa2.0-unknown-linux-gnu ;;
957 *) echo hppa-unknown-linux-gnu ;;
958 esac
959 exit ;;
960 ppc64:Linux:*:*)
961 echo powerpc64-unknown-linux-gnu
962 exit ;;
963 ppc:Linux:*:*)
964 echo powerpc-unknown-linux-gnu
965 exit ;;
966 s390:Linux:*:* | s390x:Linux:*:*)
967 echo ${UNAME_MACHINE}-ibm-linux
968 exit ;;
969 sh64*:Linux:*:*)
970 echo ${UNAME_MACHINE}-unknown-linux-gnu
971 exit ;;
972 sh*:Linux:*:*)
973 echo ${UNAME_MACHINE}-unknown-linux-gnu
974 exit ;;
975 sparc:Linux:*:* | sparc64:Linux:*:*)
976 echo ${UNAME_MACHINE}-unknown-linux-gnu
977 exit ;;
978 tile*:Linux:*:*)
979 echo ${UNAME_MACHINE}-unknown-linux-gnu
980 exit ;;
981 vax:Linux:*:*)
982 echo ${UNAME_MACHINE}-dec-linux-gnu
983 exit ;;
984 x86_64:Linux:*:*)
985 echo x86_64-unknown-linux-gnu
986 exit ;;
987 xtensa*:Linux:*:*)
988 echo ${UNAME_MACHINE}-unknown-linux-gnu
989 exit ;;
990 i*86:DYNIX/ptx:4*:*)
991 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
992 # earlier versions are messed up and put the nodename in both
993 # sysname and nodename.
994 echo i386-sequent-sysv4
995 exit ;;
996 i*86:UNIX_SV:4.2MP:2.*)
997 # Unixware is an offshoot of SVR4, but it has its own version
998 # number series starting with 2...
999 # I am not positive that other SVR4 systems won't match this,
1000 # I just have to hope. -- rms.
1001 # Use sysv4.2uw... so that sysv4* matches it.
1002 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1003 exit ;;
1004 i*86:OS/2:*:*)
1005 # If we were able to find `uname', then EMX Unix compatibility
1006 # is probably installed.
1007 echo ${UNAME_MACHINE}-pc-os2-emx
1008 exit ;;
1009 i*86:XTS-300:*:STOP)
1010 echo ${UNAME_MACHINE}-unknown-stop
1011 exit ;;
1012 i*86:atheos:*:*)
1013 echo ${UNAME_MACHINE}-unknown-atheos
1014 exit ;;
1015 i*86:syllable:*:*)
1016 echo ${UNAME_MACHINE}-pc-syllable
1017 exit ;;
1018 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1019 echo i386-unknown-lynxos${UNAME_RELEASE}
1020 exit ;;
1021 i*86:*DOS:*:*)
1022 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1023 exit ;;
1024 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1025 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1026 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1027 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1028 else
1029 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1030 fi
1031 exit ;;
1032 i*86:*:5:[678]*)
1033 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1034 case `/bin/uname -X | grep "^Machine"` in
1035 *486*) UNAME_MACHINE=i486 ;;
1036 *Pentium) UNAME_MACHINE=i586 ;;
1037 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1038 esac
1039 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1040 exit ;;
1041 i*86:*:3.2:*)
1042 if test -f /usr/options/cb.name; then
1043 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1044 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1045 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1046 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1047 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1048 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1049 && UNAME_MACHINE=i586
1050 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1051 && UNAME_MACHINE=i686
1052 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1053 && UNAME_MACHINE=i686
1054 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1055 else
1056 echo ${UNAME_MACHINE}-pc-sysv32
1057 fi
1058 exit ;;
1059 pc:*:*:*)
1060 # Left here for compatibility:
1061 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1062 # the processor, so we play safe by assuming i586.
1063 # Note: whatever this is, it MUST be the same as what config.sub
1064 # prints for the "djgpp" host, or else GDB configury will decide that
1065 # this is a cross-build.
1066 echo i586-pc-msdosdjgpp
1067 exit ;;
1068 Intel:Mach:3*:*)
1069 echo i386-pc-mach3
1070 exit ;;
1071 paragon:*:*:*)
1072 echo i860-intel-osf1
1073 exit ;;
1074 i860:*:4.*:*) # i860-SVR4
1075 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1076 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1077 else # Add other i860-SVR4 vendors below as they are discovered.
1078 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1079 fi
1080 exit ;;
1081 mini*:CTIX:SYS*5:*)
1082 # "miniframe"
1083 echo m68010-convergent-sysv
1084 exit ;;
1085 mc68k:UNIX:SYSTEM5:3.51m)
1086 echo m68k-convergent-sysv
1087 exit ;;
1088 M680?0:D-NIX:5.3:*)
1089 echo m68k-diab-dnix
1090 exit ;;
1091 M68*:*:R3V[5678]*:*)
1092 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1093 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1094 OS_REL=''
1095 test -r /etc/.relid \
1096 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1097 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1098 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1099 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1100 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1101 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1102 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1103 && { echo i486-ncr-sysv4; exit; } ;;
1104 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1105 OS_REL='.3'
1106 test -r /etc/.relid \
1107 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1108 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1109 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1110 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1111 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1112 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1113 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1114 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1115 echo m68k-unknown-lynxos${UNAME_RELEASE}
1116 exit ;;
1117 mc68030:UNIX_System_V:4.*:*)
1118 echo m68k-atari-sysv4
1119 exit ;;
1120 TSUNAMI:LynxOS:2.*:*)
1121 echo sparc-unknown-lynxos${UNAME_RELEASE}
1122 exit ;;
1123 rs6000:LynxOS:2.*:*)
1124 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1125 exit ;;
1126 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1127 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1128 exit ;;
1129 SM[BE]S:UNIX_SV:*:*)
1130 echo mips-dde-sysv${UNAME_RELEASE}
1131 exit ;;
1132 RM*:ReliantUNIX-*:*:*)
1133 echo mips-sni-sysv4
1134 exit ;;
1135 RM*:SINIX-*:*:*)
1136 echo mips-sni-sysv4
1137 exit ;;
1138 *:SINIX-*:*:*)
1139 if uname -p 2>/dev/null >/dev/null ; then
1140 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1141 echo ${UNAME_MACHINE}-sni-sysv4
1142 else
1143 echo ns32k-sni-sysv
1144 fi
1145 exit ;;
1146 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1147 # says <Richard.M.Bartel@ccMail.Census.GOV>
1148 echo i586-unisys-sysv4
1149 exit ;;
1150 *:UNIX_System_V:4*:FTX*)
1151 # From Gerald Hewes <hewes@openmarket.com>.
1152 # How about differentiating between stratus architectures? -djm
1153 echo hppa1.1-stratus-sysv4
1154 exit ;;
1155 *:*:*:FTX*)
1156 # From seanf@swdc.stratus.com.
1157 echo i860-stratus-sysv4
1158 exit ;;
1159 i*86:VOS:*:*)
1160 # From Paul.Green@stratus.com.
1161 echo ${UNAME_MACHINE}-stratus-vos
1162 exit ;;
1163 *:VOS:*:*)
1164 # From Paul.Green@stratus.com.
1165 echo hppa1.1-stratus-vos
1166 exit ;;
1167 mc68*:A/UX:*:*)
1168 echo m68k-apple-aux${UNAME_RELEASE}
1169 exit ;;
1170 news*:NEWS-OS:6*:*)
1171 echo mips-sony-newsos6
1172 exit ;;
1173 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1174 if [ -d /usr/nec ]; then
1175 echo mips-nec-sysv${UNAME_RELEASE}
1176 else
1177 echo mips-unknown-sysv${UNAME_RELEASE}
1178 fi
1179 exit ;;
1180 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1181 echo powerpc-be-beos
1182 exit ;;
1183 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1184 echo powerpc-apple-beos
1185 exit ;;
1186 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1187 echo i586-pc-beos
1188 exit ;;
1189 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1190 echo i586-pc-haiku
1191 exit ;;
1192 SX-4:SUPER-UX:*:*)
1193 echo sx4-nec-superux${UNAME_RELEASE}
1194 exit ;;
1195 SX-5:SUPER-UX:*:*)
1196 echo sx5-nec-superux${UNAME_RELEASE}
1197 exit ;;
1198 SX-6:SUPER-UX:*:*)
1199 echo sx6-nec-superux${UNAME_RELEASE}
1200 exit ;;
1201 SX-7:SUPER-UX:*:*)
1202 echo sx7-nec-superux${UNAME_RELEASE}
1203 exit ;;
1204 SX-8:SUPER-UX:*:*)
1205 echo sx8-nec-superux${UNAME_RELEASE}
1206 exit ;;
1207 SX-8R:SUPER-UX:*:*)
1208 echo sx8r-nec-superux${UNAME_RELEASE}
1209 exit ;;
1210 Power*:Rhapsody:*:*)
1211 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1212 exit ;;
1213 *:Rhapsody:*:*)
1214 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1215 exit ;;
1216 *:Darwin:*:*)
1217 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1218 case $UNAME_PROCESSOR in
1219 i386)
1220 eval $set_cc_for_build
1221 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1222 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1223 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1224 grep IS_64BIT_ARCH >/dev/null
1225 then
1226 UNAME_PROCESSOR="x86_64"
1227 fi
1228 fi ;;
1229 unknown) UNAME_PROCESSOR=powerpc ;;
1230 esac
1231 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1232 exit ;;
1233 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1234 UNAME_PROCESSOR=`uname -p`
1235 if test "$UNAME_PROCESSOR" = "x86"; then
1236 UNAME_PROCESSOR=i386
1237 UNAME_MACHINE=pc
1238 fi
1239 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1240 exit ;;
1241 *:QNX:*:4*)
1242 echo i386-pc-qnx
1243 exit ;;
1244 NEO-?:NONSTOP_KERNEL:*:*)
1245 echo neo-tandem-nsk${UNAME_RELEASE}
1246 exit ;;
1247 NSE-?:NONSTOP_KERNEL:*:*)
1248 echo nse-tandem-nsk${UNAME_RELEASE}
1249 exit ;;
1250 NSR-?:NONSTOP_KERNEL:*:*)
1251 echo nsr-tandem-nsk${UNAME_RELEASE}
1252 exit ;;
1253 *:NonStop-UX:*:*)
1254 echo mips-compaq-nonstopux
1255 exit ;;
1256 BS2000:POSIX*:*:*)
1257 echo bs2000-siemens-sysv
1258 exit ;;
1259 DS/*:UNIX_System_V:*:*)
1260 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1261 exit ;;
1262 *:Plan9:*:*)
1263 # "uname -m" is not consistent, so use $cputype instead. 386
1264 # is converted to i386 for consistency with other x86
1265 # operating systems.
1266 if test "$cputype" = "386"; then
1267 UNAME_MACHINE=i386
1268 else
1269 UNAME_MACHINE="$cputype"
1270 fi
1271 echo ${UNAME_MACHINE}-unknown-plan9
1272 exit ;;
1273 *:TOPS-10:*:*)
1274 echo pdp10-unknown-tops10
1275 exit ;;
1276 *:TENEX:*:*)
1277 echo pdp10-unknown-tenex
1278 exit ;;
1279 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1280 echo pdp10-dec-tops20
1281 exit ;;
1282 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1283 echo pdp10-xkl-tops20
1284 exit ;;
1285 *:TOPS-20:*:*)
1286 echo pdp10-unknown-tops20
1287 exit ;;
1288 *:ITS:*:*)
1289 echo pdp10-unknown-its
1290 exit ;;
1291 SEI:*:*:SEIUX)
1292 echo mips-sei-seiux${UNAME_RELEASE}
1293 exit ;;
1294 *:DragonFly:*:*)
1295 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1296 exit ;;
1297 *:*VMS:*:*)
1298 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1299 case "${UNAME_MACHINE}" in
1300 A*) echo alpha-dec-vms ; exit ;;
1301 I*) echo ia64-dec-vms ; exit ;;
1302 V*) echo vax-dec-vms ; exit ;;
1303 esac ;;
1304 *:XENIX:*:SysV)
1305 echo i386-pc-xenix
1306 exit ;;
1307 i*86:skyos:*:*)
1308 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1309 exit ;;
1310 i*86:rdos:*:*)
1311 echo ${UNAME_MACHINE}-pc-rdos
1312 exit ;;
1313 i*86:AROS:*:*)
1314 echo ${UNAME_MACHINE}-pc-aros
1315 exit ;;
1316 esac
1317
1318 #echo '(No uname command or uname output not recognized.)' 1>&2
1319 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1320
1321 eval $set_cc_for_build
1322 cat >$dummy.c <<EOF
1323 #ifdef _SEQUENT_
1324 # include <sys/types.h>
1325 # include <sys/utsname.h>
1326 #endif
1327 main ()
1328 {
1329 #if defined (sony)
1330 #if defined (MIPSEB)
1331 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1332 I don't know.... */
1333 printf ("mips-sony-bsd\n"); exit (0);
1334 #else
1335 #include <sys/param.h>
1336 printf ("m68k-sony-newsos%s\n",
1337 #ifdef NEWSOS4
1338 "4"
1339 #else
1340 ""
1341 #endif
1342 ); exit (0);
1343 #endif
1344 #endif
1345
1346 #if defined (__arm) && defined (__acorn) && defined (__unix)
1347 printf ("arm-acorn-riscix\n"); exit (0);
1348 #endif
1349
1350 #if defined (hp300) && !defined (hpux)
1351 printf ("m68k-hp-bsd\n"); exit (0);
1352 #endif
1353
1354 #if defined (NeXT)
1355 #if !defined (__ARCHITECTURE__)
1356 #define __ARCHITECTURE__ "m68k"
1357 #endif
1358 int version;
1359 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1360 if (version < 4)
1361 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1362 else
1363 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1364 exit (0);
1365 #endif
1366
1367 #if defined (MULTIMAX) || defined (n16)
1368 #if defined (UMAXV)
1369 printf ("ns32k-encore-sysv\n"); exit (0);
1370 #else
1371 #if defined (CMU)
1372 printf ("ns32k-encore-mach\n"); exit (0);
1373 #else
1374 printf ("ns32k-encore-bsd\n"); exit (0);
1375 #endif
1376 #endif
1377 #endif
1378
1379 #if defined (__386BSD__)
1380 printf ("i386-pc-bsd\n"); exit (0);
1381 #endif
1382
1383 #if defined (sequent)
1384 #if defined (i386)
1385 printf ("i386-sequent-dynix\n"); exit (0);
1386 #endif
1387 #if defined (ns32000)
1388 printf ("ns32k-sequent-dynix\n"); exit (0);
1389 #endif
1390 #endif
1391
1392 #if defined (_SEQUENT_)
1393 struct utsname un;
1394
1395 uname(&un);
1396
1397 if (strncmp(un.version, "V2", 2) == 0) {
1398 printf ("i386-sequent-ptx2\n"); exit (0);
1399 }
1400 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1401 printf ("i386-sequent-ptx1\n"); exit (0);
1402 }
1403 printf ("i386-sequent-ptx\n"); exit (0);
1404
1405 #endif
1406
1407 #if defined (vax)
1408 # if !defined (ultrix)
1409 # include <sys/param.h>
1410 # if defined (BSD)
1411 # if BSD == 43
1412 printf ("vax-dec-bsd4.3\n"); exit (0);
1413 # else
1414 # if BSD == 199006
1415 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1416 # else
1417 printf ("vax-dec-bsd\n"); exit (0);
1418 # endif
1419 # endif
1420 # else
1421 printf ("vax-dec-bsd\n"); exit (0);
1422 # endif
1423 # else
1424 printf ("vax-dec-ultrix\n"); exit (0);
1425 # endif
1426 #endif
1427
1428 #if defined (alliant) && defined (i860)
1429 printf ("i860-alliant-bsd\n"); exit (0);
1430 #endif
1431
1432 exit (1);
1433 }
1434 EOF
1435
1436 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1437 { echo "$SYSTEM_NAME"; exit; }
1438
1439 # Apollos put the system type in the environment.
1440
1441 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1442
1443 # Convex versions that predate uname can use getsysinfo(1)
1444
1445 if [ -x /usr/convex/getsysinfo ]
1446 then
1447 case `getsysinfo -f cpu_type` in
1448 c1*)
1449 echo c1-convex-bsd
1450 exit ;;
1451 c2*)
1452 if getsysinfo -f scalar_acc
1453 then echo c32-convex-bsd
1454 else echo c2-convex-bsd
1455 fi
1456 exit ;;
1457 c34*)
1458 echo c34-convex-bsd
1459 exit ;;
1460 c38*)
1461 echo c38-convex-bsd
1462 exit ;;
1463 c4*)
1464 echo c4-convex-bsd
1465 exit ;;
1466 esac
1467 fi
1468
1469 cat >&2 <<EOF
1470 $0: unable to guess system type
1471
1472 This script, last modified $timestamp, has failed to recognize
1473 the operating system you are using. It is advised that you
1474 download the most up to date version of the config scripts from
1475
1476 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1477 and
1478 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1479
1480 If the version you run ($0) is already up to date, please
1481 send the following data and any information you think might be
1482 pertinent to <config-patches@gnu.org> in order to provide the needed
1483 information to handle your system.
1484
1485 config.guess timestamp = $timestamp
1486
1487 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1488 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1489 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1490 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1491
1492 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1493 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1494
1495 hostinfo = `(hostinfo) 2>/dev/null`
1496 /bin/universe = `(/bin/universe) 2>/dev/null`
1497 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1498 /bin/arch = `(/bin/arch) 2>/dev/null`
1499 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1500 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1501
1502 UNAME_MACHINE = ${UNAME_MACHINE}
1503 UNAME_RELEASE = ${UNAME_RELEASE}
1504 UNAME_SYSTEM = ${UNAME_SYSTEM}
1505 UNAME_VERSION = ${UNAME_VERSION}
1506 EOF
1507
1508 exit 1
1509
1510 # Local variables:
1511 # eval: (add-hook 'write-file-hooks 'time-stamp)
1512 # time-stamp-start: "timestamp='"
1513 # time-stamp-format: "%:y-%02m-%02d"
1514 # time-stamp-end: "'"
1515 # End:
+0
-1764
config/config.sub less more
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
4 # 2011 Free Software Foundation, Inc.
5
6 timestamp='2011-08-23'
7
8 # This file is (in principle) common to ALL GNU software.
9 # The presence of a machine in this file suggests that SOME GNU software
10 # can handle that machine. It does not imply ALL GNU software can.
11 #
12 # This file is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License, or
15 # (at your option) any later version.
16 #
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
25 # 02110-1301, USA.
26 #
27 # As a special exception to the GNU General Public License, if you
28 # distribute this file as part of a program that contains a
29 # configuration script generated by Autoconf, you may include it under
30 # the same distribution terms that you use for the rest of that program.
31
32
33 # Please send patches to <config-patches@gnu.org>. Submit a context
34 # diff and a properly formatted GNU ChangeLog entry.
35 #
36 # Configuration subroutine to validate and canonicalize a configuration type.
37 # Supply the specified configuration type as an argument.
38 # If it is invalid, we print an error message on stderr and exit with code 1.
39 # Otherwise, we print the canonical config type on stdout and succeed.
40
41 # You can get the latest version of this script from:
42 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
43
44 # This file is supposed to be the same for all GNU packages
45 # and recognize all the CPU types, system types and aliases
46 # that are meaningful with *any* GNU software.
47 # Each package is responsible for reporting which valid configurations
48 # it does not support. The user should be able to distinguish
49 # a failure to support a valid configuration from a meaningless
50 # configuration.
51
52 # The goal of this file is to map all the various variations of a given
53 # machine specification into a single specification in the form:
54 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
55 # or in some cases, the newer four-part form:
56 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
57 # It is wrong to echo any other type of specification.
58
59 me=`echo "$0" | sed -e 's,.*/,,'`
60
61 usage="\
62 Usage: $0 [OPTION] CPU-MFR-OPSYS
63 $0 [OPTION] ALIAS
64
65 Canonicalize a configuration name.
66
67 Operation modes:
68 -h, --help print this help, then exit
69 -t, --time-stamp print date of last modification, then exit
70 -v, --version print version number, then exit
71
72 Report bugs and patches to <config-patches@gnu.org>."
73
74 version="\
75 GNU config.sub ($timestamp)
76
77 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
78 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
79 Software Foundation, Inc.
80
81 This is free software; see the source for copying conditions. There is NO
82 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
83
84 help="
85 Try \`$me --help' for more information."
86
87 # Parse command line
88 while test $# -gt 0 ; do
89 case $1 in
90 --time-stamp | --time* | -t )
91 echo "$timestamp" ; exit ;;
92 --version | -v )
93 echo "$version" ; exit ;;
94 --help | --h* | -h )
95 echo "$usage"; exit ;;
96 -- ) # Stop option processing
97 shift; break ;;
98 - ) # Use stdin as input.
99 break ;;
100 -* )
101 echo "$me: invalid option $1$help"
102 exit 1 ;;
103
104 *local*)
105 # First pass through any local machine types.
106 echo $1
107 exit ;;
108
109 * )
110 break ;;
111 esac
112 done
113
114 case $# in
115 0) echo "$me: missing argument$help" >&2
116 exit 1;;
117 1) ;;
118 *) echo "$me: too many arguments$help" >&2
119 exit 1;;
120 esac
121
122 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
123 # Here we must recognize all the valid KERNEL-OS combinations.
124 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
125 case $maybe_os in
126 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
127 linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
128 knetbsd*-gnu* | netbsd*-gnu* | \
129 kopensolaris*-gnu* | \
130 storm-chaos* | os2-emx* | rtmk-nova*)
131 os=-$maybe_os
132 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
133 ;;
134 *)
135 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
136 if [ $basic_machine != $1 ]
137 then os=`echo $1 | sed 's/.*-/-/'`
138 else os=; fi
139 ;;
140 esac
141
142 ### Let's recognize common machines as not being operating systems so
143 ### that things like config.sub decstation-3100 work. We also
144 ### recognize some manufacturers as not being operating systems, so we
145 ### can provide default operating systems below.
146 case $os in
147 -sun*os*)
148 # Prevent following clause from handling this invalid input.
149 ;;
150 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
151 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
152 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
153 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
154 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
155 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
156 -apple | -axis | -knuth | -cray | -microblaze)
157 os=
158 basic_machine=$1
159 ;;
160 -bluegene*)
161 os=-cnk
162 ;;
163 -sim | -cisco | -oki | -wec | -winbond)
164 os=
165 basic_machine=$1
166 ;;
167 -scout)
168 ;;
169 -wrs)
170 os=-vxworks
171 basic_machine=$1
172 ;;
173 -chorusos*)
174 os=-chorusos
175 basic_machine=$1
176 ;;
177 -chorusrdb)
178 os=-chorusrdb
179 basic_machine=$1
180 ;;
181 -hiux*)
182 os=-hiuxwe2
183 ;;
184 -sco6)
185 os=-sco5v6
186 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
187 ;;
188 -sco5)
189 os=-sco3.2v5
190 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
191 ;;
192 -sco4)
193 os=-sco3.2v4
194 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
195 ;;
196 -sco3.2.[4-9]*)
197 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
198 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
199 ;;
200 -sco3.2v[4-9]*)
201 # Don't forget version if it is 3.2v4 or newer.
202 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
203 ;;
204 -sco5v6*)
205 # Don't forget version if it is 3.2v4 or newer.
206 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
207 ;;
208 -sco*)
209 os=-sco3.2v2
210 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
211 ;;
212 -udk*)
213 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
214 ;;
215 -isc)
216 os=-isc2.2
217 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
218 ;;
219 -clix*)
220 basic_machine=clipper-intergraph
221 ;;
222 -isc*)
223 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
224 ;;
225 -lynx*)
226 os=-lynxos
227 ;;
228 -ptx*)
229 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
230 ;;
231 -windowsnt*)
232 os=`echo $os | sed -e 's/windowsnt/winnt/'`
233 ;;
234 -psos*)
235 os=-psos
236 ;;
237 -mint | -mint[0-9]*)
238 basic_machine=m68k-atari
239 os=-mint
240 ;;
241 esac
242
243 # Decode aliases for certain CPU-COMPANY combinations.
244 case $basic_machine in
245 # Recognize the basic CPU types without company name.
246 # Some are omitted here because they have special meanings below.
247 1750a | 580 \
248 | a29k \
249 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
250 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
251 | am33_2.0 \
252 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
253 | be32 | be64 \
254 | bfin \
255 | c4x | clipper \
256 | d10v | d30v | dlx | dsp16xx \
257 | fido | fr30 | frv \
258 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
259 | i370 | i860 | i960 | ia64 \
260 | ip2k | iq2000 \
261 | le32 | le64 \
262 | lm32 \
263 | m32c | m32r | m32rle | m68000 | m68k | m88k \
264 | maxq | mb | microblaze | mcore | mep | metag \
265 | mips | mipsbe | mipseb | mipsel | mipsle \
266 | mips16 \
267 | mips64 | mips64el \
268 | mips64octeon | mips64octeonel \
269 | mips64orion | mips64orionel \
270 | mips64r5900 | mips64r5900el \
271 | mips64vr | mips64vrel \
272 | mips64vr4100 | mips64vr4100el \
273 | mips64vr4300 | mips64vr4300el \
274 | mips64vr5000 | mips64vr5000el \
275 | mips64vr5900 | mips64vr5900el \
276 | mipsisa32 | mipsisa32el \
277 | mipsisa32r2 | mipsisa32r2el \
278 | mipsisa64 | mipsisa64el \
279 | mipsisa64r2 | mipsisa64r2el \
280 | mipsisa64sb1 | mipsisa64sb1el \
281 | mipsisa64sr71k | mipsisa64sr71kel \
282 | mipstx39 | mipstx39el \
283 | mn10200 | mn10300 \
284 | moxie \
285 | mt \
286 | msp430 \
287 | nds32 | nds32le | nds32be \
288 | nios | nios2 \
289 | ns16k | ns32k \
290 | open8 \
291 | or32 \
292 | pdp10 | pdp11 | pj | pjl \
293 | powerpc | powerpc64 | powerpc64le | powerpcle \
294 | pyramid \
295 | rx \
296 | score \
297 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
298 | sh64 | sh64le \
299 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
300 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
301 | spu \
302 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
303 | ubicom32 \
304 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
305 | we32k \
306 | x86 | xc16x | xstormy16 | xtensa \
307 | z8k | z80)
308 basic_machine=$basic_machine-unknown
309 ;;
310 c54x)
311 basic_machine=tic54x-unknown
312 ;;
313 c55x)
314 basic_machine=tic55x-unknown
315 ;;
316 c6x)
317 basic_machine=tic6x-unknown
318 ;;
319 m6811 | m68hc11 | m6812 | m68hc12 | picochip)
320 # Motorola 68HC11/12.
321 basic_machine=$basic_machine-unknown
322 os=-none
323 ;;
324 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
325 ;;
326 ms1)
327 basic_machine=mt-unknown
328 ;;
329
330 strongarm | thumb | xscale)
331 basic_machine=arm-unknown
332 ;;
333
334 xscaleeb)
335 basic_machine=armeb-unknown
336 ;;
337
338 xscaleel)
339 basic_machine=armel-unknown
340 ;;
341
342 # We use `pc' rather than `unknown'
343 # because (1) that's what they normally are, and
344 # (2) the word "unknown" tends to confuse beginning users.
345 i*86 | x86_64)
346 basic_machine=$basic_machine-pc
347 ;;
348 # Object if more than one company name word.
349 *-*-*)
350 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
351 exit 1
352 ;;
353 # Recognize the basic CPU types with company name.
354 580-* \
355 | a29k-* \
356 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
357 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
358 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
359 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
360 | avr-* | avr32-* \
361 | be32-* | be64-* \
362 | bfin-* | bs2000-* \
363 | c[123]* | c30-* | [cjt]90-* | c4x-* \
364 | clipper-* | craynv-* | cydra-* \
365 | d10v-* | d30v-* | dlx-* \
366 | elxsi-* \
367 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
368 | h8300-* | h8500-* \
369 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
370 | i*86-* | i860-* | i960-* | ia64-* \
371 | ip2k-* | iq2000-* \
372 | le32-* | le64-* \
373 | lm32-* \
374 | m32c-* | m32r-* | m32rle-* \
375 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
376 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
377 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
378 | mips16-* \
379 | mips64-* | mips64el-* \
380 | mips64octeon-* | mips64octeonel-* \
381 | mips64orion-* | mips64orionel-* \
382 | mips64r5900-* | mips64r5900el-* \
383 | mips64vr-* | mips64vrel-* \
384 | mips64vr4100-* | mips64vr4100el-* \
385 | mips64vr4300-* | mips64vr4300el-* \
386 | mips64vr5000-* | mips64vr5000el-* \
387 | mips64vr5900-* | mips64vr5900el-* \
388 | mipsisa32-* | mipsisa32el-* \
389 | mipsisa32r2-* | mipsisa32r2el-* \
390 | mipsisa64-* | mipsisa64el-* \
391 | mipsisa64r2-* | mipsisa64r2el-* \
392 | mipsisa64sb1-* | mipsisa64sb1el-* \
393 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
394 | mipstx39-* | mipstx39el-* \
395 | mmix-* \
396 | mt-* \
397 | msp430-* \
398 | nds32-* | nds32le-* | nds32be-* \
399 | nios-* | nios2-* \
400 | none-* | np1-* | ns16k-* | ns32k-* \
401 | open8-* \
402 | orion-* \
403 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
404 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
405 | pyramid-* \
406 | romp-* | rs6000-* | rx-* \
407 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
408 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
409 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
410 | sparclite-* \
411 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
412 | tahoe-* \
413 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
414 | tile*-* \
415 | tron-* \
416 | ubicom32-* \
417 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
418 | vax-* \
419 | we32k-* \
420 | x86-* | x86_64-* | xc16x-* | xps100-* \
421 | xstormy16-* | xtensa*-* \
422 | ymp-* \
423 | z8k-* | z80-*)
424 ;;
425 # Recognize the basic CPU types without company name, with glob match.
426 xtensa*)
427 basic_machine=$basic_machine-unknown
428 ;;
429 # Recognize the various machine names and aliases which stand
430 # for a CPU type and a company and sometimes even an OS.
431 386bsd)
432 basic_machine=i386-unknown
433 os=-bsd
434 ;;
435 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
436 basic_machine=m68000-att
437 ;;
438 3b*)
439 basic_machine=we32k-att
440 ;;
441 a29khif)
442 basic_machine=a29k-amd
443 os=-udi
444 ;;
445 abacus)
446 basic_machine=abacus-unknown
447 ;;
448 adobe68k)
449 basic_machine=m68010-adobe
450 os=-scout
451 ;;
452 alliant | fx80)
453 basic_machine=fx80-alliant
454 ;;
455 altos | altos3068)
456 basic_machine=m68k-altos
457 ;;
458 am29k)
459 basic_machine=a29k-none
460 os=-bsd
461 ;;
462 amd64)
463 basic_machine=x86_64-pc
464 ;;
465 amd64-*)
466 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
467 ;;
468 amdahl)
469 basic_machine=580-amdahl
470 os=-sysv
471 ;;
472 amiga | amiga-*)
473 basic_machine=m68k-unknown
474 ;;
475 amigaos | amigados)
476 basic_machine=m68k-unknown
477 os=-amigaos
478 ;;
479 amigaunix | amix)
480 basic_machine=m68k-unknown
481 os=-sysv4
482 ;;
483 apollo68)
484 basic_machine=m68k-apollo
485 os=-sysv
486 ;;
487 apollo68bsd)
488 basic_machine=m68k-apollo
489 os=-bsd
490 ;;
491 aros)
492 basic_machine=i386-pc
493 os=-aros
494 ;;
495 aux)
496 basic_machine=m68k-apple
497 os=-aux
498 ;;
499 balance)
500 basic_machine=ns32k-sequent
501 os=-dynix
502 ;;
503 blackfin)
504 basic_machine=bfin-unknown
505 os=-linux
506 ;;
507 blackfin-*)
508 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
509 os=-linux
510 ;;
511 bluegene*)
512 basic_machine=powerpc-ibm
513 os=-cnk
514 ;;
515 c54x-*)
516 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
517 ;;
518 c55x-*)
519 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
520 ;;
521 c6x-*)
522 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
523 ;;
524 c90)
525 basic_machine=c90-cray
526 os=-unicos
527 ;;
528 cegcc)
529 basic_machine=arm-unknown
530 os=-cegcc
531 ;;
532 convex-c1)
533 basic_machine=c1-convex
534 os=-bsd
535 ;;
536 convex-c2)
537 basic_machine=c2-convex
538 os=-bsd
539 ;;
540 convex-c32)
541 basic_machine=c32-convex
542 os=-bsd
543 ;;
544 convex-c34)
545 basic_machine=c34-convex
546 os=-bsd
547 ;;
548 convex-c38)
549 basic_machine=c38-convex
550 os=-bsd
551 ;;
552 cray | j90)
553 basic_machine=j90-cray
554 os=-unicos
555 ;;
556 craynv)
557 basic_machine=craynv-cray
558 os=-unicosmp
559 ;;
560 cr16 | cr16-*)
561 basic_machine=cr16-unknown
562 os=-elf
563 ;;
564 crds | unos)
565 basic_machine=m68k-crds
566 ;;
567 crisv32 | crisv32-* | etraxfs*)
568 basic_machine=crisv32-axis
569 ;;
570 cris | cris-* | etrax*)
571 basic_machine=cris-axis
572 ;;
573 crx)
574 basic_machine=crx-unknown
575 os=-elf
576 ;;
577 da30 | da30-*)
578 basic_machine=m68k-da30
579 ;;
580 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
581 basic_machine=mips-dec
582 ;;
583 decsystem10* | dec10*)
584 basic_machine=pdp10-dec
585 os=-tops10
586 ;;
587 decsystem20* | dec20*)
588 basic_machine=pdp10-dec
589 os=-tops20
590 ;;
591 delta | 3300 | motorola-3300 | motorola-delta \
592 | 3300-motorola | delta-motorola)
593 basic_machine=m68k-motorola
594 ;;
595 delta88)
596 basic_machine=m88k-motorola
597 os=-sysv3
598 ;;
599 dicos)
600 basic_machine=i686-pc
601 os=-dicos
602 ;;
603 djgpp)
604 basic_machine=i586-pc
605 os=-msdosdjgpp
606 ;;
607 dpx20 | dpx20-*)
608 basic_machine=rs6000-bull
609 os=-bosx
610 ;;
611 dpx2* | dpx2*-bull)
612 basic_machine=m68k-bull
613 os=-sysv3
614 ;;
615 ebmon29k)
616 basic_machine=a29k-amd
617 os=-ebmon
618 ;;
619 elxsi)
620 basic_machine=elxsi-elxsi
621 os=-bsd
622 ;;
623 encore | umax | mmax)
624 basic_machine=ns32k-encore
625 ;;
626 es1800 | OSE68k | ose68k | ose | OSE)
627 basic_machine=m68k-ericsson
628 os=-ose
629 ;;
630 fx2800)
631 basic_machine=i860-alliant
632 ;;
633 genix)
634 basic_machine=ns32k-ns
635 ;;
636 gmicro)
637 basic_machine=tron-gmicro
638 os=-sysv
639 ;;
640 go32)
641 basic_machine=i386-pc
642 os=-go32
643 ;;
644 h3050r* | hiux*)
645 basic_machine=hppa1.1-hitachi
646 os=-hiuxwe2
647 ;;
648 h8300hms)
649 basic_machine=h8300-hitachi
650 os=-hms
651 ;;
652 h8300xray)
653 basic_machine=h8300-hitachi
654 os=-xray
655 ;;
656 h8500hms)
657 basic_machine=h8500-hitachi
658 os=-hms
659 ;;
660 harris)
661 basic_machine=m88k-harris
662 os=-sysv3
663 ;;
664 hp300-*)
665 basic_machine=m68k-hp
666 ;;
667 hp300bsd)
668 basic_machine=m68k-hp
669 os=-bsd
670 ;;
671 hp300hpux)
672 basic_machine=m68k-hp
673 os=-hpux
674 ;;
675 hp3k9[0-9][0-9] | hp9[0-9][0-9])
676 basic_machine=hppa1.0-hp
677 ;;
678 hp9k2[0-9][0-9] | hp9k31[0-9])
679 basic_machine=m68000-hp
680 ;;
681 hp9k3[2-9][0-9])
682 basic_machine=m68k-hp
683 ;;
684 hp9k6[0-9][0-9] | hp6[0-9][0-9])
685 basic_machine=hppa1.0-hp
686 ;;
687 hp9k7[0-79][0-9] | hp7[0-79][0-9])
688 basic_machine=hppa1.1-hp
689 ;;
690 hp9k78[0-9] | hp78[0-9])
691 # FIXME: really hppa2.0-hp
692 basic_machine=hppa1.1-hp
693 ;;
694 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
695 # FIXME: really hppa2.0-hp
696 basic_machine=hppa1.1-hp
697 ;;
698 hp9k8[0-9][13679] | hp8[0-9][13679])
699 basic_machine=hppa1.1-hp
700 ;;
701 hp9k8[0-9][0-9] | hp8[0-9][0-9])
702 basic_machine=hppa1.0-hp
703 ;;
704 hppa-next)
705 os=-nextstep3
706 ;;
707 hppaosf)
708 basic_machine=hppa1.1-hp
709 os=-osf
710 ;;
711 hppro)
712 basic_machine=hppa1.1-hp
713 os=-proelf
714 ;;
715 i370-ibm* | ibm*)
716 basic_machine=i370-ibm
717 ;;
718 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
719 i*86v32)
720 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
721 os=-sysv32
722 ;;
723 i*86v4*)
724 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
725 os=-sysv4
726 ;;
727 i*86v)
728 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
729 os=-sysv
730 ;;
731 i*86sol2)
732 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
733 os=-solaris2
734 ;;
735 i386mach)
736 basic_machine=i386-mach
737 os=-mach
738 ;;
739 i386-vsta | vsta)
740 basic_machine=i386-unknown
741 os=-vsta
742 ;;
743 iris | iris4d)
744 basic_machine=mips-sgi
745 case $os in
746 -irix*)
747 ;;
748 *)
749 os=-irix4
750 ;;
751 esac
752 ;;
753 isi68 | isi)
754 basic_machine=m68k-isi
755 os=-sysv
756 ;;
757 m68knommu)
758 basic_machine=m68k-unknown
759 os=-linux
760 ;;
761 m68knommu-*)
762 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
763 os=-linux
764 ;;
765 m88k-omron*)
766 basic_machine=m88k-omron
767 ;;
768 magnum | m3230)
769 basic_machine=mips-mips
770 os=-sysv
771 ;;
772 merlin)
773 basic_machine=ns32k-utek
774 os=-sysv
775 ;;
776 microblaze)
777 basic_machine=microblaze-xilinx
778 ;;
779 mingw32)
780 basic_machine=i386-pc
781 os=-mingw32
782 ;;
783 mingw32ce)
784 basic_machine=arm-unknown
785 os=-mingw32ce
786 ;;
787 miniframe)
788 basic_machine=m68000-convergent
789 ;;
790 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
791 basic_machine=m68k-atari
792 os=-mint
793 ;;
794 mips3*-*)
795 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
796 ;;
797 mips3*)
798 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
799 ;;
800 monitor)
801 basic_machine=m68k-rom68k
802 os=-coff
803 ;;
804 morphos)
805 basic_machine=powerpc-unknown
806 os=-morphos
807 ;;
808 msdos)
809 basic_machine=i386-pc
810 os=-msdos
811 ;;
812 ms1-*)
813 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
814 ;;
815 mvs)
816 basic_machine=i370-ibm
817 os=-mvs
818 ;;
819 nacl)
820 basic_machine=le32-unknown
821 os=-nacl
822 ;;
823 ncr3000)
824 basic_machine=i486-ncr
825 os=-sysv4
826 ;;
827 netbsd386)
828 basic_machine=i386-unknown
829 os=-netbsd
830 ;;
831 netwinder)
832 basic_machine=armv4l-rebel
833 os=-linux
834 ;;
835 news | news700 | news800 | news900)
836 basic_machine=m68k-sony
837 os=-newsos
838 ;;
839 news1000)
840 basic_machine=m68030-sony
841 os=-newsos
842 ;;
843 news-3600 | risc-news)
844 basic_machine=mips-sony
845 os=-newsos
846 ;;
847 necv70)
848 basic_machine=v70-nec
849 os=-sysv
850 ;;
851 next | m*-next )
852 basic_machine=m68k-next
853 case $os in
854 -nextstep* )
855 ;;
856 -ns2*)
857 os=-nextstep2
858 ;;
859 *)
860 os=-nextstep3
861 ;;
862 esac
863 ;;
864 nh3000)
865 basic_machine=m68k-harris
866 os=-cxux
867 ;;
868 nh[45]000)
869 basic_machine=m88k-harris
870 os=-cxux
871 ;;
872 nindy960)
873 basic_machine=i960-intel
874 os=-nindy
875 ;;
876 mon960)
877 basic_machine=i960-intel
878 os=-mon960
879 ;;
880 nonstopux)
881 basic_machine=mips-compaq
882 os=-nonstopux
883 ;;
884 np1)
885 basic_machine=np1-gould
886 ;;
887 neo-tandem)
888 basic_machine=neo-tandem
889 ;;
890 nse-tandem)
891 basic_machine=nse-tandem
892 ;;
893 nsr-tandem)
894 basic_machine=nsr-tandem
895 ;;
896 op50n-* | op60c-*)
897 basic_machine=hppa1.1-oki
898 os=-proelf
899 ;;
900 openrisc | openrisc-*)
901 basic_machine=or32-unknown
902 ;;
903 os400)
904 basic_machine=powerpc-ibm
905 os=-os400
906 ;;
907 OSE68000 | ose68000)
908 basic_machine=m68000-ericsson
909 os=-ose
910 ;;
911 os68k)
912 basic_machine=m68k-none
913 os=-os68k
914 ;;
915 pa-hitachi)
916 basic_machine=hppa1.1-hitachi
917 os=-hiuxwe2
918 ;;
919 paragon)
920 basic_machine=i860-intel
921 os=-osf
922 ;;
923 parisc)
924 basic_machine=hppa-unknown
925 os=-linux
926 ;;
927 parisc-*)
928 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
929 os=-linux
930 ;;
931 pbd)
932 basic_machine=sparc-tti
933 ;;
934 pbb)
935 basic_machine=m68k-tti
936 ;;
937 pc532 | pc532-*)
938 basic_machine=ns32k-pc532
939 ;;
940 pc98)
941 basic_machine=i386-pc
942 ;;
943 pc98-*)
944 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
945 ;;
946 pentium | p5 | k5 | k6 | nexgen | viac3)
947 basic_machine=i586-pc
948 ;;
949 pentiumpro | p6 | 6x86 | athlon | athlon_*)
950 basic_machine=i686-pc
951 ;;
952 pentiumii | pentium2 | pentiumiii | pentium3)
953 basic_machine=i686-pc
954 ;;
955 pentium4)
956 basic_machine=i786-pc
957 ;;
958 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
959 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
960 ;;
961 pentiumpro-* | p6-* | 6x86-* | athlon-*)
962 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
963 ;;
964 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
965 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
966 ;;
967 pentium4-*)
968 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
969 ;;
970 pn)
971 basic_machine=pn-gould
972 ;;
973 power) basic_machine=power-ibm
974 ;;
975 ppc | ppcbe) basic_machine=powerpc-unknown
976 ;;
977 ppc-* | ppcbe-*)
978 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
979 ;;
980 ppcle | powerpclittle | ppc-le | powerpc-little)
981 basic_machine=powerpcle-unknown
982 ;;
983 ppcle-* | powerpclittle-*)
984 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
985 ;;
986 ppc64) basic_machine=powerpc64-unknown
987 ;;
988 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
989 ;;
990 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
991 basic_machine=powerpc64le-unknown
992 ;;
993 ppc64le-* | powerpc64little-*)
994 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
995 ;;
996 ps2)
997 basic_machine=i386-ibm
998 ;;
999 pw32)
1000 basic_machine=i586-unknown
1001 os=-pw32
1002 ;;
1003 rdos)
1004 basic_machine=i386-pc
1005 os=-rdos
1006 ;;
1007 rom68k)
1008 basic_machine=m68k-rom68k
1009 os=-coff
1010 ;;
1011 rm[46]00)
1012 basic_machine=mips-siemens
1013 ;;
1014 rtpc | rtpc-*)
1015 basic_machine=romp-ibm
1016 ;;
1017 s390 | s390-*)
1018 basic_machine=s390-ibm
1019 ;;
1020 s390x | s390x-*)
1021 basic_machine=s390x-ibm
1022 ;;
1023 sa29200)
1024 basic_machine=a29k-amd
1025 os=-udi
1026 ;;
1027 sb1)
1028 basic_machine=mipsisa64sb1-unknown
1029 ;;
1030 sb1el)
1031 basic_machine=mipsisa64sb1el-unknown
1032 ;;
1033 sde)
1034 basic_machine=mipsisa32-sde
1035 os=-elf
1036 ;;
1037 sei)
1038 basic_machine=mips-sei
1039 os=-seiux
1040 ;;
1041 sequent)
1042 basic_machine=i386-sequent
1043 ;;
1044 sh)
1045 basic_machine=sh-hitachi
1046 os=-hms
1047 ;;
1048 sh5el)
1049 basic_machine=sh5le-unknown
1050 ;;
1051 sh64)
1052 basic_machine=sh64-unknown
1053 ;;
1054 sparclite-wrs | simso-wrs)
1055 basic_machine=sparclite-wrs
1056 os=-vxworks
1057 ;;
1058 sps7)
1059 basic_machine=m68k-bull
1060 os=-sysv2
1061 ;;
1062 spur)
1063 basic_machine=spur-unknown
1064 ;;
1065 st2000)
1066 basic_machine=m68k-tandem
1067 ;;
1068 stratus)
1069 basic_machine=i860-stratus
1070 os=-sysv4
1071 ;;
1072 strongarm-* | thumb-*)
1073 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1074 ;;
1075 sun2)
1076 basic_machine=m68000-sun
1077 ;;
1078 sun2os3)
1079 basic_machine=m68000-sun
1080 os=-sunos3
1081 ;;
1082 sun2os4)
1083 basic_machine=m68000-sun
1084 os=-sunos4
1085 ;;
1086 sun3os3)
1087 basic_machine=m68k-sun
1088 os=-sunos3
1089 ;;
1090 sun3os4)
1091 basic_machine=m68k-sun
1092 os=-sunos4
1093 ;;
1094 sun4os3)
1095 basic_machine=sparc-sun
1096 os=-sunos3
1097 ;;
1098 sun4os4)
1099 basic_machine=sparc-sun
1100 os=-sunos4
1101 ;;
1102 sun4sol2)
1103 basic_machine=sparc-sun
1104 os=-solaris2
1105 ;;
1106 sun3 | sun3-*)
1107 basic_machine=m68k-sun
1108 ;;
1109 sun4)
1110 basic_machine=sparc-sun
1111 ;;
1112 sun386 | sun386i | roadrunner)
1113 basic_machine=i386-sun
1114 ;;
1115 sv1)
1116 basic_machine=sv1-cray
1117 os=-unicos
1118 ;;
1119 symmetry)
1120 basic_machine=i386-sequent
1121 os=-dynix
1122 ;;
1123 t3e)
1124 basic_machine=alphaev5-cray
1125 os=-unicos
1126 ;;
1127 t90)
1128 basic_machine=t90-cray
1129 os=-unicos
1130 ;;
1131 tile*)
1132 basic_machine=$basic_machine-unknown
1133 os=-linux-gnu
1134 ;;
1135 tx39)
1136 basic_machine=mipstx39-unknown
1137 ;;
1138 tx39el)
1139 basic_machine=mipstx39el-unknown
1140 ;;
1141 toad1)
1142 basic_machine=pdp10-xkl
1143 os=-tops20
1144 ;;
1145 tower | tower-32)
1146 basic_machine=m68k-ncr
1147 ;;
1148 tpf)
1149 basic_machine=s390x-ibm
1150 os=-tpf
1151 ;;
1152 udi29k)
1153 basic_machine=a29k-amd
1154 os=-udi
1155 ;;
1156 ultra3)
1157 basic_machine=a29k-nyu
1158 os=-sym1
1159 ;;
1160 v810 | necv810)
1161 basic_machine=v810-nec
1162 os=-none
1163 ;;
1164 vaxv)
1165 basic_machine=vax-dec
1166 os=-sysv
1167 ;;
1168 vms)
1169 basic_machine=vax-dec
1170 os=-vms
1171 ;;
1172 vpp*|vx|vx-*)
1173 basic_machine=f301-fujitsu
1174 ;;
1175 vxworks960)
1176 basic_machine=i960-wrs
1177 os=-vxworks
1178 ;;
1179 vxworks68)
1180 basic_machine=m68k-wrs
1181 os=-vxworks
1182 ;;
1183 vxworks29k)
1184 basic_machine=a29k-wrs
1185 os=-vxworks
1186 ;;
1187 w65*)
1188 basic_machine=w65-wdc
1189 os=-none
1190 ;;
1191 w89k-*)
1192 basic_machine=hppa1.1-winbond
1193 os=-proelf
1194 ;;
1195 xbox)
1196 basic_machine=i686-pc
1197 os=-mingw32
1198 ;;
1199 xps | xps100)
1200 basic_machine=xps100-honeywell
1201 ;;
1202 xscale-* | xscalee[bl]-*)
1203 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1204 ;;
1205 ymp)
1206 basic_machine=ymp-cray
1207 os=-unicos
1208 ;;
1209 z8k-*-coff)
1210 basic_machine=z8k-unknown
1211 os=-sim
1212 ;;
1213 z80-*-coff)
1214 basic_machine=z80-unknown
1215 os=-sim
1216 ;;
1217 none)
1218 basic_machine=none-none
1219 os=-none
1220 ;;
1221
1222 # Here we handle the default manufacturer of certain CPU types. It is in
1223 # some cases the only manufacturer, in others, it is the most popular.
1224 w89k)
1225 basic_machine=hppa1.1-winbond
1226 ;;
1227 op50n)
1228 basic_machine=hppa1.1-oki
1229 ;;
1230 op60c)
1231 basic_machine=hppa1.1-oki
1232 ;;
1233 romp)
1234 basic_machine=romp-ibm
1235 ;;
1236 mmix)
1237 basic_machine=mmix-knuth
1238 ;;
1239 rs6000)
1240 basic_machine=rs6000-ibm
1241 ;;
1242 vax)
1243 basic_machine=vax-dec
1244 ;;
1245 pdp10)
1246 # there are many clones, so DEC is not a safe bet
1247 basic_machine=pdp10-unknown
1248 ;;
1249 pdp11)
1250 basic_machine=pdp11-dec
1251 ;;
1252 we32k)
1253 basic_machine=we32k-att
1254 ;;
1255 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1256 basic_machine=sh-unknown
1257 ;;
1258 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1259 basic_machine=sparc-sun
1260 ;;
1261 cydra)
1262 basic_machine=cydra-cydrome
1263 ;;
1264 orion)
1265 basic_machine=orion-highlevel
1266 ;;
1267 orion105)
1268 basic_machine=clipper-highlevel
1269 ;;
1270 mac | mpw | mac-mpw)
1271 basic_machine=m68k-apple
1272 ;;
1273 pmac | pmac-mpw)
1274 basic_machine=powerpc-apple
1275 ;;
1276 *-unknown)
1277 # Make sure to match an already-canonicalized machine name.
1278 ;;
1279 *)
1280 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1281 exit 1
1282 ;;
1283 esac
1284
1285 # Here we canonicalize certain aliases for manufacturers.
1286 case $basic_machine in
1287 *-digital*)
1288 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1289 ;;
1290 *-commodore*)
1291 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1292 ;;
1293 *)
1294 ;;
1295 esac
1296
1297 # Decode manufacturer-specific aliases for certain operating systems.
1298
1299 if [ x"$os" != x"" ]
1300 then
1301 case $os in
1302 # First match some system type aliases
1303 # that might get confused with valid system types.
1304 # -solaris* is a basic system type, with this one exception.
1305 -auroraux)
1306 os=-auroraux
1307 ;;
1308 -solaris1 | -solaris1.*)
1309 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1310 ;;
1311 -solaris)
1312 os=-solaris2
1313 ;;
1314 -svr4*)
1315 os=-sysv4
1316 ;;
1317 -unixware*)
1318 os=-sysv4.2uw
1319 ;;
1320 -gnu/linux*)
1321 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1322 ;;
1323 # First accept the basic system types.
1324 # The portable systems comes first.
1325 # Each alternative MUST END IN A *, to match a version number.
1326 # -sysv* is not here because it comes later, after sysvr4.
1327 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1328 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1329 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1330 | -sym* | -kopensolaris* \
1331 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1332 | -aos* | -aros* \
1333 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1334 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1335 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1336 | -openbsd* | -solidbsd* \
1337 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1338 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1339 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1340 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1341 | -chorusos* | -chorusrdb* | -cegcc* \
1342 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1343 | -mingw32* | -linux-gnu* | -linux-android* \
1344 | -linux-newlib* | -linux-uclibc* \
1345 | -uxpv* | -beos* | -mpeix* | -udk* \
1346 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1347 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1348 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1349 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1350 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1351 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1352 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1353 # Remember, each alternative MUST END IN *, to match a version number.
1354 ;;
1355 -qnx*)
1356 case $basic_machine in
1357 x86-* | i*86-*)
1358 ;;
1359 *)
1360 os=-nto$os
1361 ;;
1362 esac
1363 ;;
1364 -nto-qnx*)
1365 ;;
1366 -nto*)
1367 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1368 ;;
1369 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1370 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1371 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1372 ;;
1373 -mac*)
1374 os=`echo $os | sed -e 's|mac|macos|'`
1375 ;;
1376 -linux-dietlibc)
1377 os=-linux-dietlibc
1378 ;;
1379 -linux*)
1380 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1381 ;;
1382 -sunos5*)
1383 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1384 ;;
1385 -sunos6*)
1386 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1387 ;;
1388 -opened*)
1389 os=-openedition
1390 ;;
1391 -os400*)
1392 os=-os400
1393 ;;
1394 -wince*)
1395 os=-wince
1396 ;;
1397 -osfrose*)
1398 os=-osfrose
1399 ;;
1400 -osf*)
1401 os=-osf
1402 ;;
1403 -utek*)
1404 os=-bsd
1405 ;;
1406 -dynix*)
1407 os=-bsd
1408 ;;
1409 -acis*)
1410 os=-aos
1411 ;;
1412 -atheos*)
1413 os=-atheos
1414 ;;
1415 -syllable*)
1416 os=-syllable
1417 ;;
1418 -386bsd)
1419 os=-bsd
1420 ;;
1421 -ctix* | -uts*)
1422 os=-sysv
1423 ;;
1424 -nova*)
1425 os=-rtmk-nova
1426 ;;
1427 -ns2 )
1428 os=-nextstep2
1429 ;;
1430 -nsk*)
1431 os=-nsk
1432 ;;
1433 # Preserve the version number of sinix5.
1434 -sinix5.*)
1435 os=`echo $os | sed -e 's|sinix|sysv|'`
1436 ;;
1437 -sinix*)
1438 os=-sysv4
1439 ;;
1440 -tpf*)
1441 os=-tpf
1442 ;;
1443 -triton*)
1444 os=-sysv3
1445 ;;
1446 -oss*)
1447 os=-sysv3
1448 ;;
1449 -svr4)
1450 os=-sysv4
1451 ;;
1452 -svr3)
1453 os=-sysv3
1454 ;;
1455 -sysvr4)
1456 os=-sysv4
1457 ;;
1458 # This must come after -sysvr4.
1459 -sysv*)
1460 ;;
1461 -ose*)
1462 os=-ose
1463 ;;
1464 -es1800*)
1465 os=-ose
1466 ;;
1467 -xenix)
1468 os=-xenix
1469 ;;
1470 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1471 os=-mint
1472 ;;
1473 -aros*)
1474 os=-aros
1475 ;;
1476 -kaos*)
1477 os=-kaos
1478 ;;
1479 -zvmoe)
1480 os=-zvmoe
1481 ;;
1482 -dicos*)
1483 os=-dicos
1484 ;;
1485 -nacl*)
1486 ;;
1487 -none)
1488 ;;
1489 *)
1490 # Get rid of the `-' at the beginning of $os.
1491 os=`echo $os | sed 's/[^-]*-//'`
1492 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1493 exit 1
1494 ;;
1495 esac
1496 else
1497
1498 # Here we handle the default operating systems that come with various machines.
1499 # The value should be what the vendor currently ships out the door with their
1500 # machine or put another way, the most popular os provided with the machine.
1501
1502 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1503 # "-sun"), then you have to tell the case statement up towards the top
1504 # that MANUFACTURER isn't an operating system. Otherwise, code above
1505 # will signal an error saying that MANUFACTURER isn't an operating
1506 # system, and we'll never get to this point.
1507
1508 case $basic_machine in
1509 score-*)
1510 os=-elf
1511 ;;
1512 spu-*)
1513 os=-elf
1514 ;;
1515 *-acorn)
1516 os=-riscix1.2
1517 ;;
1518 arm*-rebel)
1519 os=-linux
1520 ;;
1521 arm*-semi)
1522 os=-aout
1523 ;;
1524 c4x-* | tic4x-*)
1525 os=-coff
1526 ;;
1527 tic54x-*)
1528 os=-coff
1529 ;;
1530 tic55x-*)
1531 os=-coff
1532 ;;
1533 tic6x-*)
1534 os=-coff
1535 ;;
1536 # This must come before the *-dec entry.
1537 pdp10-*)
1538 os=-tops20
1539 ;;
1540 pdp11-*)
1541 os=-none
1542 ;;
1543 *-dec | vax-*)
1544 os=-ultrix4.2
1545 ;;
1546 m68*-apollo)
1547 os=-domain
1548 ;;
1549 i386-sun)
1550 os=-sunos4.0.2
1551 ;;
1552 m68000-sun)
1553 os=-sunos3
1554 # This also exists in the configure program, but was not the
1555 # default.
1556 # os=-sunos4
1557 ;;
1558 m68*-cisco)
1559 os=-aout
1560 ;;
1561 mep-*)
1562 os=-elf
1563 ;;
1564 mips*-cisco)
1565 os=-elf
1566 ;;
1567 mips*-*)
1568 os=-elf
1569 ;;
1570 or32-*)
1571 os=-coff
1572 ;;
1573 *-tti) # must be before sparc entry or we get the wrong os.
1574 os=-sysv3
1575 ;;
1576 sparc-* | *-sun)
1577 os=-sunos4.1.1
1578 ;;
1579 *-be)
1580 os=-beos
1581 ;;
1582 *-haiku)
1583 os=-haiku
1584 ;;
1585 *-ibm)
1586 os=-aix
1587 ;;
1588 *-knuth)
1589 os=-mmixware
1590 ;;
1591 *-wec)
1592 os=-proelf
1593 ;;
1594 *-winbond)
1595 os=-proelf
1596 ;;
1597 *-oki)
1598 os=-proelf
1599 ;;
1600 *-hp)
1601 os=-hpux
1602 ;;
1603 *-hitachi)
1604 os=-hiux
1605 ;;
1606 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1607 os=-sysv
1608 ;;
1609 *-cbm)
1610 os=-amigaos
1611 ;;
1612 *-dg)
1613 os=-dgux
1614 ;;
1615 *-dolphin)
1616 os=-sysv3
1617 ;;
1618 m68k-ccur)
1619 os=-rtu
1620 ;;
1621 m88k-omron*)
1622 os=-luna
1623 ;;
1624 *-next )
1625 os=-nextstep
1626 ;;
1627 *-sequent)
1628 os=-ptx
1629 ;;
1630 *-crds)
1631 os=-unos
1632 ;;
1633 *-ns)
1634 os=-genix
1635 ;;
1636 i370-*)
1637 os=-mvs
1638 ;;
1639 *-next)
1640 os=-nextstep3
1641 ;;
1642 *-gould)
1643 os=-sysv
1644 ;;
1645 *-highlevel)
1646 os=-bsd
1647 ;;
1648 *-encore)
1649 os=-bsd
1650 ;;
1651 *-sgi)
1652 os=-irix
1653 ;;
1654 *-siemens)
1655 os=-sysv4
1656 ;;
1657 *-masscomp)
1658 os=-rtu
1659 ;;
1660 f30[01]-fujitsu | f700-fujitsu)
1661 os=-uxpv
1662 ;;
1663 *-rom68k)
1664 os=-coff
1665 ;;
1666 *-*bug)
1667 os=-coff
1668 ;;
1669 *-apple)
1670 os=-macos
1671 ;;
1672 *-atari*)
1673 os=-mint
1674 ;;
1675 *)
1676 os=-none
1677 ;;
1678 esac
1679 fi
1680
1681 # Here we handle the case where we know the os, and the CPU type, but not the
1682 # manufacturer. We pick the logical manufacturer.
1683 vendor=unknown
1684 case $basic_machine in
1685 *-unknown)
1686 case $os in
1687 -riscix*)
1688 vendor=acorn
1689 ;;
1690 -sunos*)
1691 vendor=sun
1692 ;;
1693 -cnk*|-aix*)
1694 vendor=ibm
1695 ;;
1696 -beos*)
1697 vendor=be
1698 ;;
1699 -hpux*)
1700 vendor=hp
1701 ;;
1702 -mpeix*)
1703 vendor=hp
1704 ;;
1705 -hiux*)
1706 vendor=hitachi
1707 ;;
1708 -unos*)
1709 vendor=crds
1710 ;;
1711 -dgux*)
1712 vendor=dg
1713 ;;
1714 -luna*)
1715 vendor=omron
1716 ;;
1717 -genix*)
1718 vendor=ns
1719 ;;
1720 -mvs* | -opened*)
1721 vendor=ibm
1722 ;;
1723 -os400*)
1724 vendor=ibm
1725 ;;
1726 -ptx*)
1727 vendor=sequent
1728 ;;
1729 -tpf*)
1730 vendor=ibm
1731 ;;
1732 -vxsim* | -vxworks* | -windiss*)
1733 vendor=wrs
1734 ;;
1735 -aux*)
1736 vendor=apple
1737 ;;
1738 -hms*)
1739 vendor=hitachi
1740 ;;
1741 -mpw* | -macos*)
1742 vendor=apple
1743 ;;
1744 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1745 vendor=atari
1746 ;;
1747 -vos*)
1748 vendor=stratus
1749 ;;
1750 esac
1751 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1752 ;;
1753 esac
1754
1755 echo $basic_machine$os
1756 exit
1757
1758 # Local variables:
1759 # eval: (add-hook 'write-file-hooks 'time-stamp)
1760 # time-stamp-start: "timestamp='"
1761 # time-stamp-format: "%:y-%02m-%02d"
1762 # time-stamp-end: "'"
1763 # End:
+0
-423
config/depcomp less more
0 #! /bin/sh
1
2 # depcomp - compile a program generating dependencies as side-effects
3 # Copyright 1999, 2000 Free Software Foundation, Inc.
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
8 # any later version.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 # 02111-1307, USA.
19
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that program.
24
25 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
26
27 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
28 echo "depcomp: Variables source, object and depmode must be set" 1>&2
29 exit 1
30 fi
31 # `libtool' can also be set to `yes' or `no'.
32
33 if test -z "$depfile"; then
34 base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
35 dir=`echo "$object" | sed 's,/.*$,/,'`
36 if test "$dir" = "$object"; then
37 dir=
38 fi
39 # FIXME: should be _deps on DOS.
40 depfile="$dir.deps/$base"
41 fi
42
43 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
44
45 rm -f "$tmpdepfile"
46
47 # Some modes work just like other modes, but use different flags. We
48 # parameterize here, but still list the modes in the big case below,
49 # to make depend.m4 easier to write. Note that we *cannot* use a case
50 # here, because this file can only contain one case statement.
51 if test "$depmode" = hp; then
52 # HP compiler uses -M and no extra arg.
53 gccflag=-M
54 depmode=gcc
55 fi
56
57 if test "$depmode" = dashXmstdout; then
58 # This is just like dashmstdout with a different argument.
59 dashmflag=-xM
60 depmode=dashmstdout
61 fi
62
63 case "$depmode" in
64 gcc3)
65 ## gcc 3 implements dependency tracking that does exactly what
66 ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
67 ## it if -MD -MP comes after the -MF stuff. Hmm.
68 "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
69 stat=$?
70 if test $stat -eq 0; then :
71 else
72 rm -f "$tmpdepfile"
73 exit $stat
74 fi
75 mv "$tmpdepfile" "$depfile"
76 ;;
77
78 gcc)
79 ## There are various ways to get dependency output from gcc. Here's
80 ## why we pick this rather obscure method:
81 ## - Don't want to use -MD because we'd like the dependencies to end
82 ## up in a subdir. Having to rename by hand is ugly.
83 ## (We might end up doing this anyway to support other compilers.)
84 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
85 ## -MM, not -M (despite what the docs say).
86 ## - Using -M directly means running the compiler twice (even worse
87 ## than renaming).
88 if test -z "$gccflag"; then
89 gccflag=-MD,
90 fi
91 "$@" -Wp,"$gccflag$tmpdepfile"
92 stat=$?
93 if test $stat -eq 0; then :
94 else
95 rm -f "$tmpdepfile"
96 exit $stat
97 fi
98 rm -f "$depfile"
99 echo "$object : \\" > "$depfile"
100 alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
101 ## The second -e expression handles DOS-style file names with drive letters.
102 sed -e 's/^[^:]*: / /' \
103 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
104 ## This next piece of magic avoids the `deleted header file' problem.
105 ## The problem is that when a header file which appears in a .P file
106 ## is deleted, the dependency causes make to die (because there is
107 ## typically no way to rebuild the header). We avoid this by adding
108 ## dummy dependencies for each header file. Too bad gcc doesn't do
109 ## this for us directly.
110 tr ' ' '
111 ' < "$tmpdepfile" |
112 ## Some versions of gcc put a space before the `:'. On the theory
113 ## that the space means something, we add a space to the output as
114 ## well.
115 ## Some versions of the HPUX 10.20 sed can't process this invocation
116 ## correctly. Breaking it into two sed invocations is a workaround.
117 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
118 rm -f "$tmpdepfile"
119 ;;
120
121 hp)
122 # This case exists only to let depend.m4 do its work. It works by
123 # looking at the text of this script. This case will never be run,
124 # since it is checked for above.
125 exit 1
126 ;;
127
128 sgi)
129 if test "$libtool" = yes; then
130 "$@" "-Wp,-MDupdate,$tmpdepfile"
131 else
132 "$@" -MDupdate "$tmpdepfile"
133 fi
134 stat=$?
135 if test $stat -eq 0; then :
136 else
137 rm -f "$tmpdepfile"
138 exit $stat
139 fi
140 rm -f "$depfile"
141
142 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
143 echo "$object : \\" > "$depfile"
144
145 # Clip off the initial element (the dependent). Don't try to be
146 # clever and replace this with sed code, as IRIX sed won't handle
147 # lines with more than a fixed number of characters (4096 in
148 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
149 # the IRIX cc adds comments like `#:fec' to the end of the
150 # dependency line.
151 tr ' ' '
152 ' < "$tmpdepfile" \
153 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
154 tr '
155 ' ' ' >> $depfile
156 echo >> $depfile
157
158 # The second pass generates a dummy entry for each header file.
159 tr ' ' '
160 ' < "$tmpdepfile" \
161 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
162 >> $depfile
163 else
164 # The sourcefile does not contain any dependencies, so just
165 # store a dummy comment line, to avoid errors with the Makefile
166 # "include basename.Plo" scheme.
167 echo "#dummy" > "$depfile"
168 fi
169 rm -f "$tmpdepfile"
170 ;;
171
172 aix)
173 # The C for AIX Compiler uses -M and outputs the dependencies
174 # in a .u file. This file always lives in the current directory.
175 # Also, the AIX compiler puts `$object:' at the start of each line;
176 # $object doesn't have directory information.
177 stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
178 tmpdepfile="$stripped.u"
179 outname="$stripped.o"
180 if test "$libtool" = yes; then
181 "$@" -Wc,-M
182 else
183 "$@" -M
184 fi
185
186 stat=$?
187 if test $stat -eq 0; then :
188 else
189 rm -f "$tmpdepfile"
190 exit $stat
191 fi
192
193 if test -f "$tmpdepfile"; then
194 # Each line is of the form `foo.o: dependent.h'.
195 # Do two passes, one to just change these to
196 # `$object: dependent.h' and one to simply `dependent.h:'.
197 sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
198 sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
199 else
200 # The sourcefile does not contain any dependencies, so just
201 # store a dummy comment line, to avoid errors with the Makefile
202 # "include basename.Plo" scheme.
203 echo "#dummy" > "$depfile"
204 fi
205 rm -f "$tmpdepfile"
206 ;;
207
208 tru64)
209 # The Tru64 compiler uses -MD to generate dependencies as a side
210 # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
211 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
212 # dependencies in `foo.d' instead, so we check for that too.
213 # Subdirectories are respected.
214 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
215 test "x$dir" = "x$object" && dir=
216 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
217
218 if test "$libtool" = yes; then
219 tmpdepfile1="$dir.libs/$base.lo.d"
220 tmpdepfile2="$dir.libs/$base.d"
221 "$@" -Wc,-MD
222 else
223 tmpdepfile1="$dir$base.o.d"
224 tmpdepfile2="$dir$base.d"
225 "$@" -MD
226 fi
227
228 stat=$?
229 if test $stat -eq 0; then :
230 else
231 rm -f "$tmpdepfile1" "$tmpdepfile2"
232 exit $stat
233 fi
234
235 if test -f "$tmpdepfile1"; then
236 tmpdepfile="$tmpdepfile1"
237 else
238 tmpdepfile="$tmpdepfile2"
239 fi
240 if test -f "$tmpdepfile"; then
241 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
242 # That's a space and a tab in the [].
243 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
244 else
245 echo "#dummy" > "$depfile"
246 fi
247 rm -f "$tmpdepfile"
248 ;;
249
250 #nosideeffect)
251 # This comment above is used by automake to tell side-effect
252 # dependency tracking mechanisms from slower ones.
253
254 dashmstdout)
255 # Important note: in order to support this mode, a compiler *must*
256 # always write the proprocessed file to stdout, regardless of -o.
257 "$@" || exit $?
258
259 # Remove the call to Libtool.
260 if test "$libtool" = yes; then
261 while test $1 != '--mode=compile'; do
262 shift
263 done
264 shift
265 fi
266
267 # Remove `-o $object'. We will use -o /dev/null later,
268 # however we can't do the remplacement now because
269 # `-o $object' might simply not be used
270 IFS=" "
271 for arg
272 do
273 case $arg in
274 -o)
275 shift
276 ;;
277 $object)
278 shift
279 ;;
280 *)
281 set fnord "$@" "$arg"
282 shift # fnord
283 shift # $arg
284 ;;
285 esac
286 done
287
288 test -z "$dashmflag" && dashmflag=-M
289 "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
290 rm -f "$depfile"
291 cat < "$tmpdepfile" > "$depfile"
292 tr ' ' '
293 ' < "$tmpdepfile" | \
294 ## Some versions of the HPUX 10.20 sed can't process this invocation
295 ## correctly. Breaking it into two sed invocations is a workaround.
296 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
297 rm -f "$tmpdepfile"
298 ;;
299
300 dashXmstdout)
301 # This case only exists to satisfy depend.m4. It is never actually
302 # run, as this mode is specially recognized in the preamble.
303 exit 1
304 ;;
305
306 makedepend)
307 "$@" || exit $?
308 # X makedepend
309 shift
310 cleared=no
311 for arg in "$@"; do
312 case $cleared in
313 no)
314 set ""; shift
315 cleared=yes ;;
316 esac
317 case "$arg" in
318 -D*|-I*)
319 set fnord "$@" "$arg"; shift ;;
320 -*)
321 ;;
322 *)
323 set fnord "$@" "$arg"; shift ;;
324 esac
325 done
326 obj_suffix="`echo $object | sed 's/^.*\././'`"
327 touch "$tmpdepfile"
328 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
329 rm -f "$depfile"
330 cat < "$tmpdepfile" > "$depfile"
331 sed '1,2d' "$tmpdepfile" | tr ' ' '
332 ' | \
333 ## Some versions of the HPUX 10.20 sed can't process this invocation
334 ## correctly. Breaking it into two sed invocations is a workaround.
335 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
336 rm -f "$tmpdepfile" "$tmpdepfile".bak
337 ;;
338
339 cpp)
340 # Important note: in order to support this mode, a compiler *must*
341 # always write the proprocessed file to stdout.
342 "$@" || exit $?
343
344 # Remove the call to Libtool.
345 if test "$libtool" = yes; then
346 while test $1 != '--mode=compile'; do
347 shift
348 done
349 shift
350 fi
351
352 # Remove `-o $object'.
353 IFS=" "
354 for arg
355 do
356 case $arg in
357 -o)
358 shift
359 ;;
360 $object)
361 shift
362 ;;
363 *)
364 set fnord "$@" "$arg"
365 shift # fnord
366 shift # $arg
367 ;;
368 esac
369 done
370
371 "$@" -E |
372 sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
373 sed '$ s: \\$::' > "$tmpdepfile"
374 rm -f "$depfile"
375 echo "$object : \\" > "$depfile"
376 cat < "$tmpdepfile" >> "$depfile"
377 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
378 rm -f "$tmpdepfile"
379 ;;
380
381 msvisualcpp)
382 # Important note: in order to support this mode, a compiler *must*
383 # always write the proprocessed file to stdout, regardless of -o,
384 # because we must use -o when running libtool.
385 "$@" || exit $?
386 IFS=" "
387 for arg
388 do
389 case "$arg" in
390 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
391 set fnord "$@"
392 shift
393 shift
394 ;;
395 *)
396 set fnord "$@" "$arg"
397 shift
398 shift
399 ;;
400 esac
401 done
402 "$@" -E |
403 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
404 rm -f "$depfile"
405 echo "$object : \\" > "$depfile"
406 . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
407 echo " " >> "$depfile"
408 . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
409 rm -f "$tmpdepfile"
410 ;;
411
412 none)
413 exec "$@"
414 ;;
415
416 *)
417 echo "Unknown depmode $depmode" 1>&2
418 exit 1
419 ;;
420 esac
421
422 exit 0
+0
-276
config/install-sh less more
0 #!/bin/sh
1 #
2 # install - install a program, script, or datafile
3 # This comes from X11R5 (mit/util/scripts/install.sh).
4 #
5 # Copyright 1991 by the Massachusetts Institute of Technology
6 #
7 # Permission to use, copy, modify, distribute, and sell this software and its
8 # documentation for any purpose is hereby granted without fee, provided that
9 # the above copyright notice appear in all copies and that both that
10 # copyright notice and this permission notice appear in supporting
11 # documentation, and that the name of M.I.T. not be used in advertising or
12 # publicity pertaining to distribution of the software without specific,
13 # written prior permission. M.I.T. makes no representations about the
14 # suitability of this software for any purpose. It is provided "as is"
15 # without express or implied warranty.
16 #
17 # Calling this script install-sh is preferred over install.sh, to prevent
18 # `make' implicit rules from creating a file called install from it
19 # when there is no Makefile.
20 #
21 # This script is compatible with the BSD install script, but was written
22 # from scratch. It can only install one file at a time, a restriction
23 # shared with many OS's install programs.
24
25
26 # set DOITPROG to echo to test this script
27
28 # Don't use :- since 4.3BSD and earlier shells don't like it.
29 doit="${DOITPROG-}"
30
31
32 # put in absolute paths if you don't have them in your path; or use env. vars.
33
34 mvprog="${MVPROG-mv}"
35 cpprog="${CPPROG-cp}"
36 chmodprog="${CHMODPROG-chmod}"
37 chownprog="${CHOWNPROG-chown}"
38 chgrpprog="${CHGRPPROG-chgrp}"
39 stripprog="${STRIPPROG-strip}"
40 rmprog="${RMPROG-rm}"
41 mkdirprog="${MKDIRPROG-mkdir}"
42
43 transformbasename=""
44 transform_arg=""
45 instcmd="$mvprog"
46 chmodcmd="$chmodprog 0755"
47 chowncmd=""
48 chgrpcmd=""
49 stripcmd=""
50 rmcmd="$rmprog -f"
51 mvcmd="$mvprog"
52 src=""
53 dst=""
54 dir_arg=""
55
56 while [ x"$1" != x ]; do
57 case $1 in
58 -c) instcmd=$cpprog
59 shift
60 continue;;
61
62 -d) dir_arg=true
63 shift
64 continue;;
65
66 -m) chmodcmd="$chmodprog $2"
67 shift
68 shift
69 continue;;
70
71 -o) chowncmd="$chownprog $2"
72 shift
73 shift
74 continue;;
75
76 -g) chgrpcmd="$chgrpprog $2"
77 shift
78 shift
79 continue;;
80
81 -s) stripcmd=$stripprog
82 shift
83 continue;;
84
85 -t=*) transformarg=`echo $1 | sed 's/-t=//'`
86 shift
87 continue;;
88
89 -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
90 shift
91 continue;;
92
93 *) if [ x"$src" = x ]
94 then
95 src=$1
96 else
97 # this colon is to work around a 386BSD /bin/sh bug
98 :
99 dst=$1
100 fi
101 shift
102 continue;;
103 esac
104 done
105
106 if [ x"$src" = x ]
107 then
108 echo "$0: no input file specified" >&2
109 exit 1
110 else
111 :
112 fi
113
114 if [ x"$dir_arg" != x ]; then
115 dst=$src
116 src=""
117
118 if [ -d "$dst" ]; then
119 instcmd=:
120 chmodcmd=""
121 else
122 instcmd=$mkdirprog
123 fi
124 else
125
126 # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
127 # might cause directories to be created, which would be especially bad
128 # if $src (and thus $dsttmp) contains '*'.
129
130 if [ -f "$src" ] || [ -d "$src" ]
131 then
132 :
133 else
134 echo "$0: $src does not exist" >&2
135 exit 1
136 fi
137
138 if [ x"$dst" = x ]
139 then
140 echo "$0: no destination specified" >&2
141 exit 1
142 else
143 :
144 fi
145
146 # If destination is a directory, append the input filename; if your system
147 # does not like double slashes in filenames, you may need to add some logic
148
149 if [ -d "$dst" ]
150 then
151 dst=$dst/`basename "$src"`
152 else
153 :
154 fi
155 fi
156
157 ## this sed command emulates the dirname command
158 dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
159
160 # Make sure that the destination directory exists.
161 # this part is taken from Noah Friedman's mkinstalldirs script
162
163 # Skip lots of stat calls in the usual case.
164 if [ ! -d "$dstdir" ]; then
165 defaultIFS='
166 '
167 IFS="${IFS-$defaultIFS}"
168
169 oIFS=$IFS
170 # Some sh's can't handle IFS=/ for some reason.
171 IFS='%'
172 set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
173 IFS=$oIFS
174
175 pathcomp=''
176
177 while [ $# -ne 0 ] ; do
178 pathcomp=$pathcomp$1
179 shift
180
181 if [ ! -d "$pathcomp" ] ;
182 then
183 $mkdirprog "$pathcomp"
184 else
185 :
186 fi
187
188 pathcomp=$pathcomp/
189 done
190 fi
191
192 if [ x"$dir_arg" != x ]
193 then
194 $doit $instcmd "$dst" &&
195
196 if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
197 if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
198 if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
199 if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
200 else
201
202 # If we're going to rename the final executable, determine the name now.
203
204 if [ x"$transformarg" = x ]
205 then
206 dstfile=`basename "$dst"`
207 else
208 dstfile=`basename "$dst" $transformbasename |
209 sed $transformarg`$transformbasename
210 fi
211
212 # don't allow the sed command to completely eliminate the filename
213
214 if [ x"$dstfile" = x ]
215 then
216 dstfile=`basename "$dst"`
217 else
218 :
219 fi
220
221 # Make a couple of temp file names in the proper directory.
222
223 dsttmp=$dstdir/#inst.$$#
224 rmtmp=$dstdir/#rm.$$#
225
226 # Trap to clean up temp files at exit.
227
228 trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
229 trap '(exit $?); exit' 1 2 13 15
230
231 # Move or copy the file name to the temp name
232
233 $doit $instcmd "$src" "$dsttmp" &&
234
235 # and set any options; do chmod last to preserve setuid bits
236
237 # If any of these fail, we abort the whole thing. If we want to
238 # ignore errors from any of these, just make sure not to ignore
239 # errors from the above "$doit $instcmd $src $dsttmp" command.
240
241 if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
242 if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
243 if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
244 if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
245
246 # Now remove or move aside any old file at destination location. We try this
247 # two ways since rm can't unlink itself on some systems and the destination
248 # file might be busy for other reasons. In this case, the final cleanup
249 # might fail but the new file should still install successfully.
250
251 {
252 if [ -f "$dstdir/$dstfile" ]
253 then
254 $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
255 $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
256 {
257 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
258 (exit 1); exit
259 }
260 else
261 :
262 fi
263 } &&
264
265 # Now rename the file to the real destination.
266
267 $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
268
269 fi &&
270
271 # The final little trick to "correctly" pass the exit status to the exit trap.
272
273 {
274 (exit 0); exit
275 }
+0
-153
config/kerberos_v4.m4 less more
0 dnl checking for kerberos 4 libraries (and DES)
1
2 AC_DEFUN([SASL_DES_CHK], [
3 AC_ARG_WITH(des, [ --with-des=DIR with DES (look in DIR) [yes] ],
4 with_des=$withval,
5 with_des=yes)
6
7 LIB_DES=""
8 if test "$with_des" != no; then
9 if test -d $with_des; then
10 CPPFLAGS="$CPPFLAGS -I${with_des}/include"
11 LDFLAGS="$LDFLAGS -L${with_des}/lib"
12 fi
13
14 if test "$with_openssl" != no; then
15 dnl check for openssl installing -lcrypto, then make vanilla check
16 AC_CHECK_LIB(crypto, des_cbc_encrypt, [
17 AC_CHECK_HEADER(openssl/des.h, [AC_DEFINE(WITH_SSL_DES,[],[Use OpenSSL DES Implementation])
18 LIB_DES="-lcrypto";
19 with_des=yes],
20 with_des=no)],
21 with_des=no, $LIB_RSAREF)
22
23 dnl same test again, different symbol name
24 if test "$with_des" = no; then
25 AC_CHECK_LIB(crypto, DES_cbc_encrypt, [
26 AC_CHECK_HEADER(openssl/des.h, [AC_DEFINE(WITH_SSL_DES,[],[Use OpenSSL DES Implementation])
27 LIB_DES="-lcrypto";
28 with_des=yes],
29 with_des=no)],
30 with_des=no, $LIB_RSAREF)
31 fi
32 fi
33
34 if test "$with_des" = no; then
35 AC_CHECK_LIB(des, des_cbc_encrypt, [LIB_DES="-ldes";
36 with_des=yes], with_des=no)
37 fi
38
39 if test "$with_des" = no; then
40 AC_CHECK_LIB(des425, des_cbc_encrypt, [LIB_DES="-ldes425";
41 with_des=yes], with_des=no)
42 fi
43
44 if test "$with_des" = no; then
45 AC_CHECK_LIB(des524, des_cbc_encrypt, [LIB_DES="-ldes524";
46 with_des=yes], with_des=no)
47 fi
48
49 if test "$with_des" = no; then
50 dnl if openssl is around, we might be able to use that for des
51
52 dnl if openssl has been compiled with the rsaref2 libraries,
53 dnl we need to include the rsaref libraries in the crypto check
54 LIB_RSAREF=""
55 AC_CHECK_LIB(rsaref, RSAPublicEncrypt,
56 LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes,
57 cmu_have_rsaref=no)
58
59 AC_CHECK_LIB(crypto, des_cbc_encrypt, [
60 AC_CHECK_HEADER(openssl/des.h, [AC_DEFINE(WITH_SSL_DES,[],[Use OpenSSL DES Implementation])
61 LIB_DES="-lcrypto";
62 with_des=yes],
63 with_des=no)],
64 with_des=no, $LIB_RSAREF)
65 fi
66 fi
67
68 if test "$with_des" != no; then
69 AC_DEFINE(WITH_DES,[],[Use DES])
70 fi
71
72 AC_SUBST(LIB_DES)
73 ])
74
75 AC_DEFUN([SASL_KERBEROS_V4_CHK], [
76 AC_REQUIRE([SASL_DES_CHK])
77
78 AC_ARG_ENABLE(krb4, [ --enable-krb4 enable KERBEROS_V4 authentication [[no]] ],
79 krb4=$enableval,
80 krb4=no)
81
82 if test "$krb4" != no; then
83 dnl In order to compile kerberos4, we need libkrb and libdes.
84 dnl (We've already gotten libdes from SASL_DES_CHK)
85 dnl we might need -lresolv for kerberos
86 AC_CHECK_LIB(resolv,res_search)
87
88 dnl if we were ambitious, we would look more aggressively for the
89 dnl krb4 install
90 if test -d ${krb4}; then
91 AC_CACHE_CHECK(for Kerberos includes, cyrus_krbinclude, [
92 for krbhloc in include/kerberosIV include/kerberos include
93 do
94 if test -f ${krb4}/${krbhloc}/krb.h ; then
95 cyrus_krbinclude=${krb4}/${krbhloc}
96 break
97 fi
98 done
99 ])
100
101 if test -n "${cyrus_krbinclude}"; then
102 CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
103 fi
104 LDFLAGS="$LDFLAGS -L$krb4/lib"
105 fi
106
107 if test "$with_des" != no; then
108 AC_CHECK_HEADER(krb.h, [
109 AC_CHECK_LIB(com_err, com_err, [
110 AC_CHECK_LIB(krb, krb_mk_priv,
111 [COM_ERR="-lcom_err"; SASL_KRB_LIB="-lkrb"; krb4lib="yes"],
112 krb4lib=no, $LIB_DES -lcom_err)], [
113 AC_CHECK_LIB(krb, krb_mk_priv,
114 [COM_ERR=""; SASL_KRB_LIB="-lkrb"; krb4lib="yes"],
115 krb4lib=no, $LIB_DES)])], krb4="no")
116
117 if test "$krb4" != "no" -a "$krb4lib" = "no"; then
118 AC_CHECK_LIB(krb4, krb_mk_priv,
119 [COM_ERR=""; SASL_KRB_LIB="-lkrb4"; krb4=yes],
120 krb4=no, $LIB_DES)
121 fi
122 if test "$krb4" = no; then
123 AC_WARN(No Kerberos V4 found)
124 fi
125 else
126 AC_WARN(No DES library found for Kerberos V4 support)
127 krb4=no
128 fi
129 fi
130
131 if test "$krb4" != no; then
132 cmu_save_LIBS="$LIBS"
133 LIBS="$LIBS $SASL_KRB_LIB"
134 AC_CHECK_FUNCS(krb_get_err_text)
135 LIBS="$cmu_save_LIBS"
136 fi
137
138 AC_MSG_CHECKING(KERBEROS_V4)
139 if test "$krb4" != no; then
140 AC_MSG_RESULT(enabled)
141 SASL_MECHS="$SASL_MECHS libkerberos4.la"
142 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/kerberos4.c"
143 SASL_STATIC_OBJS="$SASL_STATIC_OBJS kerberos4.o"
144 AC_DEFINE(STATIC_KERBEROS4,[],[User KERBEROS_V4 Staticly])
145 AC_DEFINE(HAVE_KRB,[],[Do we have Kerberos 4 Support?])
146 SASL_KRB_LIB="$SASL_KRB_LIB $LIB_DES $COM_ERR"
147 else
148 AC_MSG_RESULT(disabled)
149 fi
150 AC_SUBST(SASL_KRB_LIB)
151 ])
152
+0
-430
config/libtool.m4 less more
0 ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
1 ## Copyright (C) 1996-1999 Free Software Foundation, Inc.
2 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3 ##
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2 of the License, or
7 ## (at your option) any later version.
8 ##
9 ## This program is distributed in the hope that it will be useful, but
10 ## WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 ## General Public License for more details.
13 ##
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program; if not, write to the Free Software
16 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 ##
18 ## As a special exception to the GNU General Public License, if you
19 ## distribute this file as part of a program that contains a
20 ## configuration script generated by Autoconf, you may include it under
21 ## the same distribution terms that you use for the rest of that program.
22
23 # serial 40 AC_PROG_LIBTOOL
24 AC_DEFUN([AC_PROG_LIBTOOL],
25 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
26
27 # Save cache, so that ltconfig can load it
28 AC_CACHE_SAVE
29
30 # Actually configure libtool. ac_aux_dir is where install-sh is found.
31 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
32 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
33 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
34 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
35 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
36 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
37 || AC_MSG_ERROR([libtool configure failed])
38
39 # Reload cache, that may have been modified by ltconfig
40 AC_CACHE_LOAD
41
42 # This can be used to rebuild libtool when needed
43 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
44
45 # Always use our own libtool.
46 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
47 AC_SUBST(LIBTOOL)dnl
48
49 # Redirect the config.log output again, so that the ltconfig log is not
50 # clobbered by the next message.
51 exec 5>>./config.log
52 ])
53
54 AC_DEFUN([AC_LIBTOOL_SETUP],
55 [AC_PREREQ(2.13)dnl
56 AC_REQUIRE([AC_ENABLE_SHARED])dnl
57 AC_REQUIRE([AC_ENABLE_STATIC])dnl
58 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
59 AC_REQUIRE([AC_CANONICAL_HOST])dnl
60 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
61 AC_REQUIRE([AC_PROG_RANLIB])dnl
62 AC_REQUIRE([AC_PROG_CC])dnl
63 AC_REQUIRE([AC_PROG_LD])dnl
64 AC_REQUIRE([AC_PROG_NM])dnl
65 AC_REQUIRE([AC_PROG_LN_S])dnl
66 dnl
67
68 case "$target" in
69 NONE) lt_target="$host" ;;
70 *) lt_target="$target" ;;
71 esac
72
73 # Check for any special flags to pass to ltconfig.
74 libtool_flags="--cache-file=$cache_file"
75 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
76 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
77 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
78 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
79 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
80 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
81 [libtool_flags="$libtool_flags --enable-dlopen"])
82 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
83 [libtool_flags="$libtool_flags --enable-win32-dll"])
84 AC_ARG_ENABLE(libtool-lock,
85 [ --disable-libtool-lock avoid locking (might break parallel builds)])
86 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
87 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
88
89 # Some flags need to be propagated to the compiler or linker for good
90 # libtool support.
91 case "$lt_target" in
92 *-*-irix6*)
93 # Find out which ABI we are using.
94 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
95 if AC_TRY_EVAL(ac_compile); then
96 case "`/usr/bin/file conftest.o`" in
97 *32-bit*)
98 LD="${LD-ld} -32"
99 ;;
100 *N32*)
101 LD="${LD-ld} -n32"
102 ;;
103 *64-bit*)
104 LD="${LD-ld} -64"
105 ;;
106 esac
107 fi
108 rm -rf conftest*
109 ;;
110
111 *-*-sco3.2v5*)
112 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
113 SAVE_CFLAGS="$CFLAGS"
114 CFLAGS="$CFLAGS -belf"
115 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
116 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
117 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
118 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
119 CFLAGS="$SAVE_CFLAGS"
120 fi
121 ;;
122
123 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
124 [*-*-cygwin* | *-*-mingw*)
125 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
126 AC_CHECK_TOOL(AS, as, false)
127 AC_CHECK_TOOL(OBJDUMP, objdump, false)
128 ;;
129 ])
130 esac
131 ])
132
133 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
134 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
135
136 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
137 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
138
139 # AC_ENABLE_SHARED - implement the --enable-shared flag
140 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
141 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
142 # `yes'.
143 AC_DEFUN([AC_ENABLE_SHARED], [dnl
144 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
145 AC_ARG_ENABLE(shared,
146 changequote(<<, >>)dnl
147 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
148 changequote([, ])dnl
149 [p=${PACKAGE-default}
150 case "$enableval" in
151 yes) enable_shared=yes ;;
152 no) enable_shared=no ;;
153 *)
154 enable_shared=no
155 # Look at the argument we got. We use all the common list separators.
156 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
157 for pkg in $enableval; do
158 if test "X$pkg" = "X$p"; then
159 enable_shared=yes
160 fi
161 done
162 IFS="$ac_save_ifs"
163 ;;
164 esac],
165 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
166 ])
167
168 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
169 AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
170 AC_ENABLE_SHARED(no)])
171
172 # AC_ENABLE_STATIC - implement the --enable-static flag
173 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
174 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
175 # `yes'.
176 AC_DEFUN([AC_ENABLE_STATIC], [dnl
177 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
178 AC_ARG_ENABLE(static,
179 changequote(<<, >>)dnl
180 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
181 changequote([, ])dnl
182 [p=${PACKAGE-default}
183 case "$enableval" in
184 yes) enable_static=yes ;;
185 no) enable_static=no ;;
186 *)
187 enable_static=no
188 # Look at the argument we got. We use all the common list separators.
189 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
190 for pkg in $enableval; do
191 if test "X$pkg" = "X$p"; then
192 enable_static=yes
193 fi
194 done
195 IFS="$ac_save_ifs"
196 ;;
197 esac],
198 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
199 ])
200
201 # AC_DISABLE_STATIC - set the default static flag to --disable-static
202 AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
203 AC_ENABLE_STATIC(no)])
204
205
206 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
207 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
208 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
209 # `yes'.
210 AC_DEFUN([AC_ENABLE_FAST_INSTALL], [dnl
211 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
212 AC_ARG_ENABLE(fast-install,
213 changequote(<<, >>)dnl
214 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
215 changequote([, ])dnl
216 [p=${PACKAGE-default}
217 case "$enableval" in
218 yes) enable_fast_install=yes ;;
219 no) enable_fast_install=no ;;
220 *)
221 enable_fast_install=no
222 # Look at the argument we got. We use all the common list separators.
223 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
224 for pkg in $enableval; do
225 if test "X$pkg" = "X$p"; then
226 enable_fast_install=yes
227 fi
228 done
229 IFS="$ac_save_ifs"
230 ;;
231 esac],
232 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
233 ])
234
235 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
236 AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
237 AC_ENABLE_FAST_INSTALL(no)])
238
239 # AC_PROG_LD - find the path to the GNU or non-GNU linker
240 AC_DEFUN([AC_PROG_LD],
241 [AC_ARG_WITH(gnu-ld,
242 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
243 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
244 AC_REQUIRE([AC_PROG_CC])dnl
245 AC_REQUIRE([AC_CANONICAL_HOST])dnl
246 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
247 ac_prog=ld
248 if test "$ac_cv_prog_gcc" = yes; then
249 # Check if gcc -print-prog-name=ld gives a path.
250 AC_MSG_CHECKING([for ld used by GCC])
251 ac_prog=`($CC -print-prog-name=ld) 2>&5`
252 case "$ac_prog" in
253 # Accept absolute paths.
254 changequote(,)dnl
255 [\\/]* | [A-Za-z]:[\\/]*)
256 re_direlt='/[^/][^/]*/\.\./'
257 changequote([,])dnl
258 # Canonicalize the path of ld
259 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
260 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
261 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
262 done
263 test -z "$LD" && LD="$ac_prog"
264 ;;
265 "")
266 # If it fails, then pretend we aren't using GCC.
267 ac_prog=ld
268 ;;
269 *)
270 # If it is relative, then search for the first ld in PATH.
271 with_gnu_ld=unknown
272 ;;
273 esac
274 elif test "$with_gnu_ld" = yes; then
275 AC_MSG_CHECKING([for GNU ld])
276 else
277 AC_MSG_CHECKING([for non-GNU ld])
278 fi
279 AC_CACHE_VAL(ac_cv_path_LD,
280 [if test -z "$LD"; then
281 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
282 for ac_dir in $PATH; do
283 test -z "$ac_dir" && ac_dir=.
284 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
285 ac_cv_path_LD="$ac_dir/$ac_prog"
286 # Check to see if the program is GNU ld. I'd rather use --version,
287 # but apparently some GNU ld's only accept -v.
288 # Break only if it was the GNU/non-GNU ld that we prefer.
289 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
290 test "$with_gnu_ld" != no && break
291 else
292 test "$with_gnu_ld" != yes && break
293 fi
294 fi
295 done
296 IFS="$ac_save_ifs"
297 else
298 ac_cv_path_LD="$LD" # Let the user override the test with a path.
299 fi])
300 LD="$ac_cv_path_LD"
301 if test -n "$LD"; then
302 AC_MSG_RESULT($LD)
303 else
304 AC_MSG_RESULT(no)
305 fi
306 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
307 AC_PROG_LD_GNU
308 ])
309
310 AC_DEFUN([AC_PROG_LD_GNU],
311 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
312 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
313 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
314 ac_cv_prog_gnu_ld=yes
315 else
316 ac_cv_prog_gnu_ld=no
317 fi])
318 ])
319
320 # AC_PROG_NM - find the path to a BSD-compatible name lister
321 AC_DEFUN([AC_PROG_NM],
322 [AC_MSG_CHECKING([for BSD-compatible nm])
323 AC_CACHE_VAL(ac_cv_path_NM,
324 [if test -n "$NM"; then
325 # Let the user override the test.
326 ac_cv_path_NM="$NM"
327 else
328 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
329 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
330 test -z "$ac_dir" && ac_dir=.
331 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
332 # Check to see if the nm accepts a BSD-compat flag.
333 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
334 # nm: unknown option "B" ignored
335 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
336 ac_cv_path_NM="$ac_dir/nm -B"
337 break
338 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
339 ac_cv_path_NM="$ac_dir/nm -p"
340 break
341 else
342 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
343 continue # so that we can try to find one that supports BSD flags
344 fi
345 fi
346 done
347 IFS="$ac_save_ifs"
348 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
349 fi])
350 NM="$ac_cv_path_NM"
351 AC_MSG_RESULT([$NM])
352 ])
353
354 # AC_CHECK_LIBM - check for math library
355 AC_DEFUN([AC_CHECK_LIBM],
356 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
357 LIBM=
358 case "$lt_target" in
359 *-*-beos* | *-*-cygwin*)
360 # These system don't have libm
361 ;;
362 *-ncr-sysv4.3*)
363 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
364 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
365 ;;
366 *)
367 AC_CHECK_LIB(m, main, LIBM="-lm")
368 ;;
369 esac
370 ])
371
372 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
373 # the libltdl convenience library, adds --enable-ltdl-convenience to
374 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
375 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
376 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
377 # '${top_builddir}/' (note the single quotes!) if your package is not
378 # flat, and, if you're not using automake, define top_builddir as
379 # appropriate in the Makefiles.
380 AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
381 case "$enable_ltdl_convenience" in
382 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
383 "") enable_ltdl_convenience=yes
384 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
385 esac
386 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
387 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
388 ])
389
390 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
391 # the libltdl installable library, and adds --enable-ltdl-install to
392 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
393 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
394 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
395 # '${top_builddir}/' (note the single quotes!) if your package is not
396 # flat, and, if you're not using automake, define top_builddir as
397 # appropriate in the Makefiles.
398 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
399 AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
400 AC_CHECK_LIB(ltdl, main,
401 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
402 [if test x"$enable_ltdl_install" = xno; then
403 AC_MSG_WARN([libltdl not installed, but installation disabled])
404 else
405 enable_ltdl_install=yes
406 fi
407 ])
408 if test x"$enable_ltdl_install" = x"yes"; then
409 ac_configure_args="$ac_configure_args --enable-ltdl-install"
410 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
411 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
412 else
413 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
414 LIBLTDL="-lltdl"
415 INCLTDL=
416 fi
417 ])
418
419 dnl old names
420 AC_DEFUN([AM_PROG_LIBTOOL], [indir([AC_PROG_LIBTOOL])])dnl
421 AC_DEFUN([AM_ENABLE_SHARED], [indir([AC_ENABLE_SHARED], $@)])dnl
422 AC_DEFUN([AM_ENABLE_STATIC], [indir([AC_ENABLE_STATIC], $@)])dnl
423 AC_DEFUN([AM_DISABLE_SHARED], [indir([AC_DISABLE_SHARED], $@)])dnl
424 AC_DEFUN([AM_DISABLE_STATIC], [indir([AC_DISABLE_STATIC], $@)])dnl
425 AC_DEFUN([AM_PROG_LD], [indir([AC_PROG_LD])])dnl
426 AC_DEFUN([AM_PROG_NM], [indir([AC_PROG_NM])])dnl
427
428 dnl This is just to silence aclocal about the macro not being used
429 ifelse([AC_DISABLE_FAST_INSTALL])dnl
+0
-3150
config/ltconfig less more
0 #! /bin/sh
1
2 # ltconfig - Create a system-specific libtool.
3 # Copyright (C) 1996-1999 Free Software Foundation, Inc.
4 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5 #
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 #
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that program.
24
25 # A lot of this script is taken from autoconf-2.10.
26
27 # Check that we are running under the correct shell.
28 SHELL=${CONFIG_SHELL-/bin/sh}
29 echo=echo
30 if test "X$1" = X--no-reexec; then
31 # Discard the --no-reexec flag, and continue.
32 shift
33 elif test "X$1" = X--fallback-echo; then
34 # Avoid inline document here, it may be left over
35 :
36 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
37 # Yippee, $echo works!
38 :
39 else
40 # Restart under the correct shell.
41 exec "$SHELL" "$0" --no-reexec ${1+"$@"}
42 fi
43
44 if test "X$1" = X--fallback-echo; then
45 # used as fallback echo
46 shift
47 cat <<EOF
48 $*
49 EOF
50 exit 0
51 fi
52
53 # Find the correct PATH separator. Usually this is `:', but
54 # DJGPP uses `;' like DOS.
55 if test "X${PATH_SEPARATOR+set}" != Xset; then
56 UNAME=${UNAME-`uname 2>/dev/null`}
57 case X$UNAME in
58 *-DOS) PATH_SEPARATOR=';' ;;
59 *) PATH_SEPARATOR=':' ;;
60 esac
61 fi
62
63 # The HP-UX ksh and POSIX shell print the target directory to stdout
64 # if CDPATH is set.
65 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
66
67 if test "X${echo_test_string+set}" != Xset; then
68 # find a string as large as possible, as long as the shell can cope with it
69 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
70 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
71 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
72 echo_test_string="`eval $cmd`" &&
73 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
74 break
75 fi
76 done
77 fi
78
79 if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
80 test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
81 # The Solaris, AIX, and Digital Unix default echo programs unquote
82 # backslashes. This makes it impossible to quote backslashes using
83 # echo "$something" | sed 's/\\/\\\\/g'
84 #
85 # So, first we look for a working echo in the user's PATH.
86
87 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
88 for dir in $PATH /usr/ucb; do
89 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
90 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
91 test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
92 echo="$dir/echo"
93 break
94 fi
95 done
96 IFS="$save_ifs"
97
98 if test "X$echo" = Xecho; then
99 # We didn't find a better echo, so look for alternatives.
100 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
101 test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
102 # This shell has a builtin print -r that does the trick.
103 echo='print -r'
104 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
105 test "X$CONFIG_SHELL" != X/bin/ksh; then
106 # If we have ksh, try running ltconfig again with it.
107 ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
108 export ORIGINAL_CONFIG_SHELL
109 CONFIG_SHELL=/bin/ksh
110 export CONFIG_SHELL
111 exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
112 else
113 # Try using printf.
114 echo='printf "%s\n"'
115 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
116 test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
117 # Cool, printf works
118 :
119 elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
120 test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
121 CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
122 export CONFIG_SHELL
123 SHELL="$CONFIG_SHELL"
124 export SHELL
125 echo="$CONFIG_SHELL $0 --fallback-echo"
126 elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
127 test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
128 echo="$CONFIG_SHELL $0 --fallback-echo"
129 else
130 # maybe with a smaller string...
131 prev=:
132
133 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
134 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
135 break
136 fi
137 prev="$cmd"
138 done
139
140 if test "$prev" != 'sed 50q "$0"'; then
141 echo_test_string=`eval $prev`
142 export echo_test_string
143 exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
144 else
145 # Oops. We lost completely, so just stick with echo.
146 echo=echo
147 fi
148 fi
149 fi
150 fi
151 fi
152
153 # Sed substitution that helps us do robust quoting. It backslashifies
154 # metacharacters that are still active within double-quoted strings.
155 Xsed='sed -e s/^X//'
156 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
157
158 # Same as above, but do not quote variable references.
159 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
160
161 # Sed substitution to delay expansion of an escaped shell variable in a
162 # double_quote_subst'ed string.
163 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
164
165 # The name of this program.
166 progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
167
168 # Constants:
169 PROGRAM=ltconfig
170 PACKAGE=libtool
171 VERSION=1.3.5
172 TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)"
173 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
174 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
175 rm="rm -f"
176
177 help="Try \`$progname --help' for more information."
178
179 # Global variables:
180 default_ofile=libtool
181 can_build_shared=yes
182 enable_shared=yes
183 # All known linkers require a `.a' archive for static linking (except M$VC,
184 # which needs '.lib').
185 enable_static=yes
186 enable_fast_install=yes
187 enable_dlopen=unknown
188 enable_win32_dll=no
189 ltmain=
190 silent=
191 srcdir=
192 ac_config_guess=
193 ac_config_sub=
194 host=
195 nonopt=
196 ofile="$default_ofile"
197 verify_host=yes
198 with_gcc=no
199 with_gnu_ld=no
200 need_locks=yes
201 ac_ext=c
202 objext=o
203 libext=a
204 exeext=
205 cache_file=
206
207 old_AR="$AR"
208 old_CC="$CC"
209 old_CFLAGS="$CFLAGS"
210 old_CPPFLAGS="$CPPFLAGS"
211 old_LDFLAGS="$LDFLAGS"
212 old_LD="$LD"
213 old_LN_S="$LN_S"
214 old_LIBS="$LIBS"
215 old_NM="$NM"
216 old_RANLIB="$RANLIB"
217 old_DLLTOOL="$DLLTOOL"
218 old_OBJDUMP="$OBJDUMP"
219 old_AS="$AS"
220
221 # Parse the command line options.
222 args=
223 prev=
224 for option
225 do
226 case "$option" in
227 -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
228 *) optarg= ;;
229 esac
230
231 # If the previous option needs an argument, assign it.
232 if test -n "$prev"; then
233 eval "$prev=\$option"
234 prev=
235 continue
236 fi
237
238 case "$option" in
239 --help) cat <<EOM
240 Usage: $progname [OPTION]... [HOST [LTMAIN]]
241
242 Generate a system-specific libtool script.
243
244 --debug enable verbose shell tracing
245 --disable-shared do not build shared libraries
246 --disable-static do not build static libraries
247 --disable-fast-install do not optimize for fast installation
248 --enable-dlopen enable dlopen support
249 --enable-win32-dll enable building dlls on win32 hosts
250 --help display this help and exit
251 --no-verify do not verify that HOST is a valid host type
252 -o, --output=FILE specify the output file [default=$default_ofile]
253 --quiet same as \`--silent'
254 --silent do not print informational messages
255 --srcdir=DIR find \`config.guess' in DIR
256 --version output version information and exit
257 --with-gcc assume that the GNU C compiler will be used
258 --with-gnu-ld assume that the C compiler uses the GNU linker
259 --disable-lock disable file locking
260 --cache-file=FILE configure cache file
261
262 LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
263 that provides basic libtool functionality.
264
265 HOST is the canonical host system name [default=guessed].
266 EOM
267 exit 0
268 ;;
269
270 --debug)
271 echo "$progname: enabling shell trace mode"
272 set -x
273 ;;
274
275 --disable-shared) enable_shared=no ;;
276
277 --disable-static) enable_static=no ;;
278
279 --disable-fast-install) enable_fast_install=no ;;
280
281 --enable-dlopen) enable_dlopen=yes ;;
282
283 --enable-win32-dll) enable_win32_dll=yes ;;
284
285 --quiet | --silent) silent=yes ;;
286
287 --srcdir) prev=srcdir ;;
288 --srcdir=*) srcdir="$optarg" ;;
289
290 --no-verify) verify_host=no ;;
291
292 --output | -o) prev=ofile ;;
293 --output=*) ofile="$optarg" ;;
294
295 --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
296
297 --with-gcc) with_gcc=yes ;;
298 --with-gnu-ld) with_gnu_ld=yes ;;
299
300 --disable-lock) need_locks=no ;;
301
302 --cache-file=*) cache_file="$optarg" ;;
303
304 -*)
305 echo "$progname: unrecognized option \`$option'" 1>&2
306 echo "$help" 1>&2
307 exit 1
308 ;;
309
310 *)
311 if test -z "$ltmain"; then
312 ltmain="$option"
313 elif test -z "$host"; then
314 # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
315 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
316 # echo "$progname: warning \`$option' is not a valid host type" 1>&2
317 # fi
318 host="$option"
319 else
320 echo "$progname: too many arguments" 1>&2
321 echo "$help" 1>&2
322 exit 1
323 fi ;;
324 esac
325 done
326
327 if test -z "$ltmain"; then
328 echo "$progname: you must specify a LTMAIN file" 1>&2
329 echo "$help" 1>&2
330 exit 1
331 fi
332
333 if test ! -f "$ltmain"; then
334 echo "$progname: \`$ltmain' does not exist" 1>&2
335 echo "$help" 1>&2
336 exit 1
337 fi
338
339 # Quote any args containing shell metacharacters.
340 ltconfig_args=
341 for arg
342 do
343 case "$arg" in
344 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
345 ltconfig_args="$ltconfig_args '$arg'" ;;
346 *) ltconfig_args="$ltconfig_args $arg" ;;
347 esac
348 done
349
350 # A relevant subset of AC_INIT.
351
352 # File descriptor usage:
353 # 0 standard input
354 # 1 file creation
355 # 2 errors and warnings
356 # 3 some systems may open it to /dev/tty
357 # 4 used on the Kubota Titan
358 # 5 compiler messages saved in config.log
359 # 6 checking for... messages and results
360 if test "$silent" = yes; then
361 exec 6>/dev/null
362 else
363 exec 6>&1
364 fi
365 exec 5>>./config.log
366
367 # NLS nuisances.
368 # Only set LANG and LC_ALL to C if already set.
369 # These must not be set unconditionally because not all systems understand
370 # e.g. LANG=C (notably SCO).
371 if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
372 if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi
373
374 if test -n "$cache_file" && test -r "$cache_file"; then
375 echo "loading cache $cache_file within ltconfig"
376 . $cache_file
377 fi
378
379 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
380 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
381 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
382 ac_n= ac_c='
383 ' ac_t=' '
384 else
385 ac_n=-n ac_c= ac_t=
386 fi
387 else
388 ac_n= ac_c='\c' ac_t=
389 fi
390
391 if test -z "$srcdir"; then
392 # Assume the source directory is the same one as the path to LTMAIN.
393 srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
394 test "$srcdir" = "$ltmain" && srcdir=.
395 fi
396
397 trap "$rm conftest*; exit 1" 1 2 15
398 if test "$verify_host" = yes; then
399 # Check for config.guess and config.sub.
400 ac_aux_dir=
401 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
402 if test -f $ac_dir/config.guess; then
403 ac_aux_dir=$ac_dir
404 break
405 fi
406 done
407 if test -z "$ac_aux_dir"; then
408 echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
409 echo "$help" 1>&2
410 exit 1
411 fi
412 ac_config_guess=$ac_aux_dir/config.guess
413 ac_config_sub=$ac_aux_dir/config.sub
414
415 # Make sure we can run config.sub.
416 if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
417 else
418 echo "$progname: cannot run $ac_config_sub" 1>&2
419 echo "$help" 1>&2
420 exit 1
421 fi
422
423 echo $ac_n "checking host system type""... $ac_c" 1>&6
424
425 host_alias=$host
426 case "$host_alias" in
427 "")
428 if host_alias=`$SHELL $ac_config_guess`; then :
429 else
430 echo "$progname: cannot guess host type; you must specify one" 1>&2
431 echo "$help" 1>&2
432 exit 1
433 fi ;;
434 esac
435 host=`$SHELL $ac_config_sub $host_alias`
436 echo "$ac_t$host" 1>&6
437
438 # Make sure the host verified.
439 test -z "$host" && exit 1
440
441 elif test -z "$host"; then
442 echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
443 echo "$help" 1>&2
444 exit 1
445 else
446 host_alias=$host
447 fi
448
449 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
450 case "$host_os" in
451 linux-gnu*) ;;
452 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
453 esac
454
455 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
456 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
457 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
458
459 case "$host_os" in
460 aix3*)
461 # AIX sometimes has problems with the GCC collect2 program. For some
462 # reason, if we set the COLLECT_NAMES environment variable, the problems
463 # vanish in a puff of smoke.
464 if test "X${COLLECT_NAMES+set}" != Xset; then
465 COLLECT_NAMES=
466 export COLLECT_NAMES
467 fi
468 ;;
469 esac
470
471 # Determine commands to create old-style static archives.
472 old_archive_cmds='$AR cru $oldlib$oldobjs'
473 old_postinstall_cmds='chmod 644 $oldlib'
474 old_postuninstall_cmds=
475
476 # Set a sane default for `AR'.
477 test -z "$AR" && AR=ar
478
479 # Set a sane default for `OBJDUMP'.
480 test -z "$OBJDUMP" && OBJDUMP=objdump
481
482 # If RANLIB is not set, then run the test.
483 if test "${RANLIB+set}" != "set"; then
484 result=no
485
486 echo $ac_n "checking for ranlib... $ac_c" 1>&6
487 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
488 for dir in $PATH; do
489 test -z "$dir" && dir=.
490 if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
491 RANLIB="ranlib"
492 result="ranlib"
493 break
494 fi
495 done
496 IFS="$save_ifs"
497
498 echo "$ac_t$result" 1>&6
499 fi
500
501 if test -n "$RANLIB"; then
502 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
503 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
504 fi
505
506 # Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
507 test -z "$DLLTOOL" && DLLTOOL=dlltool
508 test -z "$OBJDUMP" && OBJDUMP=objdump
509 test -z "$AS" && AS=as
510
511 # Check to see if we are using GCC.
512 if test "$with_gcc" != yes || test -z "$CC"; then
513 # If CC is not set, then try to find GCC or a usable CC.
514 if test -z "$CC"; then
515 echo $ac_n "checking for gcc... $ac_c" 1>&6
516 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
517 for dir in $PATH; do
518 test -z "$dir" && dir=.
519 if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then
520 CC="gcc"
521 break
522 fi
523 done
524 IFS="$save_ifs"
525
526 if test -n "$CC"; then
527 echo "$ac_t$CC" 1>&6
528 else
529 echo "$ac_t"no 1>&6
530 fi
531 fi
532
533 # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
534 if test -z "$CC"; then
535 echo $ac_n "checking for cc... $ac_c" 1>&6
536 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
537 cc_rejected=no
538 for dir in $PATH; do
539 test -z "$dir" && dir=.
540 if test -f $dir/cc || test -f $dir/cc$ac_exeext; then
541 if test "$dir/cc" = "/usr/ucb/cc"; then
542 cc_rejected=yes
543 continue
544 fi
545 CC="cc"
546 break
547 fi
548 done
549 IFS="$save_ifs"
550 if test $cc_rejected = yes; then
551 # We found a bogon in the path, so make sure we never use it.
552 set dummy $CC
553 shift
554 if test $# -gt 0; then
555 # We chose a different compiler from the bogus one.
556 # However, it has the same name, so the bogon will be chosen
557 # first if we set CC to just the name; use the full file name.
558 shift
559 set dummy "$dir/cc" "$@"
560 shift
561 CC="$@"
562 fi
563 fi
564
565 if test -n "$CC"; then
566 echo "$ac_t$CC" 1>&6
567 else
568 echo "$ac_t"no 1>&6
569 fi
570
571 if test -z "$CC"; then
572 echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
573 exit 1
574 fi
575 fi
576
577 # Now see if the compiler is really GCC.
578 with_gcc=no
579 echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
580 echo "$progname:581: checking whether we are using GNU C" >&5
581
582 $rm conftest.c
583 cat > conftest.c <<EOF
584 #ifdef __GNUC__
585 yes;
586 #endif
587 EOF
588 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
589 with_gcc=yes
590 fi
591 $rm conftest.c
592 echo "$ac_t$with_gcc" 1>&6
593 fi
594
595 # Allow CC to be a program name with arguments.
596 set dummy $CC
597 compiler="$2"
598
599 echo $ac_n "checking for object suffix... $ac_c" 1>&6
600 $rm conftest*
601 echo 'int i = 1;' > conftest.c
602 echo "$progname:603: checking for object suffix" >& 5
603 if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
604 # Append any warnings to the config.log.
605 cat conftest.err 1>&5
606
607 for ac_file in conftest.*; do
608 case $ac_file in
609 *.c) ;;
610 *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
611 esac
612 done
613 else
614 cat conftest.err 1>&5
615 echo "$progname: failed program was:" >&5
616 cat conftest.c >&5
617 fi
618 $rm conftest*
619 echo "$ac_t$objext" 1>&6
620
621 echo $ac_n "checking for executable suffix... $ac_c" 1>&6
622 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
623 echo $ac_n "(cached) $ac_c" 1>&6
624 else
625 ac_cv_exeext="no"
626 $rm conftest*
627 echo 'main () { return 0; }' > conftest.c
628 echo "$progname:629: checking for executable suffix" >& 5
629 if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
630 # Append any warnings to the config.log.
631 cat conftest.err 1>&5
632
633 for ac_file in conftest.*; do
634 case $ac_file in
635 *.c | *.err | *.$objext ) ;;
636 *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
637 esac
638 done
639 else
640 cat conftest.err 1>&5
641 echo "$progname: failed program was:" >&5
642 cat conftest.c >&5
643 fi
644 $rm conftest*
645 fi
646 if test "X$ac_cv_exeext" = Xno; then
647 exeext=""
648 else
649 exeext="$ac_cv_exeext"
650 fi
651 echo "$ac_t$ac_cv_exeext" 1>&6
652
653 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
654 pic_flag=
655 special_shlib_compile_flags=
656 wl=
657 link_static_flag=
658 no_builtin_flag=
659
660 if test "$with_gcc" = yes; then
661 wl='-Wl,'
662 link_static_flag='-static'
663
664 case "$host_os" in
665 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
666 # PIC is the default for these OSes.
667 ;;
668 aix*)
669 # Below there is a dirty hack to force normal static linking with -ldl
670 # The problem is because libdl dynamically linked with both libc and
671 # libC (AIX C++ library), which obviously doesn't included in libraries
672 # list by gcc. This cause undefined symbols with -static flags.
673 # This hack allows C programs to be linked with "-static -ldl", but
674 # we not sure about C++ programs.
675 link_static_flag="$link_static_flag ${wl}-lC"
676 ;;
677 cygwin* | mingw* | os2*)
678 # We can build DLLs from non-PIC.
679 ;;
680 darwin* | rhapsody*)
681 # PIC is the default on this platform
682 # Common symbols not allowed in MH_DYLIB files
683 pic_flag='-fno-common'
684 ;;
685 amigaos*)
686 # FIXME: we need at least 68020 code to build shared libraries, but
687 # adding the `-m68020' flag to GCC prevents building anything better,
688 # like `-m68040'.
689 pic_flag='-m68020 -resident32 -malways-restore-a4'
690 ;;
691 sysv4*MP*)
692 if test -d /usr/nec; then
693 pic_flag=-Kconform_pic
694 fi
695 ;;
696 *)
697 pic_flag='-fPIC'
698 ;;
699 esac
700 else
701 # PORTME Check for PIC flags for the system compiler.
702 case "$host_os" in
703 aix3* | aix4*)
704 # All AIX code is PIC.
705 link_static_flag='-bnso -bI:/lib/syscalls.exp'
706 ;;
707
708 hpux9* | hpux10* | hpux11*)
709 # Is there a better link_static_flag that works with the bundled CC?
710 wl='-Wl,'
711 link_static_flag="${wl}-a ${wl}archive"
712 pic_flag='+Z'
713 ;;
714
715 irix5* | irix6*)
716 wl='-Wl,'
717 link_static_flag='-non_shared'
718 # PIC (with -KPIC) is the default.
719 ;;
720
721 cygwin* | mingw* | os2*)
722 # We can build DLLs from non-PIC.
723 ;;
724
725 osf3* | osf4* | osf5*)
726 # All OSF/1 code is PIC.
727 wl='-Wl,'
728 link_static_flag='-non_shared'
729 ;;
730
731 sco3.2v5*)
732 pic_flag='-Kpic'
733 link_static_flag='-dn'
734 special_shlib_compile_flags='-belf'
735 ;;
736
737 solaris*)
738 pic_flag='-KPIC'
739 link_static_flag='-Bstatic'
740 wl='-Wl,'
741 ;;
742
743 sunos4*)
744 pic_flag='-PIC'
745 link_static_flag='-Bstatic'
746 wl='-Qoption ld '
747 ;;
748
749 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
750 pic_flag='-KPIC'
751 link_static_flag='-Bstatic'
752 wl='-Wl,'
753 ;;
754
755 uts4*)
756 pic_flag='-pic'
757 link_static_flag='-Bstatic'
758 ;;
759 sysv4*MP*)
760 if test -d /usr/nec ;then
761 pic_flag='-Kconform_pic'
762 link_static_flag='-Bstatic'
763 fi
764 ;;
765 *)
766 can_build_shared=no
767 ;;
768 esac
769 fi
770
771 if test -n "$pic_flag"; then
772 echo "$ac_t$pic_flag" 1>&6
773
774 # Check to make sure the pic_flag actually works.
775 echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
776 $rm conftest*
777 echo "int some_variable = 0;" > conftest.c
778 save_CFLAGS="$CFLAGS"
779 CFLAGS="$CFLAGS $pic_flag -DPIC"
780 echo "$progname:781: checking if $compiler PIC flag $pic_flag works" >&5
781 if { (eval echo $progname:782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
782 # Append any warnings to the config.log.
783 cat conftest.err 1>&5
784
785 case "$host_os" in
786 hpux9* | hpux10* | hpux11*)
787 # On HP-UX, both CC and GCC only warn that PIC is supported... then they
788 # create non-PIC objects. So, if there were any warnings, we assume that
789 # PIC is not supported.
790 if test -s conftest.err; then
791 echo "$ac_t"no 1>&6
792 can_build_shared=no
793 pic_flag=
794 else
795 echo "$ac_t"yes 1>&6
796 pic_flag=" $pic_flag"
797 fi
798 ;;
799 *)
800 echo "$ac_t"yes 1>&6
801 pic_flag=" $pic_flag"
802 ;;
803 esac
804 else
805 # Append any errors to the config.log.
806 cat conftest.err 1>&5
807 can_build_shared=no
808 pic_flag=
809 echo "$ac_t"no 1>&6
810 fi
811 CFLAGS="$save_CFLAGS"
812 $rm conftest*
813 else
814 echo "$ac_t"none 1>&6
815 fi
816
817 # Check to see if options -o and -c are simultaneously supported by compiler
818 echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
819 $rm -r conftest 2>/dev/null
820 mkdir conftest
821 cd conftest
822 $rm conftest*
823 echo "int some_variable = 0;" > conftest.c
824 mkdir out
825 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
826 # that will create temporary files in the current directory regardless of
827 # the output directory. Thus, making CWD read-only will cause this test
828 # to fail, enabling locking or at least warning the user not to do parallel
829 # builds.
830 chmod -w .
831 save_CFLAGS="$CFLAGS"
832 CFLAGS="$CFLAGS -o out/conftest2.o"
833 echo "$progname:834: checking if $compiler supports -c -o file.o" >&5
834 if { (eval echo $progname:835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
835
836 # The compiler can only warn and ignore the option if not recognized
837 # So say no if there are warnings
838 if test -s out/conftest.err; then
839 echo "$ac_t"no 1>&6
840 compiler_c_o=no
841 else
842 echo "$ac_t"yes 1>&6
843 compiler_c_o=yes
844 fi
845 else
846 # Append any errors to the config.log.
847 cat out/conftest.err 1>&5
848 compiler_c_o=no
849 echo "$ac_t"no 1>&6
850 fi
851 CFLAGS="$save_CFLAGS"
852 chmod u+w .
853 $rm conftest* out/*
854 rmdir out
855 cd ..
856 rmdir conftest
857 $rm -r conftest 2>/dev/null
858
859 if test x"$compiler_c_o" = x"yes"; then
860 # Check to see if we can write to a .lo
861 echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
862 $rm conftest*
863 echo "int some_variable = 0;" > conftest.c
864 save_CFLAGS="$CFLAGS"
865 CFLAGS="$CFLAGS -c -o conftest.lo"
866 echo "$progname:867: checking if $compiler supports -c -o file.lo" >&5
867 if { (eval echo $progname:868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
868
869 # The compiler can only warn and ignore the option if not recognized
870 # So say no if there are warnings
871 if test -s conftest.err; then
872 echo "$ac_t"no 1>&6
873 compiler_o_lo=no
874 else
875 echo "$ac_t"yes 1>&6
876 compiler_o_lo=yes
877 fi
878 else
879 # Append any errors to the config.log.
880 cat conftest.err 1>&5
881 compiler_o_lo=no
882 echo "$ac_t"no 1>&6
883 fi
884 CFLAGS="$save_CFLAGS"
885 $rm conftest*
886 else
887 compiler_o_lo=no
888 fi
889
890 # Check to see if we can do hard links to lock some files if needed
891 hard_links="nottested"
892 if test "$compiler_c_o" = no && test "$need_locks" != no; then
893 # do not overwrite the value of need_locks provided by the user
894 echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
895 hard_links=yes
896 $rm conftest*
897 ln conftest.a conftest.b 2>/dev/null && hard_links=no
898 touch conftest.a
899 ln conftest.a conftest.b 2>&5 || hard_links=no
900 ln conftest.a conftest.b 2>/dev/null && hard_links=no
901 echo "$ac_t$hard_links" 1>&6
902 $rm conftest*
903 if test "$hard_links" = no; then
904 echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
905 need_locks=warn
906 fi
907 else
908 need_locks=no
909 fi
910
911 if test "$with_gcc" = yes; then
912 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
913 echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
914 $rm conftest*
915 echo "int some_variable = 0;" > conftest.c
916 save_CFLAGS="$CFLAGS"
917 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
918 echo "$progname:919: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
919 if { (eval echo $progname:920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
920
921 # The compiler can only warn and ignore the option if not recognized
922 # So say no if there are warnings
923 if test -s conftest.err; then
924 echo "$ac_t"no 1>&6
925 compiler_rtti_exceptions=no
926 else
927 echo "$ac_t"yes 1>&6
928 compiler_rtti_exceptions=yes
929 fi
930 else
931 # Append any errors to the config.log.
932 cat conftest.err 1>&5
933 compiler_rtti_exceptions=no
934 echo "$ac_t"no 1>&6
935 fi
936 CFLAGS="$save_CFLAGS"
937 $rm conftest*
938
939 if test "$compiler_rtti_exceptions" = "yes"; then
940 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
941 else
942 no_builtin_flag=' -fno-builtin'
943 fi
944
945 fi
946
947 # Check for any special shared library compilation flags.
948 if test -n "$special_shlib_compile_flags"; then
949 echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
950 if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then :
951 else
952 echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
953 can_build_shared=no
954 fi
955 fi
956
957 echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
958 $rm conftest*
959 echo 'main(){return(0);}' > conftest.c
960 save_LDFLAGS="$LDFLAGS"
961 LDFLAGS="$LDFLAGS $link_static_flag"
962 echo "$progname:963: checking if $compiler static flag $link_static_flag works" >&5
963 if { (eval echo $progname:964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
964 echo "$ac_t$link_static_flag" 1>&6
965 else
966 echo "$ac_t"none 1>&6
967 link_static_flag=
968 fi
969 LDFLAGS="$save_LDFLAGS"
970 $rm conftest*
971
972 if test -z "$LN_S"; then
973 # Check to see if we can use ln -s, or we need hard links.
974 echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
975 $rm conftest.dat
976 if ln -s X conftest.dat 2>/dev/null; then
977 $rm conftest.dat
978 LN_S="ln -s"
979 else
980 LN_S=ln
981 fi
982 if test "$LN_S" = "ln -s"; then
983 echo "$ac_t"yes 1>&6
984 else
985 echo "$ac_t"no 1>&6
986 fi
987 fi
988
989 # Make sure LD is an absolute path.
990 if test -z "$LD"; then
991 ac_prog=ld
992 if test "$with_gcc" = yes; then
993 # Check if gcc -print-prog-name=ld gives a path.
994 echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
995 echo "$progname:996: checking for ld used by GCC" >&5
996 ac_prog=`($CC -print-prog-name=ld) 2>&5`
997 case "$ac_prog" in
998 # Accept absolute paths.
999 [\\/]* | [A-Za-z]:[\\/]*)
1000 re_direlt='/[^/][^/]*/\.\./'
1001 # Canonicalize the path of ld
1002 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1003 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1004 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1005 done
1006 test -z "$LD" && LD="$ac_prog"
1007 ;;
1008 "")
1009 # If it fails, then pretend we are not using GCC.
1010 ac_prog=ld
1011 ;;
1012 *)
1013 # If it is relative, then search for the first ld in PATH.
1014 with_gnu_ld=unknown
1015 ;;
1016 esac
1017 elif test "$with_gnu_ld" = yes; then
1018 echo $ac_n "checking for GNU ld... $ac_c" 1>&6
1019 echo "$progname:1020: checking for GNU ld" >&5
1020 else
1021 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1022 echo "$progname:1023: checking for non-GNU ld" >&5
1023 fi
1024
1025 if test -z "$LD"; then
1026 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
1027 for ac_dir in $PATH; do
1028 test -z "$ac_dir" && ac_dir=.
1029 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1030 LD="$ac_dir/$ac_prog"
1031 # Check to see if the program is GNU ld. I'd rather use --version,
1032 # but apparently some GNU ld's only accept -v.
1033 # Break only if it was the GNU/non-GNU ld that we prefer.
1034 if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1035 test "$with_gnu_ld" != no && break
1036 else
1037 test "$with_gnu_ld" != yes && break
1038 fi
1039 fi
1040 done
1041 IFS="$ac_save_ifs"
1042 fi
1043
1044 if test -n "$LD"; then
1045 echo "$ac_t$LD" 1>&6
1046 else
1047 echo "$ac_t"no 1>&6
1048 fi
1049
1050 if test -z "$LD"; then
1051 echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
1052 exit 1
1053 fi
1054 fi
1055
1056 # Check to see if it really is or is not GNU ld.
1057 echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
1058 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1059 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1060 with_gnu_ld=yes
1061 else
1062 with_gnu_ld=no
1063 fi
1064 echo "$ac_t$with_gnu_ld" 1>&6
1065
1066 # See if the linker supports building shared libraries.
1067 echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
1068
1069 allow_undefined_flag=
1070 no_undefined_flag=
1071 need_lib_prefix=unknown
1072 need_version=unknown
1073 # when you set need_version to no, make sure it does not cause -set_version
1074 # flags to be left without arguments
1075 archive_cmds=
1076 archive_expsym_cmds=
1077 old_archive_from_new_cmds=
1078 export_dynamic_flag_spec=
1079 whole_archive_flag_spec=
1080 thread_safe_flag_spec=
1081 hardcode_libdir_flag_spec=
1082 hardcode_libdir_separator=
1083 hardcode_direct=no
1084 hardcode_minus_L=no
1085 hardcode_shlibpath_var=unsupported
1086 runpath_var=
1087 always_export_symbols=no
1088 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1089 # include_expsyms should be a list of space-separated symbols to be *always*
1090 # included in the symbol list
1091 include_expsyms=
1092 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1093 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1094 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1095 # as well as any symbol that contains `d'.
1096 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1097 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1098 # platforms (ab)use it in PIC code, but their linkers get confused if
1099 # the symbol is explicitly referenced. Since portable code cannot
1100 # rely on this symbol name, it's probably fine to never include it in
1101 # preloaded symbol tables.
1102
1103 case "$host_os" in
1104 cygwin* | mingw*)
1105 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1106 # When not using gcc, we currently assume that we are using
1107 # Microsoft Visual C++.
1108 if test "$with_gcc" != yes; then
1109 with_gnu_ld=no
1110 fi
1111 ;;
1112
1113 esac
1114
1115 ld_shlibs=yes
1116 if test "$with_gnu_ld" = yes; then
1117 # If archive_cmds runs LD, not CC, wlarc should be empty
1118 wlarc='${wl}'
1119
1120 # See if GNU ld supports shared libraries.
1121 case "$host_os" in
1122 aix3* | aix4*)
1123 # On AIX, the GNU linker is very broken
1124 ld_shlibs=no
1125 cat <<EOF 1>&2
1126
1127 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1128 *** to be unable to reliably create shared libraries on AIX.
1129 *** Therefore, libtool is disabling shared libraries support. If you
1130 *** really care for shared libraries, you may want to modify your PATH
1131 *** so that a non-GNU linker is found, and then restart.
1132
1133 EOF
1134 ;;
1135
1136 amigaos*)
1137 archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
1138 hardcode_libdir_flag_spec='-L$libdir'
1139 hardcode_minus_L=yes
1140
1141 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1142 # that the semantics of dynamic libraries on AmigaOS, at least up
1143 # to version 4, is to share data among multiple programs linked
1144 # with the same dynamic library. Since this doesn't match the
1145 # behavior of shared libraries on other platforms, we can use
1146 # them.
1147 ld_shlibs=no
1148 ;;
1149
1150 beos*)
1151 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1152 allow_undefined_flag=unsupported
1153 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1154 # support --undefined. This deserves some investigation. FIXME
1155 archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1156 else
1157 ld_shlibs=no
1158 fi
1159 ;;
1160
1161 cygwin* | mingw*)
1162 # hardcode_libdir_flag_spec is actually meaningless, as there is
1163 # no search path for DLLs.
1164 hardcode_libdir_flag_spec='-L$libdir'
1165 allow_undefined_flag=unsupported
1166 always_export_symbols=yes
1167
1168 # Extract the symbol export list from an `--export-all' def file,
1169 # then regenerate the def file from the symbol export list, so that
1170 # the compiled dll only exports the symbol export list.
1171 # Be careful not to strip the DATA tag left by newer dlltools.
1172 export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
1173 test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
1174 $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~
1175 sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols'
1176
1177 # If DATA tags from a recent dlltool are present, honour them!
1178 archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
1179 _lt_hint=1;
1180 cat $export_symbols | while read symbol; do
1181 set dummy \$symbol;
1182 case \$# in
1183 2) echo " \$2 @ \$_lt_hint ; " >> $objdir/$soname-def;;
1184 *) echo " \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;;
1185 esac;
1186 _lt_hint=`expr 1 + \$_lt_hint`;
1187 done~
1188 test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
1189 test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
1190 $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
1191 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
1192 $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
1193 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
1194 $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
1195
1196 old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
1197 ;;
1198
1199 netbsd*)
1200 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1201 archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1202 archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1203 else
1204 archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
1205 # can we support soname and/or expsyms with a.out? -oliva
1206 fi
1207 ;;
1208
1209 solaris* | sysv5*)
1210 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1211 ld_shlibs=no
1212 cat <<EOF 1>&2
1213
1214 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1215 *** create shared libraries on Solaris systems. Therefore, libtool
1216 *** is disabling shared libraries support. We urge you to upgrade GNU
1217 *** binutils to release 2.9.1 or newer. Another option is to modify
1218 *** your PATH or compiler configuration so that the native linker is
1219 *** used, and then restart.
1220
1221 EOF
1222 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1223 archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1224 archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1225 else
1226 ld_shlibs=no
1227 fi
1228 ;;
1229
1230 sunos4*)
1231 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
1232 wlarc=
1233 hardcode_direct=yes
1234 hardcode_shlibpath_var=no
1235 ;;
1236
1237 *)
1238 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1239 archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1240 archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1241 else
1242 ld_shlibs=no
1243 fi
1244 ;;
1245 esac
1246
1247 if test "$ld_shlibs" = yes; then
1248 runpath_var=LD_RUN_PATH
1249 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1250 export_dynamic_flag_spec='${wl}--export-dynamic'
1251 case $host_os in
1252 cygwin* | mingw*)
1253 # dlltool doesn't understand --whole-archive et. al.
1254 whole_archive_flag_spec=
1255 ;;
1256 *)
1257 # ancient GNU ld didn't support --whole-archive et. al.
1258 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1259 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1260 else
1261 whole_archive_flag_spec=
1262 fi
1263 ;;
1264 esac
1265 fi
1266 else
1267 # PORTME fill in a description of your system's linker (not GNU ld)
1268 case "$host_os" in
1269 aix3*)
1270 allow_undefined_flag=unsupported
1271 always_export_symbols=yes
1272 archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
1273 # Note: this linker hardcodes the directories in LIBPATH if there
1274 # are no directories specified by -L.
1275 hardcode_minus_L=yes
1276 if test "$with_gcc" = yes && test -z "$link_static_flag"; then
1277 # Neither direct hardcoding nor static linking is supported with a
1278 # broken collect2.
1279 hardcode_direct=unsupported
1280 fi
1281 ;;
1282
1283 aix4*)
1284 hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
1285 hardcode_libdir_separator=':'
1286 if test "$with_gcc" = yes; then
1287 collect2name=`${CC} -print-prog-name=collect2`
1288 if test -f "$collect2name" && \
1289 strings "$collect2name" | grep resolve_lib_name >/dev/null
1290 then
1291 # We have reworked collect2
1292 hardcode_direct=yes
1293 else
1294 # We have old collect2
1295 hardcode_direct=unsupported
1296 # It fails to find uninstalled libraries when the uninstalled
1297 # path is not listed in the libpath. Setting hardcode_minus_L
1298 # to unsupported forces relinking
1299 hardcode_minus_L=yes
1300 hardcode_libdir_flag_spec='-L$libdir'
1301 hardcode_libdir_separator=
1302 fi
1303 shared_flag='-shared'
1304 else
1305 shared_flag='${wl}-bM:SRE'
1306 hardcode_direct=yes
1307 fi
1308 allow_undefined_flag=' ${wl}-berok'
1309 archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
1310 archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
1311 case "$host_os" in aix4.[01]|aix4.[01].*)
1312 # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
1313 always_export_symbols=yes ;;
1314 esac
1315 ;;
1316
1317 amigaos*)
1318 archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
1319 hardcode_libdir_flag_spec='-L$libdir'
1320 hardcode_minus_L=yes
1321 # see comment about different semantics on the GNU ld section
1322 ld_shlibs=no
1323 ;;
1324
1325 cygwin* | mingw*)
1326 # When not using gcc, we currently assume that we are using
1327 # Microsoft Visual C++.
1328 # hardcode_libdir_flag_spec is actually meaningless, as there is
1329 # no search path for DLLs.
1330 hardcode_libdir_flag_spec=' '
1331 allow_undefined_flag=unsupported
1332 # Tell ltmain to make .lib files, not .a files.
1333 libext=lib
1334 # FIXME: Setting linknames here is a bad hack.
1335 archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1336 # The linker will automatically build a .lib file if we build a DLL.
1337 old_archive_from_new_cmds='true'
1338 # FIXME: Should let the user specify the lib program.
1339 old_archive_cmds='lib /OUT:$oldlib$oldobjs'
1340 fix_srcfile_path='`cygpath -w $srcfile`'
1341 ;;
1342
1343 freebsd1*)
1344 ld_shlibs=no
1345 ;;
1346
1347 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1348 # support. Future versions do this automatically, but an explicit c++rt0.o
1349 # does not break anything, and helps significantly (at the cost of a little
1350 # extra space).
1351 freebsd2.2*)
1352 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
1353 hardcode_libdir_flag_spec='-R$libdir'
1354 hardcode_direct=yes
1355 hardcode_shlibpath_var=no
1356 ;;
1357
1358 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
1359 freebsd2*)
1360 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
1361 hardcode_direct=yes
1362 hardcode_minus_L=yes
1363 hardcode_shlibpath_var=no
1364 ;;
1365
1366 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1367 freebsd*)
1368 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
1369 hardcode_libdir_flag_spec='-R$libdir'
1370 hardcode_direct=yes
1371 hardcode_shlibpath_var=no
1372 ;;
1373
1374 darwin[15].* | rhapsody*)
1375 allow_undefined_flag='-undefined error'
1376 archive_cmds='$CC $(test x$module = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts $(test x$module != xyes && echo -install_name $rpath/$soname) $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)'
1377 # We need to add '_' to the symbols in $export_symbols first
1378 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib'
1379 hardcode_direct=yes
1380 hardcode_shlibpath_var=no
1381 whole_archive_flag_spec='-all_load $convenience'
1382 ;;
1383
1384 # Mac OS X v10.2 uses bash for /bin/sh instead of zsh, and the quoting syntax is incompatible
1385 darwin*)
1386 allow_undefined_flag='-undefined error'
1387 archive_cmds='$CC $(test x$module = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts $(test x$module != xyes && echo -install_name $LD_RUN_PATH/$soname $tmp_verstring)'
1388 # We need to add '_' to the symbols in $export_symbols first
1389 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib'
1390 hardcode_direct=yes
1391 hardcode_shlibpath_var=no
1392 whole_archive_flag_spec='-all_load $convenience'
1393 ;;
1394
1395 hpux9* | hpux10* | hpux11*)
1396 case "$host_os" in
1397 hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
1398 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
1399 esac
1400 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1401 hardcode_libdir_separator=:
1402 hardcode_direct=yes
1403 hardcode_minus_L=yes # Not in the search PATH, but as the default
1404 # location of the library.
1405 export_dynamic_flag_spec='${wl}-E'
1406 ;;
1407
1408 irix5* | irix6*)
1409 if test "$with_gcc" = yes; then
1410 archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
1411 else
1412 archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
1413 fi
1414 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1415 hardcode_libdir_separator=:
1416 ;;
1417
1418 netbsd*)
1419 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1420 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out
1421 else
1422 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF
1423 fi
1424 hardcode_libdir_flag_spec='${wl}-R$libdir'
1425 hardcode_direct=yes
1426 hardcode_shlibpath_var=no
1427 ;;
1428
1429 openbsd*)
1430 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
1431 hardcode_libdir_flag_spec='-R$libdir'
1432 hardcode_direct=yes
1433 hardcode_shlibpath_var=no
1434 ;;
1435
1436 os2*)
1437 hardcode_libdir_flag_spec='-L$libdir'
1438 hardcode_minus_L=yes
1439 allow_undefined_flag=unsupported
1440 archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def'
1441 old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
1442 ;;
1443
1444 osf3*)
1445 if test "$with_gcc" = yes; then
1446 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1447 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
1448 else
1449 allow_undefined_flag=' -expect_unresolved \*'
1450 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
1451 fi
1452 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1453 hardcode_libdir_separator=:
1454 ;;
1455
1456 osf4* | osf5*) # As osf3* with the addition of the -msym flag
1457 if test "$with_gcc" = yes; then
1458 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1459 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
1460 else
1461 allow_undefined_flag=' -expect_unresolved \*'
1462 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
1463 fi
1464 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1465 hardcode_libdir_separator=:
1466 ;;
1467
1468 sco3.2v5*)
1469 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1470 hardcode_shlibpath_var=no
1471 runpath_var=LD_RUN_PATH
1472 hardcode_runpath_var=yes
1473 ;;
1474
1475 solaris*)
1476 no_undefined_flag=' -z text'
1477 # $CC -shared without GNU ld will not create a library from C++
1478 # object files and a static libstdc++, better avoid it by now
1479 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
1480 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1481 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
1482 hardcode_libdir_flag_spec='-R$libdir'
1483 hardcode_shlibpath_var=no
1484 case "$host_os" in
1485 solaris2.[0-5] | solaris2.[0-5].*) ;;
1486 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
1487 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
1488 esac
1489 ;;
1490
1491 sunos4*)
1492 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
1493 hardcode_libdir_flag_spec='-L$libdir'
1494 hardcode_direct=yes
1495 hardcode_minus_L=yes
1496 hardcode_shlibpath_var=no
1497 ;;
1498
1499 sysv4)
1500 if test "x$host_vendor" = xsequent; then
1501 # Use $CC to link under sequent, because it throws in some extra .o
1502 # files that make .init and .fini sections work.
1503 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts'
1504 else
1505 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1506 fi
1507 runpath_var='LD_RUN_PATH'
1508 hardcode_shlibpath_var=no
1509 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
1510 ;;
1511
1512 sysv4.3*)
1513 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1514 hardcode_shlibpath_var=no
1515 export_dynamic_flag_spec='-Bexport'
1516 ;;
1517
1518 sysv5*)
1519 no_undefined_flag=' -z text'
1520 # $CC -shared without GNU ld will not create a library from C++
1521 # object files and a static libstdc++, better avoid it by now
1522 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
1523 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1524 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
1525 hardcode_libdir_flag_spec=
1526 hardcode_shlibpath_var=no
1527 runpath_var='LD_RUN_PATH'
1528 ;;
1529
1530 uts4*)
1531 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1532 hardcode_libdir_flag_spec='-L$libdir'
1533 hardcode_shlibpath_var=no
1534 ;;
1535
1536 dgux*)
1537 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1538 hardcode_libdir_flag_spec='-L$libdir'
1539 hardcode_shlibpath_var=no
1540 ;;
1541
1542 sysv4*MP*)
1543 if test -d /usr/nec; then
1544 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1545 hardcode_shlibpath_var=no
1546 runpath_var=LD_RUN_PATH
1547 hardcode_runpath_var=yes
1548 ld_shlibs=yes
1549 fi
1550 ;;
1551
1552 sysv4.2uw2*)
1553 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
1554 hardcode_direct=yes
1555 hardcode_minus_L=no
1556 hardcode_shlibpath_var=no
1557 hardcode_runpath_var=yes
1558 runpath_var=LD_RUN_PATH
1559 ;;
1560
1561 unixware7*)
1562 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1563 runpath_var='LD_RUN_PATH'
1564 hardcode_shlibpath_var=no
1565 ;;
1566
1567 *)
1568 ld_shlibs=no
1569 ;;
1570 esac
1571 fi
1572 echo "$ac_t$ld_shlibs" 1>&6
1573 test "$ld_shlibs" = no && can_build_shared=no
1574
1575 if test -z "$NM"; then
1576 echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
1577 case "$NM" in
1578 [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
1579 *)
1580 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
1581 for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
1582 test -z "$ac_dir" && ac_dir=.
1583 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then
1584 # Check to see if the nm accepts a BSD-compat flag.
1585 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1586 # nm: unknown option "B" ignored
1587 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1588 NM="$ac_dir/nm -B"
1589 break
1590 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1591 NM="$ac_dir/nm -p"
1592 break
1593 else
1594 NM=${NM="$ac_dir/nm"} # keep the first match, but
1595 continue # so that we can try to find one that supports BSD flags
1596 fi
1597 fi
1598 done
1599 IFS="$ac_save_ifs"
1600 test -z "$NM" && NM=nm
1601 ;;
1602 esac
1603 echo "$ac_t$NM" 1>&6
1604 fi
1605
1606 # Check for command to grab the raw symbol name followed by C symbol from nm.
1607 echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
1608
1609 # These are sane defaults that work on at least a few old systems.
1610 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
1611
1612 # Character class describing NM global symbol codes.
1613 symcode='[BCDEGRST]'
1614
1615 # Regexp to match symbols that can be accessed directly from C.
1616 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1617
1618 # Transform the above into a raw symbol and a C symbol.
1619 symxfrm='\1 \2\3 \3'
1620
1621 # Transform an extracted symbol line into a proper C declaration
1622 global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1623
1624 # Define system-specific variables.
1625 case "$host_os" in
1626 aix*)
1627 symcode='[BCDT]'
1628 ;;
1629 cygwin* | mingw*)
1630 symcode='[ABCDGISTW]'
1631 ;;
1632 hpux*) # Its linker distinguishes data from code symbols
1633 global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
1634 ;;
1635 irix*)
1636 symcode='[BCDEGRST]'
1637 ;;
1638 solaris*)
1639 symcode='[BDT]'
1640 ;;
1641 sysv4)
1642 symcode='[DFNSTU]'
1643 ;;
1644 esac
1645
1646 # If we're using GNU nm, then use its standard symbol codes.
1647 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1648 symcode='[ABCDGISTW]'
1649 fi
1650
1651 # Try without a prefix undercore, then with it.
1652 for ac_symprfx in "" "_"; do
1653
1654 # Write the raw and C identifiers.
1655 global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'"
1656
1657 # Check to see that the pipe works correctly.
1658 pipe_works=no
1659 $rm conftest*
1660 cat > conftest.c <<EOF
1661 #ifdef __cplusplus
1662 extern "C" {
1663 #endif
1664 char nm_test_var;
1665 void nm_test_func(){}
1666 #ifdef __cplusplus
1667 }
1668 #endif
1669 main(){nm_test_var='a';nm_test_func();return(0);}
1670 EOF
1671
1672 echo "$progname:1662: checking if global_symbol_pipe works" >&5
1673 if { (eval echo $progname:1663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
1674 # Now try to grab the symbols.
1675 nlist=conftest.nm
1676 if { echo "$progname:1666: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
1677
1678 # Try sorting and uniquifying the output.
1679 if sort "$nlist" | uniq > "$nlist"T; then
1680 mv -f "$nlist"T "$nlist"
1681 else
1682 rm -f "$nlist"T
1683 fi
1684
1685 # Make sure that we snagged all the symbols we need.
1686 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1687 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1688 cat <<EOF > conftest.c
1689 #ifdef __cplusplus
1690 extern "C" {
1691 #endif
1692
1693 EOF
1694 # Now generate the symbol file.
1695 eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
1696
1697 cat <<EOF >> conftest.c
1698 #if defined (__STDC__) && __STDC__
1699 # define lt_ptr_t void *
1700 #else
1701 # define lt_ptr_t char *
1702 # define const
1703 #endif
1704
1705 /* The mapping between symbol names and symbols. */
1706 const struct {
1707 const char *name;
1708 lt_ptr_t address;
1709 }
1710 lt_preloaded_symbols[] =
1711 {
1712 EOF
1713 sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
1714 cat <<\EOF >> conftest.c
1715 {0, (lt_ptr_t) 0}
1716 };
1717
1718 #ifdef __cplusplus
1719 }
1720 #endif
1721 EOF
1722 # Now try linking the two files.
1723 mv conftest.$objext conftstm.$objext
1724 save_LIBS="$LIBS"
1725 save_CFLAGS="$CFLAGS"
1726 LIBS="conftstm.$objext"
1727 CFLAGS="$CFLAGS$no_builtin_flag"
1728 if { (eval echo $progname:1718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1729 pipe_works=yes
1730 else
1731 echo "$progname: failed program was:" >&5
1732 cat conftest.c >&5
1733 fi
1734 LIBS="$save_LIBS"
1735 else
1736 echo "cannot find nm_test_func in $nlist" >&5
1737 fi
1738 else
1739 echo "cannot find nm_test_var in $nlist" >&5
1740 fi
1741 else
1742 echo "cannot run $global_symbol_pipe" >&5
1743 fi
1744 else
1745 echo "$progname: failed program was:" >&5
1746 cat conftest.c >&5
1747 fi
1748 $rm conftest* conftst*
1749
1750 # Do not use the global_symbol_pipe unless it works.
1751 if test "$pipe_works" = yes; then
1752 break
1753 else
1754 global_symbol_pipe=
1755 fi
1756 done
1757 if test "$pipe_works" = yes; then
1758 echo "${ac_t}ok" 1>&6
1759 else
1760 echo "${ac_t}failed" 1>&6
1761 fi
1762
1763 if test -z "$global_symbol_pipe"; then
1764 global_symbol_to_cdecl=
1765 fi
1766
1767 # Check hardcoding attributes.
1768 echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
1769 hardcode_action=
1770 if test -n "$hardcode_libdir_flag_spec" || \
1771 test -n "$runpath_var"; then
1772
1773 # We can hardcode non-existant directories.
1774 if test "$hardcode_direct" != no &&
1775 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1776 # have to relink, otherwise we might link with an installed library
1777 # when we should be linking with a yet-to-be-installed one
1778 ## test "$hardcode_shlibpath_var" != no &&
1779 test "$hardcode_minus_L" != no; then
1780 # Linking always hardcodes the temporary library directory.
1781 hardcode_action=relink
1782 else
1783 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1784 hardcode_action=immediate
1785 fi
1786 else
1787 # We cannot hardcode anything, or else we can only hardcode existing
1788 # directories.
1789 hardcode_action=unsupported
1790 fi
1791 echo "$ac_t$hardcode_action" 1>&6
1792
1793
1794 reload_flag=
1795 reload_cmds='$LD$reload_flag -o $output$reload_objs'
1796 echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
1797 # PORTME Some linkers may need a different reload flag.
1798 reload_flag='-r'
1799 echo "$ac_t$reload_flag" 1>&6
1800 test -n "$reload_flag" && reload_flag=" $reload_flag"
1801
1802 # PORTME Fill in your ld.so characteristics
1803 library_names_spec=
1804 libname_spec='lib$name'
1805 soname_spec=
1806 postinstall_cmds=
1807 postuninstall_cmds=
1808 finish_cmds=
1809 finish_eval=
1810 shlibpath_var=
1811 shlibpath_overrides_runpath=unknown
1812 version_type=none
1813 dynamic_linker="$host_os ld.so"
1814 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1815 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1816 file_magic_cmd=
1817 file_magic_test_file=
1818 deplibs_check_method='unknown'
1819 # Need to set the preceding variable on all platforms that support
1820 # interlibrary dependencies.
1821 # 'none' -- dependencies not supported.
1822 # `unknown' -- same as none, but documents that we really don't know.
1823 # 'pass_all' -- all dependencies passed with no checks.
1824 # 'test_compile' -- check by making test program.
1825 # 'file_magic [regex]' -- check by looking for files in library path
1826 # which responds to the $file_magic_cmd with a given egrep regex.
1827 # If you have `file' or equivalent on your system and you're not sure
1828 # whether `pass_all' will *always* work, you probably want this one.
1829 echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
1830 case "$host_os" in
1831 aix3*)
1832 version_type=linux
1833 library_names_spec='${libname}${release}.so$versuffix $libname.a'
1834 shlibpath_var=LIBPATH
1835
1836 # AIX has no versioning support, so we append a major version to the name.
1837 soname_spec='${libname}${release}.so$major'
1838 ;;
1839
1840 aix4*)
1841 version_type=linux
1842 # AIX has no versioning support, so currently we can not hardcode correct
1843 # soname into executable. Probably we can add versioning support to
1844 # collect2, so additional links can be useful in future.
1845 # We preserve .a as extension for shared libraries though AIX4.2
1846 # and later linker supports .so
1847 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
1848 shlibpath_var=LIBPATH
1849 deplibs_check_method=pass_all
1850 ;;
1851
1852 amigaos*)
1853 library_names_spec='$libname.ixlibrary $libname.a'
1854 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1855 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
1856 ;;
1857
1858 beos*)
1859 library_names_spec='${libname}.so'
1860 dynamic_linker="$host_os ld.so"
1861 shlibpath_var=LIBRARY_PATH
1862 deplibs_check_method=pass_all
1863 lt_cv_dlopen="load_add_on"
1864 lt_cv_dlopen_libs=
1865 lt_cv_dlopen_self=yes
1866 ;;
1867
1868 bsdi4*)
1869 version_type=linux
1870 need_version=no
1871 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1872 soname_spec='${libname}${release}.so$major'
1873 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1874 shlibpath_var=LD_LIBRARY_PATH
1875 deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1876 file_magic_cmd=/usr/bin/file
1877 file_magic_test_file=/shlib/libc.so
1878 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1879 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1880 export_dynamic_flag_spec=-rdynamic
1881 # the default ld.so.conf also contains /usr/contrib/lib and
1882 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1883 # libtool to hard-code these into programs
1884 ;;
1885
1886 cygwin* | mingw*)
1887 version_type=windows
1888 need_version=no
1889 need_lib_prefix=no
1890 if test "$with_gcc" = yes; then
1891 library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
1892 else
1893 library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
1894 fi
1895 dynamic_linker='Win32 ld.exe'
1896 deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1897 file_magic_cmd='${OBJDUMP} -f'
1898 # FIXME: first we should search . and the directory the executable is in
1899 shlibpath_var=PATH
1900 lt_cv_dlopen="LoadLibrary"
1901 lt_cv_dlopen_libs=
1902 ;;
1903
1904 freebsd1*)
1905 dynamic_linker=no
1906 ;;
1907
1908 freebsd*)
1909 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1910 version_type=freebsd-$objformat
1911 case "$version_type" in
1912 freebsd-elf*)
1913 deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
1914 file_magic_cmd=/usr/bin/file
1915 file_magic_test_file=`echo /usr/lib/libc.so*`
1916 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1917 need_version=no
1918 need_lib_prefix=no
1919 ;;
1920 freebsd-*)
1921 deplibs_check_method=unknown
1922 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
1923 need_version=yes
1924 ;;
1925 esac
1926 shlibpath_var=LD_LIBRARY_PATH
1927 case "$host_os" in
1928 freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*)
1929 shlibpath_overrides_runpath=yes
1930 ;;
1931 *) # from 3.2 on
1932 shlibpath_overrides_runpath=no
1933 ;;
1934 esac
1935 ;;
1936
1937 darwin* | rhapsody*)
1938 dynamic_linker="$host_os dyld"
1939 version_type=darwin
1940 need_lib_prefix=no
1941 need_version=no
1942 deplibs_check_method='file_magic Mach-O (64-bit )?dynamically linked shared library'
1943 file_magic_cmd='/usr/bin/file -L'
1944 case "$host_os" in
1945 rhapsody* | darwin1.[012])
1946 file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1947 ;;
1948 *) # Darwin 1.3 on
1949 file_magic_test_file='/usr/lib/libSystem.dylib'
1950 ;;
1951 esac
1952 library_names_spec='${libname}.$(test x$module = xyes && echo plugin || echo dylib)'
1953 soname_spec='${libname}.$(test x$module = xyes && echo plugin || echo dylib)'
1954 shlibpath_overrides_runpath=yes
1955 shlibpath_var=DYLD_LIBRARY_PATH
1956 ;;
1957
1958 gnu*)
1959 version_type=linux
1960 need_lib_prefix=no
1961 need_version=no
1962 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
1963 soname_spec='${libname}${release}.so$major'
1964 shlibpath_var=LD_LIBRARY_PATH
1965 ;;
1966
1967 hpux9* | hpux10* | hpux11*)
1968 # Give a soname corresponding to the major version so that dld.sl refuses to
1969 # link against other versions.
1970 dynamic_linker="$host_os dld.sl"
1971 version_type=sunos
1972 need_lib_prefix=no
1973 need_version=no
1974 shlibpath_var=SHLIB_PATH
1975 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1976 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1977 soname_spec='${libname}${release}.sl$major'
1978 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1979 postinstall_cmds='chmod 555 $lib'
1980 case "$host_os" in
1981 hpux10.20*)
1982 # TODO: Does this work for hpux-11 too?
1983 deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1984 file_magic_cmd=/usr/bin/file
1985 file_magic_test_file=/usr/lib/libc.sl
1986 ;;
1987 esac
1988 ;;
1989
1990 irix5* | irix6*)
1991 version_type=irix
1992 need_lib_prefix=no
1993 need_version=no
1994 soname_spec='${libname}${release}.so.$major'
1995 library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
1996 case "$host_os" in
1997 irix5*)
1998 libsuff= shlibsuff=
1999 # this will be overridden with pass_all, but let us keep it just in case
2000 deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2001 ;;
2002 *)
2003 case "$LD" in # libtool.m4 will add one of these switches to LD
2004 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2005 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2006 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2007 *) libsuff= shlibsuff= libmagic=never-match;;
2008 esac
2009 ;;
2010 esac
2011 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2012 shlibpath_overrides_runpath=no
2013 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2014 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2015 file_magic_cmd=/usr/bin/file
2016 file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2017 deplibs_check_method='pass_all'
2018 ;;
2019
2020 # No shared lib support for Linux oldld, aout, or coff.
2021 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2022 dynamic_linker=no
2023 ;;
2024
2025 # This must be Linux ELF.
2026 linux-gnu*)
2027 version_type=linux
2028 need_lib_prefix=no
2029 need_version=no
2030 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2031 soname_spec='${libname}${release}.so$major'
2032 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2033 shlibpath_var=LD_LIBRARY_PATH
2034 shlibpath_overrides_runpath=no
2035 deplibs_check_method=pass_all
2036
2037 if test -f /lib/ld.so.1; then
2038 dynamic_linker='GNU ld.so'
2039 else
2040 # Only the GNU ld.so supports shared libraries on MkLinux.
2041 case "$host_cpu" in
2042 powerpc*) dynamic_linker=no ;;
2043 *) dynamic_linker='Linux ld.so' ;;
2044 esac
2045 fi
2046 ;;
2047
2048 netbsd*)
2049 version_type=sunos
2050 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2051 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2052 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2053 dynamic_linker='NetBSD (a.out) ld.so'
2054 else
2055 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2056 soname_spec='${libname}${release}.so$major'
2057 dynamic_linker='NetBSD ld.elf_so'
2058 fi
2059 shlibpath_var=LD_LIBRARY_PATH
2060 ;;
2061
2062 openbsd*)
2063 version_type=sunos
2064 if test "$with_gnu_ld" = yes; then
2065 need_lib_prefix=no
2066 need_version=no
2067 fi
2068 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2069 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2070 shlibpath_var=LD_LIBRARY_PATH
2071 ;;
2072
2073 os2*)
2074 libname_spec='$name'
2075 need_lib_prefix=no
2076 library_names_spec='$libname.dll $libname.a'
2077 dynamic_linker='OS/2 ld.exe'
2078 shlibpath_var=LIBPATH
2079 ;;
2080
2081 osf3* | osf4* | osf5*)
2082 version_type=osf
2083 need_version=no
2084 soname_spec='${libname}${release}.so'
2085 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2086 shlibpath_var=LD_LIBRARY_PATH
2087 # this will be overridden with pass_all, but let us keep it just in case
2088 deplibs_check_method='file_magic COFF format alpha shared library'
2089 file_magic_cmd=/usr/bin/file
2090 file_magic_test_file=/shlib/libc.so
2091 deplibs_check_method='pass_all'
2092 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2093 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2094 ;;
2095
2096 sco3.2v5*)
2097 version_type=osf
2098 soname_spec='${libname}${release}.so$major'
2099 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2100 shlibpath_var=LD_LIBRARY_PATH
2101 ;;
2102
2103 solaris*)
2104 version_type=linux
2105 need_lib_prefix=no
2106 need_version=no
2107 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2108 soname_spec='${libname}${release}.so$major'
2109 shlibpath_var=LD_LIBRARY_PATH
2110 shlibpath_overrides_runpath=yes
2111 # ldd complains unless libraries are executable
2112 postinstall_cmds='chmod +x $lib'
2113 deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib"
2114 file_magic_cmd=/usr/bin/file
2115 file_magic_test_file=/lib/libc.so
2116 ;;
2117
2118 sunos4*)
2119 version_type=sunos
2120 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2121 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2122 shlibpath_var=LD_LIBRARY_PATH
2123 shlibpath_overrides_runpath=yes
2124 if test "$with_gnu_ld" = yes; then
2125 need_lib_prefix=no
2126 fi
2127 need_version=yes
2128 ;;
2129
2130 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2131 version_type=linux
2132 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2133 soname_spec='${libname}${release}.so$major'
2134 shlibpath_var=LD_LIBRARY_PATH
2135 case "$host_vendor" in
2136 sequent)
2137 file_magic_cmd='/bin/file'
2138 deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
2139 ;;
2140 ncr)
2141 deplibs_check_method='pass_all'
2142 ;;
2143 motorola)
2144 need_lib_prefix=no
2145 need_version=no
2146 shlibpath_overrides_runpath=no
2147 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2148 deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
2149 file_magic_cmd=/usr/bin/file
2150 file_magic_test_file=`echo /usr/lib/libc.so*`
2151 ;;
2152 esac
2153 ;;
2154
2155 uts4*)
2156 version_type=linux
2157 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2158 soname_spec='${libname}${release}.so$major'
2159 shlibpath_var=LD_LIBRARY_PATH
2160 ;;
2161
2162 dgux*)
2163 version_type=linux
2164 need_lib_prefix=no
2165 need_version=no
2166 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2167 soname_spec='${libname}${release}.so$major'
2168 shlibpath_var=LD_LIBRARY_PATH
2169 ;;
2170
2171 sysv4*MP*)
2172 if test -d /usr/nec ;then
2173 version_type=linux
2174 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2175 soname_spec='$libname.so.$major'
2176 shlibpath_var=LD_LIBRARY_PATH
2177 fi
2178 ;;
2179
2180 *)
2181 dynamic_linker=no
2182 ;;
2183 esac
2184 echo "$ac_t$dynamic_linker" 1>&6
2185 test "$dynamic_linker" = no && can_build_shared=no
2186
2187 # Report the final consequences.
2188 echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
2189
2190 # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
2191 # configure.in, otherwise build static only libraries.
2192 case "$host_os" in
2193 cygwin* | mingw* | os2*)
2194 if test x$can_build_shared = xyes; then
2195 test x$enable_win32_dll = xno && can_build_shared=no
2196 echo "checking if package supports dlls... $can_build_shared" 1>&6
2197 fi
2198 ;;
2199 esac
2200
2201 if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
2202 case "$deplibs_check_method" in
2203 "file_magic "*)
2204 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2205 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2206 egrep "$file_magic_regex" > /dev/null; then
2207 :
2208 else
2209 cat <<EOF 1>&2
2210
2211 *** Warning: the command libtool uses to detect shared libraries,
2212 *** $file_magic_cmd, produces output that libtool cannot recognize.
2213 *** The result is that libtool may fail to recognize shared libraries
2214 *** as such. This will affect the creation of libtool libraries that
2215 *** depend on shared libraries, but programs linked with such libtool
2216 *** libraries will work regardless of this problem. Nevertheless, you
2217 *** may want to report the problem to your system manager and/or to
2218 *** bug-libtool@gnu.org
2219
2220 EOF
2221 fi ;;
2222 esac
2223 fi
2224
2225 echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
2226 test "$can_build_shared" = "no" && enable_shared=no
2227
2228 # On AIX, shared libraries and static libraries use the same namespace, and
2229 # are all built from PIC.
2230 case "$host_os" in
2231 aix3*)
2232 test "$enable_shared" = yes && enable_static=no
2233 if test -n "$RANLIB"; then
2234 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2235 postinstall_cmds='$RANLIB $lib'
2236 fi
2237 ;;
2238
2239 aix4*)
2240 test "$enable_shared" = yes && enable_static=no
2241 ;;
2242 esac
2243
2244 echo "$ac_t$enable_shared" 1>&6
2245
2246 # Make sure either enable_shared or enable_static is yes.
2247 test "$enable_shared" = yes || enable_static=yes
2248
2249 # Propagate what we've learned...
2250 ac_cv_can_build_shared="$can_build_shared"
2251
2252 echo "checking whether to build static libraries... $enable_static" 1>&6
2253
2254 if test "$hardcode_action" = relink; then
2255 # Fast installation is not supported
2256 enable_fast_install=no
2257 elif test "$shlibpath_overrides_runpath" = yes ||
2258 test "$enable_shared" = no; then
2259 # Fast installation is not necessary
2260 enable_fast_install=needless
2261 fi
2262
2263 echo $ac_n "checking for objdir... $ac_c" 1>&6
2264 rm -f .libs 2>/dev/null
2265 mkdir .libs 2>/dev/null
2266 if test -d .libs; then
2267 objdir=.libs
2268 else
2269 # MS-DOS does not allow filenames that begin with a dot.
2270 objdir=_libs
2271 fi
2272 rmdir .libs 2>/dev/null
2273 echo "$ac_t$objdir" 1>&6
2274
2275 if test "x$enable_dlopen" != xyes; then
2276 enable_dlopen=unknown
2277 enable_dlopen_self=unknown
2278 enable_dlopen_self_static=unknown
2279 else
2280 if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
2281 lt_cv_dlopen=no lt_cv_dlopen_libs=
2282 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2283 echo "$progname:2270: checking for dlopen in -ldl" >&5
2284 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2285 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2286 echo $ac_n "(cached) $ac_c" 1>&6
2287 else
2288 ac_save_LIBS="$LIBS"
2289 LIBS="-ldl $LIBS"
2290 cat > conftest.$ac_ext <<EOF
2291 #line 2278 "ltconfig"
2292 /* Override any gcc2 internal prototype to avoid an error. */
2293 /* We use char because int might match the return type of a gcc2
2294 builtin and then its argument prototype would still apply. */
2295 #ifdef __cplusplus
2296 extern "C"
2297 #endif
2298 char dlopen();
2299
2300 int main() {
2301 dlopen()
2302 ; return 0; }
2303 EOF
2304 if { (eval echo $progname:2291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2305 rm -rf conftest*
2306 eval "ac_cv_lib_$ac_lib_var=yes"
2307 else
2308 echo "$progname: failed program was:" >&5
2309 cat conftest.$ac_ext >&5
2310 rm -rf conftest*
2311 eval "ac_cv_lib_$ac_lib_var=no"
2312 fi
2313 rm -f conftest*
2314 LIBS="$ac_save_LIBS"
2315
2316 fi
2317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2318 echo "$ac_t""yes" 1>&6
2319 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
2320 else
2321 echo "$ac_t""no" 1>&6
2322 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
2323 echo "$progname:2310: checking for dlopen" >&5
2324 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
2325 echo $ac_n "(cached) $ac_c" 1>&6
2326 else
2327 cat > conftest.$ac_ext <<EOF
2328 #line 2315 "ltconfig"
2329 /* System header to define __stub macros and hopefully few prototypes,
2330 which can conflict with char dlopen(); below. */
2331 #include <assert.h>
2332 /* Override any gcc2 internal prototype to avoid an error. */
2333 /* We use char because int might match the return type of a gcc2
2334 builtin and then its argument prototype would still apply. */
2335 #ifdef __cplusplus
2336 extern "C"
2337 #endif
2338 char dlopen();
2339
2340 int main() {
2341
2342 /* The GNU C library defines this for functions which it implements
2343 to always fail with ENOSYS. Some functions are actually named
2344 something starting with __ and the normal name is an alias. */
2345 #if defined (__stub_dlopen) || defined (__stub___dlopen)
2346 choke me
2347 #else
2348 dlopen();
2349 #endif
2350
2351 ; return 0; }
2352 EOF
2353 if { (eval echo $progname:2340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2354 rm -rf conftest*
2355 eval "ac_cv_func_dlopen=yes"
2356 else
2357 echo "$progname: failed program was:" >&5
2358 cat conftest.$ac_ext >&5
2359 rm -rf conftest*
2360 eval "ac_cv_func_dlopen=no"
2361 fi
2362 rm -f conftest*
2363 fi
2364 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
2365 echo "$ac_t""yes" 1>&6
2366 lt_cv_dlopen="dlopen"
2367 else
2368 echo "$ac_t""no" 1>&6
2369 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
2370 echo "$progname:2357: checking for dld_link in -ldld" >&5
2371 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
2372 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2373 echo $ac_n "(cached) $ac_c" 1>&6
2374 else
2375 ac_save_LIBS="$LIBS"
2376 LIBS="-ldld $LIBS"
2377 cat > conftest.$ac_ext <<EOF
2378 #line 2365 "ltconfig"
2379 /* Override any gcc2 internal prototype to avoid an error. */
2380 /* We use char because int might match the return type of a gcc2
2381 builtin and then its argument prototype would still apply. */
2382 #ifdef __cplusplus
2383 extern "C"
2384 #endif
2385 char dld_link();
2386
2387 int main() {
2388 dld_link()
2389 ; return 0; }
2390 EOF
2391 if { (eval echo $progname:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2392 rm -rf conftest*
2393 eval "ac_cv_lib_$ac_lib_var=yes"
2394 else
2395 echo "$progname: failed program was:" >&5
2396 cat conftest.$ac_ext >&5
2397 rm -rf conftest*
2398 eval "ac_cv_lib_$ac_lib_var=no"
2399 fi
2400 rm -f conftest*
2401 LIBS="$ac_save_LIBS"
2402
2403 fi
2404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2405 echo "$ac_t""yes" 1>&6
2406 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
2407 else
2408 echo "$ac_t""no" 1>&6
2409 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
2410 echo "$progname:2397: checking for shl_load" >&5
2411 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
2412 echo $ac_n "(cached) $ac_c" 1>&6
2413 else
2414 cat > conftest.$ac_ext <<EOF
2415 #line 2402 "ltconfig"
2416 /* System header to define __stub macros and hopefully few prototypes,
2417 which can conflict with char shl_load(); below. */
2418 #include <assert.h>
2419 /* Override any gcc2 internal prototype to avoid an error. */
2420 /* We use char because int might match the return type of a gcc2
2421 builtin and then its argument prototype would still apply. */
2422 #ifdef __cplusplus
2423 extern "C"
2424 #endif
2425 char shl_load();
2426
2427 int main() {
2428
2429 /* The GNU C library defines this for functions which it implements
2430 to always fail with ENOSYS. Some functions are actually named
2431 something starting with __ and the normal name is an alias. */
2432 #if defined (__stub_shl_load) || defined (__stub___shl_load)
2433 choke me
2434 #else
2435 shl_load();
2436 #endif
2437
2438 ; return 0; }
2439 EOF
2440 if { (eval echo $progname:2427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2441 rm -rf conftest*
2442 eval "ac_cv_func_shl_load=yes"
2443 else
2444 echo "$progname: failed program was:" >&5
2445 cat conftest.$ac_ext >&5
2446 rm -rf conftest*
2447 eval "ac_cv_func_shl_load=no"
2448 fi
2449 rm -f conftest*
2450 fi
2451
2452 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
2453 echo "$ac_t""yes" 1>&6
2454 lt_cv_dlopen="shl_load"
2455 else
2456 echo "$ac_t""no" 1>&6
2457 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
2458 echo "$progname:2445: checking for shl_load in -ldld" >&5
2459 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
2460 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2461 echo $ac_n "(cached) $ac_c" 1>&6
2462 else
2463 ac_save_LIBS="$LIBS"
2464 LIBS="-ldld $LIBS"
2465 cat > conftest.$ac_ext <<EOF
2466 #line 2453 "ltconfig"
2467 #include "confdefs.h"
2468 /* Override any gcc2 internal prototype to avoid an error. */
2469 /* We use char because int might match the return type of a gcc2
2470 builtin and then its argument prototype would still apply. */
2471 #ifdef __cplusplus
2472 extern "C"
2473 #endif
2474 char shl_load();
2475
2476 int main() {
2477 shl_load()
2478 ; return 0; }
2479 EOF
2480 if { (eval echo $progname:2467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2481 rm -rf conftest*
2482 eval "ac_cv_lib_$ac_lib_var=yes"
2483 else
2484 echo "$progname: failed program was:" >&5
2485 cat conftest.$ac_ext >&5
2486 rm -rf conftest*
2487 eval "ac_cv_lib_$ac_lib_var=no"
2488 fi
2489 rm -f conftest*
2490 LIBS="$ac_save_LIBS"
2491
2492 fi
2493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2494 echo "$ac_t""yes" 1>&6
2495 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
2496 else
2497 echo "$ac_t""no" 1>&6
2498 fi
2499
2500
2501 fi
2502
2503
2504 fi
2505
2506
2507 fi
2508
2509
2510 fi
2511
2512 fi
2513
2514 if test "x$lt_cv_dlopen" != xno; then
2515 enable_dlopen=yes
2516 fi
2517
2518 case "$lt_cv_dlopen" in
2519 dlopen)
2520 for ac_hdr in dlfcn.h; do
2521 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2522 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2523 echo "$progname:2510: checking for $ac_hdr" >&5
2524 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2525 echo $ac_n "(cached) $ac_c" 1>&6
2526 else
2527 cat > conftest.$ac_ext <<EOF
2528 #line 2515 "ltconfig"
2529 #include <$ac_hdr>
2530 int fnord = 0;
2531 EOF
2532 ac_try="$ac_compile >/dev/null 2>conftest.out"
2533 { (eval echo $progname:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2535 if test -z "$ac_err"; then
2536 rm -rf conftest*
2537 eval "ac_cv_header_$ac_safe=yes"
2538 else
2539 echo "$ac_err" >&5
2540 echo "$progname: failed program was:" >&5
2541 cat conftest.$ac_ext >&5
2542 rm -rf conftest*
2543 eval "ac_cv_header_$ac_safe=no"
2544 fi
2545 rm -f conftest*
2546 fi
2547 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2548 echo "$ac_t""yes" 1>&6
2549 else
2550 echo "$ac_t""no" 1>&6
2551 fi
2552 done
2553
2554 if test "x$ac_cv_header_dlfcn_h" = xyes; then
2555 CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2556 fi
2557 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2558 LIBS="$lt_cv_dlopen_libs $LIBS"
2559
2560 echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
2561 echo "$progname:2548: checking whether a program can dlopen itself" >&5
2562 if test "${lt_cv_dlopen_self+set}" = set; then
2563 echo $ac_n "(cached) $ac_c" 1>&6
2564 else
2565 if test "$cross_compiling" = yes; then
2566 lt_cv_dlopen_self=cross
2567 else
2568 cat > conftest.c <<EOF
2569 #line 2556 "ltconfig"
2570
2571 #if HAVE_DLFCN_H
2572 #include <dlfcn.h>
2573 #endif
2574
2575 #include <stdio.h>
2576
2577 #ifdef RTLD_GLOBAL
2578 # define LTDL_GLOBAL RTLD_GLOBAL
2579 #else
2580 # ifdef DL_GLOBAL
2581 # define LTDL_GLOBAL DL_GLOBAL
2582 # else
2583 # define LTDL_GLOBAL 0
2584 # endif
2585 #endif
2586
2587 /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
2588 find out it does not work in some platform. */
2589 #ifndef LTDL_LAZY_OR_NOW
2590 # ifdef RTLD_LAZY
2591 # define LTDL_LAZY_OR_NOW RTLD_LAZY
2592 # else
2593 # ifdef DL_LAZY
2594 # define LTDL_LAZY_OR_NOW DL_LAZY
2595 # else
2596 # ifdef RTLD_NOW
2597 # define LTDL_LAZY_OR_NOW RTLD_NOW
2598 # else
2599 # ifdef DL_NOW
2600 # define LTDL_LAZY_OR_NOW DL_NOW
2601 # else
2602 # define LTDL_LAZY_OR_NOW 0
2603 # endif
2604 # endif
2605 # endif
2606 # endif
2607 #endif
2608
2609 fnord() { int i=42;}
2610 main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
2611 if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
2612 if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
2613
2614 EOF
2615 if { (eval echo $progname:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2616 then
2617 lt_cv_dlopen_self=yes
2618 else
2619 echo "$progname: failed program was:" >&5
2620 cat conftest.$ac_ext >&5
2621 rm -fr conftest*
2622 lt_cv_dlopen_self=no
2623 fi
2624 rm -fr conftest*
2625 fi
2626
2627 fi
2628
2629 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
2630
2631 if test "$lt_cv_dlopen_self" = yes; then
2632 LDFLAGS="$LDFLAGS $link_static_flag"
2633 echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
2634 echo "$progname:2621: checking whether a statically linked program can dlopen itself" >&5
2635 if test "${lt_cv_dlopen_self_static+set}" = set; then
2636 echo $ac_n "(cached) $ac_c" 1>&6
2637 else
2638 if test "$cross_compiling" = yes; then
2639 lt_cv_dlopen_self_static=cross
2640 else
2641 cat > conftest.c <<EOF
2642 #line 2629 "ltconfig"
2643
2644 #if HAVE_DLFCN_H
2645 #include <dlfcn.h>
2646 #endif
2647
2648 #include <stdio.h>
2649
2650 #ifdef RTLD_GLOBAL
2651 # define LTDL_GLOBAL RTLD_GLOBAL
2652 #else
2653 # ifdef DL_GLOBAL
2654 # define LTDL_GLOBAL DL_GLOBAL
2655 # else
2656 # define LTDL_GLOBAL 0
2657 # endif
2658 #endif
2659
2660 /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
2661 find out it does not work in some platform. */
2662 #ifndef LTDL_LAZY_OR_NOW
2663 # ifdef RTLD_LAZY
2664 # define LTDL_LAZY_OR_NOW RTLD_LAZY
2665 # else
2666 # ifdef DL_LAZY
2667 # define LTDL_LAZY_OR_NOW DL_LAZY
2668 # else
2669 # ifdef RTLD_NOW
2670 # define LTDL_LAZY_OR_NOW RTLD_NOW
2671 # else
2672 # ifdef DL_NOW
2673 # define LTDL_LAZY_OR_NOW DL_NOW
2674 # else
2675 # define LTDL_LAZY_OR_NOW 0
2676 # endif
2677 # endif
2678 # endif
2679 # endif
2680 #endif
2681
2682 fnord() { int i=42;}
2683 main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
2684 if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
2685 if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
2686
2687 EOF
2688 if { (eval echo $progname:2675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2689 then
2690 lt_cv_dlopen_self_static=yes
2691 else
2692 echo "$progname: failed program was:" >&5
2693 cat conftest.$ac_ext >&5
2694 rm -fr conftest*
2695 lt_cv_dlopen_self_static=no
2696 fi
2697 rm -fr conftest*
2698 fi
2699
2700 fi
2701
2702 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
2703 fi
2704 ;;
2705 esac
2706
2707 case "$lt_cv_dlopen_self" in
2708 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2709 *) enable_dlopen_self=unknown ;;
2710 esac
2711
2712 case "$lt_cv_dlopen_self_static" in
2713 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2714 *) enable_dlopen_self_static=unknown ;;
2715 esac
2716 fi
2717
2718 # Copy echo and quote the copy, instead of the original, because it is
2719 # used later.
2720 ltecho="$echo"
2721 if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
2722 ltecho="$CONFIG_SHELL \$0 --fallback-echo"
2723 fi
2724 LTSHELL="$SHELL"
2725
2726 LTCONFIG_VERSION="$VERSION"
2727
2728 # Only quote variables if we're using ltmain.sh.
2729 case "$ltmain" in
2730 *.sh)
2731 # Now quote all the things that may contain metacharacters.
2732 for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
2733 old_LD old_LDFLAGS old_LIBS \
2734 old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
2735 AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
2736 reload_flag reload_cmds wl \
2737 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2738 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2739 library_names_spec soname_spec \
2740 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2741 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \
2742 file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \
2743 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2744 hardcode_libdir_flag_spec hardcode_libdir_separator \
2745 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2746 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
2747
2748 case "$var" in
2749 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2750 old_postinstall_cmds | old_postuninstall_cmds | \
2751 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2752 postinstall_cmds | postuninstall_cmds | \
2753 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2754 # Double-quote double-evaled strings.
2755 eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2756 ;;
2757 *)
2758 eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2759 ;;
2760 esac
2761 done
2762
2763 case "$ltecho" in
2764 *'\$0 --fallback-echo"')
2765 ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
2766 ;;
2767 esac
2768
2769 trap "$rm \"$ofile\"; exit 1" 1 2 15
2770 echo "creating $ofile"
2771 $rm "$ofile"
2772 cat <<EOF > "$ofile"
2773 #! $SHELL
2774
2775 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2776 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2777 # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
2778 #
2779 # Copyright (C) 1996-1999 Free Software Foundation, Inc.
2780 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2781 #
2782 # This program is free software; you can redistribute it and/or modify
2783 # it under the terms of the GNU General Public License as published by
2784 # the Free Software Foundation; either version 2 of the License, or
2785 # (at your option) any later version.
2786 #
2787 # This program is distributed in the hope that it will be useful, but
2788 # WITHOUT ANY WARRANTY; without even the implied warranty of
2789 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2790 # General Public License for more details.
2791 #
2792 # You should have received a copy of the GNU General Public License
2793 # along with this program; if not, write to the Free Software
2794 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2795 #
2796 # As a special exception to the GNU General Public License, if you
2797 # distribute this file as part of a program that contains a
2798 # configuration script generated by Autoconf, you may include it under
2799 # the same distribution terms that you use for the rest of that program.
2800
2801 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
2802 Xsed="sed -e s/^X//"
2803
2804 # The HP-UX ksh and POSIX shell print the target directory to stdout
2805 # if CDPATH is set.
2806 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2807
2808 ### BEGIN LIBTOOL CONFIG
2809 EOF
2810 cfgfile="$ofile"
2811 ;;
2812
2813 *)
2814 # Double-quote the variables that need it (for aesthetics).
2815 for var in old_CC old_CFLAGS old_CPPFLAGS \
2816 old_LD old_LDFLAGS old_LIBS \
2817 old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
2818 eval "$var=\\\"\$var\\\""
2819 done
2820
2821 # Just create a config file.
2822 cfgfile="$ofile.cfg"
2823 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
2824 echo "creating $cfgfile"
2825 $rm "$cfgfile"
2826 cat <<EOF > "$cfgfile"
2827 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
2828 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2829 EOF
2830 ;;
2831 esac
2832
2833 cat <<EOF >> "$cfgfile"
2834 # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2835 #
2836 # CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
2837 # LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
2838 # NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
2839 # DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
2840 # $0$ltconfig_args
2841 #
2842 # Compiler and other test output produced by $progname, useful for
2843 # debugging $progname, is in ./config.log if it exists.
2844
2845 # The version of $progname that generated this script.
2846 LTCONFIG_VERSION=$LTCONFIG_VERSION
2847
2848 # Shell to use when invoking shell scripts.
2849 SHELL=$LTSHELL
2850
2851 # Whether or not to build shared libraries.
2852 build_libtool_libs=$enable_shared
2853
2854 # Whether or not to build static libraries.
2855 build_old_libs=$enable_static
2856
2857 # Whether or not to optimize for fast installation.
2858 fast_install=$enable_fast_install
2859
2860 # The host system.
2861 host_alias=$host_alias
2862 host=$host
2863
2864 # An echo program that does not interpret backslashes.
2865 echo=$ltecho
2866
2867 # The archiver.
2868 AR=$AR
2869
2870 # The default C compiler.
2871 CC=$CC
2872
2873 # The linker used to build libraries.
2874 LD=$LD
2875
2876 # Whether we need hard or soft links.
2877 LN_S=$LN_S
2878
2879 # A BSD-compatible nm program.
2880 NM=$NM
2881
2882 # Used on cygwin: DLL creation program.
2883 DLLTOOL="$DLLTOOL"
2884
2885 # Used on cygwin: object dumper.
2886 OBJDUMP="$OBJDUMP"
2887
2888 # Used on cygwin: assembler.
2889 AS="$AS"
2890
2891 # The name of the directory that contains temporary libtool files.
2892 objdir=$objdir
2893
2894 # How to create reloadable object files.
2895 reload_flag=$reload_flag
2896 reload_cmds=$reload_cmds
2897
2898 # How to pass a linker flag through the compiler.
2899 wl=$wl
2900
2901 # Object file suffix (normally "o").
2902 objext="$objext"
2903
2904 # Old archive suffix (normally "a").
2905 libext="$libext"
2906
2907 # Executable file suffix (normally "").
2908 exeext="$exeext"
2909
2910 # Additional compiler flags for building library objects.
2911 pic_flag=$pic_flag
2912
2913 # Does compiler simultaneously support -c and -o options?
2914 compiler_c_o=$compiler_c_o
2915
2916 # Can we write directly to a .lo ?
2917 compiler_o_lo=$compiler_o_lo
2918
2919 # Must we lock files when doing compilation ?
2920 need_locks=$need_locks
2921
2922 # Do we need the lib prefix for modules?
2923 need_lib_prefix=$need_lib_prefix
2924
2925 # Do we need a version for libraries?
2926 need_version=$need_version
2927
2928 # Whether dlopen is supported.
2929 dlopen=$enable_dlopen
2930
2931 # Whether dlopen of programs is supported.
2932 dlopen_self=$enable_dlopen_self
2933
2934 # Whether dlopen of statically linked programs is supported.
2935 dlopen_self_static=$enable_dlopen_self_static
2936
2937 # Compiler flag to prevent dynamic linking.
2938 link_static_flag=$link_static_flag
2939
2940 # Compiler flag to turn off builtin functions.
2941 no_builtin_flag=$no_builtin_flag
2942
2943 # Compiler flag to allow reflexive dlopens.
2944 export_dynamic_flag_spec=$export_dynamic_flag_spec
2945
2946 # Compiler flag to generate shared objects directly from archives.
2947 whole_archive_flag_spec=$whole_archive_flag_spec
2948
2949 # Compiler flag to generate thread-safe objects.
2950 thread_safe_flag_spec=$thread_safe_flag_spec
2951
2952 # Library versioning type.
2953 version_type=$version_type
2954
2955 # Format of library name prefix.
2956 libname_spec=$libname_spec
2957
2958 # List of archive names. First name is the real one, the rest are links.
2959 # The last name is the one that the linker finds with -lNAME.
2960 library_names_spec=$library_names_spec
2961
2962 # The coded name of the library, if different from the real name.
2963 soname_spec=$soname_spec
2964
2965 # Commands used to build and install an old-style archive.
2966 RANLIB=$RANLIB
2967 old_archive_cmds=$old_archive_cmds
2968 old_postinstall_cmds=$old_postinstall_cmds
2969 old_postuninstall_cmds=$old_postuninstall_cmds
2970
2971 # Create an old-style archive from a shared archive.
2972 old_archive_from_new_cmds=$old_archive_from_new_cmds
2973
2974 # Commands used to build and install a shared archive.
2975 archive_cmds=$archive_cmds
2976 archive_expsym_cmds=$archive_expsym_cmds
2977 postinstall_cmds=$postinstall_cmds
2978 postuninstall_cmds=$postuninstall_cmds
2979
2980 # Method to check whether dependent libraries are shared objects.
2981 deplibs_check_method=$deplibs_check_method
2982
2983 # Command to use when deplibs_check_method == file_magic.
2984 file_magic_cmd=$file_magic_cmd
2985
2986 # Flag that allows shared libraries with undefined symbols to be built.
2987 allow_undefined_flag=$allow_undefined_flag
2988
2989 # Flag that forces no undefined symbols.
2990 no_undefined_flag=$no_undefined_flag
2991
2992 # Commands used to finish a libtool library installation in a directory.
2993 finish_cmds=$finish_cmds
2994
2995 # Same as above, but a single script fragment to be evaled but not shown.
2996 finish_eval=$finish_eval
2997
2998 # Take the output of nm and produce a listing of raw symbols and C names.
2999 global_symbol_pipe=$global_symbol_pipe
3000
3001 # Transform the output of nm in a proper C declaration
3002 global_symbol_to_cdecl=$global_symbol_to_cdecl
3003
3004 # This is the shared library runtime path variable.
3005 runpath_var=$runpath_var
3006
3007 # This is the shared library path variable.
3008 shlibpath_var=$shlibpath_var
3009
3010 # Is shlibpath searched before the hard-coded library search path?
3011 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3012
3013 # How to hardcode a shared library path into an executable.
3014 hardcode_action=$hardcode_action
3015
3016 # Flag to hardcode \$libdir into a binary during linking.
3017 # This must work even if \$libdir does not exist.
3018 hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
3019
3020 # Whether we need a single -rpath flag with a separated argument.
3021 hardcode_libdir_separator=$hardcode_libdir_separator
3022
3023 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3024 # resulting binary.
3025 hardcode_direct=$hardcode_direct
3026
3027 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3028 # resulting binary.
3029 hardcode_minus_L=$hardcode_minus_L
3030
3031 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3032 # the resulting binary.
3033 hardcode_shlibpath_var=$hardcode_shlibpath_var
3034
3035 # Compile-time system search path for libraries
3036 sys_lib_search_path_spec=$sys_lib_search_path_spec
3037
3038 # Run-time system search path for libraries
3039 sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
3040
3041 # Fix the shell variable \$srcfile for the compiler.
3042 fix_srcfile_path="$fix_srcfile_path"
3043
3044 # Set to yes if exported symbols are required.
3045 always_export_symbols=$always_export_symbols
3046
3047 # The commands to list exported symbols.
3048 export_symbols_cmds=$export_symbols_cmds
3049
3050 # Symbols that should not be listed in the preloaded symbols.
3051 exclude_expsyms=$exclude_expsyms
3052
3053 # Symbols that must always be exported.
3054 include_expsyms=$include_expsyms
3055
3056 EOF
3057
3058 case "$ltmain" in
3059 *.sh)
3060 echo '### END LIBTOOL CONFIG' >> "$ofile"
3061 echo >> "$ofile"
3062 case "$host_os" in
3063 aix3*)
3064 cat <<\EOF >> "$ofile"
3065
3066 # AIX sometimes has problems with the GCC collect2 program. For some
3067 # reason, if we set the COLLECT_NAMES environment variable, the problems
3068 # vanish in a puff of smoke.
3069 if test "X${COLLECT_NAMES+set}" != Xset; then
3070 COLLECT_NAMES=
3071 export COLLECT_NAMES
3072 fi
3073 EOF
3074 ;;
3075 esac
3076
3077 # Append the ltmain.sh script.
3078 sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
3079 # We use sed instead of cat because bash on DJGPP gets confused if
3080 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3081 # text mode, it properly converts lines to CR/LF. This bash problem
3082 # is reportedly fixed, but why not run on old versions too?
3083
3084 chmod +x "$ofile"
3085 ;;
3086
3087 *)
3088 # Compile the libtool program.
3089 echo "FIXME: would compile $ltmain"
3090 ;;
3091 esac
3092
3093 test -n "$cache_file" || exit 0
3094
3095 # AC_CACHE_SAVE
3096 trap '' 1 2 15
3097 cat > confcache <<\EOF
3098 # This file is a shell script that caches the results of configure
3099 # tests run on this system so they can be shared between configure
3100 # scripts and configure runs. It is not useful on other systems.
3101 # If it contains results you don't want to keep, you may remove or edit it.
3102 #
3103 # By default, configure uses ./config.cache as the cache file,
3104 # creating it if it does not exist already. You can give configure
3105 # the --cache-file=FILE option to use a different cache file; that is
3106 # what configure does when it calls configure scripts in
3107 # subdirectories, so they share the cache.
3108 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3109 # config.status only pays attention to the cache file if you give it the
3110 # --recheck option to rerun configure.
3111 #
3112 EOF
3113 # The following way of writing the cache mishandles newlines in values,
3114 # but we know of no workaround that is simple, portable, and efficient.
3115 # So, don't put newlines in cache variables' values.
3116 # Ultrix sh set writes to stderr and can't be redirected directly,
3117 # and sets the high bit in the cache file unless we assign to the vars.
3118 (set) 2>&1 |
3119 case `(ac_space=' '; set | grep ac_space) 2>&1` in
3120 *ac_space=\ *)
3121 # `set' does not quote correctly, so add quotes (double-quote substitution
3122 # turns \\\\ into \\, and sed turns \\ into \).
3123 sed -n \
3124 -e "s/'/'\\\\''/g" \
3125 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3126 ;;
3127 *)
3128 # `set' quotes correctly as required by POSIX, so do not add quotes.
3129 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3130 ;;
3131 esac >> confcache
3132 if cmp -s $cache_file confcache; then
3133 :
3134 else
3135 if test -w $cache_file; then
3136 echo "updating cache $cache_file"
3137 cat confcache > $cache_file
3138 else
3139 echo "not updating unwritable cache $cache_file"
3140 fi
3141 fi
3142 rm -f confcache
3143
3144 exit 0
3145
3146 # Local Variables:
3147 # mode:shell-script
3148 # sh-indentation:2
3149 # End:
+0
-4059
config/ltmain.sh less more
0 # ltmain.sh - Provide generalized library-building support services.
1 # NOTE: Changing this file will not affect anything until you rerun ltconfig.
2 #
3 # Copyright (C) 1996-1999 Free Software Foundation, Inc.
4 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 #
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that program.
24
25 # Check that we have a working $echo.
26 if test "X$1" = X--no-reexec; then
27 # Discard the --no-reexec flag, and continue.
28 shift
29 elif test "X$1" = X--fallback-echo; then
30 # Avoid inline document here, it may be left over
31 :
32 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
33 # Yippee, $echo works!
34 :
35 else
36 # Restart under the correct shell, and then maybe $echo will work.
37 exec $SHELL "$0" --no-reexec ${1+"$@"}
38 fi
39
40 if test "X$1" = X--fallback-echo; then
41 # used as fallback echo
42 shift
43 cat <<EOF
44 $*
45 EOF
46 exit 0
47 fi
48
49 # The name of this program.
50 progname=`$echo "$0" | sed 's%^.*/%%'`
51 modename="$progname"
52
53 # Constants.
54 PROGRAM=ltmain.sh
55 PACKAGE=libtool
56 VERSION=1.3.5
57 TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)"
58
59 default_mode=
60 help="Try \`$progname --help' for more information."
61 magic="%%%MAGIC variable%%%"
62 mkdir="mkdir"
63 mv="mv -f"
64 rm="rm -f"
65
66 # Sed substitution that helps us do robust quoting. It backslashifies
67 # metacharacters that are still active within double-quoted strings.
68 Xsed='sed -e 1s/^X//'
69 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
70 # test EBCDIC or ASCII
71 case `echo '' | od -x` in
72 *15*) # EBCDIC based system
73 SP2NL='tr \100 \025'
74 NL2SP='tr \025 \100'
75 ;;
76 *) # Assume ASCII based system
77 SP2NL='tr \040 \012'
78 NL2SP='tr \015\012 \040\040'
79 ;;
80 esac
81
82 # NLS nuisances.
83 # Only set LANG and LC_ALL to C if already set.
84 # These must not be set unconditionally because not all systems understand
85 # e.g. LANG=C (notably SCO).
86 # We save the old values to restore during execute mode.
87 if test "${LC_ALL+set}" = set; then
88 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
89 fi
90 if test "${LANG+set}" = set; then
91 save_LANG="$LANG"; LANG=C; export LANG
92 fi
93
94 if test "$LTCONFIG_VERSION" != "$VERSION"; then
95 echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
96 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
97 exit 1
98 fi
99
100 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
101 echo "$modename: not configured to build any kind of library" 1>&2
102 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
103 exit 1
104 fi
105
106 # Global variables.
107 mode=$default_mode
108 nonopt=
109 prev=
110 prevopt=
111 run=
112 show="$echo"
113 show_help=
114 execute_dlfiles=
115 lo2o="s/\\.lo\$/.${objext}/"
116 o2lo="s/\\.${objext}\$/.lo/"
117
118 # Parse our command line options once, thoroughly.
119 while test $# -gt 0
120 do
121 arg="$1"
122 shift
123
124 case "$arg" in
125 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
126 *) optarg= ;;
127 esac
128
129 # If the previous option needs an argument, assign it.
130 if test -n "$prev"; then
131 case "$prev" in
132 execute_dlfiles)
133 eval "$prev=\"\$$prev \$arg\""
134 ;;
135 *)
136 eval "$prev=\$arg"
137 ;;
138 esac
139
140 prev=
141 prevopt=
142 continue
143 fi
144
145 # Have we seen a non-optional argument yet?
146 case "$arg" in
147 --help)
148 show_help=yes
149 ;;
150
151 --version)
152 echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
153 exit 0
154 ;;
155
156 --config)
157 sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
158 exit 0
159 ;;
160
161 --debug)
162 echo "$progname: enabling shell trace mode"
163 set -x
164 ;;
165
166 --dry-run | -n)
167 run=:
168 ;;
169
170 --features)
171 echo "host: $host"
172 if test "$build_libtool_libs" = yes; then
173 echo "enable shared libraries"
174 else
175 echo "disable shared libraries"
176 fi
177 if test "$build_old_libs" = yes; then
178 echo "enable static libraries"
179 else
180 echo "disable static libraries"
181 fi
182 exit 0
183 ;;
184
185 --finish) mode="finish" ;;
186
187 --mode) prevopt="--mode" prev=mode ;;
188 --mode=*) mode="$optarg" ;;
189
190 --quiet | --silent)
191 show=:
192 ;;
193
194 -dlopen)
195 prevopt="-dlopen"
196 prev=execute_dlfiles
197 ;;
198
199 -*)
200 $echo "$modename: unrecognized option \`$arg'" 1>&2
201 $echo "$help" 1>&2
202 exit 1
203 ;;
204
205 *)
206 nonopt="$arg"
207 break
208 ;;
209 esac
210 done
211
212 if test -n "$prevopt"; then
213 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
214 $echo "$help" 1>&2
215 exit 1
216 fi
217
218 if test -z "$show_help"; then
219
220 # Infer the operation mode.
221 if test -z "$mode"; then
222 case "$nonopt" in
223 *cc | *++ | gcc* | *-gcc*)
224 mode=link
225 for arg
226 do
227 case "$arg" in
228 -c)
229 mode=compile
230 break
231 ;;
232 esac
233 done
234 ;;
235 *db | *dbx | *strace | *truss)
236 mode=execute
237 ;;
238 *install*|cp|mv)
239 mode=install
240 ;;
241 *rm)
242 mode=uninstall
243 ;;
244 *)
245 # If we have no mode, but dlfiles were specified, then do execute mode.
246 test -n "$execute_dlfiles" && mode=execute
247
248 # Just use the default operation mode.
249 if test -z "$mode"; then
250 if test -n "$nonopt"; then
251 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
252 else
253 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
254 fi
255 fi
256 ;;
257 esac
258 fi
259
260 # Only execute mode is allowed to have -dlopen flags.
261 if test -n "$execute_dlfiles" && test "$mode" != execute; then
262 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
263 $echo "$help" 1>&2
264 exit 1
265 fi
266
267 # Change the help message to a mode-specific one.
268 generic_help="$help"
269 help="Try \`$modename --help --mode=$mode' for more information."
270
271 # These modes are in order of execution frequency so that they run quickly.
272 case "$mode" in
273 # libtool compile mode
274 compile)
275 modename="$modename: compile"
276 # Get the compilation command and the source file.
277 base_compile=
278 lastarg=
279 srcfile="$nonopt"
280 suppress_output=
281
282 user_target=no
283 for arg
284 do
285 # Accept any command-line options.
286 case "$arg" in
287 -o)
288 if test "$user_target" != "no"; then
289 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
290 exit 1
291 fi
292 user_target=next
293 ;;
294
295 -static)
296 build_old_libs=yes
297 continue
298 ;;
299 esac
300
301 case "$user_target" in
302 next)
303 # The next one is the -o target name
304 user_target=yes
305 continue
306 ;;
307 yes)
308 # We got the output file
309 user_target=set
310 libobj="$arg"
311 continue
312 ;;
313 esac
314
315 # Accept the current argument as the source file.
316 lastarg="$srcfile"
317 srcfile="$arg"
318
319 # Aesthetically quote the previous argument.
320
321 # Backslashify any backslashes, double quotes, and dollar signs.
322 # These are the only characters that are still specially
323 # interpreted inside of double-quoted scrings.
324 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
325
326 # Double-quote args containing other shell metacharacters.
327 # Many Bourne shells cannot handle close brackets correctly in scan
328 # sets, so we specify it separately.
329 case "$lastarg" in
330 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
331 lastarg="\"$lastarg\""
332 ;;
333 esac
334
335 # Add the previous argument to base_compile.
336 if test -z "$base_compile"; then
337 base_compile="$lastarg"
338 else
339 base_compile="$base_compile $lastarg"
340 fi
341 done
342
343 case "$user_target" in
344 set)
345 ;;
346 no)
347 # Get the name of the library object.
348 libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
349 ;;
350 *)
351 $echo "$modename: you must specify a target with \`-o'" 1>&2
352 exit 1
353 ;;
354 esac
355
356 # Recognize several different file suffixes.
357 # If the user specifies -o file.o, it is replaced with file.lo
358 xform='[cCFSfmso]'
359 case "$libobj" in
360 *.ada) xform=ada ;;
361 *.adb) xform=adb ;;
362 *.ads) xform=ads ;;
363 *.asm) xform=asm ;;
364 *.c++) xform=c++ ;;
365 *.cc) xform=cc ;;
366 *.cpp) xform=cpp ;;
367 *.cxx) xform=cxx ;;
368 *.f90) xform=f90 ;;
369 *.for) xform=for ;;
370 esac
371
372 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
373
374 case "$libobj" in
375 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
376 *)
377 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
378 exit 1
379 ;;
380 esac
381
382 if test -z "$base_compile"; then
383 $echo "$modename: you must specify a compilation command" 1>&2
384 $echo "$help" 1>&2
385 exit 1
386 fi
387
388 # Delete any leftover library objects.
389 if test "$build_old_libs" = yes; then
390 removelist="$obj $libobj"
391 else
392 removelist="$libobj"
393 fi
394
395 $run $rm $removelist
396 trap "$run $rm $removelist; exit 1" 1 2 15
397
398 # Calculate the filename of the output object if compiler does
399 # not support -o with -c
400 if test "$compiler_c_o" = no; then
401 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
402 lockfile="$output_obj.lock"
403 removelist="$removelist $output_obj $lockfile"
404 trap "$run $rm $removelist; exit 1" 1 2 15
405 else
406 need_locks=no
407 lockfile=
408 fi
409
410 # Lock this critical section if it is needed
411 # We use this script file to make the link, it avoids creating a new file
412 if test "$need_locks" = yes; then
413 until ln "$0" "$lockfile" 2>/dev/null; do
414 $show "Waiting for $lockfile to be removed"
415 sleep 2
416 done
417 elif test "$need_locks" = warn; then
418 if test -f "$lockfile"; then
419 echo "\
420 *** ERROR, $lockfile exists and contains:
421 `cat $lockfile 2>/dev/null`
422
423 This indicates that another process is trying to use the same
424 temporary object file, and libtool could not work around it because
425 your compiler does not support \`-c' and \`-o' together. If you
426 repeat this compilation, it may succeed, by chance, but you had better
427 avoid parallel builds (make -j) in this platform, or get a better
428 compiler."
429
430 $run $rm $removelist
431 exit 1
432 fi
433 echo $srcfile > "$lockfile"
434 fi
435
436 if test -n "$fix_srcfile_path"; then
437 eval srcfile=\"$fix_srcfile_path\"
438 fi
439
440 # Only build a PIC object if we are building libtool libraries.
441 if test "$build_libtool_libs" = yes; then
442 # Without this assignment, base_compile gets emptied.
443 fbsd_hideous_sh_bug=$base_compile
444
445 # All platforms use -DPIC, to notify preprocessed assembler code.
446 command="$base_compile $srcfile $pic_flag -DPIC"
447 if test "$build_old_libs" = yes; then
448 lo_libobj="$libobj"
449 dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
450 if test "X$dir" = "X$libobj"; then
451 dir="$objdir"
452 else
453 dir="$dir/$objdir"
454 fi
455 libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
456
457 if test -d "$dir"; then
458 $show "$rm $libobj"
459 $run $rm $libobj
460 else
461 $show "$mkdir $dir"
462 $run $mkdir $dir
463 status=$?
464 if test $status -ne 0 && test ! -d $dir; then
465 exit $status
466 fi
467 fi
468 fi
469 if test "$compiler_o_lo" = yes; then
470 output_obj="$libobj"
471 command="$command -o $output_obj"
472 elif test "$compiler_c_o" = yes; then
473 output_obj="$obj"
474 command="$command -o $output_obj"
475 fi
476
477 $run $rm "$output_obj"
478 $show "$command"
479 if $run eval "$command"; then :
480 else
481 test -n "$output_obj" && $run $rm $removelist
482 exit 1
483 fi
484
485 if test "$need_locks" = warn &&
486 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
487 echo "\
488 *** ERROR, $lockfile contains:
489 `cat $lockfile 2>/dev/null`
490
491 but it should contain:
492 $srcfile
493
494 This indicates that another process is trying to use the same
495 temporary object file, and libtool could not work around it because
496 your compiler does not support \`-c' and \`-o' together. If you
497 repeat this compilation, it may succeed, by chance, but you had better
498 avoid parallel builds (make -j) in this platform, or get a better
499 compiler."
500
501 $run $rm $removelist
502 exit 1
503 fi
504
505 # Just move the object if needed, then go on to compile the next one
506 if test x"$output_obj" != x"$libobj"; then
507 $show "$mv $output_obj $libobj"
508 if $run $mv $output_obj $libobj; then :
509 else
510 error=$?
511 $run $rm $removelist
512 exit $error
513 fi
514 fi
515
516 # If we have no pic_flag, then copy the object into place and finish.
517 if test -z "$pic_flag" && test "$build_old_libs" = yes; then
518 # Rename the .lo from within objdir to obj
519 if test -f $obj; then
520 $show $rm $obj
521 $run $rm $obj
522 fi
523
524 $show "$mv $libobj $obj"
525 if $run $mv $libobj $obj; then :
526 else
527 error=$?
528 $run $rm $removelist
529 exit $error
530 fi
531
532 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
533 if test "X$xdir" = "X$obj"; then
534 xdir="."
535 else
536 xdir="$xdir"
537 fi
538 baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
539 libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
540 # Now arrange that obj and lo_libobj become the same file
541 $show "(cd $xdir && $LN_S $baseobj $libobj)"
542 if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
543 exit 0
544 else
545 error=$?
546 $run $rm $removelist
547 exit $error
548 fi
549 fi
550
551 # Allow error messages only from the first compilation.
552 suppress_output=' >/dev/null 2>&1'
553 fi
554
555 # Only build a position-dependent object if we build old libraries.
556 if test "$build_old_libs" = yes; then
557 command="$base_compile $srcfile"
558 if test "$compiler_c_o" = yes; then
559 command="$command -o $obj"
560 output_obj="$obj"
561 fi
562
563 # Suppress compiler output if we already did a PIC compilation.
564 command="$command$suppress_output"
565 $run $rm "$output_obj"
566 $show "$command"
567 if $run eval "$command"; then :
568 else
569 $run $rm $removelist
570 exit 1
571 fi
572
573 if test "$need_locks" = warn &&
574 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
575 echo "\
576 *** ERROR, $lockfile contains:
577 `cat $lockfile 2>/dev/null`
578
579 but it should contain:
580 $srcfile
581
582 This indicates that another process is trying to use the same
583 temporary object file, and libtool could not work around it because
584 your compiler does not support \`-c' and \`-o' together. If you
585 repeat this compilation, it may succeed, by chance, but you had better
586 avoid parallel builds (make -j) in this platform, or get a better
587 compiler."
588
589 $run $rm $removelist
590 exit 1
591 fi
592
593 # Just move the object if needed
594 if test x"$output_obj" != x"$obj"; then
595 $show "$mv $output_obj $obj"
596 if $run $mv $output_obj $obj; then :
597 else
598 error=$?
599 $run $rm $removelist
600 exit $error
601 fi
602 fi
603
604 # Create an invalid libtool object if no PIC, so that we do not
605 # accidentally link it into a program.
606 if test "$build_libtool_libs" != yes; then
607 $show "echo timestamp > $libobj"
608 $run eval "echo timestamp > \$libobj" || exit $?
609 else
610 # Move the .lo from within objdir
611 $show "$mv $libobj $lo_libobj"
612 if $run $mv $libobj $lo_libobj; then :
613 else
614 error=$?
615 $run $rm $removelist
616 exit $error
617 fi
618 fi
619 fi
620
621 # Unlock the critical section if it was locked
622 if test "$need_locks" != no; then
623 $rm "$lockfile"
624 fi
625
626 exit 0
627 ;;
628
629 # libtool link mode
630 link)
631 modename="$modename: link"
632 case "$host" in
633 *-*-cygwin* | *-*-mingw* | *-*-os2*)
634 # It is impossible to link a dll without this setting, and
635 # we shouldn't force the makefile maintainer to figure out
636 # which system we are compiling for in order to pass an extra
637 # flag for every libtool invokation.
638 # allow_undefined=no
639
640 # FIXME: Unfortunately, there are problems with the above when trying
641 # to make a dll which has undefined symbols, in which case not
642 # even a static library is built. For now, we need to specify
643 # -no-undefined on the libtool link line when we can be certain
644 # that all symbols are satisfied, otherwise we get a static library.
645 allow_undefined=yes
646
647 # This is a source program that is used to create dlls on Windows
648 # Don't remove nor modify the starting and closing comments
649 # /* ltdll.c starts here */
650 # #define WIN32_LEAN_AND_MEAN
651 # #include <windows.h>
652 # #undef WIN32_LEAN_AND_MEAN
653 # #include <stdio.h>
654 #
655 # #ifndef __CYGWIN__
656 # # ifdef __CYGWIN32__
657 # # define __CYGWIN__ __CYGWIN32__
658 # # endif
659 # #endif
660 #
661 # #ifdef __cplusplus
662 # extern "C" {
663 # #endif
664 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
665 # #ifdef __cplusplus
666 # }
667 # #endif
668 #
669 # #ifdef __CYGWIN__
670 # #include <cygwin/cygwin_dll.h>
671 # DECLARE_CYGWIN_DLL( DllMain );
672 # #endif
673 # HINSTANCE __hDllInstance_base;
674 #
675 # BOOL APIENTRY
676 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
677 # {
678 # __hDllInstance_base = hInst;
679 # return TRUE;
680 # }
681 # /* ltdll.c ends here */
682 # This is a source program that is used to create import libraries
683 # on Windows for dlls which lack them. Don't remove nor modify the
684 # starting and closing comments
685 # /* impgen.c starts here */
686 # /* Copyright (C) 1999 Free Software Foundation, Inc.
687 #
688 # This file is part of GNU libtool.
689 #
690 # This program is free software; you can redistribute it and/or modify
691 # it under the terms of the GNU General Public License as published by
692 # the Free Software Foundation; either version 2 of the License, or
693 # (at your option) any later version.
694 #
695 # This program is distributed in the hope that it will be useful,
696 # but WITHOUT ANY WARRANTY; without even the implied warranty of
697 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
698 # GNU General Public License for more details.
699 #
700 # You should have received a copy of the GNU General Public License
701 # along with this program; if not, write to the Free Software
702 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
703 # */
704 #
705 # #include <stdio.h> /* for printf() */
706 # #include <unistd.h> /* for open(), lseek(), read() */
707 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
708 # #include <string.h> /* for strdup() */
709 #
710 # static unsigned int
711 # pe_get16 (fd, offset)
712 # int fd;
713 # int offset;
714 # {
715 # unsigned char b[2];
716 # lseek (fd, offset, SEEK_SET);
717 # read (fd, b, 2);
718 # return b[0] + (b[1]<<8);
719 # }
720 #
721 # static unsigned int
722 # pe_get32 (fd, offset)
723 # int fd;
724 # int offset;
725 # {
726 # unsigned char b[4];
727 # lseek (fd, offset, SEEK_SET);
728 # read (fd, b, 4);
729 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
730 # }
731 #
732 # static unsigned int
733 # pe_as32 (ptr)
734 # void *ptr;
735 # {
736 # unsigned char *b = ptr;
737 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
738 # }
739 #
740 # int
741 # main (argc, argv)
742 # int argc;
743 # char *argv[];
744 # {
745 # int dll;
746 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
747 # unsigned long export_rva, export_size, nsections, secptr, expptr;
748 # unsigned long name_rvas, nexp;
749 # unsigned char *expdata, *erva;
750 # char *filename, *dll_name;
751 #
752 # filename = argv[1];
753 #
754 # dll = open(filename, O_RDONLY|O_BINARY);
755 # if (!dll)
756 # return 1;
757 #
758 # dll_name = filename;
759 #
760 # for (i=0; filename[i]; i++)
761 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
762 # dll_name = filename + i +1;
763 #
764 # pe_header_offset = pe_get32 (dll, 0x3c);
765 # opthdr_ofs = pe_header_offset + 4 + 20;
766 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
767 #
768 # if (num_entries < 1) /* no exports */
769 # return 1;
770 #
771 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
772 # export_size = pe_get32 (dll, opthdr_ofs + 100);
773 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
774 # secptr = (pe_header_offset + 4 + 20 +
775 # pe_get16 (dll, pe_header_offset + 4 + 16));
776 #
777 # expptr = 0;
778 # for (i = 0; i < nsections; i++)
779 # {
780 # char sname[8];
781 # unsigned long secptr1 = secptr + 40 * i;
782 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
783 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
784 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
785 # lseek(dll, secptr1, SEEK_SET);
786 # read(dll, sname, 8);
787 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
788 # {
789 # expptr = fptr + (export_rva - vaddr);
790 # if (export_rva + export_size > vaddr + vsize)
791 # export_size = vsize - (export_rva - vaddr);
792 # break;
793 # }
794 # }
795 #
796 # expdata = (unsigned char*)malloc(export_size);
797 # lseek (dll, expptr, SEEK_SET);
798 # read (dll, expdata, export_size);
799 # erva = expdata - export_rva;
800 #
801 # nexp = pe_as32 (expdata+24);
802 # name_rvas = pe_as32 (expdata+32);
803 #
804 # printf ("EXPORTS\n");
805 # for (i = 0; i<nexp; i++)
806 # {
807 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
808 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
809 # }
810 #
811 # return 0;
812 # }
813 # /* impgen.c ends here */
814 ;;
815 *)
816 allow_undefined=yes
817 ;;
818 esac
819 compile_command="$nonopt"
820 finalize_command="$nonopt"
821
822 compile_rpath=
823 finalize_rpath=
824 compile_shlibpath=
825 finalize_shlibpath=
826 convenience=
827 old_convenience=
828 deplibs=
829 linkopts=
830
831 if test -n "$shlibpath_var"; then
832 # get the directories listed in $shlibpath_var
833 eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
834 else
835 lib_search_path=
836 fi
837 # now prepend the system-specific ones
838 eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
839 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
840
841 avoid_version=no
842 dlfiles=
843 dlprefiles=
844 dlself=no
845 export_dynamic=no
846 export_symbols=
847 export_symbols_regex=
848 generated=
849 libobjs=
850 link_against_libtool_libs=
851 ltlibs=
852 module=no
853 objs=
854 prefer_static_libs=no
855 preload=no
856 prev=
857 prevarg=
858 release=
859 rpath=
860 xrpath=
861 perm_rpath=
862 temp_rpath=
863 thread_safe=no
864 vinfo=
865
866 # We need to know -static, to get the right output filenames.
867 for arg
868 do
869 case "$arg" in
870 -all-static | -static)
871 if test "X$arg" = "X-all-static"; then
872 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
873 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
874 fi
875 if test -n "$link_static_flag"; then
876 dlopen_self=$dlopen_self_static
877 fi
878 else
879 if test -z "$pic_flag" && test -n "$link_static_flag"; then
880 dlopen_self=$dlopen_self_static
881 fi
882 fi
883 build_libtool_libs=no
884 build_old_libs=yes
885 prefer_static_libs=yes
886 break
887 ;;
888 esac
889 done
890
891 # See if our shared archives depend on static archives.
892 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
893
894 # Go through the arguments, transforming them on the way.
895 while test $# -gt 0; do
896 arg="$1"
897 shift
898
899 # If the previous option needs an argument, assign it.
900 if test -n "$prev"; then
901 case "$prev" in
902 output)
903 compile_command="$compile_command @OUTPUT@"
904 finalize_command="$finalize_command @OUTPUT@"
905 ;;
906 esac
907
908 case "$prev" in
909 dlfiles|dlprefiles)
910 if test "$preload" = no; then
911 # Add the symbol object into the linking commands.
912 compile_command="$compile_command @SYMFILE@"
913 finalize_command="$finalize_command @SYMFILE@"
914 preload=yes
915 fi
916 case "$arg" in
917 *.la | *.lo) ;; # We handle these cases below.
918 force)
919 if test "$dlself" = no; then
920 dlself=needless
921 export_dynamic=yes
922 fi
923 prev=
924 continue
925 ;;
926 self)
927 if test "$prev" = dlprefiles; then
928 dlself=yes
929 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
930 dlself=yes
931 else
932 dlself=needless
933 export_dynamic=yes
934 fi
935 prev=
936 continue
937 ;;
938 *)
939 if test "$prev" = dlfiles; then
940 dlfiles="$dlfiles $arg"
941 else
942 dlprefiles="$dlprefiles $arg"
943 fi
944 prev=
945 ;;
946 esac
947 ;;
948 expsyms)
949 export_symbols="$arg"
950 if test ! -f "$arg"; then
951 $echo "$modename: symbol file \`$arg' does not exist"
952 exit 1
953 fi
954 prev=
955 continue
956 ;;
957 expsyms_regex)
958 export_symbols_regex="$arg"
959 prev=
960 continue
961 ;;
962 release)
963 release="-$arg"
964 prev=
965 continue
966 ;;
967 rpath | xrpath)
968 # We need an absolute path.
969 case "$arg" in
970 [\\/]* | [A-Za-z]:[\\/]*) ;;
971 *)
972 $echo "$modename: only absolute run-paths are allowed" 1>&2
973 exit 1
974 ;;
975 esac
976 if test "$prev" = rpath; then
977 case "$rpath " in
978 *" $arg "*) ;;
979 *) rpath="$rpath $arg" ;;
980 esac
981 else
982 case "$xrpath " in
983 *" $arg "*) ;;
984 *) xrpath="$xrpath $arg" ;;
985 esac
986 fi
987 prev=
988 continue
989 ;;
990 *)
991 eval "$prev=\"\$arg\""
992 prev=
993 continue
994 ;;
995 esac
996 fi
997
998 prevarg="$arg"
999
1000 case "$arg" in
1001 -all-static)
1002 if test -n "$link_static_flag"; then
1003 compile_command="$compile_command $link_static_flag"
1004 finalize_command="$finalize_command $link_static_flag"
1005 fi
1006 continue
1007 ;;
1008
1009 -allow-undefined)
1010 # FIXME: remove this flag sometime in the future.
1011 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1012 continue
1013 ;;
1014
1015 -avoid-version)
1016 avoid_version=yes
1017 continue
1018 ;;
1019
1020 -dlopen)
1021 prev=dlfiles
1022 continue
1023 ;;
1024
1025 -dlpreopen)
1026 prev=dlprefiles
1027 continue
1028 ;;
1029
1030 -export-dynamic)
1031 export_dynamic=yes
1032 continue
1033 ;;
1034
1035 -export-symbols | -export-symbols-regex)
1036 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1037 $echo "$modename: not more than one -exported-symbols argument allowed"
1038 exit 1
1039 fi
1040 if test "X$arg" = "X-export-symbols"; then
1041 prev=expsyms
1042 else
1043 prev=expsyms_regex
1044 fi
1045 continue
1046 ;;
1047
1048 -L*)
1049 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1050 # We need an absolute path.
1051 case "$dir" in
1052 [\\/]* | [A-Za-z]:[\\/]*) ;;
1053 *)
1054 absdir=`cd "$dir" && pwd`
1055 if test -z "$absdir"; then
1056 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
1057 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
1058 absdir="$dir"
1059 fi
1060 dir="$absdir"
1061 ;;
1062 esac
1063 case " $deplibs " in
1064 *" $arg "*) ;;
1065 *) deplibs="$deplibs $arg";;
1066 esac
1067 case " $lib_search_path " in
1068 *" $dir "*) ;;
1069 *) lib_search_path="$lib_search_path $dir";;
1070 esac
1071 case "$host" in
1072 *-*-cygwin* | *-*-mingw* | *-*-os2*)
1073 dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
1074 case ":$dllsearchpath:" in
1075 ::) dllsearchpath="$dllsearchdir";;
1076 *":$dllsearchdir:"*) ;;
1077 *) dllsearchpath="$dllsearchpath:$dllsearchdir";;
1078 esac
1079 ;;
1080 esac
1081 ;;
1082
1083 -l*)
1084 if test "$arg" = "-lc"; then
1085 case "$host" in
1086 *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
1087 # These systems don't actually have c library (as such)
1088 continue
1089 ;;
1090 *-*-rhapsody* | *-*-darwin1.[012])
1091 # Rhapsody C library is in the System framework
1092 deplibs="$deplibs -framework System"
1093 continue
1094 ;;
1095 esac
1096 elif test "$arg" = "-lm"; then
1097 case "$host" in
1098 *-*-cygwin* | *-*-beos*)
1099 # These systems don't actually have math library (as such)
1100 continue
1101 ;;
1102 *-*-rhapsody* | *-*-darwin1.[012])
1103 # Rhapsody math library is in the System framework
1104 deplibs="$deplibs -framework System"
1105 continue
1106 ;;
1107 esac
1108 fi
1109 deplibs="$deplibs $arg"
1110 ;;
1111
1112 -module)
1113 module=yes
1114 continue
1115 ;;
1116
1117 -no-undefined)
1118 allow_undefined=no
1119 continue
1120 ;;
1121
1122 -o) prev=output ;;
1123
1124 -release)
1125 prev=release
1126 continue
1127 ;;
1128
1129 -rpath)
1130 prev=rpath
1131 continue
1132 ;;
1133
1134 -R)
1135 prev=xrpath
1136 continue
1137 ;;
1138
1139 -R*)
1140 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1141 # We need an absolute path.
1142 case "$dir" in
1143 [\\/]* | [A-Za-z]:[\\/]*) ;;
1144 *)
1145 $echo "$modename: only absolute run-paths are allowed" 1>&2
1146 exit 1
1147 ;;
1148 esac
1149 case "$xrpath " in
1150 *" $dir "*) ;;
1151 *) xrpath="$xrpath $dir" ;;
1152 esac
1153 continue
1154 ;;
1155
1156 -static)
1157 # If we have no pic_flag, then this is the same as -all-static.
1158 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1159 compile_command="$compile_command $link_static_flag"
1160 finalize_command="$finalize_command $link_static_flag"
1161 fi
1162 continue
1163 ;;
1164
1165 -thread-safe)
1166 thread_safe=yes
1167 continue
1168 ;;
1169
1170 -version-info)
1171 prev=vinfo
1172 continue
1173 ;;
1174
1175 # Some other compiler flag.
1176 -* | +*)
1177 # Unknown arguments in both finalize_command and compile_command need
1178 # to be aesthetically quoted because they are evaled later.
1179 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1180 case "$arg" in
1181 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
1182 arg="\"$arg\""
1183 ;;
1184 esac
1185 ;;
1186
1187 *.o | *.obj | *.a | *.lib)
1188 # A standard object.
1189 objs="$objs $arg"
1190 ;;
1191
1192 *.lo)
1193 # A library object.
1194 if test "$prev" = dlfiles; then
1195 dlfiles="$dlfiles $arg"
1196 if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then
1197 prev=
1198 continue
1199 else
1200 # If libtool objects are unsupported, then we need to preload.
1201 prev=dlprefiles
1202 fi
1203 fi
1204
1205 if test "$prev" = dlprefiles; then
1206 # Preload the old-style object.
1207 dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
1208 prev=
1209 fi
1210 libobjs="$libobjs $arg"
1211 ;;
1212
1213 *.la)
1214 # A libtool-controlled library.
1215
1216 dlname=
1217 libdir=
1218 library_names=
1219 old_library=
1220
1221 # Check to see that this really is a libtool archive.
1222 if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
1223 else
1224 $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
1225 exit 1
1226 fi
1227
1228 # If the library was installed with an old release of libtool,
1229 # it will not redefine variable installed.
1230 installed=yes
1231
1232 # Read the .la file
1233 # If there is no directory component, then add one.
1234 case "$arg" in
1235 */* | *\\*) . $arg ;;
1236 *) . ./$arg ;;
1237 esac
1238
1239 # Get the name of the library we link against.
1240 linklib=
1241 for l in $old_library $library_names; do
1242 linklib="$l"
1243 done
1244
1245 if test -z "$linklib"; then
1246 $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
1247 exit 1
1248 fi
1249
1250 # Find the relevant object directory and library name.
1251 name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
1252
1253 if test "X$installed" = Xyes; then
1254 dir="$libdir"
1255 else
1256 dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1257 if test "X$dir" = "X$arg"; then
1258 dir="$objdir"
1259 else
1260 dir="$dir/$objdir"
1261 fi
1262 fi
1263
1264 if test -n "$dependency_libs"; then
1265 # Extract -R and -L from dependency_libs
1266 temp_deplibs=
1267 for deplib in $dependency_libs; do
1268 case "$deplib" in
1269 -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
1270 case " $rpath $xrpath " in
1271 *" $temp_xrpath "*) ;;
1272 *) xrpath="$xrpath $temp_xrpath";;
1273 esac;;
1274 -L*) case "$compile_command $temp_deplibs " in
1275 *" $deplib "*) ;;
1276 *) temp_deplibs="$temp_deplibs $deplib";;
1277 esac
1278 temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1279 case " $lib_search_path " in
1280 *" $temp_dir "*) ;;
1281 *) lib_search_path="$lib_search_path $temp_dir";;
1282 esac
1283 ;;
1284 *) temp_deplibs="$temp_deplibs $deplib";;
1285 esac
1286 done
1287 dependency_libs="$temp_deplibs"
1288 fi
1289
1290 if test -z "$libdir"; then
1291 # It is a libtool convenience library, so add in its objects.
1292 convenience="$convenience $dir/$old_library"
1293 old_convenience="$old_convenience $dir/$old_library"
1294 deplibs="$deplibs$dependency_libs"
1295 compile_command="$compile_command $dir/$old_library$dependency_libs"
1296 finalize_command="$finalize_command $dir/$old_library$dependency_libs"
1297 continue
1298 fi
1299
1300 # This library was specified with -dlopen.
1301 if test "$prev" = dlfiles; then
1302 dlfiles="$dlfiles $arg"
1303 if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then
1304 # If there is no dlname, no dlopen support or we're linking statically,
1305 # we need to preload.
1306 prev=dlprefiles
1307 else
1308 # We should not create a dependency on this library, but we
1309 # may need any libraries it requires.
1310 compile_command="$compile_command$dependency_libs"
1311 finalize_command="$finalize_command$dependency_libs"
1312 prev=
1313 continue
1314 fi
1315 fi
1316
1317 # The library was specified with -dlpreopen.
1318 if test "$prev" = dlprefiles; then
1319 # Prefer using a static library (so that no silly _DYNAMIC symbols
1320 # are required to link).
1321 if test -n "$old_library"; then
1322 dlprefiles="$dlprefiles $dir/$old_library"
1323 else
1324 dlprefiles="$dlprefiles $dir/$linklib"
1325 fi
1326 prev=
1327 fi
1328
1329 if test -n "$library_names" &&
1330 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
1331 link_against_libtool_libs="$link_against_libtool_libs $arg"
1332 if test -n "$shlibpath_var"; then
1333 # Make sure the rpath contains only unique directories.
1334 case "$temp_rpath " in
1335 *" $dir "*) ;;
1336 *) temp_rpath="$temp_rpath $dir" ;;
1337 esac
1338 fi
1339
1340 # We need an absolute path.
1341 case "$dir" in
1342 [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;;
1343 *)
1344 absdir=`cd "$dir" && pwd`
1345 if test -z "$absdir"; then
1346 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
1347 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
1348 absdir="$dir"
1349 fi
1350 ;;
1351 esac
1352
1353 # This is the magic to use -rpath.
1354 # Skip directories that are in the system default run-time
1355 # search path, unless they have been requested with -R.
1356 case " $sys_lib_dlsearch_path " in
1357 *" $absdir "*) ;;
1358 *)
1359 case "$compile_rpath " in
1360 *" $absdir "*) ;;
1361 *) compile_rpath="$compile_rpath $absdir"
1362 esac
1363 ;;
1364 esac
1365
1366 case " $sys_lib_dlsearch_path " in
1367 *" $libdir "*) ;;
1368 *)
1369 case "$finalize_rpath " in
1370 *" $libdir "*) ;;
1371 *) finalize_rpath="$finalize_rpath $libdir"
1372 esac
1373 ;;
1374 esac
1375
1376 lib_linked=yes
1377 case "$hardcode_action" in
1378 immediate | unsupported)
1379 if test "$hardcode_direct" = no; then
1380 compile_command="$compile_command $dir/$linklib"
1381 deplibs="$deplibs $dir/$linklib"
1382 case "$host" in
1383 *-*-cygwin* | *-*-mingw* | *-*-os2*)
1384 dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
1385 if test -n "$dllsearchpath"; then
1386 dllsearchpath="$dllsearchpath:$dllsearchdir"
1387 else
1388 dllsearchpath="$dllsearchdir"
1389 fi
1390 ;;
1391 esac
1392 elif test "$hardcode_minus_L" = no; then
1393 case "$host" in
1394 *-*-sunos*)
1395 compile_shlibpath="$compile_shlibpath$dir:"
1396 ;;
1397 esac
1398 case "$compile_command " in
1399 *" -L$dir "*) ;;
1400 *) compile_command="$compile_command -L$dir";;
1401 esac
1402 compile_command="$compile_command -l$name"
1403 deplibs="$deplibs -L$dir -l$name"
1404 elif test "$hardcode_shlibpath_var" = no; then
1405 case ":$compile_shlibpath:" in
1406 *":$dir:"*) ;;
1407 *) compile_shlibpath="$compile_shlibpath$dir:";;
1408 esac
1409 compile_command="$compile_command -l$name"
1410 deplibs="$deplibs -l$name"
1411 else
1412 lib_linked=no
1413 fi
1414 ;;
1415
1416 relink)
1417 if test "$hardcode_direct" = yes; then
1418 compile_command="$compile_command $absdir/$linklib"
1419 deplibs="$deplibs $absdir/$linklib"
1420 elif test "$hardcode_minus_L" = yes; then
1421 case "$compile_command " in
1422 *" -L$absdir "*) ;;
1423 *) compile_command="$compile_command -L$absdir";;
1424 esac
1425 compile_command="$compile_command -l$name"
1426 deplibs="$deplibs -L$absdir -l$name"
1427 elif test "$hardcode_shlibpath_var" = yes; then
1428 case ":$compile_shlibpath:" in
1429 *":$absdir:"*) ;;
1430 *) compile_shlibpath="$compile_shlibpath$absdir:";;
1431 esac
1432 compile_command="$compile_command -l$name"
1433 deplibs="$deplibs -l$name"
1434 else
1435 lib_linked=no
1436 fi
1437 ;;
1438
1439 *)
1440 lib_linked=no
1441 ;;
1442 esac
1443
1444 if test "$lib_linked" != yes; then
1445 $echo "$modename: configuration error: unsupported hardcode properties"
1446 exit 1
1447 fi
1448
1449 # Finalize command for both is simple: just hardcode it.
1450 if test "$hardcode_direct" = yes; then
1451 finalize_command="$finalize_command $libdir/$linklib"
1452 elif test "$hardcode_minus_L" = yes; then
1453 case "$finalize_command " in
1454 *" -L$libdir "*) ;;
1455 *) finalize_command="$finalize_command -L$libdir";;
1456 esac
1457 finalize_command="$finalize_command -l$name"
1458 elif test "$hardcode_shlibpath_var" = yes; then
1459 case ":$finalize_shlibpath:" in
1460 *":$libdir:"*) ;;
1461 *) finalize_shlibpath="$finalize_shlibpath$libdir:";;
1462 esac
1463 finalize_command="$finalize_command -l$name"
1464 else
1465 # We cannot seem to hardcode it, guess we'll fake it.
1466 case "$finalize_command " in
1467 *" -L$dir "*) ;;
1468 *) finalize_command="$finalize_command -L$libdir";;
1469 esac
1470 finalize_command="$finalize_command -l$name"
1471 fi
1472 else
1473 # Transform directly to old archives if we don't build new libraries.
1474 if test -n "$pic_flag" && test -z "$old_library"; then
1475 $echo "$modename: cannot find static library for \`$arg'" 1>&2
1476 exit 1
1477 fi
1478
1479 # Here we assume that one of hardcode_direct or hardcode_minus_L
1480 # is not unsupported. This is valid on all known static and
1481 # shared platforms.
1482 if test "$hardcode_direct" != unsupported; then
1483 test -n "$old_library" && linklib="$old_library"
1484 compile_command="$compile_command $dir/$linklib"
1485 finalize_command="$finalize_command $dir/$linklib"
1486 else
1487 case "$compile_command " in
1488 *" -L$dir "*) ;;
1489 *) compile_command="$compile_command -L$dir";;
1490 esac
1491 compile_command="$compile_command -l$name"
1492 case "$finalize_command " in
1493 *" -L$dir "*) ;;
1494 *) finalize_command="$finalize_command -L$dir";;
1495 esac
1496 finalize_command="$finalize_command -l$name"
1497 fi
1498 fi
1499
1500 # Add in any libraries that this one depends upon.
1501 compile_command="$compile_command$dependency_libs"
1502 finalize_command="$finalize_command$dependency_libs"
1503 continue
1504 ;;
1505
1506 # Some other compiler argument.
1507 *)
1508 # Unknown arguments in both finalize_command and compile_command need
1509 # to be aesthetically quoted because they are evaled later.
1510 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1511 case "$arg" in
1512 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
1513 arg="\"$arg\""
1514 ;;
1515 esac
1516 ;;
1517 esac
1518
1519 # Now actually substitute the argument into the commands.
1520 if test -n "$arg"; then
1521 compile_command="$compile_command $arg"
1522 finalize_command="$finalize_command $arg"
1523 fi
1524 done
1525
1526 if test -n "$prev"; then
1527 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1528 $echo "$help" 1>&2
1529 exit 1
1530 fi
1531
1532 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1533 eval arg=\"$export_dynamic_flag_spec\"
1534 compile_command="$compile_command $arg"
1535 finalize_command="$finalize_command $arg"
1536 fi
1537
1538 oldlibs=
1539 # calculate the name of the file, without its directory
1540 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
1541 libobjs_save="$libobjs"
1542
1543 case "$output" in
1544 "")
1545 $echo "$modename: you must specify an output file" 1>&2
1546 $echo "$help" 1>&2
1547 exit 1
1548 ;;
1549
1550 *.a | *.lib)
1551 if test -n "$link_against_libtool_libs"; then
1552 $echo "$modename: error: cannot link libtool libraries into archives" 1>&2
1553 exit 1
1554 fi
1555
1556 if test -n "$deplibs"; then
1557 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
1558 fi
1559
1560 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
1561 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
1562 fi
1563
1564 if test -n "$rpath"; then
1565 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
1566 fi
1567
1568 if test -n "$xrpath"; then
1569 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
1570 fi
1571
1572 if test -n "$vinfo"; then
1573 $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
1574 fi
1575
1576 if test -n "$release"; then
1577 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
1578 fi
1579
1580 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1581 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
1582 fi
1583
1584 # Now set the variables for building old libraries.
1585 build_libtool_libs=no
1586 oldlibs="$output"
1587 ;;
1588
1589 *.la)
1590 # Make sure we only generate libraries of the form `libNAME.la'.
1591 case "$outputname" in
1592 lib*)
1593 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
1594 eval libname=\"$libname_spec\"
1595 ;;
1596 *)
1597 if test "$module" = no; then
1598 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
1599 $echo "$help" 1>&2
1600 exit 1
1601 fi
1602 if test "$need_lib_prefix" != no; then
1603 # Add the "lib" prefix for modules if required
1604 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
1605 eval libname=\"$libname_spec\"
1606 else
1607 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
1608 fi
1609 ;;
1610 esac
1611
1612 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1613 if test "X$output_objdir" = "X$output"; then
1614 output_objdir="$objdir"
1615 else
1616 output_objdir="$output_objdir/$objdir"
1617 fi
1618
1619 if test -n "$objs"; then
1620 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
1621 exit 1
1622 fi
1623
1624 # How the heck are we supposed to write a wrapper for a shared library?
1625 if test -n "$link_against_libtool_libs"; then
1626 $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
1627 exit 1
1628 fi
1629
1630 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
1631 $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
1632 fi
1633
1634 set dummy $rpath
1635 if test $# -gt 2; then
1636 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
1637 fi
1638 install_libdir="$2"
1639
1640 oldlibs=
1641 if test -z "$rpath"; then
1642 if test "$build_libtool_libs" = yes; then
1643 # Building a libtool convenience library.
1644 libext=al
1645 oldlibs="$output_objdir/$libname.$libext $oldlibs"
1646 build_libtool_libs=convenience
1647 build_old_libs=yes
1648 fi
1649 dependency_libs="$deplibs"
1650
1651 if test -n "$vinfo"; then
1652 $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
1653 fi
1654
1655 if test -n "$release"; then
1656 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
1657 fi
1658 else
1659
1660 # Parse the version information argument.
1661 IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
1662 set dummy $vinfo 0 0 0
1663 IFS="$save_ifs"
1664
1665 if test -n "$8"; then
1666 $echo "$modename: too many parameters to \`-version-info'" 1>&2
1667 $echo "$help" 1>&2
1668 exit 1
1669 fi
1670
1671 current="$2"
1672 revision="$3"
1673 age="$4"
1674
1675 # Check that each of the things are valid numbers.
1676 case "$current" in
1677 0 | [1-9] | [1-9][0-9]*) ;;
1678 *)
1679 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
1680 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1681 exit 1
1682 ;;
1683 esac
1684
1685 case "$revision" in
1686 0 | [1-9] | [1-9][0-9]*) ;;
1687 *)
1688 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
1689 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1690 exit 1
1691 ;;
1692 esac
1693
1694 case "$age" in
1695 0 | [1-9] | [1-9][0-9]*) ;;
1696 *)
1697 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
1698 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1699 exit 1
1700 ;;
1701 esac
1702
1703 if test $age -gt $current; then
1704 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
1705 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1706 exit 1
1707 fi
1708
1709 # Calculate the version variables.
1710 major=
1711 versuffix=
1712 verstring=
1713 case "$version_type" in
1714 none) ;;
1715
1716 irix)
1717 major=`expr $current - $age + 1`
1718 versuffix="$major.$revision"
1719 verstring="sgi$major.$revision"
1720
1721 # Add in all the interfaces that we are compatible with.
1722 loop=$revision
1723 while test $loop != 0; do
1724 iface=`expr $revision - $loop`
1725 loop=`expr $loop - 1`
1726 verstring="sgi$major.$iface:$verstring"
1727 done
1728 ;;
1729
1730 linux)
1731 major=.`expr $current - $age`
1732 versuffix="$major.$age.$revision"
1733 ;;
1734
1735 osf)
1736 major=`expr $current - $age`
1737 versuffix=".$current.$age.$revision"
1738 verstring="$current.$age.$revision"
1739
1740 # Add in all the interfaces that we are compatible with.
1741 loop=$age
1742 while test $loop != 0; do
1743 iface=`expr $current - $loop`
1744 loop=`expr $loop - 1`
1745 verstring="$verstring:${iface}.0"
1746 done
1747
1748 # Make executables depend on our current version.
1749 verstring="$verstring:${current}.0"
1750 ;;
1751
1752 sunos)
1753 major=".$current"
1754 versuffix=".$current.$revision"
1755 ;;
1756
1757 freebsd-aout)
1758 major=".$current"
1759 versuffix=".$current.$revision";
1760 ;;
1761
1762 freebsd-elf)
1763 major=".$current"
1764 versuffix=".$current";
1765 ;;
1766
1767 windows)
1768 # Like Linux, but with '-' rather than '.', since we only
1769 # want one extension on Windows 95.
1770 major=`expr $current - $age`
1771 versuffix="-$major-$age-$revision"
1772 ;;
1773
1774 darwin)
1775 # Like Linux, but with the current version available in
1776 # verstring for coding it into the library header
1777 major=`expr $current - $age`
1778 versuffix=".$major.$age.$revision"
1779 # Darwin ld doesn't like 0 for these options...
1780 minor_current=`expr $current + 1`
1781 verstring="-compatibility_version $major -current_version $major.$age.$revision"
1782 major=".$major"
1783 ;;
1784
1785 *)
1786 $echo "$modename: unknown library version type \`$version_type'" 1>&2
1787 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
1788 exit 1
1789 ;;
1790 esac
1791
1792 # Clear the version info if we defaulted, and they specified a release.
1793 if test -z "$vinfo" && test -n "$release"; then
1794 major=
1795 verstring="0.0"
1796 if test "$need_version" = no; then
1797 versuffix=
1798 else
1799 versuffix=".0.0"
1800 fi
1801 fi
1802
1803 # Remove version info from name if versioning should be avoided
1804 if test "$avoid_version" = yes && test "$need_version" = no; then
1805 major=
1806 versuffix=
1807 verstring=""
1808 fi
1809
1810 # Check to see if the archive will have undefined symbols.
1811 if test "$allow_undefined" = yes; then
1812 if test "$allow_undefined_flag" = unsupported; then
1813 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
1814 build_libtool_libs=no
1815 build_old_libs=yes
1816 fi
1817 else
1818 # Don't allow undefined symbols.
1819 allow_undefined_flag="$no_undefined_flag"
1820 fi
1821
1822 dependency_libs="$deplibs"
1823 case "$host" in
1824 *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
1825 # these systems don't actually have a c library (as such)!
1826 ;;
1827 *-*-rhapsody* | *-*-darwin1.[012])
1828 # Rhapsody C library is in the System framework
1829 deplibs="$deplibs -framework System"
1830 ;;
1831 *)
1832 # Add libc to deplibs on all other systems.
1833 deplibs="$deplibs -lc"
1834 ;;
1835 esac
1836 fi
1837
1838 # Create the output directory, or remove our outputs if we need to.
1839 if test -d $output_objdir; then
1840 $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
1841 $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
1842 else
1843 $show "$mkdir $output_objdir"
1844 $run $mkdir $output_objdir
1845 status=$?
1846 if test $status -ne 0 && test ! -d $output_objdir; then
1847 exit $status
1848 fi
1849 fi
1850
1851 # Now set the variables for building old libraries.
1852 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
1853 oldlibs="$oldlibs $output_objdir/$libname.$libext"
1854
1855 # Transform .lo files to .o files.
1856 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
1857 fi
1858
1859 if test "$build_libtool_libs" = yes; then
1860 # Transform deplibs into only deplibs that can be linked in shared.
1861 name_save=$name
1862 libname_save=$libname
1863 release_save=$release
1864 versuffix_save=$versuffix
1865 major_save=$major
1866 # I'm not sure if I'm treating the release correctly. I think
1867 # release should show up in the -l (ie -lgmp5) so we don't want to
1868 # add it in twice. Is that correct?
1869 release=""
1870 versuffix=""
1871 major=""
1872 newdeplibs=
1873 droppeddeps=no
1874 case "$deplibs_check_method" in
1875 pass_all)
1876 # Don't check for shared/static. Everything works.
1877 # This might be a little naive. We might want to check
1878 # whether the library exists or not. But this is on
1879 # osf3 & osf4 and I'm not really sure... Just
1880 # implementing what was already the behaviour.
1881 newdeplibs=$deplibs
1882 ;;
1883 test_compile)
1884 # This code stresses the "libraries are programs" paradigm to its
1885 # limits. Maybe even breaks it. We compile a program, linking it
1886 # against the deplibs as a proxy for the library. Then we can check
1887 # whether they linked in statically or dynamically with ldd.
1888 $rm conftest.c
1889 cat > conftest.c <<EOF
1890 int main() { return 0; }
1891 EOF
1892 $rm conftest
1893 $CC -o conftest conftest.c $deplibs
1894 if test $? -eq 0 ; then
1895 ldd_output=`ldd conftest`
1896 for i in $deplibs; do
1897 name="`expr X$i : 'X-l\(.*\)'`"
1898 # If $name is empty we are operating on a -L argument.
1899 if test "$name" != "" ; then
1900 libname=`eval \\$echo \"$libname_spec\"`
1901 deplib_matches=`eval \\$echo \"$library_names_spec\"`
1902 set dummy $deplib_matches
1903 deplib_match=$2
1904 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
1905 newdeplibs="$newdeplibs $i"
1906 else
1907 droppeddeps=yes
1908 echo
1909 echo "*** Warning: This library needs some functionality provided by $i."
1910 echo "*** I have the capability to make that library automatically link in when"
1911 echo "*** you link to this library. But I can only do this if you have a"
1912 echo "*** shared version of the library, which you do not appear to have."
1913 fi
1914 else
1915 newdeplibs="$newdeplibs $i"
1916 fi
1917 done
1918 else
1919 # Error occured in the first compile. Let's try to salvage the situation:
1920 # Compile a seperate program for each library.
1921 for i in $deplibs; do
1922 name="`expr X$i : 'X-l\(.*\)'`"
1923 # If $name is empty we are operating on a -L argument.
1924 if test "$name" != "" ; then
1925 $rm conftest
1926 $CC -o conftest conftest.c $i
1927 # Did it work?
1928 if test $? -eq 0 ; then
1929 ldd_output=`ldd conftest`
1930 libname=`eval \\$echo \"$libname_spec\"`
1931 deplib_matches=`eval \\$echo \"$library_names_spec\"`
1932 set dummy $deplib_matches
1933 deplib_match=$2
1934 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
1935 newdeplibs="$newdeplibs $i"
1936 else
1937 droppeddeps=yes
1938 echo
1939 echo "*** Warning: This library needs some functionality provided by $i."
1940 echo "*** I have the capability to make that library automatically link in when"
1941 echo "*** you link to this library. But I can only do this if you have a"
1942 echo "*** shared version of the library, which you do not appear to have."
1943 fi
1944 else
1945 droppeddeps=yes
1946 echo
1947 echo "*** Warning! Library $i is needed by this library but I was not able to"
1948 echo "*** make it link in! You will probably need to install it or some"
1949 echo "*** library that it depends on before this library will be fully"
1950 echo "*** functional. Installing it before continuing would be even better."
1951 fi
1952 else
1953 newdeplibs="$newdeplibs $i"
1954 fi
1955 done
1956 fi
1957 ;;
1958 file_magic*)
1959 set dummy $deplibs_check_method
1960 file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`"
1961 for a_deplib in $deplibs; do
1962 name="`expr X$a_deplib : 'X-l\(.*\)'`"
1963 # If $name is empty we are operating on a -L argument.
1964 if test "$name" != "" ; then
1965 libname=`eval \\$echo \"$libname_spec\"`
1966 for i in $lib_search_path; do
1967 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
1968 for potent_lib in $potential_libs; do
1969 # Follow soft links.
1970 if ls -lLd "$potent_lib" 2>/dev/null \
1971 | grep " -> " >/dev/null; then
1972 continue
1973 fi
1974 # The statement above tries to avoid entering an
1975 # endless loop below, in case of cyclic links.
1976 # We might still enter an endless loop, since a link
1977 # loop can be closed while we follow links,
1978 # but so what?
1979 potlib="$potent_lib"
1980 while test -h "$potlib" 2>/dev/null; do
1981 potliblink=`ls -ld $potlib | sed 's/.* -> //'`
1982 case "$potliblink" in
1983 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
1984 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
1985 esac
1986 done
1987 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
1988 | sed 10q \
1989 | egrep "$file_magic_regex" > /dev/null; then
1990 newdeplibs="$newdeplibs $a_deplib"
1991 a_deplib=""
1992 break 2
1993 fi
1994 done
1995 done
1996 if test -n "$a_deplib" ; then
1997 droppeddeps=yes
1998 echo
1999 echo "*** Warning: This library needs some functionality provided by $a_deplib."
2000 echo "*** I have the capability to make that library automatically link in when"
2001 echo "*** you link to this library. But I can only do this if you have a"
2002 echo "*** shared version of the library, which you do not appear to have."
2003 fi
2004 else
2005 # Add a -L argument.
2006 newdeplibs="$newdeplibs $a_deplib"
2007 fi
2008 done # Gone through all deplibs.
2009 ;;
2010 none | unknown | *)
2011 newdeplibs=""
2012 if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
2013 -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
2014 grep . >/dev/null; then
2015 echo
2016 if test "X$deplibs_check_method" = "Xnone"; then
2017 echo "*** Warning: inter-library dependencies are not supported in this platform."
2018 else
2019 echo "*** Warning: inter-library dependencies are not known to be supported."
2020 fi
2021 echo "*** All declared inter-library dependencies are being dropped."
2022 droppeddeps=yes
2023 fi
2024 ;;
2025 esac
2026 versuffix=$versuffix_save
2027 major=$major_save
2028 release=$release_save
2029 libname=$libname_save
2030 name=$name_save
2031
2032 if test "$droppeddeps" = yes; then
2033 if test "$module" = yes; then
2034 echo
2035 echo "*** Warning: libtool could not satisfy all declared inter-library"
2036 echo "*** dependencies of module $libname. Therefore, libtool will create"
2037 echo "*** a static module, that should work as long as the dlopening"
2038 echo "*** application is linked with the -dlopen flag."
2039 if test -z "$global_symbol_pipe"; then
2040 echo
2041 echo "*** However, this would only work if libtool was able to extract symbol"
2042 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2043 echo "*** not find such a program. So, this module is probably useless."
2044 echo "*** \`nm' from GNU binutils and a full rebuild may help."
2045 fi
2046 if test "$build_old_libs" = no; then
2047 oldlibs="$output_objdir/$libname.$libext"
2048 build_libtool_libs=module
2049 build_old_libs=yes
2050 else
2051 build_libtool_libs=no
2052 fi
2053 else
2054 echo "*** The inter-library dependencies that have been dropped here will be"
2055 echo "*** automatically added whenever a program is linked with this library"
2056 echo "*** or is declared to -dlopen it."
2057 fi
2058 fi
2059 # Done checking deplibs!
2060 deplibs=$newdeplibs
2061 fi
2062
2063 # All the library-specific variables (install_libdir is set above).
2064 library_names=
2065 old_library=
2066 dlname=
2067
2068 # Test again, we may have decided not to build it any more
2069 if test "$build_libtool_libs" = yes; then
2070 # Get the real and link names of the library.
2071 eval library_names=\"$library_names_spec\"
2072 set dummy $library_names
2073 realname="$2"
2074 shift; shift
2075
2076 if test -n "$soname_spec"; then
2077 eval soname=\"$soname_spec\"
2078 else
2079 soname="$realname"
2080 fi
2081
2082 lib="$output_objdir/$realname"
2083 for link
2084 do
2085 linknames="$linknames $link"
2086 done
2087
2088 # Ensure that we have .o objects for linkers which dislike .lo
2089 # (e.g. aix) in case we are running --disable-static
2090 for obj in $libobjs; do
2091 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
2092 if test "X$xdir" = "X$obj"; then
2093 xdir="."
2094 else
2095 xdir="$xdir"
2096 fi
2097 baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
2098 oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
2099 if test ! -f $xdir/$oldobj; then
2100 $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
2101 $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
2102 fi
2103 done
2104
2105 # Use standard objects if they are pic
2106 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2107
2108 # Prepare the list of exported symbols
2109 if test -z "$export_symbols"; then
2110 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
2111 $show "generating symbol list for \`$libname.la'"
2112 export_symbols="$output_objdir/$libname.exp"
2113 $run $rm $export_symbols
2114 eval cmds=\"$export_symbols_cmds\"
2115 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2116 for cmd in $cmds; do
2117 IFS="$save_ifs"
2118 $show "$cmd"
2119 $run eval "$cmd" || exit $?
2120 done
2121 IFS="$save_ifs"
2122 if test -n "$export_symbols_regex"; then
2123 $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
2124 $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
2125 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
2126 $run eval '$mv "${export_symbols}T" "$export_symbols"'
2127 fi
2128 fi
2129 fi
2130
2131 if test -n "$export_symbols" && test -n "$include_expsyms"; then
2132 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
2133 fi
2134
2135 if test -n "$convenience"; then
2136 if test -n "$whole_archive_flag_spec"; then
2137 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
2138 else
2139 gentop="$output_objdir/${outputname}x"
2140 $show "${rm}r $gentop"
2141 $run ${rm}r "$gentop"
2142 $show "mkdir $gentop"
2143 $run mkdir "$gentop"
2144 status=$?
2145 if test $status -ne 0 && test ! -d "$gentop"; then
2146 exit $status
2147 fi
2148 generated="$generated $gentop"
2149
2150 for xlib in $convenience; do
2151 # Extract the objects.
2152 case "$xlib" in
2153 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
2154 *) xabs=`pwd`"/$xlib" ;;
2155 esac
2156 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
2157 xdir="$gentop/$xlib"
2158
2159 $show "${rm}r $xdir"
2160 $run ${rm}r "$xdir"
2161 $show "mkdir $xdir"
2162 $run mkdir "$xdir"
2163 status=$?
2164 if test $status -ne 0 && test ! -d "$xdir"; then
2165 exit $status
2166 fi
2167 $show "(cd $xdir && $AR x $xabs)"
2168 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
2169
2170 libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
2171 done
2172 fi
2173 fi
2174
2175 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
2176 eval flag=\"$thread_safe_flag_spec\"
2177 linkopts="$linkopts $flag"
2178 fi
2179
2180 # Do each of the archive commands.
2181 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
2182 eval cmds=\"$archive_expsym_cmds\"
2183 else
2184 if test "x$verstring" = "x0.0"; then
2185 tmp_verstring=
2186 else
2187 tmp_verstring="$verstring"
2188 fi
2189 eval cmds=\"$archive_cmds\"
2190 fi
2191 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2192 for cmd in $cmds; do
2193 IFS="$save_ifs"
2194 $show "$cmd"
2195 $run eval "$cmd" || exit $?
2196 done
2197 IFS="$save_ifs"
2198
2199 # Create links to the real library.
2200 for linkname in $linknames; do
2201 if test "$realname" != "$linkname"; then
2202 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
2203 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
2204 fi
2205 done
2206
2207 # If -module or -export-dynamic was specified, set the dlname.
2208 if test "$module" = yes || test "$export_dynamic" = yes; then
2209 # On all known operating systems, these are identical.
2210 dlname="$soname"
2211 fi
2212 fi
2213 ;;
2214
2215 *.lo | *.o | *.obj)
2216 if test -n "$link_against_libtool_libs"; then
2217 $echo "$modename: error: cannot link libtool libraries into objects" 1>&2
2218 exit 1
2219 fi
2220
2221 if test -n "$deplibs"; then
2222 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
2223 fi
2224
2225 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2226 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
2227 fi
2228
2229 if test -n "$rpath"; then
2230 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
2231 fi
2232
2233 if test -n "$xrpath"; then
2234 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
2235 fi
2236
2237 if test -n "$vinfo"; then
2238 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
2239 fi
2240
2241 if test -n "$release"; then
2242 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
2243 fi
2244
2245 case "$output" in
2246 *.lo)
2247 if test -n "$objs"; then
2248 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
2249 exit 1
2250 fi
2251 libobj="$output"
2252 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
2253 ;;
2254 *)
2255 libobj=
2256 obj="$output"
2257 ;;
2258 esac
2259
2260 # Delete the old objects.
2261 $run $rm $obj $libobj
2262
2263 # Objects from convenience libraries. This assumes
2264 # single-version convenience libraries. Whenever we create
2265 # different ones for PIC/non-PIC, this we'll have to duplicate
2266 # the extraction.
2267 reload_conv_objs=
2268 gentop=
2269 # reload_cmds runs $LD directly, so let us get rid of
2270 # -Wl from whole_archive_flag_spec
2271 wl=
2272
2273 if test -n "$convenience"; then
2274 if test -n "$whole_archive_flag_spec"; then
2275 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
2276 else
2277 gentop="$output_objdir/${obj}x"
2278 $show "${rm}r $gentop"
2279 $run ${rm}r "$gentop"
2280 $show "mkdir $gentop"
2281 $run mkdir "$gentop"
2282 status=$?
2283 if test $status -ne 0 && test ! -d "$gentop"; then
2284 exit $status
2285 fi
2286 generated="$generated $gentop"
2287
2288 for xlib in $convenience; do
2289 # Extract the objects.
2290 case "$xlib" in
2291 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
2292 *) xabs=`pwd`"/$xlib" ;;
2293 esac
2294 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
2295 xdir="$gentop/$xlib"
2296
2297 $show "${rm}r $xdir"
2298 $run ${rm}r "$xdir"
2299 $show "mkdir $xdir"
2300 $run mkdir "$xdir"
2301 status=$?
2302 if test $status -ne 0 && test ! -d "$xdir"; then
2303 exit $status
2304 fi
2305 $show "(cd $xdir && $AR x $xabs)"
2306 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
2307
2308 reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
2309 done
2310 fi
2311 fi
2312
2313 # Create the old-style object.
2314 reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs"
2315
2316 output="$obj"
2317 eval cmds=\"$reload_cmds\"
2318 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2319 for cmd in $cmds; do
2320 IFS="$save_ifs"
2321 $show "$cmd"
2322 $run eval "$cmd" || exit $?
2323 done
2324 IFS="$save_ifs"
2325
2326 # Exit if we aren't doing a library object file.
2327 if test -z "$libobj"; then
2328 if test -n "$gentop"; then
2329 $show "${rm}r $gentop"
2330 $run ${rm}r $gentop
2331 fi
2332
2333 exit 0
2334 fi
2335
2336 if test "$build_libtool_libs" != yes; then
2337 if test -n "$gentop"; then
2338 $show "${rm}r $gentop"
2339 $run ${rm}r $gentop
2340 fi
2341
2342 # Create an invalid libtool object if no PIC, so that we don't
2343 # accidentally link it into a program.
2344 $show "echo timestamp > $libobj"
2345 $run eval "echo timestamp > $libobj" || exit $?
2346 exit 0
2347 fi
2348
2349 if test -n "$pic_flag"; then
2350 # Only do commands if we really have different PIC objects.
2351 reload_objs="$libobjs $reload_conv_objs"
2352 output="$libobj"
2353 eval cmds=\"$reload_cmds\"
2354 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2355 for cmd in $cmds; do
2356 IFS="$save_ifs"
2357 $show "$cmd"
2358 $run eval "$cmd" || exit $?
2359 done
2360 IFS="$save_ifs"
2361 else
2362 # Just create a symlink.
2363 $show $rm $libobj
2364 $run $rm $libobj
2365 xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
2366 if test "X$xdir" = "X$libobj"; then
2367 xdir="."
2368 else
2369 xdir="$xdir"
2370 fi
2371 baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
2372 oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
2373 $show "(cd $xdir && $LN_S $oldobj $baseobj)"
2374 $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
2375 fi
2376
2377 if test -n "$gentop"; then
2378 $show "${rm}r $gentop"
2379 $run ${rm}r $gentop
2380 fi
2381
2382 exit 0
2383 ;;
2384
2385 # Anything else should be a program.
2386 *)
2387 if test -n "$vinfo"; then
2388 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
2389 fi
2390
2391 if test -n "$release"; then
2392 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
2393 fi
2394
2395 if test "$preload" = yes; then
2396 if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
2397 test "$dlopen_self_static" = unknown; then
2398 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
2399 fi
2400 fi
2401
2402 if test -n "$rpath$xrpath"; then
2403 # If the user specified any rpath flags, then add them.
2404 for libdir in $rpath $xrpath; do
2405 # This is the magic to use -rpath.
2406 case "$compile_rpath " in
2407 *" $libdir "*) ;;
2408 *) compile_rpath="$compile_rpath $libdir" ;;
2409 esac
2410 case "$finalize_rpath " in
2411 *" $libdir "*) ;;
2412 *) finalize_rpath="$finalize_rpath $libdir" ;;
2413 esac
2414 done
2415 fi
2416
2417 # Now hardcode the library paths
2418 rpath=
2419 hardcode_libdirs=
2420 for libdir in $compile_rpath $finalize_rpath; do
2421 if test -n "$hardcode_libdir_flag_spec"; then
2422 if test -n "$hardcode_libdir_separator"; then
2423 if test -z "$hardcode_libdirs"; then
2424 hardcode_libdirs="$libdir"
2425 else
2426 # Just accumulate the unique libdirs.
2427 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
2428 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
2429 ;;
2430 *)
2431 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
2432 ;;
2433 esac
2434 fi
2435 else
2436 eval flag=\"$hardcode_libdir_flag_spec\"
2437 rpath="$rpath $flag"
2438 fi
2439 elif test -n "$runpath_var"; then
2440 case "$perm_rpath " in
2441 *" $libdir "*) ;;
2442 *) perm_rpath="$perm_rpath $libdir" ;;
2443 esac
2444 fi
2445 done
2446 # Substitute the hardcoded libdirs into the rpath.
2447 if test -n "$hardcode_libdir_separator" &&
2448 test -n "$hardcode_libdirs"; then
2449 libdir="$hardcode_libdirs"
2450 eval rpath=\" $hardcode_libdir_flag_spec\"
2451 fi
2452 compile_rpath="$rpath"
2453
2454 rpath=
2455 hardcode_libdirs=
2456 for libdir in $finalize_rpath; do
2457 if test -n "$hardcode_libdir_flag_spec"; then
2458 if test -n "$hardcode_libdir_separator"; then
2459 if test -z "$hardcode_libdirs"; then
2460 hardcode_libdirs="$libdir"
2461 else
2462 # Just accumulate the unique libdirs.
2463 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
2464 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
2465 ;;
2466 *)
2467 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
2468 ;;
2469 esac
2470 fi
2471 else
2472 eval flag=\"$hardcode_libdir_flag_spec\"
2473 rpath="$rpath $flag"
2474 fi
2475 elif test -n "$runpath_var"; then
2476 case "$finalize_perm_rpath " in
2477 *" $libdir "*) ;;
2478 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
2479 esac
2480 fi
2481 done
2482 # Substitute the hardcoded libdirs into the rpath.
2483 if test -n "$hardcode_libdir_separator" &&
2484 test -n "$hardcode_libdirs"; then
2485 libdir="$hardcode_libdirs"
2486 eval rpath=\" $hardcode_libdir_flag_spec\"
2487 fi
2488 finalize_rpath="$rpath"
2489
2490 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2491 if test "X$output_objdir" = "X$output"; then
2492 output_objdir="$objdir"
2493 else
2494 output_objdir="$output_objdir/$objdir"
2495 fi
2496
2497 # Create the binary in the object directory, then wrap it.
2498 if test ! -d $output_objdir; then
2499 $show "$mkdir $output_objdir"
2500 $run $mkdir $output_objdir
2501 status=$?
2502 if test $status -ne 0 && test ! -d $output_objdir; then
2503 exit $status
2504 fi
2505 fi
2506
2507 if test -n "$libobjs" && test "$build_old_libs" = yes; then
2508 # Transform all the library objects into standard objects.
2509 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2510 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2511 fi
2512
2513 dlsyms=
2514 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2515 if test -n "$NM" && test -n "$global_symbol_pipe"; then
2516 dlsyms="${outputname}S.c"
2517 else
2518 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
2519 fi
2520 fi
2521
2522 if test -n "$dlsyms"; then
2523 case "$dlsyms" in
2524 "") ;;
2525 *.c)
2526 # Discover the nlist of each of the dlfiles.
2527 nlist="$output_objdir/${outputname}.nm"
2528
2529 $show "$rm $nlist ${nlist}S ${nlist}T"
2530 $run $rm "$nlist" "${nlist}S" "${nlist}T"
2531
2532 # Parse the name list into a source file.
2533 $show "creating $output_objdir/$dlsyms"
2534
2535 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
2536 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
2537 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
2538
2539 #ifdef __cplusplus
2540 extern \"C\" {
2541 #endif
2542
2543 /* Prevent the only kind of declaration conflicts we can make. */
2544 #define lt_preloaded_symbols some_other_symbol
2545
2546 /* External symbol declarations for the compiler. */\
2547 "
2548
2549 if test "$dlself" = yes; then
2550 $show "generating symbol list for \`$output'"
2551
2552 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
2553
2554 # Add our own program objects to the symbol list.
2555 progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2556 for arg in $progfiles; do
2557 $show "extracting global C symbols from \`$arg'"
2558 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
2559 done
2560
2561 if test -n "$exclude_expsyms"; then
2562 $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
2563 $run eval '$mv "$nlist"T "$nlist"'
2564 fi
2565
2566 if test -n "$export_symbols_regex"; then
2567 $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
2568 $run eval '$mv "$nlist"T "$nlist"'
2569 fi
2570
2571 # Prepare the list of exported symbols
2572 if test -z "$export_symbols"; then
2573 export_symbols="$output_objdir/$output.exp"
2574 $run $rm $export_symbols
2575 $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
2576 else
2577 $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
2578 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
2579 $run eval 'mv "$nlist"T "$nlist"'
2580 fi
2581 fi
2582
2583 for arg in $dlprefiles; do
2584 $show "extracting global C symbols from \`$arg'"
2585 name=`echo "$arg" | sed -e 's%^.*/%%'`
2586 $run eval 'echo ": $name " >> "$nlist"'
2587 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
2588 done
2589
2590 if test -z "$run"; then
2591 # Make sure we have at least an empty file.
2592 test -f "$nlist" || : > "$nlist"
2593
2594 if test -n "$exclude_expsyms"; then
2595 egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
2596 $mv "$nlist"T "$nlist"
2597 fi
2598
2599 # Try sorting and uniquifying the output.
2600 if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
2601 :
2602 else
2603 grep -v "^: " < "$nlist" > "$nlist"S
2604 fi
2605
2606 if test -f "$nlist"S; then
2607 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
2608 else
2609 echo '/* NONE */' >> "$output_objdir/$dlsyms"
2610 fi
2611
2612 $echo >> "$output_objdir/$dlsyms" "\
2613
2614 #undef lt_preloaded_symbols
2615
2616 #if defined (__STDC__) && __STDC__
2617 # define lt_ptr_t void *
2618 #else
2619 # define lt_ptr_t char *
2620 # define const
2621 #endif
2622
2623 /* The mapping between symbol names and symbols. */
2624 const struct {
2625 const char *name;
2626 lt_ptr_t address;
2627 }
2628 lt_preloaded_symbols[] =
2629 {\
2630 "
2631
2632 sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
2633 -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
2634 < "$nlist" >> "$output_objdir/$dlsyms"
2635
2636 $echo >> "$output_objdir/$dlsyms" "\
2637 {0, (lt_ptr_t) 0}
2638 };
2639
2640 /* This works around a problem in FreeBSD linker */
2641 #ifdef FREEBSD_WORKAROUND
2642 static const void *lt_preloaded_setup() {
2643 return lt_preloaded_symbols;
2644 }
2645 #endif
2646
2647 #ifdef __cplusplus
2648 }
2649 #endif\
2650 "
2651 fi
2652
2653 pic_flag_for_symtable=
2654 case "$host" in
2655 # compiling the symbol table file with pic_flag works around
2656 # a FreeBSD bug that causes programs to crash when -lm is
2657 # linked before any other PIC object. But we must not use
2658 # pic_flag when linking with -static. The problem exists in
2659 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
2660 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
2661 case "$compile_command " in
2662 *" -static "*) ;;
2663 *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
2664 esac;;
2665 *-*-hpux*)
2666 case "$compile_command " in
2667 *" -static "*) ;;
2668 *) pic_flag_for_symtable=" $pic_flag -DPIC";;
2669 esac
2670 esac
2671
2672 # Now compile the dynamic symbol file.
2673 $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
2674 $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
2675
2676 # Clean up the generated files.
2677 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
2678 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
2679
2680 # Transform the symbol file into the correct name.
2681 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
2682 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
2683 ;;
2684 *)
2685 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
2686 exit 1
2687 ;;
2688 esac
2689 else
2690 # We keep going just in case the user didn't refer to
2691 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
2692 # really was required.
2693
2694 # Nullify the symbol file.
2695 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
2696 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
2697 fi
2698
2699 if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
2700 # Replace the output file specification.
2701 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
2702 link_command="$compile_command$compile_rpath"
2703
2704 # We have no uninstalled library dependencies, so finalize right now.
2705 $show "$link_command"
2706 $run eval "$link_command"
2707 status=$?
2708
2709 # Delete the generated files.
2710 if test -n "$dlsyms"; then
2711 $show "$rm $output_objdir/${outputname}S.${objext}"
2712 $run $rm "$output_objdir/${outputname}S.${objext}"
2713 fi
2714
2715 exit $status
2716 fi
2717
2718 if test -n "$shlibpath_var"; then
2719 # We should set the shlibpath_var
2720 rpath=
2721 for dir in $temp_rpath; do
2722 case "$dir" in
2723 [\\/]* | [A-Za-z]:[\\/]*)
2724 # Absolute path.
2725 rpath="$rpath$dir:"
2726 ;;
2727 *)
2728 # Relative path: add a thisdir entry.
2729 rpath="$rpath\$thisdir/$dir:"
2730 ;;
2731 esac
2732 done
2733 temp_rpath="$rpath"
2734 fi
2735
2736 if test -n "$compile_shlibpath$finalize_shlibpath"; then
2737 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
2738 fi
2739 if test -n "$finalize_shlibpath"; then
2740 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
2741 fi
2742
2743 compile_var=
2744 finalize_var=
2745 if test -n "$runpath_var"; then
2746 if test -n "$perm_rpath"; then
2747 # We should set the runpath_var.
2748 rpath=
2749 for dir in $perm_rpath; do
2750 rpath="$rpath$dir:"
2751 done
2752 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
2753 fi
2754 if test -n "$finalize_perm_rpath"; then
2755 # We should set the runpath_var.
2756 rpath=
2757 for dir in $finalize_perm_rpath; do
2758 rpath="$rpath$dir:"
2759 done
2760 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
2761 fi
2762 fi
2763
2764 if test "$hardcode_action" = relink; then
2765 # Fast installation is not supported
2766 link_command="$compile_var$compile_command$compile_rpath"
2767 relink_command="$finalize_var$finalize_command$finalize_rpath"
2768
2769 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
2770 $echo "$modename: \`$output' will be relinked during installation" 1>&2
2771 else
2772 if test "$fast_install" != no; then
2773 link_command="$finalize_var$compile_command$finalize_rpath"
2774 if test "$fast_install" = yes; then
2775 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
2776 else
2777 # fast_install is set to needless
2778 relink_command=
2779 fi
2780 else
2781 link_command="$compile_var$compile_command$compile_rpath"
2782 relink_command="$finalize_var$finalize_command$finalize_rpath"
2783 fi
2784 fi
2785
2786 # Replace the output file specification.
2787 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
2788
2789 # Delete the old output files.
2790 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
2791
2792 $show "$link_command"
2793 $run eval "$link_command" || exit $?
2794
2795 # Now create the wrapper script.
2796 $show "creating $output"
2797
2798 # Quote the relink command for shipping.
2799 if test -n "$relink_command"; then
2800 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
2801 fi
2802
2803 # Quote $echo for shipping.
2804 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
2805 case "$0" in
2806 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
2807 *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
2808 esac
2809 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
2810 else
2811 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
2812 fi
2813
2814 # Only actually do things if our run command is non-null.
2815 if test -z "$run"; then
2816 # win32 will think the script is a binary if it has
2817 # a .exe suffix, so we strip it off here.
2818 case $output in
2819 *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
2820 esac
2821 $rm $output
2822 trap "$rm $output; exit 1" 1 2 15
2823
2824 $echo > $output "\
2825 #! $SHELL
2826
2827 # $output - temporary wrapper script for $objdir/$outputname
2828 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
2829 #
2830 # The $output program cannot be directly executed until all the libtool
2831 # libraries that it depends on are installed.
2832 #
2833 # This wrapper script should never be moved out of the build directory.
2834 # If it is, it will not operate correctly.
2835
2836 # Sed substitution that helps us do robust quoting. It backslashifies
2837 # metacharacters that are still active within double-quoted strings.
2838 Xsed='sed -e 1s/^X//'
2839 sed_quote_subst='$sed_quote_subst'
2840
2841 # The HP-UX ksh and POSIX shell print the target directory to stdout
2842 # if CDPATH is set.
2843 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
2844
2845 relink_command=\"$relink_command\"
2846
2847 # This environment variable determines our operation mode.
2848 if test \"\$libtool_install_magic\" = \"$magic\"; then
2849 # install mode needs the following variable:
2850 link_against_libtool_libs='$link_against_libtool_libs'
2851 else
2852 # When we are sourced in execute mode, \$file and \$echo are already set.
2853 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2854 echo=\"$qecho\"
2855 file=\"\$0\"
2856 # Make sure echo works.
2857 if test \"X\$1\" = X--no-reexec; then
2858 # Discard the --no-reexec flag, and continue.
2859 shift
2860 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
2861 # Yippee, \$echo works!
2862 :
2863 else
2864 # Restart under the correct shell, and then maybe \$echo will work.
2865 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
2866 fi
2867 fi\
2868 "
2869 $echo >> $output "\
2870
2871 # Find the directory that this script lives in.
2872 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
2873 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
2874
2875 # Follow symbolic links until we get to the real thisdir.
2876 file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
2877 while test -n \"\$file\"; do
2878 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
2879
2880 # If there was a directory component, then change thisdir.
2881 if test \"x\$destdir\" != \"x\$file\"; then
2882 case \"\$destdir\" in
2883 [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
2884 *) thisdir=\"\$thisdir/\$destdir\" ;;
2885 esac
2886 fi
2887
2888 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
2889 file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
2890 done
2891
2892 # Try to get the absolute directory name.
2893 absdir=\`cd \"\$thisdir\" && pwd\`
2894 test -n \"\$absdir\" && thisdir=\"\$absdir\"
2895 "
2896
2897 if test "$fast_install" = yes; then
2898 echo >> $output "\
2899 program=lt-'$outputname'
2900 progdir=\"\$thisdir/$objdir\"
2901
2902 if test ! -f \"\$progdir/\$program\" || \\
2903 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
2904 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
2905
2906 file=\"\$\$-\$program\"
2907
2908 if test ! -d \"\$progdir\"; then
2909 $mkdir \"\$progdir\"
2910 else
2911 $rm \"\$progdir/\$file\"
2912 fi"
2913
2914 echo >> $output "\
2915
2916 # relink executable if necessary
2917 if test -n \"\$relink_command\"; then
2918 if (cd \"\$thisdir\" && eval \$relink_command); then :
2919 else
2920 $rm \"\$progdir/\$file\"
2921 exit 1
2922 fi
2923 fi
2924
2925 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
2926 { $rm \"\$progdir/\$program\";
2927 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
2928 $rm \"\$progdir/\$file\"
2929 fi"
2930 else
2931 echo >> $output "\
2932 program='$outputname'
2933 progdir=\"\$thisdir/$objdir\"
2934 "
2935 fi
2936
2937 echo >> $output "\
2938
2939 if test -f \"\$progdir/\$program\"; then"
2940
2941 # Export our shlibpath_var if we have one.
2942 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
2943 $echo >> $output "\
2944 # Add our own library path to $shlibpath_var
2945 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
2946
2947 # Some systems cannot cope with colon-terminated $shlibpath_var
2948 # The second colon is a workaround for a bug in BeOS R4 sed
2949 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
2950
2951 export $shlibpath_var
2952 "
2953 fi
2954
2955 # fixup the dll searchpath if we need to.
2956 if test -n "$dllsearchpath"; then
2957 $echo >> $output "\
2958 # Add the dll search path components to the executable PATH
2959 PATH=$dllsearchpath:\$PATH
2960 "
2961 fi
2962
2963 $echo >> $output "\
2964 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2965 # Run the actual program with our arguments.
2966 "
2967 case $host in
2968 # win32 systems need to use the prog path for dll
2969 # lookup to work
2970 *-*-cygwin*)
2971 $echo >> $output "\
2972 exec \$progdir/\$program \${1+\"\$@\"}
2973 "
2974 ;;
2975
2976 # Backslashes separate directories on plain windows
2977 *-*-mingw | *-*-os2*)
2978 $echo >> $output "\
2979 exec \$progdir\\\\\$program \${1+\"\$@\"}
2980 "
2981 ;;
2982
2983 *)
2984 $echo >> $output "\
2985 # Export the path to the program.
2986 PATH=\"\$progdir:\$PATH\"
2987 export PATH
2988
2989 exec \$program \${1+\"\$@\"}
2990 "
2991 ;;
2992 esac
2993 $echo >> $output "\
2994 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
2995 exit 1
2996 fi
2997 else
2998 # The program doesn't exist.
2999 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
3000 \$echo \"This script is just a wrapper for \$program.\" 1>&2
3001 echo \"See the $PACKAGE documentation for more information.\" 1>&2
3002 exit 1
3003 fi
3004 fi\
3005 "
3006 chmod +x $output
3007 fi
3008 exit 0
3009 ;;
3010 esac
3011
3012 # See if we need to build an old-fashioned archive.
3013 for oldlib in $oldlibs; do
3014
3015 if test "$build_libtool_libs" = convenience; then
3016 oldobjs="$libobjs_save"
3017 addlibs="$convenience"
3018 build_libtool_libs=no
3019 else
3020 if test "$build_libtool_libs" = module; then
3021 oldobjs="$libobjs_save"
3022 build_libtool_libs=no
3023 else
3024 oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
3025 fi
3026 addlibs="$old_convenience"
3027 fi
3028
3029 if test -n "$addlibs"; then
3030 gentop="$output_objdir/${outputname}x"
3031 $show "${rm}r $gentop"
3032 $run ${rm}r "$gentop"
3033 $show "mkdir $gentop"
3034 $run mkdir "$gentop"
3035 status=$?
3036 if test $status -ne 0 && test ! -d "$gentop"; then
3037 exit $status
3038 fi
3039 generated="$generated $gentop"
3040
3041 # Add in members from convenience archives.
3042 for xlib in $addlibs; do
3043 # Extract the objects.
3044 case "$xlib" in
3045 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3046 *) xabs=`pwd`"/$xlib" ;;
3047 esac
3048 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3049 xdir="$gentop/$xlib"
3050
3051 $show "${rm}r $xdir"
3052 $run ${rm}r "$xdir"
3053 $show "mkdir $xdir"
3054 $run mkdir "$xdir"
3055 status=$?
3056 if test $status -ne 0 && test ! -d "$xdir"; then
3057 exit $status
3058 fi
3059 $show "(cd $xdir && $AR x $xabs)"
3060 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3061
3062 oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
3063 done
3064 fi
3065
3066 # Do each command in the archive commands.
3067 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
3068 eval cmds=\"$old_archive_from_new_cmds\"
3069 else
3070 # Ensure that we have .o objects in place in case we decided
3071 # not to build a shared library, and have fallen back to building
3072 # static libs even though --disable-static was passed!
3073 for oldobj in $oldobjs; do
3074 if test ! -f $oldobj; then
3075 xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
3076 if test "X$xdir" = "X$oldobj"; then
3077 xdir="."
3078 else
3079 xdir="$xdir"
3080 fi
3081 baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
3082 obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
3083 $show "(cd $xdir && ${LN_S} $obj $baseobj)"
3084 $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
3085 fi
3086 done
3087
3088 eval cmds=\"$old_archive_cmds\"
3089 fi
3090 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3091 for cmd in $cmds; do
3092 IFS="$save_ifs"
3093 $show "$cmd"
3094 $run eval "$cmd" || exit $?
3095 done
3096 IFS="$save_ifs"
3097 done
3098
3099 if test -n "$generated"; then
3100 $show "${rm}r$generated"
3101 $run ${rm}r$generated
3102 fi
3103
3104 # Now create the libtool archive.
3105 case "$output" in
3106 *.la)
3107 old_library=
3108 test "$build_old_libs" = yes && old_library="$libname.$libext"
3109 $show "creating $output"
3110
3111 if test -n "$xrpath"; then
3112 temp_xrpath=
3113 for libdir in $xrpath; do
3114 temp_xrpath="$temp_xrpath -R$libdir"
3115 done
3116 dependency_libs="$temp_xrpath $dependency_libs"
3117 fi
3118
3119 # Only create the output if not a dry run.
3120 if test -z "$run"; then
3121 for installed in no yes; do
3122 if test "$installed" = yes; then
3123 if test -z "$install_libdir"; then
3124 break
3125 fi
3126 output="$output_objdir/$outputname"i
3127 fi
3128 $rm $output
3129 $echo > $output "\
3130 # $outputname - a libtool library file
3131 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
3132 #
3133 # Please DO NOT delete this file!
3134 # It is necessary for linking the library.
3135
3136 # The name that we can dlopen(3).
3137 dlname='$dlname'
3138
3139 # Names of this library.
3140 library_names='$library_names'
3141
3142 # The name of the static archive.
3143 old_library='$old_library'
3144
3145 # Libraries that this one depends upon.
3146 dependency_libs='$dependency_libs'
3147
3148 # Version information for $libname.
3149 current=$current
3150 age=$age
3151 revision=$revision
3152
3153 # Is this an already installed library?
3154 installed=$installed
3155
3156 # Directory that this library needs to be installed in:
3157 libdir='$install_libdir'\
3158 "
3159 done
3160 fi
3161
3162 # Do a symbolic link so that the libtool archive can be found in
3163 # LD_LIBRARY_PATH before the program is installed.
3164 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
3165 $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $?
3166 ;;
3167 esac
3168 exit 0
3169 ;;
3170
3171 # libtool install mode
3172 install)
3173 modename="$modename: install"
3174
3175 # There may be an optional sh(1) argument at the beginning of
3176 # install_prog (especially on Windows NT).
3177 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
3178 # Aesthetically quote it.
3179 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
3180 case "$arg" in
3181 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
3182 arg="\"$arg\""
3183 ;;
3184 esac
3185 install_prog="$arg "
3186 arg="$1"
3187 shift
3188 else
3189 install_prog=
3190 arg="$nonopt"
3191 fi
3192
3193 # The real first argument should be the name of the installation program.
3194 # Aesthetically quote it.
3195 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
3196 case "$arg" in
3197 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
3198 arg="\"$arg\""
3199 ;;
3200 esac
3201 install_prog="$install_prog$arg"
3202
3203 # We need to accept at least all the BSD install flags.
3204 dest=
3205 files=
3206 opts=
3207 prev=
3208 install_type=
3209 isdir=no
3210 stripme=
3211 for arg
3212 do
3213 if test -n "$dest"; then
3214 files="$files $dest"
3215 dest="$arg"
3216 continue
3217 fi
3218
3219 case "$arg" in
3220 -d) isdir=yes ;;
3221 -f) prev="-f" ;;
3222 -g) prev="-g" ;;
3223 -m) prev="-m" ;;
3224 -o) prev="-o" ;;
3225 -s)
3226 stripme=" -s"
3227 continue
3228 ;;
3229 -*) ;;
3230
3231 *)
3232 # If the previous option needed an argument, then skip it.
3233 if test -n "$prev"; then
3234 prev=
3235 else
3236 dest="$arg"
3237 continue
3238 fi
3239 ;;
3240 esac
3241
3242 # Aesthetically quote the argument.
3243 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
3244 case "$arg" in
3245 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
3246 arg="\"$arg\""
3247 ;;
3248 esac
3249 install_prog="$install_prog $arg"
3250 done
3251
3252 if test -z "$install_prog"; then
3253 $echo "$modename: you must specify an install program" 1>&2
3254 $echo "$help" 1>&2
3255 exit 1
3256 fi
3257
3258 if test -n "$prev"; then
3259 $echo "$modename: the \`$prev' option requires an argument" 1>&2
3260 $echo "$help" 1>&2
3261 exit 1
3262 fi
3263
3264 if test -z "$files"; then
3265 if test -z "$dest"; then
3266 $echo "$modename: no file or destination specified" 1>&2
3267 else
3268 $echo "$modename: you must specify a destination" 1>&2
3269 fi
3270 $echo "$help" 1>&2
3271 exit 1
3272 fi
3273
3274 # Strip any trailing slash from the destination.
3275 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
3276
3277 # Check to see that the destination is a directory.
3278 test -d "$dest" && isdir=yes
3279 if test "$isdir" = yes; then
3280 destdir="$dest"
3281 destname=
3282 else
3283 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
3284 test "X$destdir" = "X$dest" && destdir=.
3285 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
3286
3287 # Not a directory, so check to see that there is only one file specified.
3288 set dummy $files
3289 if test $# -gt 2; then
3290 $echo "$modename: \`$dest' is not a directory" 1>&2
3291 $echo "$help" 1>&2
3292 exit 1
3293 fi
3294 fi
3295 case "$destdir" in
3296 [\\/]* | [A-Za-z]:[\\/]*) ;;
3297 *)
3298 for file in $files; do
3299 case "$file" in
3300 *.lo) ;;
3301 *)
3302 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
3303 $echo "$help" 1>&2
3304 exit 1
3305 ;;
3306 esac
3307 done
3308 ;;
3309 esac
3310
3311 # This variable tells wrapper scripts just to set variables rather
3312 # than running their programs.
3313 libtool_install_magic="$magic"
3314
3315 staticlibs=
3316 future_libdirs=
3317 current_libdirs=
3318 for file in $files; do
3319
3320 # Do each installation.
3321 case "$file" in
3322 *.a | *.lib)
3323 # Do the static libraries later.
3324 staticlibs="$staticlibs $file"
3325 ;;
3326
3327 *.la)
3328 # Check to see that this really is a libtool archive.
3329 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
3330 else
3331 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
3332 $echo "$help" 1>&2
3333 exit 1
3334 fi
3335
3336 library_names=
3337 old_library=
3338 # If there is no directory component, then add one.
3339 case "$file" in
3340 */* | *\\*) . $file ;;
3341 *) . ./$file ;;
3342 esac
3343
3344 # Add the libdir to current_libdirs if it is the destination.
3345 if test "X$destdir" = "X$libdir"; then
3346 case "$current_libdirs " in
3347 *" $libdir "*) ;;
3348 *) current_libdirs="$current_libdirs $libdir" ;;
3349 esac
3350 else
3351 # Note the libdir as a future libdir.
3352 case "$future_libdirs " in
3353 *" $libdir "*) ;;
3354 *) future_libdirs="$future_libdirs $libdir" ;;
3355 esac
3356 fi
3357
3358 dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
3359 test "X$dir" = "X$file/" && dir=
3360 dir="$dir$objdir"
3361
3362 # See the names of the shared library.
3363 set dummy $library_names
3364 if test -n "$2"; then
3365 realname="$2"
3366 shift
3367 shift
3368
3369 # Install the shared library and build the symlinks.
3370 $show "$install_prog $dir/$realname $destdir/$realname"
3371 $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
3372
3373 if test $# -gt 0; then
3374 # Delete the old symlinks, and create new ones.
3375 for linkname
3376 do
3377 if test "$linkname" != "$realname"; then
3378 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
3379 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
3380 fi
3381 done
3382 fi
3383
3384 # Do each command in the postinstall commands.
3385 lib="$destdir/$realname"
3386 eval cmds=\"$postinstall_cmds\"
3387 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3388 for cmd in $cmds; do
3389 IFS="$save_ifs"
3390 $show "$cmd"
3391 $run eval "$cmd" || exit $?
3392 done
3393 IFS="$save_ifs"
3394 fi
3395
3396 # Install the pseudo-library for information purposes.
3397 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3398 instname="$dir/$name"i
3399 $show "$install_prog $instname $destdir/$name"
3400 $run eval "$install_prog $instname $destdir/$name" || exit $?
3401
3402 # Maybe install the static library, too.
3403 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
3404 ;;
3405
3406 *.lo)
3407 # Install (i.e. copy) a libtool object.
3408
3409 # Figure out destination file name, if it wasn't already specified.
3410 if test -n "$destname"; then
3411 destfile="$destdir/$destname"
3412 else
3413 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3414 destfile="$destdir/$destfile"
3415 fi
3416
3417 # Deduce the name of the destination old-style object file.
3418 case "$destfile" in
3419 *.lo)
3420 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
3421 ;;
3422 *.o | *.obj)
3423 staticdest="$destfile"
3424 destfile=
3425 ;;
3426 *)
3427 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
3428 $echo "$help" 1>&2
3429 exit 1
3430 ;;
3431 esac
3432
3433 # Install the libtool object if requested.
3434 if test -n "$destfile"; then
3435 $show "$install_prog $file $destfile"
3436 $run eval "$install_prog $file $destfile" || exit $?
3437 fi
3438
3439 # Install the old object if enabled.
3440 if test "$build_old_libs" = yes; then
3441 # Deduce the name of the old-style object file.
3442 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
3443
3444 $show "$install_prog $staticobj $staticdest"
3445 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
3446 fi
3447 exit 0
3448 ;;
3449
3450 *)
3451 # Figure out destination file name, if it wasn't already specified.
3452 if test -n "$destname"; then
3453 destfile="$destdir/$destname"
3454 else
3455 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3456 destfile="$destdir/$destfile"
3457 fi
3458
3459 # Do a test to see if this is really a libtool program.
3460 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
3461 link_against_libtool_libs=
3462 relink_command=
3463
3464 # If there is no directory component, then add one.
3465 case "$file" in
3466 */* | *\\*) . $file ;;
3467 *) . ./$file ;;
3468 esac
3469
3470 # Check the variables that should have been set.
3471 if test -z "$link_against_libtool_libs"; then
3472 $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
3473 exit 1
3474 fi
3475
3476 finalize=yes
3477 for lib in $link_against_libtool_libs; do
3478 # Check to see that each library is installed.
3479 libdir=
3480 if test -f "$lib"; then
3481 # If there is no directory component, then add one.
3482 case "$lib" in
3483 */* | *\\*) . $lib ;;
3484 *) . ./$lib ;;
3485 esac
3486 fi
3487 libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
3488 if test -n "$libdir" && test ! -f "$libfile"; then
3489 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
3490 finalize=no
3491 fi
3492 done
3493
3494 outputname=
3495 if test "$fast_install" = no && test -n "$relink_command"; then
3496 if test "$finalize" = yes && test -z "$run"; then
3497 tmpdir="/tmp"
3498 test -n "$TMPDIR" && tmpdir="$TMPDIR"
3499 tmpdir="$tmpdir/libtool-$$"
3500 if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
3501 else
3502 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
3503 continue
3504 fi
3505 outputname="$tmpdir/$file"
3506 # Replace the output file specification.
3507 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
3508
3509 $show "$relink_command"
3510 if $run eval "$relink_command"; then :
3511 else
3512 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
3513 ${rm}r "$tmpdir"
3514 continue
3515 fi
3516 file="$outputname"
3517 else
3518 $echo "$modename: warning: cannot relink \`$file'" 1>&2
3519 fi
3520 else
3521 # Install the binary that we compiled earlier.
3522 file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
3523 fi
3524 fi
3525
3526 $show "$install_prog$stripme $file $destfile"
3527 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
3528 test -n "$outputname" && ${rm}r "$tmpdir"
3529 ;;
3530 esac
3531 done
3532
3533 for file in $staticlibs; do
3534 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3535
3536 # Set up the ranlib parameters.
3537 oldlib="$destdir/$name"
3538
3539 $show "$install_prog $file $oldlib"
3540 $run eval "$install_prog \$file \$oldlib" || exit $?
3541
3542 # Do each command in the postinstall commands.
3543 eval cmds=\"$old_postinstall_cmds\"
3544 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3545 for cmd in $cmds; do
3546 IFS="$save_ifs"
3547 $show "$cmd"
3548 $run eval "$cmd" || exit $?
3549 done
3550 IFS="$save_ifs"
3551 done
3552
3553 if test -n "$future_libdirs"; then
3554 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
3555 fi
3556
3557 if test -n "$current_libdirs"; then
3558 # Maybe just do a dry run.
3559 test -n "$run" && current_libdirs=" -n$current_libdirs"
3560 exec $SHELL $0 --finish$current_libdirs
3561 exit 1
3562 fi
3563
3564 exit 0
3565 ;;
3566
3567 # libtool finish mode
3568 finish)
3569 modename="$modename: finish"
3570 libdirs="$nonopt"
3571 admincmds=
3572
3573 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
3574 for dir
3575 do
3576 libdirs="$libdirs $dir"
3577 done
3578
3579 for libdir in $libdirs; do
3580 if test -n "$finish_cmds"; then
3581 # Do each command in the finish commands.
3582 eval cmds=\"$finish_cmds\"
3583 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3584 for cmd in $cmds; do
3585 IFS="$save_ifs"
3586 $show "$cmd"
3587 $run eval "$cmd" || admincmds="$admincmds
3588 $cmd"
3589 done
3590 IFS="$save_ifs"
3591 fi
3592 if test -n "$finish_eval"; then
3593 # Do the single finish_eval.
3594 eval cmds=\"$finish_eval\"
3595 $run eval "$cmds" || admincmds="$admincmds
3596 $cmds"
3597 fi
3598 done
3599 fi
3600
3601 # Exit here if they wanted silent mode.
3602 test "$show" = : && exit 0
3603
3604 echo "----------------------------------------------------------------------"
3605 echo "Libraries have been installed in:"
3606 for libdir in $libdirs; do
3607 echo " $libdir"
3608 done
3609 echo
3610 echo "If you ever happen to want to link against installed libraries"
3611 echo "in a given directory, LIBDIR, you must either use libtool, and"
3612 echo "specify the full pathname of the library, or use \`-LLIBDIR'"
3613 echo "flag during linking and do at least one of the following:"
3614 if test -n "$shlibpath_var"; then
3615 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
3616 echo " during execution"
3617 fi
3618 if test -n "$runpath_var"; then
3619 echo " - add LIBDIR to the \`$runpath_var' environment variable"
3620 echo " during linking"
3621 fi
3622 if test -n "$hardcode_libdir_flag_spec"; then
3623 libdir=LIBDIR
3624 eval flag=\"$hardcode_libdir_flag_spec\"
3625
3626 echo " - use the \`$flag' linker flag"
3627 fi
3628 if test -n "$admincmds"; then
3629 echo " - have your system administrator run these commands:$admincmds"
3630 fi
3631 if test -f /etc/ld.so.conf; then
3632 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
3633 fi
3634 echo
3635 echo "See any operating system documentation about shared libraries for"
3636 echo "more information, such as the ld(1) and ld.so(8) manual pages."
3637 echo "----------------------------------------------------------------------"
3638 exit 0
3639 ;;
3640
3641 # libtool execute mode
3642 execute)
3643 modename="$modename: execute"
3644
3645 # The first argument is the command name.
3646 cmd="$nonopt"
3647 if test -z "$cmd"; then
3648 $echo "$modename: you must specify a COMMAND" 1>&2
3649 $echo "$help"
3650 exit 1
3651 fi
3652
3653 # Handle -dlopen flags immediately.
3654 for file in $execute_dlfiles; do
3655 if test ! -f "$file"; then
3656 $echo "$modename: \`$file' is not a file" 1>&2
3657 $echo "$help" 1>&2
3658 exit 1
3659 fi
3660
3661 dir=
3662 case "$file" in
3663 *.la)
3664 # Check to see that this really is a libtool archive.
3665 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
3666 else
3667 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
3668 $echo "$help" 1>&2
3669 exit 1
3670 fi
3671
3672 # Read the libtool library.
3673 dlname=
3674 library_names=
3675
3676 # If there is no directory component, then add one.
3677 case "$file" in
3678 */* | *\\*) . $file ;;
3679 *) . ./$file ;;
3680 esac
3681
3682 # Skip this library if it cannot be dlopened.
3683 if test -z "$dlname"; then
3684 # Warn if it was a shared library.
3685 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
3686 continue
3687 fi
3688
3689 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
3690 test "X$dir" = "X$file" && dir=.
3691
3692 if test -f "$dir/$objdir/$dlname"; then
3693 dir="$dir/$objdir"
3694 else
3695 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
3696 exit 1
3697 fi
3698 ;;
3699
3700 *.lo)
3701 # Just add the directory containing the .lo file.
3702 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
3703 test "X$dir" = "X$file" && dir=.
3704 ;;
3705
3706 *)
3707 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
3708 continue
3709 ;;
3710 esac
3711
3712 # Get the absolute pathname.
3713 absdir=`cd "$dir" && pwd`
3714 test -n "$absdir" && dir="$absdir"
3715
3716 # Now add the directory to shlibpath_var.
3717 if eval "test -z \"\$$shlibpath_var\""; then
3718 eval "$shlibpath_var=\"\$dir\""
3719 else
3720 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
3721 fi
3722 done
3723
3724 # This variable tells wrapper scripts just to set shlibpath_var
3725 # rather than running their programs.
3726 libtool_execute_magic="$magic"
3727
3728 # Check if any of the arguments is a wrapper script.
3729 args=
3730 for file
3731 do
3732 case "$file" in
3733 -*) ;;
3734 *)
3735 # Do a test to see if this is really a libtool program.
3736 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
3737 # If there is no directory component, then add one.
3738 case "$file" in
3739 */* | *\\*) . $file ;;
3740 *) . ./$file ;;
3741 esac
3742
3743 # Transform arg to wrapped name.
3744 file="$progdir/$program"
3745 fi
3746 ;;
3747 esac
3748 # Quote arguments (to preserve shell metacharacters).
3749 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
3750 args="$args \"$file\""
3751 done
3752
3753 if test -z "$run"; then
3754 if test -n "$shlibpath_var"; then
3755 # Export the shlibpath_var.
3756 eval "export $shlibpath_var"
3757 fi
3758
3759 # Restore saved enviroment variables
3760 if test "${save_LC_ALL+set}" = set; then
3761 LC_ALL="$save_LC_ALL"; export LC_ALL
3762 fi
3763 if test "${save_LANG+set}" = set; then
3764 LANG="$save_LANG"; export LANG
3765 fi
3766
3767 # Now actually exec the command.
3768 eval "exec \$cmd$args"
3769
3770 $echo "$modename: cannot exec \$cmd$args"
3771 exit 1
3772 else
3773 # Display what would be done.
3774 if test -n "$shlibpath_var"; then
3775 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
3776 $echo "export $shlibpath_var"
3777 fi
3778 $echo "$cmd$args"
3779 exit 0
3780 fi
3781 ;;
3782
3783 # libtool uninstall mode
3784 uninstall)
3785 modename="$modename: uninstall"
3786 rm="$nonopt"
3787 files=
3788
3789 for arg
3790 do
3791 case "$arg" in
3792 -*) rm="$rm $arg" ;;
3793 *) files="$files $arg" ;;
3794 esac
3795 done
3796
3797 if test -z "$rm"; then
3798 $echo "$modename: you must specify an RM program" 1>&2
3799 $echo "$help" 1>&2
3800 exit 1
3801 fi
3802
3803 for file in $files; do
3804 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
3805 test "X$dir" = "X$file" && dir=.
3806 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3807
3808 rmfiles="$file"
3809
3810 case "$name" in
3811 *.la)
3812 # Possibly a libtool archive, so verify it.
3813 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
3814 . $dir/$name
3815
3816 # Delete the libtool libraries and symlinks.
3817 for n in $library_names; do
3818 rmfiles="$rmfiles $dir/$n"
3819 done
3820 test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
3821
3822 $show "$rm $rmfiles"
3823 $run $rm $rmfiles
3824
3825 if test -n "$library_names"; then
3826 # Do each command in the postuninstall commands.
3827 eval cmds=\"$postuninstall_cmds\"
3828 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3829 for cmd in $cmds; do
3830 IFS="$save_ifs"
3831 $show "$cmd"
3832 $run eval "$cmd"
3833 done
3834 IFS="$save_ifs"
3835 fi
3836
3837 if test -n "$old_library"; then
3838 # Do each command in the old_postuninstall commands.
3839 eval cmds=\"$old_postuninstall_cmds\"
3840 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3841 for cmd in $cmds; do
3842 IFS="$save_ifs"
3843 $show "$cmd"
3844 $run eval "$cmd"
3845 done
3846 IFS="$save_ifs"
3847 fi
3848
3849 # FIXME: should reinstall the best remaining shared library.
3850 fi
3851 ;;
3852
3853 *.lo)
3854 if test "$build_old_libs" = yes; then
3855 oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
3856 rmfiles="$rmfiles $dir/$oldobj"
3857 fi
3858 $show "$rm $rmfiles"
3859 $run $rm $rmfiles
3860 ;;
3861
3862 *)
3863 $show "$rm $rmfiles"
3864 $run $rm $rmfiles
3865 ;;
3866 esac
3867 done
3868 exit 0
3869 ;;
3870
3871 "")
3872 $echo "$modename: you must specify a MODE" 1>&2
3873 $echo "$generic_help" 1>&2
3874 exit 1
3875 ;;
3876 esac
3877
3878 $echo "$modename: invalid operation mode \`$mode'" 1>&2
3879 $echo "$generic_help" 1>&2
3880 exit 1
3881 fi # test -z "$show_help"
3882
3883 # We need to display help for each of the modes.
3884 case "$mode" in
3885 "") $echo \
3886 "Usage: $modename [OPTION]... [MODE-ARG]...
3887
3888 Provide generalized library-building support services.
3889
3890 --config show all configuration variables
3891 --debug enable verbose shell tracing
3892 -n, --dry-run display commands without modifying any files
3893 --features display basic configuration information and exit
3894 --finish same as \`--mode=finish'
3895 --help display this help message and exit
3896 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
3897 --quiet same as \`--silent'
3898 --silent don't print informational messages
3899 --version print version information
3900
3901 MODE must be one of the following:
3902
3903 compile compile a source file into a libtool object
3904 execute automatically set library path, then run a program
3905 finish complete the installation of libtool libraries
3906 install install libraries or executables
3907 link create a library or an executable
3908 uninstall remove libraries from an installed directory
3909
3910 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
3911 a more detailed description of MODE."
3912 exit 0
3913 ;;
3914
3915 compile)
3916 $echo \
3917 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
3918
3919 Compile a source file into a libtool library object.
3920
3921 This mode accepts the following additional options:
3922
3923 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
3924 -static always build a \`.o' file suitable for static linking
3925
3926 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
3927 from the given SOURCEFILE.
3928
3929 The output file name is determined by removing the directory component from
3930 SOURCEFILE, then substituting the C source code suffix \`.c' with the
3931 library object suffix, \`.lo'."
3932 ;;
3933
3934 execute)
3935 $echo \
3936 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
3937
3938 Automatically set library path, then run a program.
3939
3940 This mode accepts the following additional options:
3941
3942 -dlopen FILE add the directory containing FILE to the library path
3943
3944 This mode sets the library path environment variable according to \`-dlopen'
3945 flags.
3946
3947 If any of the ARGS are libtool executable wrappers, then they are translated
3948 into their corresponding uninstalled binary, and any of their required library
3949 directories are added to the library path.
3950
3951 Then, COMMAND is executed, with ARGS as arguments."
3952 ;;
3953
3954 finish)
3955 $echo \
3956 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
3957
3958 Complete the installation of libtool libraries.
3959
3960 Each LIBDIR is a directory that contains libtool libraries.
3961
3962 The commands that this mode executes may require superuser privileges. Use
3963 the \`--dry-run' option if you just want to see what would be executed."
3964 ;;
3965
3966 install)
3967 $echo \
3968 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
3969
3970 Install executables or libraries.
3971
3972 INSTALL-COMMAND is the installation command. The first component should be
3973 either the \`install' or \`cp' program.
3974
3975 The rest of the components are interpreted as arguments to that command (only
3976 BSD-compatible install options are recognized)."
3977 ;;
3978
3979 link)
3980 $echo \
3981 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
3982
3983 Link object files or libraries together to form another library, or to
3984 create an executable program.
3985
3986 LINK-COMMAND is a command using the C compiler that you would use to create
3987 a program from several object files.
3988
3989 The following components of LINK-COMMAND are treated specially:
3990
3991 -all-static do not do any dynamic linking at all
3992 -avoid-version do not add a version suffix if possible
3993 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
3994 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
3995 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
3996 -export-symbols SYMFILE
3997 try to export only the symbols listed in SYMFILE
3998 -export-symbols-regex REGEX
3999 try to export only the symbols matching REGEX
4000 -LLIBDIR search LIBDIR for required installed libraries
4001 -lNAME OUTPUT-FILE requires the installed library libNAME
4002 -module build a library that can dlopened
4003 -no-undefined declare that a library does not refer to external symbols
4004 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
4005 -release RELEASE specify package release information
4006 -rpath LIBDIR the created library will eventually be installed in LIBDIR
4007 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
4008 -static do not do any dynamic linking of libtool libraries
4009 -version-info CURRENT[:REVISION[:AGE]]
4010 specify library version info [each variable defaults to 0]
4011
4012 All other options (arguments beginning with \`-') are ignored.
4013
4014 Every other argument is treated as a filename. Files ending in \`.la' are
4015 treated as uninstalled libtool libraries, other files are standard or library
4016 object files.
4017
4018 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
4019 only library objects (\`.lo' files) may be specified, and \`-rpath' is
4020 required, except when creating a convenience library.
4021
4022 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
4023 using \`ar' and \`ranlib', or on Windows using \`lib'.
4024
4025 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
4026 is created, otherwise an executable program is created."
4027 ;;
4028
4029 uninstall)
4030 $echo \
4031 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
4032
4033 Remove libraries from an installation directory.
4034
4035 RM is the name of the program to use to delete files associated with each FILE
4036 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
4037 to RM.
4038
4039 If FILE is a libtool library, all the files associated with it are deleted.
4040 Otherwise, only FILE itself is deleted using RM."
4041 ;;
4042
4043 *)
4044 $echo "$modename: invalid operation mode \`$mode'" 1>&2
4045 $echo "$help" 1>&2
4046 exit 1
4047 ;;
4048 esac
4049
4050 echo
4051 $echo "Try \`$modename --help' for more information about other modes."
4052
4053 exit 0
4054
4055 # Local Variables:
4056 # mode:shell-script
4057 # sh-indentation:2
4058 # End:
+0
-336
config/missing less more
0 #! /bin/sh
1 # Common stub for a few missing GNU programs while installing.
2 # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
3 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
8 # any later version.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 # 02111-1307, USA.
19
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that program.
24
25 if test $# -eq 0; then
26 echo 1>&2 "Try \`$0 --help' for more information"
27 exit 1
28 fi
29
30 run=:
31
32 # In the cases where this matters, `missing' is being run in the
33 # srcdir already.
34 if test -f configure.ac; then
35 configure_ac=configure.ac
36 else
37 configure_ac=configure.in
38 fi
39
40 case "$1" in
41 --run)
42 # Try to run requested program, and just exit if it succeeds.
43 run=
44 shift
45 "$@" && exit 0
46 ;;
47 esac
48
49 # If it does not exist, or fails to run (possibly an outdated version),
50 # try to emulate it.
51 case "$1" in
52
53 -h|--h|--he|--hel|--help)
54 echo "\
55 $0 [OPTION]... PROGRAM [ARGUMENT]...
56
57 Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
58 error status if there is no known handling for PROGRAM.
59
60 Options:
61 -h, --help display this help and exit
62 -v, --version output version information and exit
63 --run try to run the given command, and emulate it if it fails
64
65 Supported PROGRAM values:
66 aclocal touch file \`aclocal.m4'
67 autoconf touch file \`configure'
68 autoheader touch file \`config.h.in'
69 automake touch all \`Makefile.in' files
70 bison create \`y.tab.[ch]', if possible, from existing .[ch]
71 flex create \`lex.yy.c', if possible, from existing .c
72 help2man touch the output file
73 lex create \`lex.yy.c', if possible, from existing .c
74 makeinfo touch the output file
75 tar try tar, gnutar, gtar, then tar without non-portable flags
76 yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
77 ;;
78
79 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
80 echo "missing 0.4 - GNU automake"
81 ;;
82
83 -*)
84 echo 1>&2 "$0: Unknown \`$1' option"
85 echo 1>&2 "Try \`$0 --help' for more information"
86 exit 1
87 ;;
88
89 aclocal*)
90 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
91 # We have it, but it failed.
92 exit 1
93 fi
94
95 echo 1>&2 "\
96 WARNING: \`$1' is missing on your system. You should only need it if
97 you modified \`acinclude.m4' or \`${configure_ac}'. You might want
98 to install the \`Automake' and \`Perl' packages. Grab them from
99 any GNU archive site."
100 touch aclocal.m4
101 ;;
102
103 autoconf)
104 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
105 # We have it, but it failed.
106 exit 1
107 fi
108
109 echo 1>&2 "\
110 WARNING: \`$1' is missing on your system. You should only need it if
111 you modified \`${configure_ac}'. You might want to install the
112 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
113 archive site."
114 touch configure
115 ;;
116
117 autoheader)
118 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
119 # We have it, but it failed.
120 exit 1
121 fi
122
123 echo 1>&2 "\
124 WARNING: \`$1' is missing on your system. You should only need it if
125 you modified \`acconfig.h' or \`${configure_ac}'. You might want
126 to install the \`Autoconf' and \`GNU m4' packages. Grab them
127 from any GNU archive site."
128 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
129 test -z "$files" && files="config.h"
130 touch_files=
131 for f in $files; do
132 case "$f" in
133 *:*) touch_files="$touch_files "`echo "$f" |
134 sed -e 's/^[^:]*://' -e 's/:.*//'`;;
135 *) touch_files="$touch_files $f.in";;
136 esac
137 done
138 touch $touch_files
139 ;;
140
141 automake*)
142 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
143 # We have it, but it failed.
144 exit 1
145 fi
146
147 echo 1>&2 "\
148 WARNING: \`$1' is missing on your system. You should only need it if
149 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
150 You might want to install the \`Automake' and \`Perl' packages.
151 Grab them from any GNU archive site."
152 find . -type f -name Makefile.am -print |
153 sed 's/\.am$/.in/' |
154 while read f; do touch "$f"; done
155 ;;
156
157 autom4te)
158 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
159 # We have it, but it failed.
160 exit 1
161 fi
162
163 echo 1>&2 "\
164 WARNING: \`$1' is needed, and you do not seem to have it handy on your
165 system. You might have modified some files without having the
166 proper tools for further handling them.
167 You can get \`$1Help2man' as part of \`Autoconf' from any GNU
168 archive site."
169
170 file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
171 test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
172 if test -f "$file"; then
173 touch $file
174 else
175 test -z "$file" || exec >$file
176 echo "#! /bin/sh"
177 echo "# Created by GNU Automake missing as a replacement of"
178 echo "# $ $@"
179 echo "exit 0"
180 chmod +x $file
181 exit 1
182 fi
183 ;;
184
185 bison|yacc)
186 echo 1>&2 "\
187 WARNING: \`$1' is missing on your system. You should only need it if
188 you modified a \`.y' file. You may need the \`Bison' package
189 in order for those modifications to take effect. You can get
190 \`Bison' from any GNU archive site."
191 rm -f y.tab.c y.tab.h
192 if [ $# -ne 1 ]; then
193 eval LASTARG="\${$#}"
194 case "$LASTARG" in
195 *.y)
196 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
197 if [ -f "$SRCFILE" ]; then
198 cp "$SRCFILE" y.tab.c
199 fi
200 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
201 if [ -f "$SRCFILE" ]; then
202 cp "$SRCFILE" y.tab.h
203 fi
204 ;;
205 esac
206 fi
207 if [ ! -f y.tab.h ]; then
208 echo >y.tab.h
209 fi
210 if [ ! -f y.tab.c ]; then
211 echo 'main() { return 0; }' >y.tab.c
212 fi
213 ;;
214
215 lex|flex)
216 echo 1>&2 "\
217 WARNING: \`$1' is missing on your system. You should only need it if
218 you modified a \`.l' file. You may need the \`Flex' package
219 in order for those modifications to take effect. You can get
220 \`Flex' from any GNU archive site."
221 rm -f lex.yy.c
222 if [ $# -ne 1 ]; then
223 eval LASTARG="\${$#}"
224 case "$LASTARG" in
225 *.l)
226 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
227 if [ -f "$SRCFILE" ]; then
228 cp "$SRCFILE" lex.yy.c
229 fi
230 ;;
231 esac
232 fi
233 if [ ! -f lex.yy.c ]; then
234 echo 'main() { return 0; }' >lex.yy.c
235 fi
236 ;;
237
238 help2man)
239 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
240 # We have it, but it failed.
241 exit 1
242 fi
243
244 echo 1>&2 "\
245 WARNING: \`$1' is missing on your system. You should only need it if
246 you modified a dependency of a manual page. You may need the
247 \`Help2man' package in order for those modifications to take
248 effect. You can get \`Help2man' from any GNU archive site."
249
250 file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
251 if test -z "$file"; then
252 file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
253 fi
254 if [ -f "$file" ]; then
255 touch $file
256 else
257 test -z "$file" || exec >$file
258 echo ".ab help2man is required to generate this page"
259 exit 1
260 fi
261 ;;
262
263 makeinfo)
264 if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
265 # We have makeinfo, but it failed.
266 exit 1
267 fi
268
269 echo 1>&2 "\
270 WARNING: \`$1' is missing on your system. You should only need it if
271 you modified a \`.texi' or \`.texinfo' file, or any other file
272 indirectly affecting the aspect of the manual. The spurious
273 call might also be the consequence of using a buggy \`make' (AIX,
274 DU, IRIX). You might want to install the \`Texinfo' package or
275 the \`GNU make' package. Grab either from any GNU archive site."
276 file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
277 if test -z "$file"; then
278 file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
279 file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
280 fi
281 touch $file
282 ;;
283
284 tar)
285 shift
286 if test -n "$run"; then
287 echo 1>&2 "ERROR: \`tar' requires --run"
288 exit 1
289 fi
290
291 # We have already tried tar in the generic part.
292 # Look for gnutar/gtar before invocation to avoid ugly error
293 # messages.
294 if (gnutar --version > /dev/null 2>&1); then
295 gnutar "$@" && exit 0
296 fi
297 if (gtar --version > /dev/null 2>&1); then
298 gtar "$@" && exit 0
299 fi
300 firstarg="$1"
301 if shift; then
302 case "$firstarg" in
303 *o*)
304 firstarg=`echo "$firstarg" | sed s/o//`
305 tar "$firstarg" "$@" && exit 0
306 ;;
307 esac
308 case "$firstarg" in
309 *h*)
310 firstarg=`echo "$firstarg" | sed s/h//`
311 tar "$firstarg" "$@" && exit 0
312 ;;
313 esac
314 fi
315
316 echo 1>&2 "\
317 WARNING: I can't seem to be able to run \`tar' with the given arguments.
318 You may want to install GNU tar or Free paxutils, or check the
319 command line arguments."
320 exit 1
321 ;;
322
323 *)
324 echo 1>&2 "\
325 WARNING: \`$1' is needed, and you do not seem to have it handy on your
326 system. You might have modified some files without having the
327 proper tools for further handling them. Check the \`README' file,
328 it often tells you about the needed prerequirements for installing
329 this package. You may also peek at any GNU archive site, in case
330 some other package would contain this missing \`$1' program."
331 exit 1
332 ;;
333 esac
334
335 exit 0
+0
-111
config/mkinstalldirs less more
0 #! /bin/sh
1 # mkinstalldirs --- make directory hierarchy
2 # Author: Noah Friedman <friedman@prep.ai.mit.edu>
3 # Created: 1993-05-16
4 # Public domain
5
6 errstatus=0
7 dirmode=""
8
9 usage="\
10 Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
11
12 # process command line arguments
13 while test $# -gt 0 ; do
14 case $1 in
15 -h | --help | --h*) # -h for help
16 echo "$usage" 1>&2
17 exit 0
18 ;;
19 -m) # -m PERM arg
20 shift
21 test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
22 dirmode=$1
23 shift
24 ;;
25 --) # stop option processing
26 shift
27 break
28 ;;
29 -*) # unknown option
30 echo "$usage" 1>&2
31 exit 1
32 ;;
33 *) # first non-opt arg
34 break
35 ;;
36 esac
37 done
38
39 for file
40 do
41 if test -d "$file"; then
42 shift
43 else
44 break
45 fi
46 done
47
48 case $# in
49 0) exit 0 ;;
50 esac
51
52 case $dirmode in
53 '')
54 if mkdir -p -- . 2>/dev/null; then
55 echo "mkdir -p -- $*"
56 exec mkdir -p -- "$@"
57 fi
58 ;;
59 *)
60 if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
61 echo "mkdir -m $dirmode -p -- $*"
62 exec mkdir -m "$dirmode" -p -- "$@"
63 fi
64 ;;
65 esac
66
67 for file
68 do
69 set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
70 shift
71
72 pathcomp=
73 for d
74 do
75 pathcomp="$pathcomp$d"
76 case $pathcomp in
77 -*) pathcomp=./$pathcomp ;;
78 esac
79
80 if test ! -d "$pathcomp"; then
81 echo "mkdir $pathcomp"
82
83 mkdir "$pathcomp" || lasterr=$?
84
85 if test ! -d "$pathcomp"; then
86 errstatus=$lasterr
87 else
88 if test ! -z "$dirmode"; then
89 echo "chmod $dirmode $pathcomp"
90 lasterr=""
91 chmod "$dirmode" "$pathcomp" || lasterr=$?
92
93 if test ! -z "$lasterr"; then
94 errstatus=$lasterr
95 fi
96 fi
97 fi
98 fi
99
100 pathcomp="$pathcomp/"
101 done
102 done
103
104 exit $errstatus
105
106 # Local Variables:
107 # mode: shell-script
108 # sh-indentation: 2
109 # End:
110 # mkinstalldirs ends here
+0
-32
config/plain.m4 less more
0 dnl Check for PLAIN (and therefore crypt)
1
2 AC_DEFUN([SASL_PLAIN_CHK],[
3 AC_REQUIRE([SASL2_CRYPT_CHK])
4
5 dnl PLAIN
6 AC_ARG_ENABLE(plain, [ --enable-plain enable PLAIN authentication [yes] ],
7 plain=$enableval,
8 plain=yes)
9
10 PLAIN_LIBS=""
11 if test "$plain" != no; then
12 dnl In order to compile plain, we need crypt.
13 if test "$cmu_have_crypt" = yes; then
14 PLAIN_LIBS=$LIB_CRYPT
15 fi
16 fi
17 AC_SUBST(PLAIN_LIBS)
18
19 AC_MSG_CHECKING(PLAIN)
20 if test "$plain" != no; then
21 AC_MSG_RESULT(enabled)
22 SASL_MECHS="$SASL_MECHS libplain.la"
23 if test "$enable_static" = yes; then
24 SASL_STATIC_OBJS="$SASL_STATIC_OBJS plain.o"
25 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/plain.c"
26 AC_DEFINE(STATIC_PLAIN,[],[Link PLAIN Staticly])
27 fi
28 else
29 AC_MSG_RESULT(disabled)
30 fi
31 ])
+0
-156
config/sasldb.m4 less more
0 dnl Functions to check what database to use for libsasldb
1
2 dnl Berkeley DB specific checks first..
3
4 dnl Figure out what database type we're using
5 AC_DEFUN([SASL_DB_CHECK], [
6 cmu_save_LIBS="$LIBS"
7 AC_ARG_WITH(dblib, [ --with-dblib=DBLIB set the DB library to use [berkeley] ],
8 dblib=$withval,
9 dblib=auto_detect)
10
11 CYRUS_BERKELEY_DB_OPTS()
12
13 SASL_DB_LIB=""
14
15 case "$dblib" in
16 dnl this is unbelievably painful due to confusion over what db-3 should be
17 dnl named. arg.
18 berkeley)
19 CYRUS_BERKELEY_DB_CHK()
20 CPPFLAGS="${CPPFLAGS} ${BDB_INCADD}"
21 SASL_DB_INC=$BDB_INCADD
22 SASL_DB_LIB="${BDB_LIBADD}"
23 ;;
24 gdbm)
25 AC_ARG_WITH(gdbm,[ --with-gdbm=PATH use gdbm from PATH],
26 with_gdbm="${withval}")
27
28 case "$with_gdbm" in
29 ""|yes)
30 AC_CHECK_HEADER(gdbm.h, [
31 AC_CHECK_LIB(gdbm, gdbm_open, SASL_DB_LIB="-lgdbm",
32 dblib="no")],
33 dblib="no")
34 ;;
35 *)
36 if test -d $with_gdbm; then
37 CPPFLAGS="${CPPFLAGS} -I${with_gdbm}/include"
38 LDFLAGS="${LDFLAGS} -L${with_gdbm}/lib"
39 SASL_DB_LIB="-lgdbm"
40 else
41 with_gdbm="no"
42 fi
43 esac
44 ;;
45 ndbm)
46 dnl We want to attempt to use -lndbm if we can, just in case
47 dnl there's some version of it installed and overriding libc
48 AC_CHECK_HEADER(ndbm.h, [
49 AC_CHECK_LIB(ndbm, dbm_open, SASL_DB_LIB="-lndbm", [
50 AC_CHECK_FUNC(dbm_open,,dblib="no")])],
51 dblib="no")
52 ;;
53 auto_detect)
54 dnl How about berkeley db?
55 CYRUS_BERKELEY_DB_CHK()
56 if test "$dblib" = no; then
57 dnl How about ndbm?
58 AC_CHECK_HEADER(ndbm.h, [
59 AC_CHECK_LIB(ndbm, dbm_open,
60 dblib="ndbm"; SASL_DB_LIB="-lndbm",
61 dblib="weird")],
62 dblib="no")
63 if test "$dblib" = "weird"; then
64 dnl Is ndbm in the standard library?
65 AC_CHECK_FUNC(dbm_open, dblib="ndbm", dblib="no")
66 fi
67
68 if test "$dblib" = no; then
69 dnl Can we use gdbm?
70 AC_CHECK_HEADER(gdbm.h, [
71 AC_CHECK_LIB(gdbm, gdbm_open, dblib="gdbm";
72 SASL_DB_LIB="-lgdbm", dblib="no")],
73 dblib="no")
74 fi
75 else
76 dnl we took Berkeley
77 CPPFLAGS="${CPPFLAGS} ${BDB_INCADD}"
78 SASL_DB_INC=$BDB_INCADD
79 SASL_DB_LIB="${BDB_LIBADD}"
80 fi
81 ;;
82 none)
83 ;;
84 no)
85 ;;
86 *)
87 AC_MSG_WARN([Bad DB library implementation specified;])
88 AC_ERROR([Use either \"berkeley\", \"gdbm\", \"ndbm\" or \"none\"])
89 dblib=no
90 ;;
91 esac
92 LIBS="$cmu_save_LIBS"
93
94 AC_MSG_CHECKING(DB library to use)
95 AC_MSG_RESULT($dblib)
96
97 SASL_DB_BACKEND="db_${dblib}.lo"
98 SASL_DB_BACKEND_STATIC="db_${dblib}.o allockey.o"
99 SASL_DB_BACKEND_STATIC_SRCS="\$(top_srcdir)/sasldb/db_${dblib}.c \$(top_srcdir)/sasldb/allockey.c"
100 SASL_DB_UTILS="saslpasswd2 sasldblistusers2"
101 SASL_DB_MANS="saslpasswd2.8 sasldblistusers2.8"
102
103 case "$dblib" in
104 gdbm)
105 SASL_MECHS="$SASL_MECHS libsasldb.la"
106 AC_DEFINE(SASL_GDBM,[],[Use GDBM for SASLdb])
107 ;;
108 ndbm)
109 SASL_MECHS="$SASL_MECHS libsasldb.la"
110 AC_DEFINE(SASL_NDBM,[],[Use NDBM for SASLdb])
111 ;;
112 berkeley)
113 SASL_MECHS="$SASL_MECHS libsasldb.la"
114 AC_DEFINE(SASL_BERKELEYDB,[],[Use BerkeleyDB for SASLdb])
115 ;;
116 *)
117 AC_MSG_WARN([Disabling SASL authentication database support])
118 dnl note that we do not add libsasldb.la to SASL_MECHS, since it
119 dnl will just fail to load anyway.
120 SASL_DB_BACKEND="db_none.lo"
121 SASL_DB_BACKEND_STATIC="db_none.o"
122 SASL_DB_BACKEND_STATIC_SRCS="\$(top_srcdir)/sasldb/db_none.c"
123 SASL_DB_UTILS=""
124 SASL_DB_MANS=""
125 SASL_DB_LIB=""
126 ;;
127 esac
128
129 if test "$enable_static" = yes; then
130 if test "$dblib" != "none"; then
131 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/sasldb.c $SASL_DB_BACKEND_STATIC_SRCS"
132 SASL_STATIC_OBJS="$SASL_STATIC_OBJS sasldb.o $SASL_DB_BACKEND_STATIC"
133 AC_DEFINE(STATIC_SASLDB,[],[Link SASLdb Staticly])
134 else
135 SASL_STATIC_OBJS="$SASL_STATIC_OBJS $SASL_DB_BACKEND_STATIC"
136 SASL_STATIC_SRCS="$SASL_STATIC_SRCS $SASL_DB_BACKEND_STATIC_SRCS"
137 fi
138 fi
139
140 AC_SUBST(SASL_DB_UTILS)
141 AC_SUBST(SASL_DB_MANS)
142 AC_SUBST(SASL_DB_BACKEND)
143 AC_SUBST(SASL_DB_BACKEND_STATIC)
144 AC_SUBST(SASL_DB_INC)
145 AC_SUBST(SASL_DB_LIB)
146 ])
147
148 dnl Figure out what database path we're using
149 AC_DEFUN([SASL_DB_PATH_CHECK], [
150 AC_ARG_WITH(dbpath, [ --with-dbpath=PATH set the DB path to use [/etc/sasldb2] ],
151 dbpath=$withval,
152 dbpath=/etc/sasldb2)
153 AC_MSG_CHECKING(DB path to use)
154 AC_MSG_RESULT($dbpath)
155 AC_DEFINE_UNQUOTED(SASL_DB_PATH, "$dbpath", [Path to default SASLdb database])])
+0
-622
config.h.in less more
0 /* config.h.in. Generated from configure.in by autoheader. */
1
2
3 /* acconfig.h - autoheader configuration input */
4 /*
5 * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 *
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the
17 * distribution.
18 *
19 * 3. The name "Carnegie Mellon University" must not be used to
20 * endorse or promote products derived from this software without
21 * prior written permission. For permission or any other legal
22 * details, please contact
23 * Office of Technology Transfer
24 * Carnegie Mellon University
25 * 5000 Forbes Avenue
26 * Pittsburgh, PA 15213-3890
27 * (412) 268-4387, fax: (412) 268-7395
28 * tech-transfer@andrew.cmu.edu
29 *
30 * 4. Redistributions of any form whatsoever must retain the following
31 * acknowledgment:
32 * "This product includes software developed by Computing Services
33 * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
34 *
35 * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
36 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
37 * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
38 * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
39 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
40 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
41 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
42 */
43
44 #ifndef CONFIG_H
45 #define CONFIG_H
46
47
48 /* Runtime config file location */
49 #undef CONFIGDIR
50
51 /* Do we need a leading _ for dlsym? */
52 #undef DLSYM_NEEDS_UNDERSCORE
53
54 /* Should we build a shared plugin (via dlopen) library? */
55 #undef DO_DLOPEN
56
57 /* should we support sasl_checkapop? */
58 #undef DO_SASL_CHECKAPOP
59
60 /* should we support setpass() for SRP? */
61 #undef DO_SRP_SETPASS
62
63 /* should we mutex-wrap calls into the GSS library? */
64 #undef GSS_USE_MUTEXES
65
66 /* Enable 'alwaystrue' password verifier? */
67 #undef HAVE_ALWAYSTRUE
68
69 /* Include support for Courier's authdaemond? */
70 #undef HAVE_AUTHDAEMON
71
72 /* Define to 1 if you have the <des.h> header file. */
73 #undef HAVE_DES_H
74
75 /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
76 */
77 #undef HAVE_DIRENT_H
78
79 /* Define to 1 if you have the <dlfcn.h> header file. */
80 #undef HAVE_DLFCN_H
81
82 /* Define to 1 if you have the `dns_lookup' function. */
83 #undef HAVE_DNS_LOOKUP
84
85 /* Define to 1 if you have the `dn_expand' function. */
86 #undef HAVE_DN_EXPAND
87
88 /* Define to 1 if you have the <fcntl.h> header file. */
89 #undef HAVE_FCNTL_H
90
91 /* Do we have a getaddrinfo? */
92 #undef HAVE_GETADDRINFO
93
94 /* Define to 1 if you have the `getdomainname' function. */
95 #undef HAVE_GETDOMAINNAME
96
97 /* Define to 1 if you have the `gethostname' function. */
98 #undef HAVE_GETHOSTNAME
99
100 /* Do we have a getnameinfo() function? */
101 #undef HAVE_GETNAMEINFO
102
103 /* Define to 1 if you have the `getpassphrase' function. */
104 #undef HAVE_GETPASSPHRASE
105
106 /* Define to 1 if you have the `getpwnam' function. */
107 #undef HAVE_GETPWNAM
108
109 /* Define to 1 if you have the `getspnam' function. */
110 #undef HAVE_GETSPNAM
111
112 /* do we have getsubopt()? */
113 #undef HAVE_GETSUBOPT
114
115 /* Define to 1 if you have the `gettimeofday' function. */
116 #undef HAVE_GETTIMEOFDAY
117
118 /* Define to 1 if you have the <gssapi/gssapi_ext.h> header file. */
119 #undef HAVE_GSSAPI_GSSAPI_EXT_H
120
121 /* Define if you have the gssapi.h header file */
122 #undef HAVE_GSSAPI_H
123
124 /* Define to 1 if you have the `gsskrb5_register_acceptor_identity' function.
125 */
126 #undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
127
128 /* Define if your GSSAPI implementation defines GSS_C_NT_HOSTBASED_SERVICE */
129 #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
130
131 /* Define if your GSSAPI implementation defines GSS_C_NT_USER_NAME */
132 #undef HAVE_GSS_C_NT_USER_NAME
133
134 /* Define to 1 if you have the `gss_decapsulate_token' function. */
135 #undef HAVE_GSS_DECAPSULATE_TOKEN
136
137 /* Define to 1 if you have the `gss_encapsulate_token' function. */
138 #undef HAVE_GSS_ENCAPSULATE_TOKEN
139
140 /* Define to 1 if you have the `gss_get_name_attribute' function. */
141 #undef HAVE_GSS_GET_NAME_ATTRIBUTE
142
143 /* Define to 1 if you have the `gss_oid_equal' function. */
144 #undef HAVE_GSS_OID_EQUAL
145
146 /* Define if your GSSAPI implementation supports SPNEGO */
147 #undef HAVE_GSS_SPNEGO
148
149 /* Define to 1 if you have the `inet_aton' function. */
150 #undef HAVE_INET_ATON
151
152 /* Define to 1 if you have the <inttypes.h> header file. */
153 #undef HAVE_INTTYPES_H
154
155 /* Define to 1 if you have the `jrand48' function. */
156 #undef HAVE_JRAND48
157
158 /* Do we have Kerberos 4 Support? */
159 #undef HAVE_KRB
160
161 /* Define to 1 if you have the `krb_get_err_text' function. */
162 #undef HAVE_KRB_GET_ERR_TEXT
163
164 /* Define to 1 if you have the <lber.h> header file. */
165 #undef HAVE_LBER_H
166
167 /* Define to 1 if you have the <ldap.h> header file. */
168 #undef HAVE_LDAP_H
169
170 /* Define to 1 if you have the `resolv' library (-lresolv). */
171 #undef HAVE_LIBRESOLV
172
173 /* Define to 1 if you have the <limits.h> header file. */
174 #undef HAVE_LIMITS_H
175
176 /* Define to 1 if you have the <malloc.h> header file. */
177 #undef HAVE_MALLOC_H
178
179 /* Define to 1 if you have the `memcpy' function. */
180 #undef HAVE_MEMCPY
181
182 /* Define to 1 if you have the <memory.h> header file. */
183 #undef HAVE_MEMORY_H
184
185 /* Define to 1 if you have the `mkdir' function. */
186 #undef HAVE_MKDIR
187
188 /* Do we have mysql support? */
189 #undef HAVE_MYSQL
190
191 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
192 #undef HAVE_NDIR_H
193
194 /* Do we have OpenSSL? */
195 #undef HAVE_OPENSSL
196
197 /* Use OPIE for server-side OTP? */
198 #undef HAVE_OPIE
199
200 /* Define to 1 if you have the <pam/pam_appl.h> header file. */
201 #undef HAVE_PAM_PAM_APPL_H
202
203 /* Define to 1 if you have the <paths.h> header file. */
204 #undef HAVE_PATHS_H
205
206 /* Do we have Postgres support? */
207 #undef HAVE_PGSQL
208
209 /* Include Support for pwcheck daemon? */
210 #undef HAVE_PWCHECK
211
212 /* Include support for saslauthd? */
213 #undef HAVE_SASLAUTHD
214
215 /* Define to 1 if you have the <security/pam_appl.h> header file. */
216 #undef HAVE_SECURITY_PAM_APPL_H
217
218 /* Define to 1 if you have the `select' function. */
219 #undef HAVE_SELECT
220
221 /* Does the system have snprintf()? */
222 #undef HAVE_SNPRINTF
223
224 /* Does sockaddr have an sa_len? */
225 #undef HAVE_SOCKADDR_SA_LEN
226
227 /* Define to 1 if you have the `socket' function. */
228 #undef HAVE_SOCKET
229
230 /* Do we have a socklen_t? */
231 #undef HAVE_SOCKLEN_T
232
233 /* Do we have SQLite support? */
234 #undef HAVE_SQLITE
235
236 /* Do we have SQLite3 support? */
237 #undef HAVE_SQLITE3
238
239 /* Is there an ss_family in sockaddr_storage? */
240 #undef HAVE_SS_FAMILY
241
242 /* Define to 1 if you have the <stdarg.h> header file. */
243 #undef HAVE_STDARG_H
244
245 /* Define to 1 if you have the <stdint.h> header file. */
246 #undef HAVE_STDINT_H
247
248 /* Define to 1 if you have the <stdlib.h> header file. */
249 #undef HAVE_STDLIB_H
250
251 /* Define to 1 if you have the `strchr' function. */
252 #undef HAVE_STRCHR
253
254 /* Define to 1 if you have the `strdup' function. */
255 #undef HAVE_STRDUP
256
257 /* Define to 1 if you have the `strerror' function. */
258 #undef HAVE_STRERROR
259
260 /* Define to 1 if you have the <strings.h> header file. */
261 #undef HAVE_STRINGS_H
262
263 /* Define to 1 if you have the <string.h> header file. */
264 #undef HAVE_STRING_H
265
266 /* Define to 1 if you have the `strspn' function. */
267 #undef HAVE_STRSPN
268
269 /* Define to 1 if you have the `strstr' function. */
270 #undef HAVE_STRSTR
271
272 /* Define to 1 if you have the `strtol' function. */
273 #undef HAVE_STRTOL
274
275 /* Do we have struct sockaddr_stroage? */
276 #undef HAVE_STRUCT_SOCKADDR_STORAGE
277
278 /* Define to 1 if you have the <sysexits.h> header file. */
279 #undef HAVE_SYSEXITS_H
280
281 /* Define to 1 if you have the `syslog' function. */
282 #undef HAVE_SYSLOG
283
284 /* Define to 1 if you have the <syslog.h> header file. */
285 #undef HAVE_SYSLOG_H
286
287 /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
288 */
289 #undef HAVE_SYS_DIR_H
290
291 /* Define to 1 if you have the <sys/file.h> header file. */
292 #undef HAVE_SYS_FILE_H
293
294 /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
295 */
296 #undef HAVE_SYS_NDIR_H
297
298 /* Define to 1 if you have the <sys/param.h> header file. */
299 #undef HAVE_SYS_PARAM_H
300
301 /* Define to 1 if you have the <sys/stat.h> header file. */
302 #undef HAVE_SYS_STAT_H
303
304 /* Define to 1 if you have the <sys/time.h> header file. */
305 #undef HAVE_SYS_TIME_H
306
307 /* Define to 1 if you have the <sys/types.h> header file. */
308 #undef HAVE_SYS_TYPES_H
309
310 /* Define to 1 if you have the <sys/uio.h> header file. */
311 #undef HAVE_SYS_UIO_H
312
313 /* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
314 #undef HAVE_SYS_WAIT_H
315
316 /* Define to 1 if you have the <unistd.h> header file. */
317 #undef HAVE_UNISTD_H
318
319 /* Define to 1 if you have the <varargs.h> header file. */
320 #undef HAVE_VARARGS_H
321
322 /* Does the system have vsnprintf()? */
323 #undef HAVE_VSNPRINTF
324
325 /* define if your compiler has __attribute__ */
326 #undef HAVE___ATTRIBUTE__
327
328 /* Should we keep handle to Berkeley DB open in SASLDB plugin? */
329 #undef KEEP_DB_OPEN
330
331 /* Ignore IP Address in Kerberos 4 tickets? */
332 #undef KRB4_IGNORE_IP_ADDRESS
333
334 /* Name of package */
335 #undef PACKAGE
336
337 /* Define to the address where bug reports for this package should be sent. */
338 #undef PACKAGE_BUGREPORT
339
340 /* Define to the full name of this package. */
341 #undef PACKAGE_NAME
342
343 /* Define to the full name and version of this package. */
344 #undef PACKAGE_STRING
345
346 /* Define to the one symbol short name of this package. */
347 #undef PACKAGE_TARNAME
348
349 /* Define to the version of this package. */
350 #undef PACKAGE_VERSION
351
352 /* Where do we look for Courier authdaemond's socket? */
353 #undef PATH_AUTHDAEMON_SOCKET
354
355 /* Where do we look for saslauthd's socket? */
356 #undef PATH_SASLAUTHD_RUNDIR
357
358 /* Runtime plugin location */
359 #undef PLUGINDIR
360
361 /* Force a preferred mechanism */
362 #undef PREFER_MECH
363
364 /* Location of pwcheck socket */
365 #undef PWCHECKDIR
366
367 /* Define as the return type of signal handlers (`int' or `void'). */
368 #undef RETSIGTYPE
369
370 /* Use BerkeleyDB for SASLdb */
371 #undef SASL_BERKELEYDB
372
373 /* Path to default SASLdb database */
374 #undef SASL_DB_PATH
375
376 /* File to use for source of randomness */
377 #undef SASL_DEV_RANDOM
378
379 /* Use GDBM for SASLdb */
380 #undef SASL_GDBM
381
382 /* Use NDBM for SASLdb */
383 #undef SASL_NDBM
384
385 /* The size of `long', as computed by sizeof. */
386 #undef SIZEOF_LONG
387
388 /* Link ANONYMOUS Statically */
389 #undef STATIC_ANONYMOUS
390
391 /* Link CRAM-MD5 Statically */
392 #undef STATIC_CRAMMD5
393
394 /* Link DIGEST-MD5 Statically */
395 #undef STATIC_DIGESTMD5
396
397 /* Link GSSAPI Statically */
398 #undef STATIC_GSSAPIV2
399
400 /* User KERBEROS_V4 Staticly */
401 #undef STATIC_KERBEROS4
402
403 /* Link ldapdb plugin Statically */
404 #undef STATIC_LDAPDB
405
406 /* Link LOGIN Statically */
407 #undef STATIC_LOGIN
408
409 /* Link NTLM Statically */
410 #undef STATIC_NTLM
411
412 /* Link OTP Statically */
413 #undef STATIC_OTP
414
415 /* Link PASSDSS Statically */
416 #undef STATIC_PASSDSS
417
418 /* Link PLAIN Staticly */
419 #undef STATIC_PLAIN
420
421 /* Link SASLdb Staticly */
422 #undef STATIC_SASLDB
423
424 /* Link SCRAM Statically */
425 #undef STATIC_SCRAM
426
427 /* Link SQL plugin statically */
428 #undef STATIC_SQL
429
430 /* Link SRP Statically */
431 #undef STATIC_SRP
432
433 /* Define to 1 if you have the ANSI C header files. */
434 #undef STDC_HEADERS
435
436 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
437 #undef TIME_WITH_SYS_TIME
438
439 /* Should we try to dlopen() plugins while statically compiled? */
440 #undef TRY_DLOPEN_WHEN_STATIC
441
442 /* use the doors IPC API for saslauthd? */
443 #undef USE_DOORS
444
445 /* Version number of package */
446 #undef VERSION
447
448 /* Use DES */
449 #undef WITH_DES
450
451 /* Linking against dmalloc? */
452 #undef WITH_DMALLOC
453
454 /* Use internal RC4 implementation? */
455 #undef WITH_RC4
456
457 /* Use OpenSSL DES Implementation */
458 #undef WITH_SSL_DES
459
460 /* Define to empty if `const' does not conform to ANSI C. */
461 #undef const
462
463 /* Define to `__inline__' or `__inline' if that's what the C compiler
464 calls it, or to nothing if 'inline' is not supported under any name. */
465 #ifndef __cplusplus
466 #undef inline
467 #endif
468
469 /* Define to `int' if <sys/types.h> does not define. */
470 #undef mode_t
471
472 /* Define to `int' if <sys/types.h> does not define. */
473 #undef pid_t
474
475
476
477
478 /* Create a struct iovec if we need one */
479 #if !defined(_WIN32)
480 #if !defined(HAVE_SYS_UIO_H)
481 /* (win32 is handled in sasl.h) */
482 struct iovec {
483 char *iov_base;
484 long iov_len;
485 };
486 #else
487 #include <sys/types.h>
488 #include <sys/uio.h>
489 #endif
490 #endif
491
492 /* location of the random number generator */
493 #ifdef DEV_RANDOM
494 #undef DEV_RANDOM
495 #endif
496 #define DEV_RANDOM SASL_DEV_RANDOM
497
498 /* if we've got krb_get_err_txt, we might as well use it;
499 especially since krb_err_txt isn't in some newer distributions
500 (MIT Kerb for Mac 4 being a notable example). If we don't have
501 it, we fall back to the krb_err_txt array */
502 #ifdef HAVE_KRB_GET_ERR_TEXT
503 #define get_krb_err_txt krb_get_err_text
504 #else
505 #define get_krb_err_txt(X) (krb_err_txt[(X)])
506 #endif
507
508 /* Make Solaris happy... */
509 #ifndef __EXTENSIONS__
510 #define __EXTENSIONS__
511 #endif
512
513 /* Make Linux happy... */
514 #ifndef _GNU_SOURCE
515 #define _GNU_SOURCE
516 #endif
517
518 #ifndef HAVE___ATTRIBUTE__
519 /* Can't use attributes... */
520 #define __attribute__(foo)
521 #endif
522
523 #define SASL_PATH_ENV_VAR "SASL_PATH"
524 #define SASL_CONF_PATH_ENV_VAR "SASL_CONF_PATH"
525
526 #include <stdlib.h>
527 #include <sys/types.h>
528 #ifndef WIN32
529 # include <sys/socket.h>
530 # include <netdb.h>
531 # include <netinet/in.h>
532 # ifdef HAVE_SYS_PARAM_H
533 # include <sys/param.h>
534 # endif
535 #else /* WIN32 */
536 # include <winsock2.h>
537 #endif /* WIN32 */
538 #include <string.h>
539
540 #ifndef HAVE_SOCKLEN_T
541 typedef unsigned int socklen_t;
542 #endif /* HAVE_SOCKLEN_T */
543
544 #if !defined(HAVE_STRUCT_SOCKADDR_STORAGE) && !defined(WIN32)
545 #define _SS_MAXSIZE 128 /* Implementation specific max size */
546 #define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
547
548 struct sockaddr_storage {
549 struct sockaddr ss_sa;
550 char __ss_pad2[_SS_PADSIZE];
551 };
552 # define ss_family ss_sa.sa_family
553 #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
554
555 #ifndef AF_INET6
556 /* Define it to something that should never appear */
557 #define AF_INET6 AF_MAX
558 #endif
559
560 #ifndef HAVE_GETADDRINFO
561 #define getaddrinfo sasl_getaddrinfo
562 #define freeaddrinfo sasl_freeaddrinfo
563 #define gai_strerror sasl_gai_strerror
564 #endif
565
566 #ifndef HAVE_GETNAMEINFO
567 #define getnameinfo sasl_getnameinfo
568 #endif
569
570 #if !defined(HAVE_GETNAMEINFO) || !defined(HAVE_GETADDRINFO)
571 #include "gai.h"
572 #endif
573
574 #ifndef AI_NUMERICHOST /* support glibc 2.0.x */
575 #define AI_NUMERICHOST 4
576 #define NI_NUMERICHOST 2
577 #define NI_NAMEREQD 4
578 #define NI_NUMERICSERV 8
579 #endif
580
581 /* Defined in RFC 1035. max strlen is only 253 due to length bytes. */
582 #ifndef MAXHOSTNAMELEN
583 #define MAXHOSTNAMELEN 255
584 #endif
585
586 #ifndef HAVE_SYSEXITS_H
587 #include "exits.h"
588 #else
589 #include "sysexits.h"
590 #endif
591
592 /* Get the correct time.h */
593 #if TIME_WITH_SYS_TIME
594 # include <sys/time.h>
595 # include <time.h>
596 #else
597 # if HAVE_SYS_TIME_H
598 # include <sys/time.h>
599 # else
600 # include <time.h>
601 # endif
602 #endif
603
604 #ifndef HIER_DELIMITER
605 #define HIER_DELIMITER '/'
606 #endif
607
608 #ifdef WIN32
609 #define SASL_ROOT_KEY "SOFTWARE\\Carnegie Mellon\\Project Cyrus\\SASL Library"
610 #define SASL_PLUGIN_PATH_ATTR "SearchPath"
611 #define SASL_CONF_PATH_ATTR "ConfFile"
612
613 #include <windows.h>
614 inline static unsigned int sleep(unsigned int seconds) {
615 Sleep(seconds * 1000);
616 return 0;
617 }
618 #endif
619
620 #endif /* CONFIG_H */
621
+0
-20242
configure less more
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.63.
3 #
4 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
5 # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
6 # This configure script is free software; the Free Software Foundation
7 # gives unlimited permission to copy, distribute and modify it.
8 ## --------------------- ##
9 ## M4sh Initialization. ##
10 ## --------------------- ##
11
12 # Be more Bourne compatible
13 DUALCASE=1; export DUALCASE # for MKS sh
14 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15 emulate sh
16 NULLCMD=:
17 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18 # is contrary to our usage. Disable this feature.
19 alias -g '${1+"$@"}'='"$@"'
20 setopt NO_GLOB_SUBST
21 else
22 case `(set -o) 2>/dev/null` in
23 *posix*) set -o posix ;;
24 esac
25
26 fi
27
28
29
30
31 # PATH needs CR
32 # Avoid depending upon Character Ranges.
33 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
35 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36 as_cr_digits='0123456789'
37 as_cr_alnum=$as_cr_Letters$as_cr_digits
38
39 as_nl='
40 '
41 export as_nl
42 # Printing a long string crashes Solaris 7 /usr/bin/printf.
43 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='printf %s\n'
48 as_echo_n='printf %s'
49 else
50 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
52 as_echo_n='/usr/ucb/echo -n'
53 else
54 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
55 as_echo_n_body='eval
56 arg=$1;
57 case $arg in
58 *"$as_nl"*)
59 expr "X$arg" : "X\\(.*\\)$as_nl";
60 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
61 esac;
62 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
63 '
64 export as_echo_n_body
65 as_echo_n='sh -c $as_echo_n_body as_echo'
66 fi
67 export as_echo_body
68 as_echo='sh -c $as_echo_body as_echo'
69 fi
70
71 # The user is always right.
72 if test "${PATH_SEPARATOR+set}" != set; then
73 PATH_SEPARATOR=:
74 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
75 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
76 PATH_SEPARATOR=';'
77 }
78 fi
79
80 # Support unset when possible.
81 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
82 as_unset=unset
83 else
84 as_unset=false
85 fi
86
87
88 # IFS
89 # We need space, tab and new line, in precisely that order. Quoting is
90 # there to prevent editors from complaining about space-tab.
91 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
92 # splitting by setting IFS to empty value.)
93 IFS=" "" $as_nl"
94
95 # Find who we are. Look in the path if we contain no directory separator.
96 case $0 in
97 *[\\/]* ) as_myself=$0 ;;
98 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
99 for as_dir in $PATH
100 do
101 IFS=$as_save_IFS
102 test -z "$as_dir" && as_dir=.
103 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104 done
105 IFS=$as_save_IFS
106
107 ;;
108 esac
109 # We did not find ourselves, most probably we were run as `sh COMMAND'
110 # in which case we are not to be found in the path.
111 if test "x$as_myself" = x; then
112 as_myself=$0
113 fi
114 if test ! -f "$as_myself"; then
115 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 { (exit 1); exit 1; }
117 fi
118
119 # Work around bugs in pre-3.0 UWIN ksh.
120 for as_var in ENV MAIL MAILPATH
121 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
122 done
123 PS1='$ '
124 PS2='> '
125 PS4='+ '
126
127 # NLS nuisances.
128 LC_ALL=C
129 export LC_ALL
130 LANGUAGE=C
131 export LANGUAGE
132
133 # Required to use basename.
134 if expr a : '\(a\)' >/dev/null 2>&1 &&
135 test "X`expr 00001 : '.*\(...\)'`" = X001; then
136 as_expr=expr
137 else
138 as_expr=false
139 fi
140
141 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
142 as_basename=basename
143 else
144 as_basename=false
145 fi
146
147
148 # Name of the executable.
149 as_me=`$as_basename -- "$0" ||
150 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
151 X"$0" : 'X\(//\)$' \| \
152 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
153 $as_echo X/"$0" |
154 sed '/^.*\/\([^/][^/]*\)\/*$/{
155 s//\1/
156 q
157 }
158 /^X\/\(\/\/\)$/{
159 s//\1/
160 q
161 }
162 /^X\/\(\/\).*/{
163 s//\1/
164 q
165 }
166 s/.*/./; q'`
167
168 # CDPATH.
169 $as_unset CDPATH
170
171
172 if test "x$CONFIG_SHELL" = x; then
173 if (eval ":") 2>/dev/null; then
174 as_have_required=yes
175 else
176 as_have_required=no
177 fi
178
179 if test $as_have_required = yes && (eval ":
180 (as_func_return () {
181 (exit \$1)
182 }
183 as_func_success () {
184 as_func_return 0
185 }
186 as_func_failure () {
187 as_func_return 1
188 }
189 as_func_ret_success () {
190 return 0
191 }
192 as_func_ret_failure () {
193 return 1
194 }
195
196 exitcode=0
197 if as_func_success; then
198 :
199 else
200 exitcode=1
201 echo as_func_success failed.
202 fi
203
204 if as_func_failure; then
205 exitcode=1
206 echo as_func_failure succeeded.
207 fi
208
209 if as_func_ret_success; then
210 :
211 else
212 exitcode=1
213 echo as_func_ret_success failed.
214 fi
215
216 if as_func_ret_failure; then
217 exitcode=1
218 echo as_func_ret_failure succeeded.
219 fi
220
221 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
222 :
223 else
224 exitcode=1
225 echo positional parameters were not saved.
226 fi
227
228 test \$exitcode = 0) || { (exit 1); exit 1; }
229
230 (
231 as_lineno_1=\$LINENO
232 as_lineno_2=\$LINENO
233 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
234 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
235 ") 2> /dev/null; then
236 :
237 else
238 as_candidate_shells=
239 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
240 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
241 do
242 IFS=$as_save_IFS
243 test -z "$as_dir" && as_dir=.
244 case $as_dir in
245 /*)
246 for as_base in sh bash ksh sh5; do
247 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
248 done;;
249 esac
250 done
251 IFS=$as_save_IFS
252
253
254 for as_shell in $as_candidate_shells $SHELL; do
255 # Try only shells that exist, to save several forks.
256 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
257 { ("$as_shell") 2> /dev/null <<\_ASEOF
258 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
259 emulate sh
260 NULLCMD=:
261 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
262 # is contrary to our usage. Disable this feature.
263 alias -g '${1+"$@"}'='"$@"'
264 setopt NO_GLOB_SUBST
265 else
266 case `(set -o) 2>/dev/null` in
267 *posix*) set -o posix ;;
268 esac
269
270 fi
271
272
273 :
274 _ASEOF
275 }; then
276 CONFIG_SHELL=$as_shell
277 as_have_required=yes
278 if { "$as_shell" 2> /dev/null <<\_ASEOF
279 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
280 emulate sh
281 NULLCMD=:
282 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
283 # is contrary to our usage. Disable this feature.
284 alias -g '${1+"$@"}'='"$@"'
285 setopt NO_GLOB_SUBST
286 else
287 case `(set -o) 2>/dev/null` in
288 *posix*) set -o posix ;;
289 esac
290
291 fi
292
293
294 :
295 (as_func_return () {
296 (exit $1)
297 }
298 as_func_success () {
299 as_func_return 0
300 }
301 as_func_failure () {
302 as_func_return 1
303 }
304 as_func_ret_success () {
305 return 0
306 }
307 as_func_ret_failure () {
308 return 1
309 }
310
311 exitcode=0
312 if as_func_success; then
313 :
314 else
315 exitcode=1
316 echo as_func_success failed.
317 fi
318
319 if as_func_failure; then
320 exitcode=1
321 echo as_func_failure succeeded.
322 fi
323
324 if as_func_ret_success; then
325 :
326 else
327 exitcode=1
328 echo as_func_ret_success failed.
329 fi
330
331 if as_func_ret_failure; then
332 exitcode=1
333 echo as_func_ret_failure succeeded.
334 fi
335
336 if ( set x; as_func_ret_success y && test x = "$1" ); then
337 :
338 else
339 exitcode=1
340 echo positional parameters were not saved.
341 fi
342
343 test $exitcode = 0) || { (exit 1); exit 1; }
344
345 (
346 as_lineno_1=$LINENO
347 as_lineno_2=$LINENO
348 test "x$as_lineno_1" != "x$as_lineno_2" &&
349 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
350
351 _ASEOF
352 }; then
353 break
354 fi
355
356 fi
357
358 done
359
360 if test "x$CONFIG_SHELL" != x; then
361 for as_var in BASH_ENV ENV
362 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
363 done
364 export CONFIG_SHELL
365 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
366 fi
367
368
369 if test $as_have_required = no; then
370 echo This script requires a shell more modern than all the
371 echo shells that I found on your system. Please install a
372 echo modern shell, or manually run the script under such a
373 echo shell if you do have one.
374 { (exit 1); exit 1; }
375 fi
376
377
378 fi
379
380 fi
381
382
383
384 (eval "as_func_return () {
385 (exit \$1)
386 }
387 as_func_success () {
388 as_func_return 0
389 }
390 as_func_failure () {
391 as_func_return 1
392 }
393 as_func_ret_success () {
394 return 0
395 }
396 as_func_ret_failure () {
397 return 1
398 }
399
400 exitcode=0
401 if as_func_success; then
402 :
403 else
404 exitcode=1
405 echo as_func_success failed.
406 fi
407
408 if as_func_failure; then
409 exitcode=1
410 echo as_func_failure succeeded.
411 fi
412
413 if as_func_ret_success; then
414 :
415 else
416 exitcode=1
417 echo as_func_ret_success failed.
418 fi
419
420 if as_func_ret_failure; then
421 exitcode=1
422 echo as_func_ret_failure succeeded.
423 fi
424
425 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
426 :
427 else
428 exitcode=1
429 echo positional parameters were not saved.
430 fi
431
432 test \$exitcode = 0") || {
433 echo No shell found that supports shell functions.
434 echo Please tell bug-autoconf@gnu.org about your system,
435 echo including any error possibly output before this message.
436 echo This can help us improve future autoconf versions.
437 echo Configuration will now proceed without shell functions.
438 }
439
440
441
442 as_lineno_1=$LINENO
443 as_lineno_2=$LINENO
444 test "x$as_lineno_1" != "x$as_lineno_2" &&
445 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
446
447 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
448 # uniformly replaced by the line number. The first 'sed' inserts a
449 # line-number line after each line using $LINENO; the second 'sed'
450 # does the real work. The second script uses 'N' to pair each
451 # line-number line with the line containing $LINENO, and appends
452 # trailing '-' during substitution so that $LINENO is not a special
453 # case at line end.
454 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
455 # scripts with optimization help from Paolo Bonzini. Blame Lee
456 # E. McMahon (1931-1989) for sed's syntax. :-)
457 sed -n '
458 p
459 /[$]LINENO/=
460 ' <$as_myself |
461 sed '
462 s/[$]LINENO.*/&-/
463 t lineno
464 b
465 :lineno
466 N
467 :loop
468 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
469 t loop
470 s/-\n.*//
471 ' >$as_me.lineno &&
472 chmod +x "$as_me.lineno" ||
473 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
474 { (exit 1); exit 1; }; }
475
476 # Don't try to exec as it changes $[0], causing all sort of problems
477 # (the dirname of $[0] is not the place where we might find the
478 # original and so on. Autoconf is especially sensitive to this).
479 . "./$as_me.lineno"
480 # Exit status is that of the last command.
481 exit
482 }
483
484
485 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
486 as_dirname=dirname
487 else
488 as_dirname=false
489 fi
490
491 ECHO_C= ECHO_N= ECHO_T=
492 case `echo -n x` in
493 -n*)
494 case `echo 'x\c'` in
495 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
496 *) ECHO_C='\c';;
497 esac;;
498 *)
499 ECHO_N='-n';;
500 esac
501 if expr a : '\(a\)' >/dev/null 2>&1 &&
502 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503 as_expr=expr
504 else
505 as_expr=false
506 fi
507
508 rm -f conf$$ conf$$.exe conf$$.file
509 if test -d conf$$.dir; then
510 rm -f conf$$.dir/conf$$.file
511 else
512 rm -f conf$$.dir
513 mkdir conf$$.dir 2>/dev/null
514 fi
515 if (echo >conf$$.file) 2>/dev/null; then
516 if ln -s conf$$.file conf$$ 2>/dev/null; then
517 as_ln_s='ln -s'
518 # ... but there are two gotchas:
519 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
520 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
521 # In both cases, we have to default to `cp -p'.
522 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
523 as_ln_s='cp -p'
524 elif ln conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s=ln
526 else
527 as_ln_s='cp -p'
528 fi
529 else
530 as_ln_s='cp -p'
531 fi
532 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
533 rmdir conf$$.dir 2>/dev/null
534
535 if mkdir -p . 2>/dev/null; then
536 as_mkdir_p=:
537 else
538 test -d ./-p && rmdir ./-p
539 as_mkdir_p=false
540 fi
541
542 if test -x / >/dev/null 2>&1; then
543 as_test_x='test -x'
544 else
545 if ls -dL / >/dev/null 2>&1; then
546 as_ls_L_option=L
547 else
548 as_ls_L_option=
549 fi
550 as_test_x='
551 eval sh -c '\''
552 if test -d "$1"; then
553 test -d "$1/.";
554 else
555 case $1 in
556 -*)set "./$1";;
557 esac;
558 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
559 ???[sx]*):;;*)false;;esac;fi
560 '\'' sh
561 '
562 fi
563 as_executable_p=$as_test_x
564
565 # Sed expression to map a string onto a valid CPP name.
566 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
567
568 # Sed expression to map a string onto a valid variable name.
569 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
570
571
572
573 exec 7<&0 </dev/null 6>&1
574
575 # Name of the host.
576 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
577 # so uname gets run too.
578 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
579
580 #
581 # Initializations.
582 #
583 ac_default_prefix=/usr/local
584 ac_clean_files=
585 ac_config_libobj_dir=.
586 LIBOBJS=
587 cross_compiling=no
588 subdirs=
589 MFLAGS=
590 MAKEFLAGS=
591 SHELL=${CONFIG_SHELL-/bin/sh}
592
593 # Identity of this package.
594 PACKAGE_NAME=
595 PACKAGE_TARNAME=
596 PACKAGE_VERSION=
597 PACKAGE_STRING=
598 PACKAGE_BUGREPORT=
599
600 ac_unique_file="lib/saslint.h"
601 # Factoring default headers for most tests.
602 ac_includes_default="\
603 #include <stdio.h>
604 #ifdef HAVE_SYS_TYPES_H
605 # include <sys/types.h>
606 #endif
607 #ifdef HAVE_SYS_STAT_H
608 # include <sys/stat.h>
609 #endif
610 #ifdef STDC_HEADERS
611 # include <stdlib.h>
612 # include <stddef.h>
613 #else
614 # ifdef HAVE_STDLIB_H
615 # include <stdlib.h>
616 # endif
617 #endif
618 #ifdef HAVE_STRING_H
619 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
620 # include <memory.h>
621 # endif
622 # include <string.h>
623 #endif
624 #ifdef HAVE_STRINGS_H
625 # include <strings.h>
626 #endif
627 #ifdef HAVE_INTTYPES_H
628 # include <inttypes.h>
629 #endif
630 #ifdef HAVE_STDINT_H
631 # include <stdint.h>
632 #endif
633 #ifdef HAVE_UNISTD_H
634 # include <unistd.h>
635 #endif"
636
637 enable_option_checking=no
638 ac_subst_vars='am__EXEEXT_FALSE
639 am__EXEEXT_TRUE
640 subdirs
641 DIRS
642 LTLIBOBJS
643 LTGETNAMEINFOOBJS
644 GETNAMEINFOOBJS
645 LTGETADDRINFOOBJS
646 GETADDRINFOOBJS
647 LTSNPRINTFOBJS
648 SNPRINTFOBJS
649 GETSUBOPT
650 LIBOBJS
651 SASL_UTIL_HEADERS_EXTRA
652 SASL_UTIL_LIBS_EXTRA
653 SMTPTEST_PROGRAM
654 SFIO_LIB_FLAGS
655 SFIO_INC_FLAGS
656 DMALLOC_LIBS
657 MACOSX_FALSE
658 MACOSX_TRUE
659 configdir
660 plugindir
661 SASL_STATIC_LIBS
662 SASL_STATIC_OBJS
663 SASL_STATIC_SRCS
664 SASL_MECHS
665 LIB_LDAP
666 LIB_SQLITE3
667 LIB_SQLITE
668 LIB_PGSQL
669 LIB_MYSQL
670 PASSDSS_LIBS
671 NTLM_LIBS
672 PLAIN_LIBS
673 GSSAPIBASE_LIBS
674 GSSAPI_LIBS
675 LIB_CRYPT
676 SASL_KRB_LIB
677 SRP_LIBS
678 OTP_LIBS
679 SCRAM_LIBS
680 LIB_DES
681 CMU_LIB_SUBDIR
682 LIB_DOOR
683 IPCTYPE
684 PWCHECK_FALSE
685 PWCHECK_TRUE
686 PWCHECKMETH
687 SASLAUTHD_FALSE
688 SASLAUTHD_TRUE
689 NM
690 SASL_DL_LIB
691 NO_SASL_DB_MANS_FALSE
692 NO_SASL_DB_MANS_TRUE
693 SASL_DB_LIB
694 SASL_DB_INC
695 SASL_DB_BACKEND_STATIC
696 SASL_DB_BACKEND
697 SASL_DB_MANS
698 SASL_DB_UTILS
699 EGREP
700 GREP
701 LIB_SOCKET
702 SAMPLE_FALSE
703 SAMPLE_TRUE
704 JAVAROOT
705 JAVA_INCLUDES
706 JAVA_FALSE
707 JAVA_TRUE
708 JAVADOC
709 JAVAH
710 JAVAC
711 PURIFY
712 PURECOV
713 LIBTOOL
714 RANLIB
715 LN_S
716 CPP
717 am__fastdepCC_FALSE
718 am__fastdepCC_TRUE
719 CCDEPMODE
720 AMDEPBACKSLASH
721 AMDEP_FALSE
722 AMDEP_TRUE
723 am__quote
724 am__include
725 DEPDIR
726 OBJEXT
727 EXEEXT
728 ac_ct_CC
729 CPPFLAGS
730 LDFLAGS
731 CFLAGS
732 CC
733 am__untar
734 am__tar
735 AMTAR
736 am__leading_dot
737 SET_MAKE
738 AWK
739 mkdir_p
740 MKDIR_P
741 INSTALL_STRIP_PROGRAM
742 STRIP
743 install_sh
744 MAKEINFO
745 AUTOHEADER
746 AUTOMAKE
747 AUTOCONF
748 ACLOCAL
749 VERSION
750 PACKAGE
751 CYGPATH_W
752 am__isrc
753 INSTALL_DATA
754 INSTALL_SCRIPT
755 INSTALL_PROGRAM
756 target_os
757 target_vendor
758 target_cpu
759 target
760 host_os
761 host_vendor
762 host_cpu
763 host
764 build_os
765 build_vendor
766 build_cpu
767 build
768 target_alias
769 host_alias
770 build_alias
771 LIBS
772 ECHO_T
773 ECHO_N
774 ECHO_C
775 DEFS
776 mandir
777 localedir
778 libdir
779 psdir
780 pdfdir
781 dvidir
782 htmldir
783 infodir
784 docdir
785 oldincludedir
786 includedir
787 localstatedir
788 sharedstatedir
789 sysconfdir
790 datadir
791 datarootdir
792 libexecdir
793 sbindir
794 bindir
795 program_transform_name
796 prefix
797 exec_prefix
798 PACKAGE_BUGREPORT
799 PACKAGE_STRING
800 PACKAGE_VERSION
801 PACKAGE_TARNAME
802 PACKAGE_NAME
803 PATH_SEPARATOR
804 SHELL'
805 ac_subst_files=''
806 ac_user_opts='
807 enable_option_checking
808 enable_cmulocal
809 enable_sample
810 enable_obsolete_cram_attr
811 enable_dependency_tracking
812 with_staticsasl
813 enable_static
814 enable_shared
815 enable_fast_install
816 with_gnu_ld
817 enable_libtool_lock
818 enable_staticdlopen
819 with_purecov
820 with_purify
821 enable_java
822 with_javabase
823 with_dbpath
824 with_dblib
825 with_bdb_libdir
826 with_bdb_incdir
827 with_gdbm
828 enable_keep_db_open
829 with_devrandom
830 with_pam
831 with_saslauthd
832 with_authdaemond
833 with_pwcheck
834 with_ipctype
835 enable_alwaystrue
836 enable_checkapop
837 enable_cram
838 with_lib_subdir
839 with_openssl
840 with_des
841 enable_digest
842 enable_scram
843 enable_otp
844 with_with_opie
845 enable_srp
846 enable_srp_setpass
847 enable_krb4
848 enable_gssapi
849 with_gss_impl
850 enable_gss_mutexes
851 enable_plain
852 enable_anon
853 enable_login
854 enable_ntlm
855 enable_passdss
856 with_ldap
857 enable_sql
858 with_mysql
859 with_pgsql
860 with_sqlite
861 with_sqlite3
862 enable_ldapdb
863 with_plugindir
864 with_configdir
865 with_rc4
866 enable_macos_framework
867 with_dmalloc
868 with_sfio
869 '
870 ac_precious_vars='build_alias
871 host_alias
872 target_alias
873 CC
874 CFLAGS
875 LDFLAGS
876 LIBS
877 CPPFLAGS
878 CPP'
879 ac_subdirs_all='saslauthd'
880
881 # Initialize some variables set by options.
882 ac_init_help=
883 ac_init_version=false
884 ac_unrecognized_opts=
885 ac_unrecognized_sep=
886 # The variables have the same names as the options, with
887 # dashes changed to underlines.
888 cache_file=/dev/null
889 exec_prefix=NONE
890 no_create=
891 no_recursion=
892 prefix=NONE
893 program_prefix=NONE
894 program_suffix=NONE
895 program_transform_name=s,x,x,
896 silent=
897 site=
898 srcdir=
899 verbose=
900 x_includes=NONE
901 x_libraries=NONE
902
903 # Installation directory options.
904 # These are left unexpanded so users can "make install exec_prefix=/foo"
905 # and all the variables that are supposed to be based on exec_prefix
906 # by default will actually change.
907 # Use braces instead of parens because sh, perl, etc. also accept them.
908 # (The list follows the same order as the GNU Coding Standards.)
909 bindir='${exec_prefix}/bin'
910 sbindir='${exec_prefix}/sbin'
911 libexecdir='${exec_prefix}/libexec'
912 datarootdir='${prefix}/share'
913 datadir='${datarootdir}'
914 sysconfdir='${prefix}/etc'
915 sharedstatedir='${prefix}/com'
916 localstatedir='${prefix}/var'
917 includedir='${prefix}/include'
918 oldincludedir='/usr/include'
919 docdir='${datarootdir}/doc/${PACKAGE}'
920 infodir='${datarootdir}/info'
921 htmldir='${docdir}'
922 dvidir='${docdir}'
923 pdfdir='${docdir}'
924 psdir='${docdir}'
925 libdir='${exec_prefix}/lib'
926 localedir='${datarootdir}/locale'
927 mandir='${datarootdir}/man'
928
929 ac_prev=
930 ac_dashdash=
931 for ac_option
932 do
933 # If the previous option needs an argument, assign it.
934 if test -n "$ac_prev"; then
935 eval $ac_prev=\$ac_option
936 ac_prev=
937 continue
938 fi
939
940 case $ac_option in
941 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
942 *) ac_optarg=yes ;;
943 esac
944
945 # Accept the important Cygnus configure options, so we can diagnose typos.
946
947 case $ac_dashdash$ac_option in
948 --)
949 ac_dashdash=yes ;;
950
951 -bindir | --bindir | --bindi | --bind | --bin | --bi)
952 ac_prev=bindir ;;
953 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
954 bindir=$ac_optarg ;;
955
956 -build | --build | --buil | --bui | --bu)
957 ac_prev=build_alias ;;
958 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
959 build_alias=$ac_optarg ;;
960
961 -cache-file | --cache-file | --cache-fil | --cache-fi \
962 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
963 ac_prev=cache_file ;;
964 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
965 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
966 cache_file=$ac_optarg ;;
967
968 --config-cache | -C)
969 cache_file=config.cache ;;
970
971 -datadir | --datadir | --datadi | --datad)
972 ac_prev=datadir ;;
973 -datadir=* | --datadir=* | --datadi=* | --datad=*)
974 datadir=$ac_optarg ;;
975
976 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
977 | --dataroo | --dataro | --datar)
978 ac_prev=datarootdir ;;
979 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
980 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
981 datarootdir=$ac_optarg ;;
982
983 -disable-* | --disable-*)
984 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
985 # Reject names that are not valid shell variable names.
986 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
987 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
988 { (exit 1); exit 1; }; }
989 ac_useropt_orig=$ac_useropt
990 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
991 case $ac_user_opts in
992 *"
993 "enable_$ac_useropt"
994 "*) ;;
995 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
996 ac_unrecognized_sep=', ';;
997 esac
998 eval enable_$ac_useropt=no ;;
999
1000 -docdir | --docdir | --docdi | --doc | --do)
1001 ac_prev=docdir ;;
1002 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1003 docdir=$ac_optarg ;;
1004
1005 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1006 ac_prev=dvidir ;;
1007 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1008 dvidir=$ac_optarg ;;
1009
1010 -enable-* | --enable-*)
1011 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1012 # Reject names that are not valid shell variable names.
1013 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1014 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
1015 { (exit 1); exit 1; }; }
1016 ac_useropt_orig=$ac_useropt
1017 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1018 case $ac_user_opts in
1019 *"
1020 "enable_$ac_useropt"
1021 "*) ;;
1022 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1023 ac_unrecognized_sep=', ';;
1024 esac
1025 eval enable_$ac_useropt=\$ac_optarg ;;
1026
1027 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1028 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1029 | --exec | --exe | --ex)
1030 ac_prev=exec_prefix ;;
1031 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1032 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1033 | --exec=* | --exe=* | --ex=*)
1034 exec_prefix=$ac_optarg ;;
1035
1036 -gas | --gas | --ga | --g)
1037 # Obsolete; use --with-gas.
1038 with_gas=yes ;;
1039
1040 -help | --help | --hel | --he | -h)
1041 ac_init_help=long ;;
1042 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1043 ac_init_help=recursive ;;
1044 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1045 ac_init_help=short ;;
1046
1047 -host | --host | --hos | --ho)
1048 ac_prev=host_alias ;;
1049 -host=* | --host=* | --hos=* | --ho=*)
1050 host_alias=$ac_optarg ;;
1051
1052 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1053 ac_prev=htmldir ;;
1054 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1055 | --ht=*)
1056 htmldir=$ac_optarg ;;
1057
1058 -includedir | --includedir | --includedi | --included | --include \
1059 | --includ | --inclu | --incl | --inc)
1060 ac_prev=includedir ;;
1061 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1062 | --includ=* | --inclu=* | --incl=* | --inc=*)
1063 includedir=$ac_optarg ;;
1064
1065 -infodir | --infodir | --infodi | --infod | --info | --inf)
1066 ac_prev=infodir ;;
1067 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1068 infodir=$ac_optarg ;;
1069
1070 -libdir | --libdir | --libdi | --libd)
1071 ac_prev=libdir ;;
1072 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1073 libdir=$ac_optarg ;;
1074
1075 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1076 | --libexe | --libex | --libe)
1077 ac_prev=libexecdir ;;
1078 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1079 | --libexe=* | --libex=* | --libe=*)
1080 libexecdir=$ac_optarg ;;
1081
1082 -localedir | --localedir | --localedi | --localed | --locale)
1083 ac_prev=localedir ;;
1084 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1085 localedir=$ac_optarg ;;
1086
1087 -localstatedir | --localstatedir | --localstatedi | --localstated \
1088 | --localstate | --localstat | --localsta | --localst | --locals)
1089 ac_prev=localstatedir ;;
1090 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1091 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1092 localstatedir=$ac_optarg ;;
1093
1094 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1095 ac_prev=mandir ;;
1096 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1097 mandir=$ac_optarg ;;
1098
1099 -nfp | --nfp | --nf)
1100 # Obsolete; use --without-fp.
1101 with_fp=no ;;
1102
1103 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1104 | --no-cr | --no-c | -n)
1105 no_create=yes ;;
1106
1107 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1108 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1109 no_recursion=yes ;;
1110
1111 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1112 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1113 | --oldin | --oldi | --old | --ol | --o)
1114 ac_prev=oldincludedir ;;
1115 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1116 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1117 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1118 oldincludedir=$ac_optarg ;;
1119
1120 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1121 ac_prev=prefix ;;
1122 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1123 prefix=$ac_optarg ;;
1124
1125 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1126 | --program-pre | --program-pr | --program-p)
1127 ac_prev=program_prefix ;;
1128 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1129 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1130 program_prefix=$ac_optarg ;;
1131
1132 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1133 | --program-suf | --program-su | --program-s)
1134 ac_prev=program_suffix ;;
1135 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1136 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1137 program_suffix=$ac_optarg ;;
1138
1139 -program-transform-name | --program-transform-name \
1140 | --program-transform-nam | --program-transform-na \
1141 | --program-transform-n | --program-transform- \
1142 | --program-transform | --program-transfor \
1143 | --program-transfo | --program-transf \
1144 | --program-trans | --program-tran \
1145 | --progr-tra | --program-tr | --program-t)
1146 ac_prev=program_transform_name ;;
1147 -program-transform-name=* | --program-transform-name=* \
1148 | --program-transform-nam=* | --program-transform-na=* \
1149 | --program-transform-n=* | --program-transform-=* \
1150 | --program-transform=* | --program-transfor=* \
1151 | --program-transfo=* | --program-transf=* \
1152 | --program-trans=* | --program-tran=* \
1153 | --progr-tra=* | --program-tr=* | --program-t=*)
1154 program_transform_name=$ac_optarg ;;
1155
1156 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1157 ac_prev=pdfdir ;;
1158 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1159 pdfdir=$ac_optarg ;;
1160
1161 -psdir | --psdir | --psdi | --psd | --ps)
1162 ac_prev=psdir ;;
1163 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1164 psdir=$ac_optarg ;;
1165
1166 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1167 | -silent | --silent | --silen | --sile | --sil)
1168 silent=yes ;;
1169
1170 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1171 ac_prev=sbindir ;;
1172 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1173 | --sbi=* | --sb=*)
1174 sbindir=$ac_optarg ;;
1175
1176 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1177 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1178 | --sharedst | --shareds | --shared | --share | --shar \
1179 | --sha | --sh)
1180 ac_prev=sharedstatedir ;;
1181 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1182 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1183 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1184 | --sha=* | --sh=*)
1185 sharedstatedir=$ac_optarg ;;
1186
1187 -site | --site | --sit)
1188 ac_prev=site ;;
1189 -site=* | --site=* | --sit=*)
1190 site=$ac_optarg ;;
1191
1192 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1193 ac_prev=srcdir ;;
1194 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1195 srcdir=$ac_optarg ;;
1196
1197 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1198 | --syscon | --sysco | --sysc | --sys | --sy)
1199 ac_prev=sysconfdir ;;
1200 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1201 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1202 sysconfdir=$ac_optarg ;;
1203
1204 -target | --target | --targe | --targ | --tar | --ta | --t)
1205 ac_prev=target_alias ;;
1206 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1207 target_alias=$ac_optarg ;;
1208
1209 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1210 verbose=yes ;;
1211
1212 -version | --version | --versio | --versi | --vers | -V)
1213 ac_init_version=: ;;
1214
1215 -with-* | --with-*)
1216 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1217 # Reject names that are not valid shell variable names.
1218 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1219 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1220 { (exit 1); exit 1; }; }
1221 ac_useropt_orig=$ac_useropt
1222 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1223 case $ac_user_opts in
1224 *"
1225 "with_$ac_useropt"
1226 "*) ;;
1227 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1228 ac_unrecognized_sep=', ';;
1229 esac
1230 eval with_$ac_useropt=\$ac_optarg ;;
1231
1232 -without-* | --without-*)
1233 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1234 # Reject names that are not valid shell variable names.
1235 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1236 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1237 { (exit 1); exit 1; }; }
1238 ac_useropt_orig=$ac_useropt
1239 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1240 case $ac_user_opts in
1241 *"
1242 "with_$ac_useropt"
1243 "*) ;;
1244 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1245 ac_unrecognized_sep=', ';;
1246 esac
1247 eval with_$ac_useropt=no ;;
1248
1249 --x)
1250 # Obsolete; use --with-x.
1251 with_x=yes ;;
1252
1253 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1254 | --x-incl | --x-inc | --x-in | --x-i)
1255 ac_prev=x_includes ;;
1256 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1257 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1258 x_includes=$ac_optarg ;;
1259
1260 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1261 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1262 ac_prev=x_libraries ;;
1263 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1264 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1265 x_libraries=$ac_optarg ;;
1266
1267 -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
1268 Try \`$0 --help' for more information." >&2
1269 { (exit 1); exit 1; }; }
1270 ;;
1271
1272 *=*)
1273 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1274 # Reject names that are not valid shell variable names.
1275 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1276 { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1277 { (exit 1); exit 1; }; }
1278 eval $ac_envvar=\$ac_optarg
1279 export $ac_envvar ;;
1280
1281 *)
1282 # FIXME: should be removed in autoconf 3.0.
1283 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1284 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1285 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1286 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1287 ;;
1288
1289 esac
1290 done
1291
1292 if test -n "$ac_prev"; then
1293 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1294 { $as_echo "$as_me: error: missing argument to $ac_option" >&2
1295 { (exit 1); exit 1; }; }
1296 fi
1297
1298 if test -n "$ac_unrecognized_opts"; then
1299 case $enable_option_checking in
1300 no) ;;
1301 fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1302 { (exit 1); exit 1; }; } ;;
1303 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1304 esac
1305 fi
1306
1307 # Check all directory arguments for consistency.
1308 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1309 datadir sysconfdir sharedstatedir localstatedir includedir \
1310 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1311 libdir localedir mandir
1312 do
1313 eval ac_val=\$$ac_var
1314 # Remove trailing slashes.
1315 case $ac_val in
1316 */ )
1317 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1318 eval $ac_var=\$ac_val;;
1319 esac
1320 # Be sure to have absolute directory names.
1321 case $ac_val in
1322 [\\/$]* | ?:[\\/]* ) continue;;
1323 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1324 esac
1325 { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1326 { (exit 1); exit 1; }; }
1327 done
1328
1329 # There might be people who depend on the old broken behavior: `$host'
1330 # used to hold the argument of --host etc.
1331 # FIXME: To remove some day.
1332 build=$build_alias
1333 host=$host_alias
1334 target=$target_alias
1335
1336 # FIXME: To remove some day.
1337 if test "x$host_alias" != x; then
1338 if test "x$build_alias" = x; then
1339 cross_compiling=maybe
1340 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1341 If a cross compiler is detected then cross compile mode will be used." >&2
1342 elif test "x$build_alias" != "x$host_alias"; then
1343 cross_compiling=yes
1344 fi
1345 fi
1346
1347 ac_tool_prefix=
1348 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1349
1350 test "$silent" = yes && exec 6>/dev/null
1351
1352
1353 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1354 ac_ls_di=`ls -di .` &&
1355 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1356 { $as_echo "$as_me: error: working directory cannot be determined" >&2
1357 { (exit 1); exit 1; }; }
1358 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1359 { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
1360 { (exit 1); exit 1; }; }
1361
1362
1363 # Find the source files, if location was not specified.
1364 if test -z "$srcdir"; then
1365 ac_srcdir_defaulted=yes
1366 # Try the directory containing this script, then the parent directory.
1367 ac_confdir=`$as_dirname -- "$as_myself" ||
1368 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1369 X"$as_myself" : 'X\(//\)[^/]' \| \
1370 X"$as_myself" : 'X\(//\)$' \| \
1371 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1372 $as_echo X"$as_myself" |
1373 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1374 s//\1/
1375 q
1376 }
1377 /^X\(\/\/\)[^/].*/{
1378 s//\1/
1379 q
1380 }
1381 /^X\(\/\/\)$/{
1382 s//\1/
1383 q
1384 }
1385 /^X\(\/\).*/{
1386 s//\1/
1387 q
1388 }
1389 s/.*/./; q'`
1390 srcdir=$ac_confdir
1391 if test ! -r "$srcdir/$ac_unique_file"; then
1392 srcdir=..
1393 fi
1394 else
1395 ac_srcdir_defaulted=no
1396 fi
1397 if test ! -r "$srcdir/$ac_unique_file"; then
1398 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1399 { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1400 { (exit 1); exit 1; }; }
1401 fi
1402 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1403 ac_abs_confdir=`(
1404 cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
1405 { (exit 1); exit 1; }; }
1406 pwd)`
1407 # When building in place, set srcdir=.
1408 if test "$ac_abs_confdir" = "$ac_pwd"; then
1409 srcdir=.
1410 fi
1411 # Remove unnecessary trailing slashes from srcdir.
1412 # Double slashes in file names in object file debugging info
1413 # mess up M-x gdb in Emacs.
1414 case $srcdir in
1415 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1416 esac
1417 for ac_var in $ac_precious_vars; do
1418 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1419 eval ac_env_${ac_var}_value=\$${ac_var}
1420 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1421 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1422 done
1423
1424 #
1425 # Report the --help message.
1426 #
1427 if test "$ac_init_help" = "long"; then
1428 # Omit some internal or obsolete options to make the list less imposing.
1429 # This message is too long to be a string in the A/UX 3.1 sh.
1430 cat <<_ACEOF
1431 \`configure' configures this package to adapt to many kinds of systems.
1432
1433 Usage: $0 [OPTION]... [VAR=VALUE]...
1434
1435 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1436 VAR=VALUE. See below for descriptions of some of the useful variables.
1437
1438 Defaults for the options are specified in brackets.
1439
1440 Configuration:
1441 -h, --help display this help and exit
1442 --help=short display options specific to this package
1443 --help=recursive display the short help of all the included packages
1444 -V, --version display version information and exit
1445 -q, --quiet, --silent do not print \`checking...' messages
1446 --cache-file=FILE cache test results in FILE [disabled]
1447 -C, --config-cache alias for \`--cache-file=config.cache'
1448 -n, --no-create do not create output files
1449 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1450
1451 Installation directories:
1452 --prefix=PREFIX install architecture-independent files in PREFIX
1453 [$ac_default_prefix]
1454 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1455 [PREFIX]
1456
1457 By default, \`make install' will install all the files in
1458 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1459 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1460 for instance \`--prefix=\$HOME'.
1461
1462 For better control, use the options below.
1463
1464 Fine tuning of the installation directories:
1465 --bindir=DIR user executables [EPREFIX/bin]
1466 --sbindir=DIR system admin executables [EPREFIX/sbin]
1467 --libexecdir=DIR program executables [EPREFIX/libexec]
1468 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1469 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1470 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1471 --libdir=DIR object code libraries [EPREFIX/lib]
1472 --includedir=DIR C header files [PREFIX/include]
1473 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1474 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1475 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1476 --infodir=DIR info documentation [DATAROOTDIR/info]
1477 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1478 --mandir=DIR man documentation [DATAROOTDIR/man]
1479 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1480 --htmldir=DIR html documentation [DOCDIR]
1481 --dvidir=DIR dvi documentation [DOCDIR]
1482 --pdfdir=DIR pdf documentation [DOCDIR]
1483 --psdir=DIR ps documentation [DOCDIR]
1484 _ACEOF
1485
1486 cat <<\_ACEOF
1487
1488 Program names:
1489 --program-prefix=PREFIX prepend PREFIX to installed program names
1490 --program-suffix=SUFFIX append SUFFIX to installed program names
1491 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1492
1493 System types:
1494 --build=BUILD configure for building on BUILD [guessed]
1495 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1496 --target=TARGET configure for building compilers for TARGET [HOST]
1497 _ACEOF
1498 fi
1499
1500 if test -n "$ac_init_help"; then
1501
1502 cat <<\_ACEOF
1503
1504 Optional Features:
1505 --disable-option-checking ignore unrecognized --enable/--with options
1506 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1507 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1508 --enable-cmulocal enable local mods for CMU [[no]]
1509 --enable-sample compile sample code [[yes]]
1510 --enable-obsolete_cram_attr
1511 enable support for cmusaslsecretCRAM-MD5 auxprop
1512 property [[yes]]
1513 --disable-dependency-tracking speeds up one-time build
1514 --enable-dependency-tracking do not reject slow dependency extractors
1515 --enable-static=PKGS build static libraries default=no
1516 --enable-shared=PKGS build shared libraries default=yes
1517 --enable-fast-install=PKGS optimize for fast installation default=yes
1518 --disable-libtool-lock avoid locking (might break parallel builds)
1519 --enable-staticdlopen try dynamic plugins when we are a static libsasl [no]
1520 --enable-java compile Java support [no]
1521 --enable-keep-db-open keep handle to Berkeley DB open for improved performance [no]
1522 --enable-alwaystrue enable the alwaystrue password verifier (discouraged)
1523 --enable-checkapop enable use of sasl_checkapop [yes]
1524 --enable-cram enable CRAM-MD5 authentication [yes]
1525 --enable-digest enable DIGEST-MD5 authentication [yes]
1526 --enable-scram enable SCRAM authentication [yes]
1527 --enable-otp enable OTP authentication [yes]
1528 --enable-srp enable SRP authentication [no]
1529 --enable-srp-setpass enable setting SRP secrets with saslpasswd [no]
1530 --enable-krb4 enable KERBEROS_V4 authentication [no]
1531 --enable-gssapi=<DIR> enable GSSAPI authentication [yes]
1532 --enable-gss_mutexes use mutexes around calls to the GSS library
1533 --enable-plain enable PLAIN authentication yes
1534 --enable-anon enable ANONYMOUS authentication [yes]
1535 --enable-login enable unsupported LOGIN authentication [no]
1536 --enable-ntlm enable unsupported NTLM authentication [no]
1537 --enable-passdss enable PASSDSS authentication (experimental) [no]
1538 --enable-sql enable SQL auxprop [no]
1539 --enable-ldapdb enable LDAPDB plugin no
1540 --disable-macos-framework disable building and installing replacement SASL2 Framework for MacOS X-provided SASL Framework [no]
1541
1542 Optional Packages:
1543 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1544 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1545
1546 --with-gnu-ld assume the C compiler uses GNU ld default=no
1547 --with-purecov link with purecov
1548 --with-purify link with purify
1549 --with-javabase=PATH set path to find jni.h in /usr/java/include
1550 --with-dbpath=PATH set the DB path to use /etc/sasldb2
1551 --with-dblib=DBLIB set the DB library to use berkeley
1552 --with-bdb-libdir=DIR Berkeley DB lib files are in DIR
1553 --with-bdb-incdir=DIR Berkeley DB include files are in DIR
1554 --with-gdbm=PATH use gdbm from PATH
1555 --with-devrandom=PATH set the path to /dev/random [/dev/random]
1556 --with-pam=DIR use PAM (rooted in DIR) [yes]
1557 --with-saslauthd=DIR enable use of the saslauth daemon using state dir DIR
1558 --with-authdaemond=PATH enable use of authdaemon with default socket=PATH [yes]
1559 --with-pwcheck=DIR enable deprecated pwcheck daemon using statedir DIR
1560 --with-ipctype={unix,doors} use ipctype [unix]
1561 --with-lib-subdir=DIR Find libraries in DIR instead of lib
1562 --with-openssl=PATH use OpenSSL from PATH
1563 --with-des=DIR with DES (look in DIR) yes
1564 --with-opie=PATH use OPIE (One Time Passwords in Everything) from PATH
1565 --with-gss_impl={heimdal|mit|cybersafe|seam|auto}
1566 choose specific GSSAPI implementation [[auto]]
1567 --with-ldap=DIR use LDAP (in DIR) for saslauthd no
1568 --with-mysql=PATH use MySQL from PATH
1569 --with-pgsql=PATH use PostgreSQL from PATH
1570 --with-sqlite=PATH use SQLite from PATH
1571 --with-sqlite3=PATH use SQLite3 from PATH
1572 --with-plugindir=DIR set the directory where plugins will
1573 be found [/usr/lib/sasl2]
1574 --with-configdir=DIR set the directory where config files will
1575 be found /usr/lib/sasl2
1576 --with-rc4 use internal rc4 routines [yes]
1577 --with-dmalloc=DIR with DMALLOC support (for test applications) [no]
1578 --with-sfio=DIR with SFIO support (for smtptest/libsfsasl) [no]
1579
1580 Some influential environment variables:
1581 CC C compiler command
1582 CFLAGS C compiler flags
1583 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1584 nonstandard directory <lib dir>
1585 LIBS libraries to pass to the linker, e.g. -l<library>
1586 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1587 you have headers in a nonstandard directory <include dir>
1588 CPP C preprocessor
1589
1590 Use these variables to override the choices made by `configure' or to help
1591 it to find libraries and programs with nonstandard names/locations.
1592
1593 _ACEOF
1594 ac_status=$?
1595 fi
1596
1597 if test "$ac_init_help" = "recursive"; then
1598 # If there are subdirs, report their specific --help.
1599 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1600 test -d "$ac_dir" ||
1601 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1602 continue
1603 ac_builddir=.
1604
1605 case "$ac_dir" in
1606 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1607 *)
1608 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1609 # A ".." for each directory in $ac_dir_suffix.
1610 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1611 case $ac_top_builddir_sub in
1612 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1613 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1614 esac ;;
1615 esac
1616 ac_abs_top_builddir=$ac_pwd
1617 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1618 # for backward compatibility:
1619 ac_top_builddir=$ac_top_build_prefix
1620
1621 case $srcdir in
1622 .) # We are building in place.
1623 ac_srcdir=.
1624 ac_top_srcdir=$ac_top_builddir_sub
1625 ac_abs_top_srcdir=$ac_pwd ;;
1626 [\\/]* | ?:[\\/]* ) # Absolute name.
1627 ac_srcdir=$srcdir$ac_dir_suffix;
1628 ac_top_srcdir=$srcdir
1629 ac_abs_top_srcdir=$srcdir ;;
1630 *) # Relative name.
1631 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1632 ac_top_srcdir=$ac_top_build_prefix$srcdir
1633 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1634 esac
1635 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1636
1637 cd "$ac_dir" || { ac_status=$?; continue; }
1638 # Check for guested configure.
1639 if test -f "$ac_srcdir/configure.gnu"; then
1640 echo &&
1641 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1642 elif test -f "$ac_srcdir/configure"; then
1643 echo &&
1644 $SHELL "$ac_srcdir/configure" --help=recursive
1645 else
1646 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1647 fi || ac_status=$?
1648 cd "$ac_pwd" || { ac_status=$?; break; }
1649 done
1650 fi
1651
1652 test -n "$ac_init_help" && exit $ac_status
1653 if $ac_init_version; then
1654 cat <<\_ACEOF
1655 configure
1656 generated by GNU Autoconf 2.63
1657
1658 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1659 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1660 This configure script is free software; the Free Software Foundation
1661 gives unlimited permission to copy, distribute and modify it.
1662 _ACEOF
1663 exit
1664 fi
1665 cat >config.log <<_ACEOF
1666 This file contains any messages produced by compilers while
1667 running configure, to aid debugging if configure makes a mistake.
1668
1669 It was created by $as_me, which was
1670 generated by GNU Autoconf 2.63. Invocation command line was
1671
1672 $ $0 $@
1673
1674 _ACEOF
1675 exec 5>>config.log
1676 {
1677 cat <<_ASUNAME
1678 ## --------- ##
1679 ## Platform. ##
1680 ## --------- ##
1681
1682 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1683 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1684 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1685 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1686 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1687
1688 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1689 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1690
1691 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1692 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1693 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1694 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1695 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1696 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1697 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1698
1699 _ASUNAME
1700
1701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1702 for as_dir in $PATH
1703 do
1704 IFS=$as_save_IFS
1705 test -z "$as_dir" && as_dir=.
1706 $as_echo "PATH: $as_dir"
1707 done
1708 IFS=$as_save_IFS
1709
1710 } >&5
1711
1712 cat >&5 <<_ACEOF
1713
1714
1715 ## ----------- ##
1716 ## Core tests. ##
1717 ## ----------- ##
1718
1719 _ACEOF
1720
1721
1722 # Keep a trace of the command line.
1723 # Strip out --no-create and --no-recursion so they do not pile up.
1724 # Strip out --silent because we don't want to record it for future runs.
1725 # Also quote any args containing shell meta-characters.
1726 # Make two passes to allow for proper duplicate-argument suppression.
1727 ac_configure_args=
1728 ac_configure_args0=
1729 ac_configure_args1=
1730 ac_must_keep_next=false
1731 for ac_pass in 1 2
1732 do
1733 for ac_arg
1734 do
1735 case $ac_arg in
1736 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1737 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1738 | -silent | --silent | --silen | --sile | --sil)
1739 continue ;;
1740 *\'*)
1741 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1742 esac
1743 case $ac_pass in
1744 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1745 2)
1746 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1747 if test $ac_must_keep_next = true; then
1748 ac_must_keep_next=false # Got value, back to normal.
1749 else
1750 case $ac_arg in
1751 *=* | --config-cache | -C | -disable-* | --disable-* \
1752 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1753 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1754 | -with-* | --with-* | -without-* | --without-* | --x)
1755 case "$ac_configure_args0 " in
1756 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1757 esac
1758 ;;
1759 -* ) ac_must_keep_next=true ;;
1760 esac
1761 fi
1762 ac_configure_args="$ac_configure_args '$ac_arg'"
1763 ;;
1764 esac
1765 done
1766 done
1767 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1768 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1769
1770 # When interrupted or exit'd, cleanup temporary files, and complete
1771 # config.log. We remove comments because anyway the quotes in there
1772 # would cause problems or look ugly.
1773 # WARNING: Use '\'' to represent an apostrophe within the trap.
1774 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1775 trap 'exit_status=$?
1776 # Save into config.log some information that might help in debugging.
1777 {
1778 echo
1779
1780 cat <<\_ASBOX
1781 ## ---------------- ##
1782 ## Cache variables. ##
1783 ## ---------------- ##
1784 _ASBOX
1785 echo
1786 # The following way of writing the cache mishandles newlines in values,
1787 (
1788 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1789 eval ac_val=\$$ac_var
1790 case $ac_val in #(
1791 *${as_nl}*)
1792 case $ac_var in #(
1793 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1794 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1795 esac
1796 case $ac_var in #(
1797 _ | IFS | as_nl) ;; #(
1798 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1799 *) $as_unset $ac_var ;;
1800 esac ;;
1801 esac
1802 done
1803 (set) 2>&1 |
1804 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1805 *${as_nl}ac_space=\ *)
1806 sed -n \
1807 "s/'\''/'\''\\\\'\'''\''/g;
1808 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1809 ;; #(
1810 *)
1811 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1812 ;;
1813 esac |
1814 sort
1815 )
1816 echo
1817
1818 cat <<\_ASBOX
1819 ## ----------------- ##
1820 ## Output variables. ##
1821 ## ----------------- ##
1822 _ASBOX
1823 echo
1824 for ac_var in $ac_subst_vars
1825 do
1826 eval ac_val=\$$ac_var
1827 case $ac_val in
1828 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1829 esac
1830 $as_echo "$ac_var='\''$ac_val'\''"
1831 done | sort
1832 echo
1833
1834 if test -n "$ac_subst_files"; then
1835 cat <<\_ASBOX
1836 ## ------------------- ##
1837 ## File substitutions. ##
1838 ## ------------------- ##
1839 _ASBOX
1840 echo
1841 for ac_var in $ac_subst_files
1842 do
1843 eval ac_val=\$$ac_var
1844 case $ac_val in
1845 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1846 esac
1847 $as_echo "$ac_var='\''$ac_val'\''"
1848 done | sort
1849 echo
1850 fi
1851
1852 if test -s confdefs.h; then
1853 cat <<\_ASBOX
1854 ## ----------- ##
1855 ## confdefs.h. ##
1856 ## ----------- ##
1857 _ASBOX
1858 echo
1859 cat confdefs.h
1860 echo
1861 fi
1862 test "$ac_signal" != 0 &&
1863 $as_echo "$as_me: caught signal $ac_signal"
1864 $as_echo "$as_me: exit $exit_status"
1865 } >&5
1866 rm -f core *.core core.conftest.* &&
1867 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1868 exit $exit_status
1869 ' 0
1870 for ac_signal in 1 2 13 15; do
1871 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1872 done
1873 ac_signal=0
1874
1875 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1876 rm -f -r conftest* confdefs.h
1877
1878 # Predefined preprocessor variables.
1879
1880 cat >>confdefs.h <<_ACEOF
1881 #define PACKAGE_NAME "$PACKAGE_NAME"
1882 _ACEOF
1883
1884
1885 cat >>confdefs.h <<_ACEOF
1886 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1887 _ACEOF
1888
1889
1890 cat >>confdefs.h <<_ACEOF
1891 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1892 _ACEOF
1893
1894
1895 cat >>confdefs.h <<_ACEOF
1896 #define PACKAGE_STRING "$PACKAGE_STRING"
1897 _ACEOF
1898
1899
1900 cat >>confdefs.h <<_ACEOF
1901 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1902 _ACEOF
1903
1904
1905 # Let the site file select an alternate cache file if it wants to.
1906 # Prefer an explicitly selected file to automatically selected ones.
1907 ac_site_file1=NONE
1908 ac_site_file2=NONE
1909 if test -n "$CONFIG_SITE"; then
1910 ac_site_file1=$CONFIG_SITE
1911 elif test "x$prefix" != xNONE; then
1912 ac_site_file1=$prefix/share/config.site
1913 ac_site_file2=$prefix/etc/config.site
1914 else
1915 ac_site_file1=$ac_default_prefix/share/config.site
1916 ac_site_file2=$ac_default_prefix/etc/config.site
1917 fi
1918 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1919 do
1920 test "x$ac_site_file" = xNONE && continue
1921 if test -r "$ac_site_file"; then
1922 { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1923 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1924 sed 's/^/| /' "$ac_site_file" >&5
1925 . "$ac_site_file"
1926 fi
1927 done
1928
1929 if test -r "$cache_file"; then
1930 # Some versions of bash will fail to source /dev/null (special
1931 # files actually), so we avoid doing that.
1932 if test -f "$cache_file"; then
1933 { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1934 $as_echo "$as_me: loading cache $cache_file" >&6;}
1935 case $cache_file in
1936 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1937 *) . "./$cache_file";;
1938 esac
1939 fi
1940 else
1941 { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1942 $as_echo "$as_me: creating cache $cache_file" >&6;}
1943 >$cache_file
1944 fi
1945
1946 # Check that the precious variables saved in the cache have kept the same
1947 # value.
1948 ac_cache_corrupted=false
1949 for ac_var in $ac_precious_vars; do
1950 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1951 eval ac_new_set=\$ac_env_${ac_var}_set
1952 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1953 eval ac_new_val=\$ac_env_${ac_var}_value
1954 case $ac_old_set,$ac_new_set in
1955 set,)
1956 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1957 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1958 ac_cache_corrupted=: ;;
1959 ,set)
1960 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1961 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1962 ac_cache_corrupted=: ;;
1963 ,);;
1964 *)
1965 if test "x$ac_old_val" != "x$ac_new_val"; then
1966 # differences in whitespace do not lead to failure.
1967 ac_old_val_w=`echo x $ac_old_val`
1968 ac_new_val_w=`echo x $ac_new_val`
1969 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1970 { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1971 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1972 ac_cache_corrupted=:
1973 else
1974 { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1975 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1976 eval $ac_var=\$ac_old_val
1977 fi
1978 { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1979 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
1980 { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1981 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
1982 fi;;
1983 esac
1984 # Pass precious variables to config.status.
1985 if test "$ac_new_set" = set; then
1986 case $ac_new_val in
1987 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1988 *) ac_arg=$ac_var=$ac_new_val ;;
1989 esac
1990 case " $ac_configure_args " in
1991 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1992 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1993 esac
1994 fi
1995 done
1996 if $ac_cache_corrupted; then
1997 { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1998 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1999 { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
2000 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2001 { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
2002 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
2003 { (exit 1); exit 1; }; }
2004 fi
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022 ac_ext=c
2023 ac_cpp='$CPP $CPPFLAGS'
2024 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2025 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2026 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2027
2028
2029
2030
2031 if test $cache_file = "/dev/null"; then
2032 cache_file="./config.cache"
2033 if test -r "$cache_file"; then
2034 # Some versions of bash will fail to source /dev/null (special
2035 # files actually), so we avoid doing that.
2036 if test -f "$cache_file"; then
2037 { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
2038 $as_echo "$as_me: loading cache $cache_file" >&6;}
2039 case $cache_file in
2040 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2041 *) . "./$cache_file";;
2042 esac
2043 fi
2044 else
2045 { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
2046 $as_echo "$as_me: creating cache $cache_file" >&6;}
2047 >$cache_file
2048 fi
2049
2050 fi
2051
2052 ac_aux_dir=
2053 for ac_dir in config "$srcdir"/config; do
2054 if test -f "$ac_dir/install-sh"; then
2055 ac_aux_dir=$ac_dir
2056 ac_install_sh="$ac_aux_dir/install-sh -c"
2057 break
2058 elif test -f "$ac_dir/install.sh"; then
2059 ac_aux_dir=$ac_dir
2060 ac_install_sh="$ac_aux_dir/install.sh -c"
2061 break
2062 elif test -f "$ac_dir/shtool"; then
2063 ac_aux_dir=$ac_dir
2064 ac_install_sh="$ac_aux_dir/shtool install -c"
2065 break
2066 fi
2067 done
2068 if test -z "$ac_aux_dir"; then
2069 { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
2070 $as_echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
2071 { (exit 1); exit 1; }; }
2072 fi
2073
2074 # These three variables are undocumented and unsupported,
2075 # and are intended to be withdrawn in a future Autoconf release.
2076 # They can cause serious problems if a builder's source tree is in a directory
2077 # whose full name contains unusual characters.
2078 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2079 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2080 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2081
2082
2083 # Make sure we can run config.sub.
2084 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2085 { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2086 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2087 { (exit 1); exit 1; }; }
2088
2089 { $as_echo "$as_me:$LINENO: checking build system type" >&5
2090 $as_echo_n "checking build system type... " >&6; }
2091 if test "${ac_cv_build+set}" = set; then
2092 $as_echo_n "(cached) " >&6
2093 else
2094 ac_build_alias=$build_alias
2095 test "x$ac_build_alias" = x &&
2096 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2097 test "x$ac_build_alias" = x &&
2098 { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2099 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2100 { (exit 1); exit 1; }; }
2101 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2102 { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2103 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2104 { (exit 1); exit 1; }; }
2105
2106 fi
2107 { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2108 $as_echo "$ac_cv_build" >&6; }
2109 case $ac_cv_build in
2110 *-*-*) ;;
2111 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2112 $as_echo "$as_me: error: invalid value of canonical build" >&2;}
2113 { (exit 1); exit 1; }; };;
2114 esac
2115 build=$ac_cv_build
2116 ac_save_IFS=$IFS; IFS='-'
2117 set x $ac_cv_build
2118 shift
2119 build_cpu=$1
2120 build_vendor=$2
2121 shift; shift
2122 # Remember, the first character of IFS is used to create $*,
2123 # except with old shells:
2124 build_os=$*
2125 IFS=$ac_save_IFS
2126 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2127
2128
2129 { $as_echo "$as_me:$LINENO: checking host system type" >&5
2130 $as_echo_n "checking host system type... " >&6; }
2131 if test "${ac_cv_host+set}" = set; then
2132 $as_echo_n "(cached) " >&6
2133 else
2134 if test "x$host_alias" = x; then
2135 ac_cv_host=$ac_cv_build
2136 else
2137 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2138 { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2139 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2140 { (exit 1); exit 1; }; }
2141 fi
2142
2143 fi
2144 { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2145 $as_echo "$ac_cv_host" >&6; }
2146 case $ac_cv_host in
2147 *-*-*) ;;
2148 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2149 $as_echo "$as_me: error: invalid value of canonical host" >&2;}
2150 { (exit 1); exit 1; }; };;
2151 esac
2152 host=$ac_cv_host
2153 ac_save_IFS=$IFS; IFS='-'
2154 set x $ac_cv_host
2155 shift
2156 host_cpu=$1
2157 host_vendor=$2
2158 shift; shift
2159 # Remember, the first character of IFS is used to create $*,
2160 # except with old shells:
2161 host_os=$*
2162 IFS=$ac_save_IFS
2163 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2164
2165
2166 { $as_echo "$as_me:$LINENO: checking target system type" >&5
2167 $as_echo_n "checking target system type... " >&6; }
2168 if test "${ac_cv_target+set}" = set; then
2169 $as_echo_n "(cached) " >&6
2170 else
2171 if test "x$target_alias" = x; then
2172 ac_cv_target=$ac_cv_host
2173 else
2174 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2175 { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
2176 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
2177 { (exit 1); exit 1; }; }
2178 fi
2179
2180 fi
2181 { $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5
2182 $as_echo "$ac_cv_target" >&6; }
2183 case $ac_cv_target in
2184 *-*-*) ;;
2185 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
2186 $as_echo "$as_me: error: invalid value of canonical target" >&2;}
2187 { (exit 1); exit 1; }; };;
2188 esac
2189 target=$ac_cv_target
2190 ac_save_IFS=$IFS; IFS='-'
2191 set x $ac_cv_target
2192 shift
2193 target_cpu=$1
2194 target_vendor=$2
2195 shift; shift
2196 # Remember, the first character of IFS is used to create $*,
2197 # except with old shells:
2198 target_os=$*
2199 IFS=$ac_save_IFS
2200 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2201
2202
2203 # The aliases save the names the user supplied, while $host etc.
2204 # will get canonicalized.
2205 test -n "$target_alias" &&
2206 test "$program_prefix$program_suffix$program_transform_name" = \
2207 NONENONEs,x,x, &&
2208 program_prefix=${target_alias}-
2209
2210 am__api_version='1.11'
2211
2212 # Find a good install program. We prefer a C program (faster),
2213 # so one script is as good as another. But avoid the broken or
2214 # incompatible versions:
2215 # SysV /etc/install, /usr/sbin/install
2216 # SunOS /usr/etc/install
2217 # IRIX /sbin/install
2218 # AIX /bin/install
2219 # AmigaOS /C/install, which installs bootblocks on floppy discs
2220 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2221 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2222 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2223 # OS/2's system install, which has a completely different semantic
2224 # ./install, which can be erroneously created by make from ./install.sh.
2225 # Reject install programs that cannot install multiple files.
2226 { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2227 $as_echo_n "checking for a BSD-compatible install... " >&6; }
2228 if test -z "$INSTALL"; then
2229 if test "${ac_cv_path_install+set}" = set; then
2230 $as_echo_n "(cached) " >&6
2231 else
2232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2233 for as_dir in $PATH
2234 do
2235 IFS=$as_save_IFS
2236 test -z "$as_dir" && as_dir=.
2237 # Account for people who put trailing slashes in PATH elements.
2238 case $as_dir/ in
2239 ./ | .// | /cC/* | \
2240 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2241 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
2242 /usr/ucb/* ) ;;
2243 *)
2244 # OSF1 and SCO ODT 3.0 have their own names for install.
2245 # Don't use installbsd from OSF since it installs stuff as root
2246 # by default.
2247 for ac_prog in ginstall scoinst install; do
2248 for ac_exec_ext in '' $ac_executable_extensions; do
2249 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
2250 if test $ac_prog = install &&
2251 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2252 # AIX install. It has an incompatible calling convention.
2253 :
2254 elif test $ac_prog = install &&
2255 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2256 # program-specific install script used by HP pwplus--don't use.
2257 :
2258 else
2259 rm -rf conftest.one conftest.two conftest.dir
2260 echo one > conftest.one
2261 echo two > conftest.two
2262 mkdir conftest.dir
2263 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2264 test -s conftest.one && test -s conftest.two &&
2265 test -s conftest.dir/conftest.one &&
2266 test -s conftest.dir/conftest.two
2267 then
2268 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2269 break 3
2270 fi
2271 fi
2272 fi
2273 done
2274 done
2275 ;;
2276 esac
2277
2278 done
2279 IFS=$as_save_IFS
2280
2281 rm -rf conftest.one conftest.two conftest.dir
2282
2283 fi
2284 if test "${ac_cv_path_install+set}" = set; then
2285 INSTALL=$ac_cv_path_install
2286 else
2287 # As a last resort, use the slow shell script. Don't cache a
2288 # value for INSTALL within a source directory, because that will
2289 # break other packages using the cache if that directory is
2290 # removed, or if the value is a relative name.
2291 INSTALL=$ac_install_sh
2292 fi
2293 fi
2294 { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
2295 $as_echo "$INSTALL" >&6; }
2296
2297 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2298 # It thinks the first close brace ends the variable substitution.
2299 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2300
2301 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2302
2303 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2304
2305 { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
2306 $as_echo_n "checking whether build environment is sane... " >&6; }
2307 # Just in case
2308 sleep 1
2309 echo timestamp > conftest.file
2310 # Reject unsafe characters in $srcdir or the absolute working directory
2311 # name. Accept space and tab only in the latter.
2312 am_lf='
2313 '
2314 case `pwd` in
2315 *[\\\"\#\$\&\'\`$am_lf]*)
2316 { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5
2317 $as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
2318 { (exit 1); exit 1; }; };;
2319 esac
2320 case $srcdir in
2321 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2322 { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
2323 $as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
2324 { (exit 1); exit 1; }; };;
2325 esac
2326
2327 # Do `set' in a subshell so we don't clobber the current shell's
2328 # arguments. Must try -L first in case configure is actually a
2329 # symlink; some systems play weird games with the mod time of symlinks
2330 # (eg FreeBSD returns the mod time of the symlink's containing
2331 # directory).
2332 if (
2333 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2334 if test "$*" = "X"; then
2335 # -L didn't work.
2336 set X `ls -t "$srcdir/configure" conftest.file`
2337 fi
2338 rm -f conftest.file
2339 if test "$*" != "X $srcdir/configure conftest.file" \
2340 && test "$*" != "X conftest.file $srcdir/configure"; then
2341
2342 # If neither matched, then we have a broken ls. This can happen
2343 # if, for instance, CONFIG_SHELL is bash and it inherits a
2344 # broken ls alias from the environment. This has actually
2345 # happened. Such a system could not be considered "sane".
2346 { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
2347 alias in your environment" >&5
2348 $as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
2349 alias in your environment" >&2;}
2350 { (exit 1); exit 1; }; }
2351 fi
2352
2353 test "$2" = conftest.file
2354 )
2355 then
2356 # Ok.
2357 :
2358 else
2359 { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
2360 Check your system clock" >&5
2361 $as_echo "$as_me: error: newly created file is older than distributed files!
2362 Check your system clock" >&2;}
2363 { (exit 1); exit 1; }; }
2364 fi
2365 { $as_echo "$as_me:$LINENO: result: yes" >&5
2366 $as_echo "yes" >&6; }
2367 test "$program_prefix" != NONE &&
2368 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2369 # Use a double $ so make ignores it.
2370 test "$program_suffix" != NONE &&
2371 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2372 # Double any \ or $.
2373 # By default was `s,x,x', remove it if useless.
2374 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2375 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
2376
2377 # expand $ac_aux_dir to an absolute path
2378 am_aux_dir=`cd $ac_aux_dir && pwd`
2379
2380 if test x"${MISSING+set}" != xset; then
2381 case $am_aux_dir in
2382 *\ * | *\ *)
2383 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2384 *)
2385 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2386 esac
2387 fi
2388 # Use eval to expand $SHELL
2389 if eval "$MISSING --run true"; then
2390 am_missing_run="$MISSING --run "
2391 else
2392 am_missing_run=
2393 { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
2394 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
2395 fi
2396
2397 if test x"${install_sh}" != xset; then
2398 case $am_aux_dir in
2399 *\ * | *\ *)
2400 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2401 *)
2402 install_sh="\${SHELL} $am_aux_dir/install-sh"
2403 esac
2404 fi
2405
2406 # Installed binaries are usually stripped using `strip' when the user
2407 # run `make install-strip'. However `strip' might not be the right
2408 # tool to use in cross-compilation environments, therefore Automake
2409 # will honor the `STRIP' environment variable to overrule this program.
2410 if test "$cross_compiling" != no; then
2411 if test -n "$ac_tool_prefix"; then
2412 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2413 set dummy ${ac_tool_prefix}strip; ac_word=$2
2414 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2415 $as_echo_n "checking for $ac_word... " >&6; }
2416 if test "${ac_cv_prog_STRIP+set}" = set; then
2417 $as_echo_n "(cached) " >&6
2418 else
2419 if test -n "$STRIP"; then
2420 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2421 else
2422 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2423 for as_dir in $PATH
2424 do
2425 IFS=$as_save_IFS
2426 test -z "$as_dir" && as_dir=.
2427 for ac_exec_ext in '' $ac_executable_extensions; do
2428 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2429 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2430 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2431 break 2
2432 fi
2433 done
2434 done
2435 IFS=$as_save_IFS
2436
2437 fi
2438 fi
2439 STRIP=$ac_cv_prog_STRIP
2440 if test -n "$STRIP"; then
2441 { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
2442 $as_echo "$STRIP" >&6; }
2443 else
2444 { $as_echo "$as_me:$LINENO: result: no" >&5
2445 $as_echo "no" >&6; }
2446 fi
2447
2448
2449 fi
2450 if test -z "$ac_cv_prog_STRIP"; then
2451 ac_ct_STRIP=$STRIP
2452 # Extract the first word of "strip", so it can be a program name with args.
2453 set dummy strip; ac_word=$2
2454 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2455 $as_echo_n "checking for $ac_word... " >&6; }
2456 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
2457 $as_echo_n "(cached) " >&6
2458 else
2459 if test -n "$ac_ct_STRIP"; then
2460 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2461 else
2462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2463 for as_dir in $PATH
2464 do
2465 IFS=$as_save_IFS
2466 test -z "$as_dir" && as_dir=.
2467 for ac_exec_ext in '' $ac_executable_extensions; do
2468 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2469 ac_cv_prog_ac_ct_STRIP="strip"
2470 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2471 break 2
2472 fi
2473 done
2474 done
2475 IFS=$as_save_IFS
2476
2477 fi
2478 fi
2479 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2480 if test -n "$ac_ct_STRIP"; then
2481 { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
2482 $as_echo "$ac_ct_STRIP" >&6; }
2483 else
2484 { $as_echo "$as_me:$LINENO: result: no" >&5
2485 $as_echo "no" >&6; }
2486 fi
2487
2488 if test "x$ac_ct_STRIP" = x; then
2489 STRIP=":"
2490 else
2491 case $cross_compiling:$ac_tool_warned in
2492 yes:)
2493 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2494 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2495 ac_tool_warned=yes ;;
2496 esac
2497 STRIP=$ac_ct_STRIP
2498 fi
2499 else
2500 STRIP="$ac_cv_prog_STRIP"
2501 fi
2502
2503 fi
2504 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2505
2506 { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
2507 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
2508 if test -z "$MKDIR_P"; then
2509 if test "${ac_cv_path_mkdir+set}" = set; then
2510 $as_echo_n "(cached) " >&6
2511 else
2512 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2513 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2514 do
2515 IFS=$as_save_IFS
2516 test -z "$as_dir" && as_dir=.
2517 for ac_prog in mkdir gmkdir; do
2518 for ac_exec_ext in '' $ac_executable_extensions; do
2519 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
2520 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2521 'mkdir (GNU coreutils) '* | \
2522 'mkdir (coreutils) '* | \
2523 'mkdir (fileutils) '4.1*)
2524 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2525 break 3;;
2526 esac
2527 done
2528 done
2529 done
2530 IFS=$as_save_IFS
2531
2532 fi
2533
2534 if test "${ac_cv_path_mkdir+set}" = set; then
2535 MKDIR_P="$ac_cv_path_mkdir -p"
2536 else
2537 # As a last resort, use the slow shell script. Don't cache a
2538 # value for MKDIR_P within a source directory, because that will
2539 # break other packages using the cache if that directory is
2540 # removed, or if the value is a relative name.
2541 test -d ./--version && rmdir ./--version
2542 MKDIR_P="$ac_install_sh -d"
2543 fi
2544 fi
2545 { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
2546 $as_echo "$MKDIR_P" >&6; }
2547
2548 mkdir_p="$MKDIR_P"
2549 case $mkdir_p in
2550 [\\/$]* | ?:[\\/]*) ;;
2551 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2552 esac
2553
2554 for ac_prog in gawk mawk nawk awk
2555 do
2556 # Extract the first word of "$ac_prog", so it can be a program name with args.
2557 set dummy $ac_prog; ac_word=$2
2558 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2559 $as_echo_n "checking for $ac_word... " >&6; }
2560 if test "${ac_cv_prog_AWK+set}" = set; then
2561 $as_echo_n "(cached) " >&6
2562 else
2563 if test -n "$AWK"; then
2564 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2565 else
2566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2567 for as_dir in $PATH
2568 do
2569 IFS=$as_save_IFS
2570 test -z "$as_dir" && as_dir=.
2571 for ac_exec_ext in '' $ac_executable_extensions; do
2572 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2573 ac_cv_prog_AWK="$ac_prog"
2574 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2575 break 2
2576 fi
2577 done
2578 done
2579 IFS=$as_save_IFS
2580
2581 fi
2582 fi
2583 AWK=$ac_cv_prog_AWK
2584 if test -n "$AWK"; then
2585 { $as_echo "$as_me:$LINENO: result: $AWK" >&5
2586 $as_echo "$AWK" >&6; }
2587 else
2588 { $as_echo "$as_me:$LINENO: result: no" >&5
2589 $as_echo "no" >&6; }
2590 fi
2591
2592
2593 test -n "$AWK" && break
2594 done
2595
2596 { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2597 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2598 set x ${MAKE-make}
2599 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2600 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
2601 $as_echo_n "(cached) " >&6
2602 else
2603 cat >conftest.make <<\_ACEOF
2604 SHELL = /bin/sh
2605 all:
2606 @echo '@@@%%%=$(MAKE)=@@@%%%'
2607 _ACEOF
2608 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2609 case `${MAKE-make} -f conftest.make 2>/dev/null` in
2610 *@@@%%%=?*=@@@%%%*)
2611 eval ac_cv_prog_make_${ac_make}_set=yes;;
2612 *)
2613 eval ac_cv_prog_make_${ac_make}_set=no;;
2614 esac
2615 rm -f conftest.make
2616 fi
2617 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2618 { $as_echo "$as_me:$LINENO: result: yes" >&5
2619 $as_echo "yes" >&6; }
2620 SET_MAKE=
2621 else
2622 { $as_echo "$as_me:$LINENO: result: no" >&5
2623 $as_echo "no" >&6; }
2624 SET_MAKE="MAKE=${MAKE-make}"
2625 fi
2626
2627 rm -rf .tst 2>/dev/null
2628 mkdir .tst 2>/dev/null
2629 if test -d .tst; then
2630 am__leading_dot=.
2631 else
2632 am__leading_dot=_
2633 fi
2634 rmdir .tst 2>/dev/null
2635
2636 if test "`cd $srcdir && pwd`" != "`pwd`"; then
2637 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2638 # is not polluted with repeated "-I."
2639 am__isrc=' -I$(srcdir)'
2640 # test to see if srcdir already configured
2641 if test -f $srcdir/config.status; then
2642 { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
2643 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
2644 { (exit 1); exit 1; }; }
2645 fi
2646 fi
2647
2648 # test whether we have cygpath
2649 if test -z "$CYGPATH_W"; then
2650 if (cygpath --version) >/dev/null 2>/dev/null; then
2651 CYGPATH_W='cygpath -w'
2652 else
2653 CYGPATH_W=echo
2654 fi
2655 fi
2656
2657
2658 # Define the identity of the package.
2659 PACKAGE=cyrus-sasl
2660 VERSION=2.1.26
2661
2662
2663 cat >>confdefs.h <<_ACEOF
2664 #define PACKAGE "$PACKAGE"
2665 _ACEOF
2666
2667
2668 cat >>confdefs.h <<_ACEOF
2669 #define VERSION "$VERSION"
2670 _ACEOF
2671
2672 # Some tools Automake needs.
2673
2674 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2675
2676
2677 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2678
2679
2680 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2681
2682
2683 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2684
2685
2686 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2687
2688 # We need awk for the "check" target. The system "awk" is bad on
2689 # some platforms.
2690 # Always define AMTAR for backward compatibility.
2691
2692 AMTAR=${AMTAR-"${am_missing_run}tar"}
2693
2694 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2695
2696
2697
2698
2699
2700
2701
2702 ACLOCAL="$ACLOCAL -I \$(top_srcdir)/cmulocal"
2703
2704
2705 # and include our config dir scripts
2706 ACLOCAL="$ACLOCAL -I \$(top_srcdir)/config"
2707
2708 DIRS=""
2709
2710 # Check whether --enable-cmulocal was given.
2711 if test "${enable_cmulocal+set}" = set; then
2712 enableval=$enable_cmulocal;
2713 else
2714 enable_cmulocal=no
2715 fi
2716
2717
2718 # Check whether --enable-sample was given.
2719 if test "${enable_sample+set}" = set; then
2720 enableval=$enable_sample; enable_sample=yes
2721 fi
2722
2723
2724 # Check whether --enable-obsolete_cram_attr was given.
2725 if test "${enable_obsolete_cram_attr+set}" = set; then
2726 enableval=$enable_obsolete_cram_attr; enable_obsolete_cram_attr=$enableval
2727 else
2728 enable_obsolete_cram_attr=yes
2729 fi
2730
2731
2732 ac_ext=c
2733 ac_cpp='$CPP $CPPFLAGS'
2734 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2735 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2736 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2737 if test -n "$ac_tool_prefix"; then
2738 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2739 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2740 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2741 $as_echo_n "checking for $ac_word... " >&6; }
2742 if test "${ac_cv_prog_CC+set}" = set; then
2743 $as_echo_n "(cached) " >&6
2744 else
2745 if test -n "$CC"; then
2746 ac_cv_prog_CC="$CC" # Let the user override the test.
2747 else
2748 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2749 for as_dir in $PATH
2750 do
2751 IFS=$as_save_IFS
2752 test -z "$as_dir" && as_dir=.
2753 for ac_exec_ext in '' $ac_executable_extensions; do
2754 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2755 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2756 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2757 break 2
2758 fi
2759 done
2760 done
2761 IFS=$as_save_IFS
2762
2763 fi
2764 fi
2765 CC=$ac_cv_prog_CC
2766 if test -n "$CC"; then
2767 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2768 $as_echo "$CC" >&6; }
2769 else
2770 { $as_echo "$as_me:$LINENO: result: no" >&5
2771 $as_echo "no" >&6; }
2772 fi
2773
2774
2775 fi
2776 if test -z "$ac_cv_prog_CC"; then
2777 ac_ct_CC=$CC
2778 # Extract the first word of "gcc", so it can be a program name with args.
2779 set dummy gcc; ac_word=$2
2780 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2781 $as_echo_n "checking for $ac_word... " >&6; }
2782 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2783 $as_echo_n "(cached) " >&6
2784 else
2785 if test -n "$ac_ct_CC"; then
2786 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2787 else
2788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2789 for as_dir in $PATH
2790 do
2791 IFS=$as_save_IFS
2792 test -z "$as_dir" && as_dir=.
2793 for ac_exec_ext in '' $ac_executable_extensions; do
2794 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2795 ac_cv_prog_ac_ct_CC="gcc"
2796 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2797 break 2
2798 fi
2799 done
2800 done
2801 IFS=$as_save_IFS
2802
2803 fi
2804 fi
2805 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2806 if test -n "$ac_ct_CC"; then
2807 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2808 $as_echo "$ac_ct_CC" >&6; }
2809 else
2810 { $as_echo "$as_me:$LINENO: result: no" >&5
2811 $as_echo "no" >&6; }
2812 fi
2813
2814 if test "x$ac_ct_CC" = x; then
2815 CC=""
2816 else
2817 case $cross_compiling:$ac_tool_warned in
2818 yes:)
2819 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2820 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2821 ac_tool_warned=yes ;;
2822 esac
2823 CC=$ac_ct_CC
2824 fi
2825 else
2826 CC="$ac_cv_prog_CC"
2827 fi
2828
2829 if test -z "$CC"; then
2830 if test -n "$ac_tool_prefix"; then
2831 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2832 set dummy ${ac_tool_prefix}cc; ac_word=$2
2833 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2834 $as_echo_n "checking for $ac_word... " >&6; }
2835 if test "${ac_cv_prog_CC+set}" = set; then
2836 $as_echo_n "(cached) " >&6
2837 else
2838 if test -n "$CC"; then
2839 ac_cv_prog_CC="$CC" # Let the user override the test.
2840 else
2841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2842 for as_dir in $PATH
2843 do
2844 IFS=$as_save_IFS
2845 test -z "$as_dir" && as_dir=.
2846 for ac_exec_ext in '' $ac_executable_extensions; do
2847 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2848 ac_cv_prog_CC="${ac_tool_prefix}cc"
2849 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2850 break 2
2851 fi
2852 done
2853 done
2854 IFS=$as_save_IFS
2855
2856 fi
2857 fi
2858 CC=$ac_cv_prog_CC
2859 if test -n "$CC"; then
2860 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2861 $as_echo "$CC" >&6; }
2862 else
2863 { $as_echo "$as_me:$LINENO: result: no" >&5
2864 $as_echo "no" >&6; }
2865 fi
2866
2867
2868 fi
2869 fi
2870 if test -z "$CC"; then
2871 # Extract the first word of "cc", so it can be a program name with args.
2872 set dummy cc; ac_word=$2
2873 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2874 $as_echo_n "checking for $ac_word... " >&6; }
2875 if test "${ac_cv_prog_CC+set}" = set; then
2876 $as_echo_n "(cached) " >&6
2877 else
2878 if test -n "$CC"; then
2879 ac_cv_prog_CC="$CC" # Let the user override the test.
2880 else
2881 ac_prog_rejected=no
2882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2883 for as_dir in $PATH
2884 do
2885 IFS=$as_save_IFS
2886 test -z "$as_dir" && as_dir=.
2887 for ac_exec_ext in '' $ac_executable_extensions; do
2888 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2889 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2890 ac_prog_rejected=yes
2891 continue
2892 fi
2893 ac_cv_prog_CC="cc"
2894 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2895 break 2
2896 fi
2897 done
2898 done
2899 IFS=$as_save_IFS
2900
2901 if test $ac_prog_rejected = yes; then
2902 # We found a bogon in the path, so make sure we never use it.
2903 set dummy $ac_cv_prog_CC
2904 shift
2905 if test $# != 0; then
2906 # We chose a different compiler from the bogus one.
2907 # However, it has the same basename, so the bogon will be chosen
2908 # first if we set CC to just the basename; use the full file name.
2909 shift
2910 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2911 fi
2912 fi
2913 fi
2914 fi
2915 CC=$ac_cv_prog_CC
2916 if test -n "$CC"; then
2917 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2918 $as_echo "$CC" >&6; }
2919 else
2920 { $as_echo "$as_me:$LINENO: result: no" >&5
2921 $as_echo "no" >&6; }
2922 fi
2923
2924
2925 fi
2926 if test -z "$CC"; then
2927 if test -n "$ac_tool_prefix"; then
2928 for ac_prog in cl.exe
2929 do
2930 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2931 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2932 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2933 $as_echo_n "checking for $ac_word... " >&6; }
2934 if test "${ac_cv_prog_CC+set}" = set; then
2935 $as_echo_n "(cached) " >&6
2936 else
2937 if test -n "$CC"; then
2938 ac_cv_prog_CC="$CC" # Let the user override the test.
2939 else
2940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2941 for as_dir in $PATH
2942 do
2943 IFS=$as_save_IFS
2944 test -z "$as_dir" && as_dir=.
2945 for ac_exec_ext in '' $ac_executable_extensions; do
2946 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2947 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2948 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2949 break 2
2950 fi
2951 done
2952 done
2953 IFS=$as_save_IFS
2954
2955 fi
2956 fi
2957 CC=$ac_cv_prog_CC
2958 if test -n "$CC"; then
2959 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2960 $as_echo "$CC" >&6; }
2961 else
2962 { $as_echo "$as_me:$LINENO: result: no" >&5
2963 $as_echo "no" >&6; }
2964 fi
2965
2966
2967 test -n "$CC" && break
2968 done
2969 fi
2970 if test -z "$CC"; then
2971 ac_ct_CC=$CC
2972 for ac_prog in cl.exe
2973 do
2974 # Extract the first word of "$ac_prog", so it can be a program name with args.
2975 set dummy $ac_prog; ac_word=$2
2976 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2977 $as_echo_n "checking for $ac_word... " >&6; }
2978 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2979 $as_echo_n "(cached) " >&6
2980 else
2981 if test -n "$ac_ct_CC"; then
2982 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2983 else
2984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2985 for as_dir in $PATH
2986 do
2987 IFS=$as_save_IFS
2988 test -z "$as_dir" && as_dir=.
2989 for ac_exec_ext in '' $ac_executable_extensions; do
2990 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2991 ac_cv_prog_ac_ct_CC="$ac_prog"
2992 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2993 break 2
2994 fi
2995 done
2996 done
2997 IFS=$as_save_IFS
2998
2999 fi
3000 fi
3001 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3002 if test -n "$ac_ct_CC"; then
3003 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3004 $as_echo "$ac_ct_CC" >&6; }
3005 else
3006 { $as_echo "$as_me:$LINENO: result: no" >&5
3007 $as_echo "no" >&6; }
3008 fi
3009
3010
3011 test -n "$ac_ct_CC" && break
3012 done
3013
3014 if test "x$ac_ct_CC" = x; then
3015 CC=""
3016 else
3017 case $cross_compiling:$ac_tool_warned in
3018 yes:)
3019 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
3020 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3021 ac_tool_warned=yes ;;
3022 esac
3023 CC=$ac_ct_CC
3024 fi
3025 fi
3026
3027 fi
3028
3029
3030 test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3031 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3032 { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3033 See \`config.log' for more details." >&5
3034 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH
3035 See \`config.log' for more details." >&2;}
3036 { (exit 1); exit 1; }; }; }
3037
3038 # Provide some information about the compiler.
3039 $as_echo "$as_me:$LINENO: checking for C compiler version" >&5
3040 set X $ac_compile
3041 ac_compiler=$2
3042 { (ac_try="$ac_compiler --version >&5"
3043 case "(($ac_try" in
3044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3045 *) ac_try_echo=$ac_try;;
3046 esac
3047 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3048 $as_echo "$ac_try_echo") >&5
3049 (eval "$ac_compiler --version >&5") 2>&5
3050 ac_status=$?
3051 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3052 (exit $ac_status); }
3053 { (ac_try="$ac_compiler -v >&5"
3054 case "(($ac_try" in
3055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3056 *) ac_try_echo=$ac_try;;
3057 esac
3058 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3059 $as_echo "$ac_try_echo") >&5
3060 (eval "$ac_compiler -v >&5") 2>&5
3061 ac_status=$?
3062 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3063 (exit $ac_status); }
3064 { (ac_try="$ac_compiler -V >&5"
3065 case "(($ac_try" in
3066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3067 *) ac_try_echo=$ac_try;;
3068 esac
3069 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3070 $as_echo "$ac_try_echo") >&5
3071 (eval "$ac_compiler -V >&5") 2>&5
3072 ac_status=$?
3073 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3074 (exit $ac_status); }
3075
3076 cat >conftest.$ac_ext <<_ACEOF
3077 /* confdefs.h. */
3078 _ACEOF
3079 cat confdefs.h >>conftest.$ac_ext
3080 cat >>conftest.$ac_ext <<_ACEOF
3081 /* end confdefs.h. */
3082
3083 int
3084 main ()
3085 {
3086
3087 ;
3088 return 0;
3089 }
3090 _ACEOF
3091 ac_clean_files_save=$ac_clean_files
3092 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3093 # Try to create an executable without -o first, disregard a.out.
3094 # It will help us diagnose broken compilers, and finding out an intuition
3095 # of exeext.
3096 { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3097 $as_echo_n "checking for C compiler default output file name... " >&6; }
3098 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3099
3100 # The possible output files:
3101 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3102
3103 ac_rmfiles=
3104 for ac_file in $ac_files
3105 do
3106 case $ac_file in
3107 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3108 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3109 esac
3110 done
3111 rm -f $ac_rmfiles
3112
3113 if { (ac_try="$ac_link_default"
3114 case "(($ac_try" in
3115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3116 *) ac_try_echo=$ac_try;;
3117 esac
3118 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3119 $as_echo "$ac_try_echo") >&5
3120 (eval "$ac_link_default") 2>&5
3121 ac_status=$?
3122 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3123 (exit $ac_status); }; then
3124 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3125 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3126 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3127 # so that the user can short-circuit this test for compilers unknown to
3128 # Autoconf.
3129 for ac_file in $ac_files ''
3130 do
3131 test -f "$ac_file" || continue
3132 case $ac_file in
3133 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3134 ;;
3135 [ab].out )
3136 # We found the default executable, but exeext='' is most
3137 # certainly right.
3138 break;;
3139 *.* )
3140 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3141 then :; else
3142 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3143 fi
3144 # We set ac_cv_exeext here because the later test for it is not
3145 # safe: cross compilers may not add the suffix if given an `-o'
3146 # argument, so we may need to know it at that point already.
3147 # Even if this section looks crufty: it has the advantage of
3148 # actually working.
3149 break;;
3150 * )
3151 break;;
3152 esac
3153 done
3154 test "$ac_cv_exeext" = no && ac_cv_exeext=
3155
3156 else
3157 ac_file=''
3158 fi
3159
3160 { $as_echo "$as_me:$LINENO: result: $ac_file" >&5
3161 $as_echo "$ac_file" >&6; }
3162 if test -z "$ac_file"; then
3163 $as_echo "$as_me: failed program was:" >&5
3164 sed 's/^/| /' conftest.$ac_ext >&5
3165
3166 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3167 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3168 { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
3169 See \`config.log' for more details." >&5
3170 $as_echo "$as_me: error: C compiler cannot create executables
3171 See \`config.log' for more details." >&2;}
3172 { (exit 77); exit 77; }; }; }
3173 fi
3174
3175 ac_exeext=$ac_cv_exeext
3176
3177 # Check that the compiler produces executables we can run. If not, either
3178 # the compiler is broken, or we cross compile.
3179 { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3180 $as_echo_n "checking whether the C compiler works... " >&6; }
3181 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3182 # If not cross compiling, check that we can run a simple program.
3183 if test "$cross_compiling" != yes; then
3184 if { ac_try='./$ac_file'
3185 { (case "(($ac_try" in
3186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3187 *) ac_try_echo=$ac_try;;
3188 esac
3189 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3190 $as_echo "$ac_try_echo") >&5
3191 (eval "$ac_try") 2>&5
3192 ac_status=$?
3193 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3194 (exit $ac_status); }; }; then
3195 cross_compiling=no
3196 else
3197 if test "$cross_compiling" = maybe; then
3198 cross_compiling=yes
3199 else
3200 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3201 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3202 { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
3203 If you meant to cross compile, use \`--host'.
3204 See \`config.log' for more details." >&5
3205 $as_echo "$as_me: error: cannot run C compiled programs.
3206 If you meant to cross compile, use \`--host'.
3207 See \`config.log' for more details." >&2;}
3208 { (exit 1); exit 1; }; }; }
3209 fi
3210 fi
3211 fi
3212 { $as_echo "$as_me:$LINENO: result: yes" >&5
3213 $as_echo "yes" >&6; }
3214
3215 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3216 ac_clean_files=$ac_clean_files_save
3217 # Check that the compiler produces executables we can run. If not, either
3218 # the compiler is broken, or we cross compile.
3219 { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3220 $as_echo_n "checking whether we are cross compiling... " >&6; }
3221 { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
3222 $as_echo "$cross_compiling" >&6; }
3223
3224 { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
3225 $as_echo_n "checking for suffix of executables... " >&6; }
3226 if { (ac_try="$ac_link"
3227 case "(($ac_try" in
3228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3229 *) ac_try_echo=$ac_try;;
3230 esac
3231 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3232 $as_echo "$ac_try_echo") >&5
3233 (eval "$ac_link") 2>&5
3234 ac_status=$?
3235 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3236 (exit $ac_status); }; then
3237 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3238 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3239 # work properly (i.e., refer to `conftest.exe'), while it won't with
3240 # `rm'.
3241 for ac_file in conftest.exe conftest conftest.*; do
3242 test -f "$ac_file" || continue
3243 case $ac_file in
3244 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3245 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3246 break;;
3247 * ) break;;
3248 esac
3249 done
3250 else
3251 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3252 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3253 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3254 See \`config.log' for more details." >&5
3255 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3256 See \`config.log' for more details." >&2;}
3257 { (exit 1); exit 1; }; }; }
3258 fi
3259
3260 rm -f conftest$ac_cv_exeext
3261 { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3262 $as_echo "$ac_cv_exeext" >&6; }
3263
3264 rm -f conftest.$ac_ext
3265 EXEEXT=$ac_cv_exeext
3266 ac_exeext=$EXEEXT
3267 { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
3268 $as_echo_n "checking for suffix of object files... " >&6; }
3269 if test "${ac_cv_objext+set}" = set; then
3270 $as_echo_n "(cached) " >&6
3271 else
3272 cat >conftest.$ac_ext <<_ACEOF
3273 /* confdefs.h. */
3274 _ACEOF
3275 cat confdefs.h >>conftest.$ac_ext
3276 cat >>conftest.$ac_ext <<_ACEOF
3277 /* end confdefs.h. */
3278
3279 int
3280 main ()
3281 {
3282
3283 ;
3284 return 0;
3285 }
3286 _ACEOF
3287 rm -f conftest.o conftest.obj
3288 if { (ac_try="$ac_compile"
3289 case "(($ac_try" in
3290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3291 *) ac_try_echo=$ac_try;;
3292 esac
3293 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3294 $as_echo "$ac_try_echo") >&5
3295 (eval "$ac_compile") 2>&5
3296 ac_status=$?
3297 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3298 (exit $ac_status); }; then
3299 for ac_file in conftest.o conftest.obj conftest.*; do
3300 test -f "$ac_file" || continue;
3301 case $ac_file in
3302 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3303 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3304 break;;
3305 esac
3306 done
3307 else
3308 $as_echo "$as_me: failed program was:" >&5
3309 sed 's/^/| /' conftest.$ac_ext >&5
3310
3311 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3312 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3313 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3314 See \`config.log' for more details." >&5
3315 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
3316 See \`config.log' for more details." >&2;}
3317 { (exit 1); exit 1; }; }; }
3318 fi
3319
3320 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3321 fi
3322 { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3323 $as_echo "$ac_cv_objext" >&6; }
3324 OBJEXT=$ac_cv_objext
3325 ac_objext=$OBJEXT
3326 { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3327 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3328 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3329 $as_echo_n "(cached) " >&6
3330 else
3331 cat >conftest.$ac_ext <<_ACEOF
3332 /* confdefs.h. */
3333 _ACEOF
3334 cat confdefs.h >>conftest.$ac_ext
3335 cat >>conftest.$ac_ext <<_ACEOF
3336 /* end confdefs.h. */
3337
3338 int
3339 main ()
3340 {
3341 #ifndef __GNUC__
3342 choke me
3343 #endif
3344
3345 ;
3346 return 0;
3347 }
3348 _ACEOF
3349 rm -f conftest.$ac_objext
3350 if { (ac_try="$ac_compile"
3351 case "(($ac_try" in
3352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3353 *) ac_try_echo=$ac_try;;
3354 esac
3355 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3356 $as_echo "$ac_try_echo") >&5
3357 (eval "$ac_compile") 2>conftest.er1
3358 ac_status=$?
3359 grep -v '^ *+' conftest.er1 >conftest.err
3360 rm -f conftest.er1
3361 cat conftest.err >&5
3362 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3363 (exit $ac_status); } && {
3364 test -z "$ac_c_werror_flag" ||
3365 test ! -s conftest.err
3366 } && test -s conftest.$ac_objext; then
3367 ac_compiler_gnu=yes
3368 else
3369 $as_echo "$as_me: failed program was:" >&5
3370 sed 's/^/| /' conftest.$ac_ext >&5
3371
3372 ac_compiler_gnu=no
3373 fi
3374
3375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3376 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3377
3378 fi
3379 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3380 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3381 if test $ac_compiler_gnu = yes; then
3382 GCC=yes
3383 else
3384 GCC=
3385 fi
3386 ac_test_CFLAGS=${CFLAGS+set}
3387 ac_save_CFLAGS=$CFLAGS
3388 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3389 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3390 if test "${ac_cv_prog_cc_g+set}" = set; then
3391 $as_echo_n "(cached) " >&6
3392 else
3393 ac_save_c_werror_flag=$ac_c_werror_flag
3394 ac_c_werror_flag=yes
3395 ac_cv_prog_cc_g=no
3396 CFLAGS="-g"
3397 cat >conftest.$ac_ext <<_ACEOF
3398 /* confdefs.h. */
3399 _ACEOF
3400 cat confdefs.h >>conftest.$ac_ext
3401 cat >>conftest.$ac_ext <<_ACEOF
3402 /* end confdefs.h. */
3403
3404 int
3405 main ()
3406 {
3407
3408 ;
3409 return 0;
3410 }
3411 _ACEOF
3412 rm -f conftest.$ac_objext
3413 if { (ac_try="$ac_compile"
3414 case "(($ac_try" in
3415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3416 *) ac_try_echo=$ac_try;;
3417 esac
3418 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3419 $as_echo "$ac_try_echo") >&5
3420 (eval "$ac_compile") 2>conftest.er1
3421 ac_status=$?
3422 grep -v '^ *+' conftest.er1 >conftest.err
3423 rm -f conftest.er1
3424 cat conftest.err >&5
3425 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3426 (exit $ac_status); } && {
3427 test -z "$ac_c_werror_flag" ||
3428 test ! -s conftest.err
3429 } && test -s conftest.$ac_objext; then
3430 ac_cv_prog_cc_g=yes
3431 else
3432 $as_echo "$as_me: failed program was:" >&5
3433 sed 's/^/| /' conftest.$ac_ext >&5
3434
3435 CFLAGS=""
3436 cat >conftest.$ac_ext <<_ACEOF
3437 /* confdefs.h. */
3438 _ACEOF
3439 cat confdefs.h >>conftest.$ac_ext
3440 cat >>conftest.$ac_ext <<_ACEOF
3441 /* end confdefs.h. */
3442
3443 int
3444 main ()
3445 {
3446
3447 ;
3448 return 0;
3449 }
3450 _ACEOF
3451 rm -f conftest.$ac_objext
3452 if { (ac_try="$ac_compile"
3453 case "(($ac_try" in
3454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3455 *) ac_try_echo=$ac_try;;
3456 esac
3457 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3458 $as_echo "$ac_try_echo") >&5
3459 (eval "$ac_compile") 2>conftest.er1
3460 ac_status=$?
3461 grep -v '^ *+' conftest.er1 >conftest.err
3462 rm -f conftest.er1
3463 cat conftest.err >&5
3464 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3465 (exit $ac_status); } && {
3466 test -z "$ac_c_werror_flag" ||
3467 test ! -s conftest.err
3468 } && test -s conftest.$ac_objext; then
3469 :
3470 else
3471 $as_echo "$as_me: failed program was:" >&5
3472 sed 's/^/| /' conftest.$ac_ext >&5
3473
3474 ac_c_werror_flag=$ac_save_c_werror_flag
3475 CFLAGS="-g"
3476 cat >conftest.$ac_ext <<_ACEOF
3477 /* confdefs.h. */
3478 _ACEOF
3479 cat confdefs.h >>conftest.$ac_ext
3480 cat >>conftest.$ac_ext <<_ACEOF
3481 /* end confdefs.h. */
3482
3483 int
3484 main ()
3485 {
3486
3487 ;
3488 return 0;
3489 }
3490 _ACEOF
3491 rm -f conftest.$ac_objext
3492 if { (ac_try="$ac_compile"
3493 case "(($ac_try" in
3494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3495 *) ac_try_echo=$ac_try;;
3496 esac
3497 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3498 $as_echo "$ac_try_echo") >&5
3499 (eval "$ac_compile") 2>conftest.er1
3500 ac_status=$?
3501 grep -v '^ *+' conftest.er1 >conftest.err
3502 rm -f conftest.er1
3503 cat conftest.err >&5
3504 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3505 (exit $ac_status); } && {
3506 test -z "$ac_c_werror_flag" ||
3507 test ! -s conftest.err
3508 } && test -s conftest.$ac_objext; then
3509 ac_cv_prog_cc_g=yes
3510 else
3511 $as_echo "$as_me: failed program was:" >&5
3512 sed 's/^/| /' conftest.$ac_ext >&5
3513
3514
3515 fi
3516
3517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3518 fi
3519
3520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3521 fi
3522
3523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3524 ac_c_werror_flag=$ac_save_c_werror_flag
3525 fi
3526 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3527 $as_echo "$ac_cv_prog_cc_g" >&6; }
3528 if test "$ac_test_CFLAGS" = set; then
3529 CFLAGS=$ac_save_CFLAGS
3530 elif test $ac_cv_prog_cc_g = yes; then
3531 if test "$GCC" = yes; then
3532 CFLAGS="-g -O2"
3533 else
3534 CFLAGS="-g"
3535 fi
3536 else
3537 if test "$GCC" = yes; then
3538 CFLAGS="-O2"
3539 else
3540 CFLAGS=
3541 fi
3542 fi
3543 { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3544 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3545 if test "${ac_cv_prog_cc_c89+set}" = set; then
3546 $as_echo_n "(cached) " >&6
3547 else
3548 ac_cv_prog_cc_c89=no
3549 ac_save_CC=$CC
3550 cat >conftest.$ac_ext <<_ACEOF
3551 /* confdefs.h. */
3552 _ACEOF
3553 cat confdefs.h >>conftest.$ac_ext
3554 cat >>conftest.$ac_ext <<_ACEOF
3555 /* end confdefs.h. */
3556 #include <stdarg.h>
3557 #include <stdio.h>
3558 #include <sys/types.h>
3559 #include <sys/stat.h>
3560 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3561 struct buf { int x; };
3562 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3563 static char *e (p, i)
3564 char **p;
3565 int i;
3566 {
3567 return p[i];
3568 }
3569 static char *f (char * (*g) (char **, int), char **p, ...)
3570 {
3571 char *s;
3572 va_list v;
3573 va_start (v,p);
3574 s = g (p, va_arg (v,int));
3575 va_end (v);
3576 return s;
3577 }
3578
3579 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3580 function prototypes and stuff, but not '\xHH' hex character constants.
3581 These don't provoke an error unfortunately, instead are silently treated
3582 as 'x'. The following induces an error, until -std is added to get
3583 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3584 array size at least. It's necessary to write '\x00'==0 to get something
3585 that's true only with -std. */
3586 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3587
3588 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3589 inside strings and character constants. */
3590 #define FOO(x) 'x'
3591 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3592
3593 int test (int i, double x);
3594 struct s1 {int (*f) (int a);};
3595 struct s2 {int (*f) (double a);};
3596 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3597 int argc;
3598 char **argv;
3599 int
3600 main ()
3601 {
3602 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3603 ;
3604 return 0;
3605 }
3606 _ACEOF
3607 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3608 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3609 do
3610 CC="$ac_save_CC $ac_arg"
3611 rm -f conftest.$ac_objext
3612 if { (ac_try="$ac_compile"
3613 case "(($ac_try" in
3614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3615 *) ac_try_echo=$ac_try;;
3616 esac
3617 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3618 $as_echo "$ac_try_echo") >&5
3619 (eval "$ac_compile") 2>conftest.er1
3620 ac_status=$?
3621 grep -v '^ *+' conftest.er1 >conftest.err
3622 rm -f conftest.er1
3623 cat conftest.err >&5
3624 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3625 (exit $ac_status); } && {
3626 test -z "$ac_c_werror_flag" ||
3627 test ! -s conftest.err
3628 } && test -s conftest.$ac_objext; then
3629 ac_cv_prog_cc_c89=$ac_arg
3630 else
3631 $as_echo "$as_me: failed program was:" >&5
3632 sed 's/^/| /' conftest.$ac_ext >&5
3633
3634
3635 fi
3636
3637 rm -f core conftest.err conftest.$ac_objext
3638 test "x$ac_cv_prog_cc_c89" != "xno" && break
3639 done
3640 rm -f conftest.$ac_ext
3641 CC=$ac_save_CC
3642
3643 fi
3644 # AC_CACHE_VAL
3645 case "x$ac_cv_prog_cc_c89" in
3646 x)
3647 { $as_echo "$as_me:$LINENO: result: none needed" >&5
3648 $as_echo "none needed" >&6; } ;;
3649 xno)
3650 { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3651 $as_echo "unsupported" >&6; } ;;
3652 *)
3653 CC="$CC $ac_cv_prog_cc_c89"
3654 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3655 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3656 esac
3657
3658
3659 ac_ext=c
3660 ac_cpp='$CPP $CPPFLAGS'
3661 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3662 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3663 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3664 DEPDIR="${am__leading_dot}deps"
3665
3666 ac_config_commands="$ac_config_commands depfiles"
3667
3668
3669 am_make=${MAKE-make}
3670 cat > confinc << 'END'
3671 am__doit:
3672 @echo this is the am__doit target
3673 .PHONY: am__doit
3674 END
3675 # If we don't find an include directive, just comment out the code.
3676 { $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
3677 $as_echo_n "checking for style of include used by $am_make... " >&6; }
3678 am__include="#"
3679 am__quote=
3680 _am_result=none
3681 # First try GNU make style include.
3682 echo "include confinc" > confmf
3683 # Ignore all kinds of additional output from `make'.
3684 case `$am_make -s -f confmf 2> /dev/null` in #(
3685 *the\ am__doit\ target*)
3686 am__include=include
3687 am__quote=
3688 _am_result=GNU
3689 ;;
3690 esac
3691 # Now try BSD make style include.
3692 if test "$am__include" = "#"; then
3693 echo '.include "confinc"' > confmf
3694 case `$am_make -s -f confmf 2> /dev/null` in #(
3695 *the\ am__doit\ target*)
3696 am__include=.include
3697 am__quote="\""
3698 _am_result=BSD
3699 ;;
3700 esac
3701 fi
3702
3703
3704 { $as_echo "$as_me:$LINENO: result: $_am_result" >&5
3705 $as_echo "$_am_result" >&6; }
3706 rm -f confinc confmf
3707
3708 # Check whether --enable-dependency-tracking was given.
3709 if test "${enable_dependency_tracking+set}" = set; then
3710 enableval=$enable_dependency_tracking;
3711 fi
3712
3713 if test "x$enable_dependency_tracking" != xno; then
3714 am_depcomp="$ac_aux_dir/depcomp"
3715 AMDEPBACKSLASH='\'
3716 fi
3717 if test "x$enable_dependency_tracking" != xno; then
3718 AMDEP_TRUE=
3719 AMDEP_FALSE='#'
3720 else
3721 AMDEP_TRUE='#'
3722 AMDEP_FALSE=
3723 fi
3724
3725
3726
3727 depcc="$CC" am_compiler_list=
3728
3729 { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
3730 $as_echo_n "checking dependency style of $depcc... " >&6; }
3731 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
3732 $as_echo_n "(cached) " >&6
3733 else
3734 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3735 # We make a subdir and do the tests there. Otherwise we can end up
3736 # making bogus files that we don't know about and never remove. For
3737 # instance it was reported that on HP-UX the gcc test will end up
3738 # making a dummy file named `D' -- because `-MD' means `put the output
3739 # in D'.
3740 mkdir conftest.dir
3741 # Copy depcomp to subdir because otherwise we won't find it if we're
3742 # using a relative directory.
3743 cp "$am_depcomp" conftest.dir
3744 cd conftest.dir
3745 # We will build objects and dependencies in a subdirectory because
3746 # it helps to detect inapplicable dependency modes. For instance
3747 # both Tru64's cc and ICC support -MD to output dependencies as a
3748 # side effect of compilation, but ICC will put the dependencies in
3749 # the current directory while Tru64 will put them in the object
3750 # directory.
3751 mkdir sub
3752
3753 am_cv_CC_dependencies_compiler_type=none
3754 if test "$am_compiler_list" = ""; then
3755 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3756 fi
3757 am__universal=false
3758 case " $depcc " in #(
3759 *\ -arch\ *\ -arch\ *) am__universal=true ;;
3760 esac
3761
3762 for depmode in $am_compiler_list; do
3763 # Setup a source with many dependencies, because some compilers
3764 # like to wrap large dependency lists on column 80 (with \), and
3765 # we should not choose a depcomp mode which is confused by this.
3766 #
3767 # We need to recreate these files for each test, as the compiler may
3768 # overwrite some of them when testing with obscure command lines.
3769 # This happens at least with the AIX C compiler.
3770 : > sub/conftest.c
3771 for i in 1 2 3 4 5 6; do
3772 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3773 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3774 # Solaris 8's {/usr,}/bin/sh.
3775 touch sub/conftst$i.h
3776 done
3777 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3778
3779 # We check with `-c' and `-o' for the sake of the "dashmstdout"
3780 # mode. It turns out that the SunPro C++ compiler does not properly
3781 # handle `-M -o', and we need to detect this. Also, some Intel
3782 # versions had trouble with output in subdirs
3783 am__obj=sub/conftest.${OBJEXT-o}
3784 am__minus_obj="-o $am__obj"
3785 case $depmode in
3786 gcc)
3787 # This depmode causes a compiler race in universal mode.
3788 test "$am__universal" = false || continue
3789 ;;
3790 nosideeffect)
3791 # after this tag, mechanisms are not by side-effect, so they'll
3792 # only be used when explicitly requested
3793 if test "x$enable_dependency_tracking" = xyes; then
3794 continue
3795 else
3796 break
3797 fi
3798 ;;
3799 msvisualcpp | msvcmsys)
3800 # This compiler won't grok `-c -o', but also, the minuso test has
3801 # not run yet. These depmodes are late enough in the game, and
3802 # so weak that their functioning should not be impacted.
3803 am__obj=conftest.${OBJEXT-o}
3804 am__minus_obj=
3805 ;;
3806 none) break ;;
3807 esac
3808 if depmode=$depmode \
3809 source=sub/conftest.c object=$am__obj \
3810 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3811 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3812 >/dev/null 2>conftest.err &&
3813 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3814 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3815 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3816 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3817 # icc doesn't choke on unknown options, it will just issue warnings
3818 # or remarks (even with -Werror). So we grep stderr for any message
3819 # that says an option was ignored or not supported.
3820 # When given -MP, icc 7.0 and 7.1 complain thusly:
3821 # icc: Command line warning: ignoring option '-M'; no argument required
3822 # The diagnosis changed in icc 8.0:
3823 # icc: Command line remark: option '-MP' not supported
3824 if (grep 'ignoring option' conftest.err ||
3825 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3826 am_cv_CC_dependencies_compiler_type=$depmode
3827 break
3828 fi
3829 fi
3830 done
3831
3832 cd ..
3833 rm -rf conftest.dir
3834 else
3835 am_cv_CC_dependencies_compiler_type=none
3836 fi
3837
3838 fi
3839 { $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
3840 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
3841 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
3842
3843 if
3844 test "x$enable_dependency_tracking" != xno \
3845 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
3846 am__fastdepCC_TRUE=
3847 am__fastdepCC_FALSE='#'
3848 else
3849 am__fastdepCC_TRUE='#'
3850 am__fastdepCC_FALSE=
3851 fi
3852
3853
3854 ac_ext=c
3855 ac_cpp='$CPP $CPPFLAGS'
3856 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3857 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3858 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3859 { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3860 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3861 # On Suns, sometimes $CPP names a directory.
3862 if test -n "$CPP" && test -d "$CPP"; then
3863 CPP=
3864 fi
3865 if test -z "$CPP"; then
3866 if test "${ac_cv_prog_CPP+set}" = set; then
3867 $as_echo_n "(cached) " >&6
3868 else
3869 # Double quotes because CPP needs to be expanded
3870 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3871 do
3872 ac_preproc_ok=false
3873 for ac_c_preproc_warn_flag in '' yes
3874 do
3875 # Use a header file that comes with gcc, so configuring glibc
3876 # with a fresh cross-compiler works.
3877 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3878 # <limits.h> exists even on freestanding compilers.
3879 # On the NeXT, cc -E runs the code through the compiler's parser,
3880 # not just through cpp. "Syntax error" is here to catch this case.
3881 cat >conftest.$ac_ext <<_ACEOF
3882 /* confdefs.h. */
3883 _ACEOF
3884 cat confdefs.h >>conftest.$ac_ext
3885 cat >>conftest.$ac_ext <<_ACEOF
3886 /* end confdefs.h. */
3887 #ifdef __STDC__
3888 # include <limits.h>
3889 #else
3890 # include <assert.h>
3891 #endif
3892 Syntax error
3893 _ACEOF
3894 if { (ac_try="$ac_cpp conftest.$ac_ext"
3895 case "(($ac_try" in
3896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3897 *) ac_try_echo=$ac_try;;
3898 esac
3899 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3900 $as_echo "$ac_try_echo") >&5
3901 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3902 ac_status=$?
3903 grep -v '^ *+' conftest.er1 >conftest.err
3904 rm -f conftest.er1
3905 cat conftest.err >&5
3906 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3907 (exit $ac_status); } >/dev/null && {
3908 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3909 test ! -s conftest.err
3910 }; then
3911 :
3912 else
3913 $as_echo "$as_me: failed program was:" >&5
3914 sed 's/^/| /' conftest.$ac_ext >&5
3915
3916 # Broken: fails on valid input.
3917 continue
3918 fi
3919
3920 rm -f conftest.err conftest.$ac_ext
3921
3922 # OK, works on sane cases. Now check whether nonexistent headers
3923 # can be detected and how.
3924 cat >conftest.$ac_ext <<_ACEOF
3925 /* confdefs.h. */
3926 _ACEOF
3927 cat confdefs.h >>conftest.$ac_ext
3928 cat >>conftest.$ac_ext <<_ACEOF
3929 /* end confdefs.h. */
3930 #include <ac_nonexistent.h>
3931 _ACEOF
3932 if { (ac_try="$ac_cpp conftest.$ac_ext"
3933 case "(($ac_try" in
3934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3935 *) ac_try_echo=$ac_try;;
3936 esac
3937 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3938 $as_echo "$ac_try_echo") >&5
3939 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3940 ac_status=$?
3941 grep -v '^ *+' conftest.er1 >conftest.err
3942 rm -f conftest.er1
3943 cat conftest.err >&5
3944 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3945 (exit $ac_status); } >/dev/null && {
3946 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3947 test ! -s conftest.err
3948 }; then
3949 # Broken: success on invalid input.
3950 continue
3951 else
3952 $as_echo "$as_me: failed program was:" >&5
3953 sed 's/^/| /' conftest.$ac_ext >&5
3954
3955 # Passes both tests.
3956 ac_preproc_ok=:
3957 break
3958 fi
3959
3960 rm -f conftest.err conftest.$ac_ext
3961
3962 done
3963 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3964 rm -f conftest.err conftest.$ac_ext
3965 if $ac_preproc_ok; then
3966 break
3967 fi
3968
3969 done
3970 ac_cv_prog_CPP=$CPP
3971
3972 fi
3973 CPP=$ac_cv_prog_CPP
3974 else
3975 ac_cv_prog_CPP=$CPP
3976 fi
3977 { $as_echo "$as_me:$LINENO: result: $CPP" >&5
3978 $as_echo "$CPP" >&6; }
3979 ac_preproc_ok=false
3980 for ac_c_preproc_warn_flag in '' yes
3981 do
3982 # Use a header file that comes with gcc, so configuring glibc
3983 # with a fresh cross-compiler works.
3984 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3985 # <limits.h> exists even on freestanding compilers.
3986 # On the NeXT, cc -E runs the code through the compiler's parser,
3987 # not just through cpp. "Syntax error" is here to catch this case.
3988 cat >conftest.$ac_ext <<_ACEOF
3989 /* confdefs.h. */
3990 _ACEOF
3991 cat confdefs.h >>conftest.$ac_ext
3992 cat >>conftest.$ac_ext <<_ACEOF
3993 /* end confdefs.h. */
3994 #ifdef __STDC__
3995 # include <limits.h>
3996 #else
3997 # include <assert.h>
3998 #endif
3999 Syntax error
4000 _ACEOF
4001 if { (ac_try="$ac_cpp conftest.$ac_ext"
4002 case "(($ac_try" in
4003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4004 *) ac_try_echo=$ac_try;;
4005 esac
4006 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4007 $as_echo "$ac_try_echo") >&5
4008 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4009 ac_status=$?
4010 grep -v '^ *+' conftest.er1 >conftest.err
4011 rm -f conftest.er1
4012 cat conftest.err >&5
4013 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4014 (exit $ac_status); } >/dev/null && {
4015 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4016 test ! -s conftest.err
4017 }; then
4018 :
4019 else
4020 $as_echo "$as_me: failed program was:" >&5
4021 sed 's/^/| /' conftest.$ac_ext >&5
4022
4023 # Broken: fails on valid input.
4024 continue
4025 fi
4026
4027 rm -f conftest.err conftest.$ac_ext
4028
4029 # OK, works on sane cases. Now check whether nonexistent headers
4030 # can be detected and how.
4031 cat >conftest.$ac_ext <<_ACEOF
4032 /* confdefs.h. */
4033 _ACEOF
4034 cat confdefs.h >>conftest.$ac_ext
4035 cat >>conftest.$ac_ext <<_ACEOF
4036 /* end confdefs.h. */
4037 #include <ac_nonexistent.h>
4038 _ACEOF
4039 if { (ac_try="$ac_cpp conftest.$ac_ext"
4040 case "(($ac_try" in
4041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4042 *) ac_try_echo=$ac_try;;
4043 esac
4044 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4045 $as_echo "$ac_try_echo") >&5
4046 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4047 ac_status=$?
4048 grep -v '^ *+' conftest.er1 >conftest.err
4049 rm -f conftest.er1
4050 cat conftest.err >&5
4051 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4052 (exit $ac_status); } >/dev/null && {
4053 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4054 test ! -s conftest.err
4055 }; then
4056 # Broken: success on invalid input.
4057 continue
4058 else
4059 $as_echo "$as_me: failed program was:" >&5
4060 sed 's/^/| /' conftest.$ac_ext >&5
4061
4062 # Passes both tests.
4063 ac_preproc_ok=:
4064 break
4065 fi
4066
4067 rm -f conftest.err conftest.$ac_ext
4068
4069 done
4070 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4071 rm -f conftest.err conftest.$ac_ext
4072 if $ac_preproc_ok; then
4073 :
4074 else
4075 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
4076 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4077 { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4078 See \`config.log' for more details." >&5
4079 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4080 See \`config.log' for more details." >&2;}
4081 { (exit 1); exit 1; }; }; }
4082 fi
4083
4084 ac_ext=c
4085 ac_cpp='$CPP $CPPFLAGS'
4086 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4087 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4088 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4089
4090 for ac_prog in gawk mawk nawk awk
4091 do
4092 # Extract the first word of "$ac_prog", so it can be a program name with args.
4093 set dummy $ac_prog; ac_word=$2
4094 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4095 $as_echo_n "checking for $ac_word... " >&6; }
4096 if test "${ac_cv_prog_AWK+set}" = set; then
4097 $as_echo_n "(cached) " >&6
4098 else
4099 if test -n "$AWK"; then
4100 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4101 else
4102 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4103 for as_dir in $PATH
4104 do
4105 IFS=$as_save_IFS
4106 test -z "$as_dir" && as_dir=.
4107 for ac_exec_ext in '' $ac_executable_extensions; do
4108 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4109 ac_cv_prog_AWK="$ac_prog"
4110 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4111 break 2
4112 fi
4113 done
4114 done
4115 IFS=$as_save_IFS
4116
4117 fi
4118 fi
4119 AWK=$ac_cv_prog_AWK
4120 if test -n "$AWK"; then
4121 { $as_echo "$as_me:$LINENO: result: $AWK" >&5
4122 $as_echo "$AWK" >&6; }
4123 else
4124 { $as_echo "$as_me:$LINENO: result: no" >&5
4125 $as_echo "no" >&6; }
4126 fi
4127
4128
4129 test -n "$AWK" && break
4130 done
4131
4132 { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
4133 $as_echo_n "checking whether ln -s works... " >&6; }
4134 LN_S=$as_ln_s
4135 if test "$LN_S" = "ln -s"; then
4136 { $as_echo "$as_me:$LINENO: result: yes" >&5
4137 $as_echo "yes" >&6; }
4138 else
4139 { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4140 $as_echo "no, using $LN_S" >&6; }
4141 fi
4142
4143 { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4144 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4145 set x ${MAKE-make}
4146 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4147 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
4148 $as_echo_n "(cached) " >&6
4149 else
4150 cat >conftest.make <<\_ACEOF
4151 SHELL = /bin/sh
4152 all:
4153 @echo '@@@%%%=$(MAKE)=@@@%%%'
4154 _ACEOF
4155 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4156 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4157 *@@@%%%=?*=@@@%%%*)
4158 eval ac_cv_prog_make_${ac_make}_set=yes;;
4159 *)
4160 eval ac_cv_prog_make_${ac_make}_set=no;;
4161 esac
4162 rm -f conftest.make
4163 fi
4164 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4165 { $as_echo "$as_me:$LINENO: result: yes" >&5
4166 $as_echo "yes" >&6; }
4167 SET_MAKE=
4168 else
4169 { $as_echo "$as_me:$LINENO: result: no" >&5
4170 $as_echo "no" >&6; }
4171 SET_MAKE="MAKE=${MAKE-make}"
4172 fi
4173
4174 # Find a good install program. We prefer a C program (faster),
4175 # so one script is as good as another. But avoid the broken or
4176 # incompatible versions:
4177 # SysV /etc/install, /usr/sbin/install
4178 # SunOS /usr/etc/install
4179 # IRIX /sbin/install
4180 # AIX /bin/install
4181 # AmigaOS /C/install, which installs bootblocks on floppy discs
4182 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4183 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4184 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4185 # OS/2's system install, which has a completely different semantic
4186 # ./install, which can be erroneously created by make from ./install.sh.
4187 # Reject install programs that cannot install multiple files.
4188 { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4189 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4190 if test -z "$INSTALL"; then
4191 if test "${ac_cv_path_install+set}" = set; then
4192 $as_echo_n "(cached) " >&6
4193 else
4194 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4195 for as_dir in $PATH
4196 do
4197 IFS=$as_save_IFS
4198 test -z "$as_dir" && as_dir=.
4199 # Account for people who put trailing slashes in PATH elements.
4200 case $as_dir/ in
4201 ./ | .// | /cC/* | \
4202 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4203 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4204 /usr/ucb/* ) ;;
4205 *)
4206 # OSF1 and SCO ODT 3.0 have their own names for install.
4207 # Don't use installbsd from OSF since it installs stuff as root
4208 # by default.
4209 for ac_prog in ginstall scoinst install; do
4210 for ac_exec_ext in '' $ac_executable_extensions; do
4211 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4212 if test $ac_prog = install &&
4213 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4214 # AIX install. It has an incompatible calling convention.
4215 :
4216 elif test $ac_prog = install &&
4217 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4218 # program-specific install script used by HP pwplus--don't use.
4219 :
4220 else
4221 rm -rf conftest.one conftest.two conftest.dir
4222 echo one > conftest.one
4223 echo two > conftest.two
4224 mkdir conftest.dir
4225 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4226 test -s conftest.one && test -s conftest.two &&
4227 test -s conftest.dir/conftest.one &&
4228 test -s conftest.dir/conftest.two
4229 then
4230 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4231 break 3
4232 fi
4233 fi
4234 fi
4235 done
4236 done
4237 ;;
4238 esac
4239
4240 done
4241 IFS=$as_save_IFS
4242
4243 rm -rf conftest.one conftest.two conftest.dir
4244
4245 fi
4246 if test "${ac_cv_path_install+set}" = set; then
4247 INSTALL=$ac_cv_path_install
4248 else
4249 # As a last resort, use the slow shell script. Don't cache a
4250 # value for INSTALL within a source directory, because that will
4251 # break other packages using the cache if that directory is
4252 # removed, or if the value is a relative name.
4253 INSTALL=$ac_install_sh
4254 fi
4255 fi
4256 { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
4257 $as_echo "$INSTALL" >&6; }
4258
4259 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4260 # It thinks the first close brace ends the variable substitution.
4261 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4262
4263 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4264
4265 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4266
4267
4268
4269 { $as_echo "$as_me:$LINENO: checking for __attribute__" >&5
4270 $as_echo_n "checking for __attribute__... " >&6; }
4271 if test "${ac_cv___attribute__+set}" = set; then
4272 $as_echo_n "(cached) " >&6
4273 else
4274
4275 cat >conftest.$ac_ext <<_ACEOF
4276 /* confdefs.h. */
4277 _ACEOF
4278 cat confdefs.h >>conftest.$ac_ext
4279 cat >>conftest.$ac_ext <<_ACEOF
4280 /* end confdefs.h. */
4281
4282 #include <stdlib.h>
4283 static void foo(void) __attribute__ ((noreturn));
4284
4285 static void
4286 foo(void)
4287 {
4288 exit(1);
4289 }
4290
4291 int
4292 main ()
4293 {
4294
4295
4296 ;
4297 return 0;
4298 }
4299 _ACEOF
4300 rm -f conftest.$ac_objext
4301 if { (ac_try="$ac_compile"
4302 case "(($ac_try" in
4303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4304 *) ac_try_echo=$ac_try;;
4305 esac
4306 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4307 $as_echo "$ac_try_echo") >&5
4308 (eval "$ac_compile") 2>conftest.er1
4309 ac_status=$?
4310 grep -v '^ *+' conftest.er1 >conftest.err
4311 rm -f conftest.er1
4312 cat conftest.err >&5
4313 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4314 (exit $ac_status); } && {
4315 test -z "$ac_c_werror_flag" ||
4316 test ! -s conftest.err
4317 } && test -s conftest.$ac_objext; then
4318 ac_cv___attribute__=yes
4319 else
4320 $as_echo "$as_me: failed program was:" >&5
4321 sed 's/^/| /' conftest.$ac_ext >&5
4322
4323 ac_cv___attribute__=no
4324 fi
4325
4326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4327 fi
4328
4329 if test "$ac_cv___attribute__" = "yes"; then
4330
4331 cat >>confdefs.h <<\_ACEOF
4332 #define HAVE___ATTRIBUTE__ 1
4333 _ACEOF
4334
4335 fi
4336 { $as_echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5
4337 $as_echo "$ac_cv___attribute__" >&6; }
4338
4339
4340
4341 # CMU GUESS RUNPATH SWITCH
4342 { $as_echo "$as_me:$LINENO: checking for runpath switch" >&5
4343 $as_echo_n "checking for runpath switch... " >&6; }
4344 if test "${andrew_cv_runpath_switch+set}" = set; then
4345 $as_echo_n "(cached) " >&6
4346 else
4347
4348 # first, try -R
4349 SAVE_LDFLAGS="${LDFLAGS}"
4350 LDFLAGS="-R /usr/lib"
4351 cat >conftest.$ac_ext <<_ACEOF
4352 /* confdefs.h. */
4353 _ACEOF
4354 cat confdefs.h >>conftest.$ac_ext
4355 cat >>conftest.$ac_ext <<_ACEOF
4356 /* end confdefs.h. */
4357
4358 int
4359 main ()
4360 {
4361
4362 ;
4363 return 0;
4364 }
4365 _ACEOF
4366 rm -f conftest.$ac_objext conftest$ac_exeext
4367 if { (ac_try="$ac_link"
4368 case "(($ac_try" in
4369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4370 *) ac_try_echo=$ac_try;;
4371 esac
4372 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4373 $as_echo "$ac_try_echo") >&5
4374 (eval "$ac_link") 2>conftest.er1
4375 ac_status=$?
4376 grep -v '^ *+' conftest.er1 >conftest.err
4377 rm -f conftest.er1
4378 cat conftest.err >&5
4379 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4380 (exit $ac_status); } && {
4381 test -z "$ac_c_werror_flag" ||
4382 test ! -s conftest.err
4383 } && test -s conftest$ac_exeext && {
4384 test "$cross_compiling" = yes ||
4385 $as_test_x conftest$ac_exeext
4386 }; then
4387 andrew_cv_runpath_switch="-R"
4388 else
4389 $as_echo "$as_me: failed program was:" >&5
4390 sed 's/^/| /' conftest.$ac_ext >&5
4391
4392
4393 LDFLAGS="-Wl,-rpath,/usr/lib"
4394 cat >conftest.$ac_ext <<_ACEOF
4395 /* confdefs.h. */
4396 _ACEOF
4397 cat confdefs.h >>conftest.$ac_ext
4398 cat >>conftest.$ac_ext <<_ACEOF
4399 /* end confdefs.h. */
4400
4401 int
4402 main ()
4403 {
4404
4405 ;
4406 return 0;
4407 }
4408 _ACEOF
4409 rm -f conftest.$ac_objext conftest$ac_exeext
4410 if { (ac_try="$ac_link"
4411 case "(($ac_try" in
4412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4413 *) ac_try_echo=$ac_try;;
4414 esac
4415 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4416 $as_echo "$ac_try_echo") >&5
4417 (eval "$ac_link") 2>conftest.er1
4418 ac_status=$?
4419 grep -v '^ *+' conftest.er1 >conftest.err
4420 rm -f conftest.er1
4421 cat conftest.err >&5
4422 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4423 (exit $ac_status); } && {
4424 test -z "$ac_c_werror_flag" ||
4425 test ! -s conftest.err
4426 } && test -s conftest$ac_exeext && {
4427 test "$cross_compiling" = yes ||
4428 $as_test_x conftest$ac_exeext
4429 }; then
4430 andrew_cv_runpath_switch="-Wl,-rpath,"
4431 else
4432 $as_echo "$as_me: failed program was:" >&5
4433 sed 's/^/| /' conftest.$ac_ext >&5
4434
4435 andrew_cv_runpath_switch="none"
4436 fi
4437
4438 rm -rf conftest.dSYM
4439 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4440 conftest$ac_exeext conftest.$ac_ext
4441
4442 fi
4443
4444 rm -rf conftest.dSYM
4445 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4446 conftest$ac_exeext conftest.$ac_ext
4447 LDFLAGS="${SAVE_LDFLAGS}"
4448
4449 fi
4450 { $as_echo "$as_me:$LINENO: result: $andrew_cv_runpath_switch" >&5
4451 $as_echo "$andrew_cv_runpath_switch" >&6; }
4452
4453
4454 # Check whether --with-staticsasl was given.
4455 if test "${with_staticsasl+set}" = set; then
4456 withval=$with_staticsasl;
4457 fi
4458
4459 if test "$with_staticsasl" = yes; then
4460 enable_shared=yes
4461 enable_static=yes
4462 fi
4463
4464 save_target=$target
4465 if test -z "$target"; then
4466 target="NONE"
4467 fi
4468
4469 # new libtool
4470 # Check whether --enable-static was given.
4471 if test "${enable_static+set}" = set; then
4472 enableval=$enable_static; p=${PACKAGE-default}
4473 case "$enableval" in
4474 yes) enable_static=yes ;;
4475 no) enable_static=no ;;
4476 *)
4477 enable_static=no
4478 # Look at the argument we got. We use all the common list separators.
4479 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4480 for pkg in $enableval; do
4481 if test "X$pkg" = "X$p"; then
4482 enable_static=yes
4483 fi
4484 done
4485 IFS="$ac_save_ifs"
4486 ;;
4487 esac
4488 else
4489 enable_static=no
4490 fi
4491
4492 # Check whether --enable-shared was given.
4493 if test "${enable_shared+set}" = set; then
4494 enableval=$enable_shared; p=${PACKAGE-default}
4495 case "$enableval" in
4496 yes) enable_shared=yes ;;
4497 no) enable_shared=no ;;
4498 *)
4499 enable_shared=no
4500 # Look at the argument we got. We use all the common list separators.
4501 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4502 for pkg in $enableval; do
4503 if test "X$pkg" = "X$p"; then
4504 enable_shared=yes
4505 fi
4506 done
4507 IFS="$ac_save_ifs"
4508 ;;
4509 esac
4510 else
4511 enable_shared=yes
4512 fi
4513
4514 # Check whether --enable-fast-install was given.
4515 if test "${enable_fast_install+set}" = set; then
4516 enableval=$enable_fast_install; p=${PACKAGE-default}
4517 case "$enableval" in
4518 yes) enable_fast_install=yes ;;
4519 no) enable_fast_install=no ;;
4520 *)
4521 enable_fast_install=no
4522 # Look at the argument we got. We use all the common list separators.
4523 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4524 for pkg in $enableval; do
4525 if test "X$pkg" = "X$p"; then
4526 enable_fast_install=yes
4527 fi
4528 done
4529 IFS="$ac_save_ifs"
4530 ;;
4531 esac
4532 else
4533 enable_fast_install=yes
4534 fi
4535
4536 if test -n "$ac_tool_prefix"; then
4537 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4538 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4539 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4540 $as_echo_n "checking for $ac_word... " >&6; }
4541 if test "${ac_cv_prog_RANLIB+set}" = set; then
4542 $as_echo_n "(cached) " >&6
4543 else
4544 if test -n "$RANLIB"; then
4545 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4546 else
4547 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4548 for as_dir in $PATH
4549 do
4550 IFS=$as_save_IFS
4551 test -z "$as_dir" && as_dir=.
4552 for ac_exec_ext in '' $ac_executable_extensions; do
4553 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4554 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4555 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4556 break 2
4557 fi
4558 done
4559 done
4560 IFS=$as_save_IFS
4561
4562 fi
4563 fi
4564 RANLIB=$ac_cv_prog_RANLIB
4565 if test -n "$RANLIB"; then
4566 { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
4567 $as_echo "$RANLIB" >&6; }
4568 else
4569 { $as_echo "$as_me:$LINENO: result: no" >&5
4570 $as_echo "no" >&6; }
4571 fi
4572
4573
4574 fi
4575 if test -z "$ac_cv_prog_RANLIB"; then
4576 ac_ct_RANLIB=$RANLIB
4577 # Extract the first word of "ranlib", so it can be a program name with args.
4578 set dummy ranlib; ac_word=$2
4579 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4580 $as_echo_n "checking for $ac_word... " >&6; }
4581 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4582 $as_echo_n "(cached) " >&6
4583 else
4584 if test -n "$ac_ct_RANLIB"; then
4585 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4586 else
4587 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4588 for as_dir in $PATH
4589 do
4590 IFS=$as_save_IFS
4591 test -z "$as_dir" && as_dir=.
4592 for ac_exec_ext in '' $ac_executable_extensions; do
4593 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4594 ac_cv_prog_ac_ct_RANLIB="ranlib"
4595 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4596 break 2
4597 fi
4598 done
4599 done
4600 IFS=$as_save_IFS
4601
4602 fi
4603 fi
4604 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4605 if test -n "$ac_ct_RANLIB"; then
4606 { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4607 $as_echo "$ac_ct_RANLIB" >&6; }
4608 else
4609 { $as_echo "$as_me:$LINENO: result: no" >&5
4610 $as_echo "no" >&6; }
4611 fi
4612
4613 if test "x$ac_ct_RANLIB" = x; then
4614 RANLIB=":"
4615 else
4616 case $cross_compiling:$ac_tool_warned in
4617 yes:)
4618 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
4619 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4620 ac_tool_warned=yes ;;
4621 esac
4622 RANLIB=$ac_ct_RANLIB
4623 fi
4624 else
4625 RANLIB="$ac_cv_prog_RANLIB"
4626 fi
4627
4628
4629 # Check whether --with-gnu-ld was given.
4630 if test "${with_gnu_ld+set}" = set; then
4631 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
4632 else
4633 with_gnu_ld=no
4634 fi
4635
4636 ac_prog=ld
4637 if test "$ac_cv_c_compiler_gnu" = yes; then
4638 # Check if gcc -print-prog-name=ld gives a path.
4639 { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5
4640 $as_echo_n "checking for ld used by GCC... " >&6; }
4641 ac_prog=`($CC -print-prog-name=ld) 2>&5`
4642 case "$ac_prog" in
4643 # Accept absolute paths.
4644 [\\/]* | [A-Za-z]:[\\/]*)
4645 re_direlt='/[^/][^/]*/\.\./'
4646 # Canonicalize the path of ld
4647 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4648 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4649 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4650 done
4651 test -z "$LD" && LD="$ac_prog"
4652 ;;
4653 "")
4654 # If it fails, then pretend we aren't using GCC.
4655 ac_prog=ld
4656 ;;
4657 *)
4658 # If it is relative, then search for the first ld in PATH.
4659 with_gnu_ld=unknown
4660 ;;
4661 esac
4662 elif test "$with_gnu_ld" = yes; then
4663 { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
4664 $as_echo_n "checking for GNU ld... " >&6; }
4665 else
4666 { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4667 $as_echo_n "checking for non-GNU ld... " >&6; }
4668 fi
4669 if test "${ac_cv_path_LD+set}" = set; then
4670 $as_echo_n "(cached) " >&6
4671 else
4672 if test -z "$LD"; then
4673 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4674 for ac_dir in $PATH; do
4675 test -z "$ac_dir" && ac_dir=.
4676 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4677 ac_cv_path_LD="$ac_dir/$ac_prog"
4678 # Check to see if the program is GNU ld. I'd rather use --version,
4679 # but apparently some GNU ld's only accept -v.
4680 # Break only if it was the GNU/non-GNU ld that we prefer.
4681 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4682 test "$with_gnu_ld" != no && break
4683 else
4684 test "$with_gnu_ld" != yes && break
4685 fi
4686 fi
4687 done
4688 IFS="$ac_save_ifs"
4689 else
4690 ac_cv_path_LD="$LD" # Let the user override the test with a path.
4691 fi
4692 fi
4693
4694 LD="$ac_cv_path_LD"
4695 if test -n "$LD"; then
4696 { $as_echo "$as_me:$LINENO: result: $LD" >&5
4697 $as_echo "$LD" >&6; }
4698 else
4699 { $as_echo "$as_me:$LINENO: result: no" >&5
4700 $as_echo "no" >&6; }
4701 fi
4702 test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4703 $as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4704 { (exit 1); exit 1; }; }
4705 { $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4706 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
4707 if test "${ac_cv_prog_gnu_ld+set}" = set; then
4708 $as_echo_n "(cached) " >&6
4709 else
4710 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
4711 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4712 ac_cv_prog_gnu_ld=yes
4713 else
4714 ac_cv_prog_gnu_ld=no
4715 fi
4716 fi
4717 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_ld" >&5
4718 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
4719
4720
4721 { $as_echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
4722 $as_echo_n "checking for BSD-compatible nm... " >&6; }
4723 if test "${ac_cv_path_NM+set}" = set; then
4724 $as_echo_n "(cached) " >&6
4725 else
4726 if test -n "$NM"; then
4727 # Let the user override the test.
4728 ac_cv_path_NM="$NM"
4729 else
4730 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4731 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4732 test -z "$ac_dir" && ac_dir=.
4733 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
4734 # Check to see if the nm accepts a BSD-compat flag.
4735 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4736 # nm: unknown option "B" ignored
4737 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4738 ac_cv_path_NM="$ac_dir/nm -B"
4739 break
4740 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4741 ac_cv_path_NM="$ac_dir/nm -p"
4742 break
4743 else
4744 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
4745 continue # so that we can try to find one that supports BSD flags
4746 fi
4747 fi
4748 done
4749 IFS="$ac_save_ifs"
4750 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
4751 fi
4752 fi
4753
4754 NM="$ac_cv_path_NM"
4755 { $as_echo "$as_me:$LINENO: result: $NM" >&5
4756 $as_echo "$NM" >&6; }
4757
4758
4759 case "$target" in
4760 NONE) lt_target="$host" ;;
4761 *) lt_target="$target" ;;
4762 esac
4763
4764 # Check for any special flags to pass to ltconfig.
4765 libtool_flags="--cache-file=$cache_file"
4766 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
4767 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
4768 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
4769 test "$ac_cv_c_compiler_gnu" = yes && libtool_flags="$libtool_flags --with-gcc"
4770 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
4771
4772
4773 # Check whether --enable-libtool-lock was given.
4774 if test "${enable_libtool_lock+set}" = set; then
4775 enableval=$enable_libtool_lock;
4776 fi
4777
4778 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
4779 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
4780
4781 # Some flags need to be propagated to the compiler or linker for good
4782 # libtool support.
4783 case "$lt_target" in
4784 *-*-irix6*)
4785 # Find out which ABI we are using.
4786 echo '#line 4787 "configure"' > conftest.$ac_ext
4787 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4788 (eval $ac_compile) 2>&5
4789 ac_status=$?
4790 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4791 (exit $ac_status); }; then
4792 case "`/usr/bin/file conftest.o`" in
4793 *32-bit*)
4794 LD="${LD-ld} -32"
4795 ;;
4796 *N32*)
4797 LD="${LD-ld} -n32"
4798 ;;
4799 *64-bit*)
4800 LD="${LD-ld} -64"
4801 ;;
4802 esac
4803 fi
4804 rm -rf conftest*
4805 ;;
4806
4807 *-*-sco3.2v5*)
4808 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4809 SAVE_CFLAGS="$CFLAGS"
4810 CFLAGS="$CFLAGS -belf"
4811 { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
4812 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
4813 if test "${lt_cv_cc_needs_belf+set}" = set; then
4814 $as_echo_n "(cached) " >&6
4815 else
4816 cat >conftest.$ac_ext <<_ACEOF
4817 /* confdefs.h. */
4818 _ACEOF
4819 cat confdefs.h >>conftest.$ac_ext
4820 cat >>conftest.$ac_ext <<_ACEOF
4821 /* end confdefs.h. */
4822
4823 int
4824 main ()
4825 {
4826
4827 ;
4828 return 0;
4829 }
4830 _ACEOF
4831 rm -f conftest.$ac_objext conftest$ac_exeext
4832 if { (ac_try="$ac_link"
4833 case "(($ac_try" in
4834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4835 *) ac_try_echo=$ac_try;;
4836 esac
4837 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4838 $as_echo "$ac_try_echo") >&5
4839 (eval "$ac_link") 2>conftest.er1
4840 ac_status=$?
4841 grep -v '^ *+' conftest.er1 >conftest.err
4842 rm -f conftest.er1
4843 cat conftest.err >&5
4844 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4845 (exit $ac_status); } && {
4846 test -z "$ac_c_werror_flag" ||
4847 test ! -s conftest.err
4848 } && test -s conftest$ac_exeext && {
4849 test "$cross_compiling" = yes ||
4850 $as_test_x conftest$ac_exeext
4851 }; then
4852 lt_cv_cc_needs_belf=yes
4853 else
4854 $as_echo "$as_me: failed program was:" >&5
4855 sed 's/^/| /' conftest.$ac_ext >&5
4856
4857 lt_cv_cc_needs_belf=no
4858 fi
4859
4860 rm -rf conftest.dSYM
4861 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4862 conftest$ac_exeext conftest.$ac_ext
4863 fi
4864 { $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
4865 $as_echo "$lt_cv_cc_needs_belf" >&6; }
4866 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4867 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4868 CFLAGS="$SAVE_CFLAGS"
4869 fi
4870 ;;
4871
4872
4873 esac
4874
4875
4876 # Save cache, so that ltconfig can load it
4877 cat >confcache <<\_ACEOF
4878 # This file is a shell script that caches the results of configure
4879 # tests run on this system so they can be shared between configure
4880 # scripts and configure runs, see configure's option --config-cache.
4881 # It is not useful on other systems. If it contains results you don't
4882 # want to keep, you may remove or edit it.
4883 #
4884 # config.status only pays attention to the cache file if you give it
4885 # the --recheck option to rerun configure.
4886 #
4887 # `ac_cv_env_foo' variables (set or unset) will be overridden when
4888 # loading this file, other *unset* `ac_cv_foo' will be assigned the
4889 # following values.
4890
4891 _ACEOF
4892
4893 # The following way of writing the cache mishandles newlines in values,
4894 # but we know of no workaround that is simple, portable, and efficient.
4895 # So, we kill variables containing newlines.
4896 # Ultrix sh set writes to stderr and can't be redirected directly,
4897 # and sets the high bit in the cache file unless we assign to the vars.
4898 (
4899 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
4900 eval ac_val=\$$ac_var
4901 case $ac_val in #(
4902 *${as_nl}*)
4903 case $ac_var in #(
4904 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
4905 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
4906 esac
4907 case $ac_var in #(
4908 _ | IFS | as_nl) ;; #(
4909 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
4910 *) $as_unset $ac_var ;;
4911 esac ;;
4912 esac
4913 done
4914
4915 (set) 2>&1 |
4916 case $as_nl`(ac_space=' '; set) 2>&1` in #(
4917 *${as_nl}ac_space=\ *)
4918 # `set' does not quote correctly, so add quotes (double-quote
4919 # substitution turns \\\\ into \\, and sed turns \\ into \).
4920 sed -n \
4921 "s/'/'\\\\''/g;
4922 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
4923 ;; #(
4924 *)
4925 # `set' quotes correctly as required by POSIX, so do not add quotes.
4926 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
4927 ;;
4928 esac |
4929 sort
4930 ) |
4931 sed '
4932 /^ac_cv_env_/b end
4933 t clear
4934 :clear
4935 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
4936 t end
4937 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
4938 :end' >>confcache
4939 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
4940 if test -w "$cache_file"; then
4941 test "x$cache_file" != "x/dev/null" &&
4942 { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
4943 $as_echo "$as_me: updating cache $cache_file" >&6;}
4944 cat confcache >$cache_file
4945 else
4946 { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
4947 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
4948 fi
4949 fi
4950 rm -f confcache
4951
4952 # Actually configure libtool. ac_aux_dir is where install-sh is found.
4953 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
4954 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
4955 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
4956 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
4957 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
4958 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
4959 || { { $as_echo "$as_me:$LINENO: error: libtool configure failed" >&5
4960 $as_echo "$as_me: error: libtool configure failed" >&2;}
4961 { (exit 1); exit 1; }; }
4962
4963 # Reload cache, that may have been modified by ltconfig
4964 if test -r "$cache_file"; then
4965 # Some versions of bash will fail to source /dev/null (special
4966 # files actually), so we avoid doing that.
4967 if test -f "$cache_file"; then
4968 { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
4969 $as_echo "$as_me: loading cache $cache_file" >&6;}
4970 case $cache_file in
4971 [\\/]* | ?:[\\/]* ) . "$cache_file";;
4972 *) . "./$cache_file";;
4973 esac
4974 fi
4975 else
4976 { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
4977 $as_echo "$as_me: creating cache $cache_file" >&6;}
4978 >$cache_file
4979 fi
4980
4981
4982 # This can be used to rebuild libtool when needed
4983 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
4984
4985 # Always use our own libtool.
4986 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
4987
4988 # Redirect the config.log output again, so that the ltconfig log is not
4989 # clobbered by the next message.
4990 exec 5>>./config.log
4991
4992
4993 target=$save_target
4994
4995 if test "$enable_static" = yes; then
4996 SASL_STATIC_LIBS=libsasl2.a
4997 else
4998 SASL_STATIC_LIBS=
4999 fi
5000
5001 # Check whether --enable-staticdlopen was given.
5002 if test "${enable_staticdlopen+set}" = set; then
5003 enableval=$enable_staticdlopen; enable_staticdlopen=$enableval
5004 else
5005 enable_staticdlopen=no
5006 fi
5007
5008
5009 if test "$enable_staticdlopen" = yes; then
5010
5011 cat >>confdefs.h <<\_ACEOF
5012 #define TRY_DLOPEN_WHEN_STATIC /**/
5013 _ACEOF
5014
5015 fi
5016
5017 if test "$ac_cv_c_compiler_gnu" = yes; then
5018 CFLAGS="-Wall -W ${CFLAGS}"
5019 fi
5020
5021
5022 # Check whether --with-purecov was given.
5023 if test "${with_purecov+set}" = set; then
5024 withval=$with_purecov;
5025 fi
5026
5027 if test "$with_purecov" = yes; then
5028 for ac_prog in purecov
5029 do
5030 # Extract the first word of "$ac_prog", so it can be a program name with args.
5031 set dummy $ac_prog; ac_word=$2
5032 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5033 $as_echo_n "checking for $ac_word... " >&6; }
5034 if test "${ac_cv_prog_PURECOV+set}" = set; then
5035 $as_echo_n "(cached) " >&6
5036 else
5037 if test -n "$PURECOV"; then
5038 ac_cv_prog_PURECOV="$PURECOV" # Let the user override the test.
5039 else
5040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5041 for as_dir in $PATH
5042 do
5043 IFS=$as_save_IFS
5044 test -z "$as_dir" && as_dir=.
5045 for ac_exec_ext in '' $ac_executable_extensions; do
5046 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5047 ac_cv_prog_PURECOV="$ac_prog"
5048 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5049 break 2
5050 fi
5051 done
5052 done
5053 IFS=$as_save_IFS
5054
5055 fi
5056 fi
5057 PURECOV=$ac_cv_prog_PURECOV
5058 if test -n "$PURECOV"; then
5059 { $as_echo "$as_me:$LINENO: result: $PURECOV" >&5
5060 $as_echo "$PURECOV" >&6; }
5061 else
5062 { $as_echo "$as_me:$LINENO: result: no" >&5
5063 $as_echo "no" >&6; }
5064 fi
5065
5066
5067 test -n "$PURECOV" && break
5068 done
5069
5070 fi
5071
5072 # Check whether --with-purify was given.
5073 if test "${with_purify+set}" = set; then
5074 withval=$with_purify;
5075 fi
5076
5077 if test "$with_purify" = yes; then
5078 for ac_prog in purify
5079 do
5080 # Extract the first word of "$ac_prog", so it can be a program name with args.
5081 set dummy $ac_prog; ac_word=$2
5082 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5083 $as_echo_n "checking for $ac_word... " >&6; }
5084 if test "${ac_cv_prog_PURIFY+set}" = set; then
5085 $as_echo_n "(cached) " >&6
5086 else
5087 if test -n "$PURIFY"; then
5088 ac_cv_prog_PURIFY="$PURIFY" # Let the user override the test.
5089 else
5090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5091 for as_dir in $PATH
5092 do
5093 IFS=$as_save_IFS
5094 test -z "$as_dir" && as_dir=.
5095 for ac_exec_ext in '' $ac_executable_extensions; do
5096 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5097 ac_cv_prog_PURIFY="$ac_prog"
5098 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5099 break 2
5100 fi
5101 done
5102 done
5103 IFS=$as_save_IFS
5104
5105 fi
5106 fi
5107 PURIFY=$ac_cv_prog_PURIFY
5108 if test -n "$PURIFY"; then
5109 { $as_echo "$as_me:$LINENO: result: $PURIFY" >&5
5110 $as_echo "$PURIFY" >&6; }
5111 else
5112 { $as_echo "$as_me:$LINENO: result: no" >&5
5113 $as_echo "no" >&6; }
5114 fi
5115
5116
5117 test -n "$PURIFY" && break
5118 done
5119
5120 fi
5121
5122 # Check whether --enable-java was given.
5123 if test "${enable_java+set}" = set; then
5124 enableval=$enable_java; enable_java=$enableval
5125 else
5126 enable_java=no
5127 fi
5128
5129 if test "$enable_java" = yes; then
5130 # Extract the first word of "javac", so it can be a program name with args.
5131 set dummy javac; ac_word=$2
5132 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5133 $as_echo_n "checking for $ac_word... " >&6; }
5134 if test "${ac_cv_path_JAVAC+set}" = set; then
5135 $as_echo_n "(cached) " >&6
5136 else
5137 case $JAVAC in
5138 [\\/]* | ?:[\\/]*)
5139 ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
5140 ;;
5141 *)
5142 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5143 for as_dir in $PATH
5144 do
5145 IFS=$as_save_IFS
5146 test -z "$as_dir" && as_dir=.
5147 for ac_exec_ext in '' $ac_executable_extensions; do
5148 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5149 ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
5150 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5151 break 2
5152 fi
5153 done
5154 done
5155 IFS=$as_save_IFS
5156
5157 test -z "$ac_cv_path_JAVAC" && ac_cv_path_JAVAC="no"
5158 ;;
5159 esac
5160 fi
5161 JAVAC=$ac_cv_path_JAVAC
5162 if test -n "$JAVAC"; then
5163 { $as_echo "$as_me:$LINENO: result: $JAVAC" >&5
5164 $as_echo "$JAVAC" >&6; }
5165 else
5166 { $as_echo "$as_me:$LINENO: result: no" >&5
5167 $as_echo "no" >&6; }
5168 fi
5169
5170
5171 for ac_prog in javah kaffeh
5172 do
5173 # Extract the first word of "$ac_prog", so it can be a program name with args.
5174 set dummy $ac_prog; ac_word=$2
5175 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5176 $as_echo_n "checking for $ac_word... " >&6; }
5177 if test "${ac_cv_path_JAVAH+set}" = set; then
5178 $as_echo_n "(cached) " >&6
5179 else
5180 case $JAVAH in
5181 [\\/]* | ?:[\\/]*)
5182 ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
5183 ;;
5184 *)
5185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5186 for as_dir in $PATH
5187 do
5188 IFS=$as_save_IFS
5189 test -z "$as_dir" && as_dir=.
5190 for ac_exec_ext in '' $ac_executable_extensions; do
5191 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5192 ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
5193 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5194 break 2
5195 fi
5196 done
5197 done
5198 IFS=$as_save_IFS
5199
5200 ;;
5201 esac
5202 fi
5203 JAVAH=$ac_cv_path_JAVAH
5204 if test -n "$JAVAH"; then
5205 { $as_echo "$as_me:$LINENO: result: $JAVAH" >&5
5206 $as_echo "$JAVAH" >&6; }
5207 else
5208 { $as_echo "$as_me:$LINENO: result: no" >&5
5209 $as_echo "no" >&6; }
5210 fi
5211
5212
5213 test -n "$JAVAH" && break
5214 done
5215 test -n "$JAVAH" || JAVAH="no"
5216
5217 for ac_prog in javadoc
5218 do
5219 # Extract the first word of "$ac_prog", so it can be a program name with args.
5220 set dummy $ac_prog; ac_word=$2
5221 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
5222 $as_echo_n "checking for $ac_word... " >&6; }
5223 if test "${ac_cv_prog_JAVADOC+set}" = set; then
5224 $as_echo_n "(cached) " >&6
5225 else
5226 if test -n "$JAVADOC"; then
5227 ac_cv_prog_JAVADOC="$JAVADOC" # Let the user override the test.
5228 else
5229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5230 for as_dir in $PATH
5231 do
5232 IFS=$as_save_IFS
5233 test -z "$as_dir" && as_dir=.
5234 for ac_exec_ext in '' $ac_executable_extensions; do
5235 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5236 ac_cv_prog_JAVADOC="$ac_prog"
5237 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5238 break 2
5239 fi
5240 done
5241 done
5242 IFS=$as_save_IFS
5243
5244 fi
5245 fi
5246 JAVADOC=$ac_cv_prog_JAVADOC
5247 if test -n "$JAVADOC"; then
5248 { $as_echo "$as_me:$LINENO: result: $JAVADOC" >&5
5249 $as_echo "$JAVADOC" >&6; }
5250 else
5251 { $as_echo "$as_me:$LINENO: result: no" >&5
5252 $as_echo "no" >&6; }
5253 fi
5254
5255
5256 test -n "$JAVADOC" && break
5257 done
5258 test -n "$JAVADOC" || JAVADOC=":"
5259
5260 if test "$JAVAC" = "no" -o "$JAVAH" = "no"; then
5261 { $as_echo "$as_me:$LINENO: WARNING: Disabling Java support" >&5
5262 $as_echo "$as_me: WARNING: Disabling Java support" >&2;}
5263 enable_java=no
5264 fi
5265 else
5266 # Make distcheck work
5267 JAVAC="true"
5268 JAVAH="true"
5269 JAVADOC="true"
5270 fi
5271 if test "$enable_java" = yes; then
5272 JAVA_TRUE=
5273 JAVA_FALSE='#'
5274 else
5275 JAVA_TRUE='#'
5276 JAVA_FALSE=
5277 fi
5278
5279
5280 if test "$enable_java" = yes; then
5281 { $as_echo "$as_me:$LINENO: checking JNI cpp flags" >&5
5282 $as_echo_n "checking JNI cpp flags... " >&6; }
5283 if test "${sasl_cv_java_includes+set}" = set; then
5284 $as_echo_n "(cached) " >&6
5285 else
5286
5287 if test `echo $JAVAH | sed 's,.*/,,'` = "kaffeh"; then
5288 sasl_cv_java_includes=-I`echo $JAVAH | sed -e 's,/bin.*,/include/kaffe,'`
5289 else
5290 java_base=`echo $JAVAC | sed 's,/bin.*,'','`
5291
5292
5293 # Check whether --with-javabase was given.
5294 if test "${with_javabase+set}" = set; then
5295 withval=$with_javabase; java_base=$withval
5296 fi
5297
5298
5299
5300 sasl_cv_java_includes=''
5301 for dir in `find ${java_base}/include -follow -type d -print | grep -v green_threads`; do
5302 sasl_cv_java_includes="${sasl_cv_java_includes} -I$dir"
5303 done
5304 fi
5305
5306 sasl_cv_java_includes="${sasl_cv_java_includes} -I$javapath/include"
5307 fi
5308
5309
5310 JAVA_INCLUDES=$sasl_cv_java_includes
5311
5312 { $as_echo "$as_me:$LINENO: result: ok" >&5
5313 $as_echo "ok" >&6; }
5314
5315 JAVAROOT=".."
5316
5317 JAVAC=`echo "$JAVAC" | sed 's,.*/,,'`
5318 JAVAH=`echo "$JAVAH" | sed 's,.*/,,'`
5319 fi
5320
5321 if test "$enable_sample" = yes; then
5322 SAMPLE_TRUE=
5323 SAMPLE_FALSE='#'
5324 else
5325 SAMPLE_TRUE='#'
5326 SAMPLE_FALSE=
5327 fi
5328
5329
5330
5331 save_LIBS="$LIBS"
5332 LIB_SOCKET=""
5333 { $as_echo "$as_me:$LINENO: checking for connect" >&5
5334 $as_echo_n "checking for connect... " >&6; }
5335 if test "${ac_cv_func_connect+set}" = set; then
5336 $as_echo_n "(cached) " >&6
5337 else
5338 cat >conftest.$ac_ext <<_ACEOF
5339 /* confdefs.h. */
5340 _ACEOF
5341 cat confdefs.h >>conftest.$ac_ext
5342 cat >>conftest.$ac_ext <<_ACEOF
5343 /* end confdefs.h. */
5344 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
5345 For example, HP-UX 11i <limits.h> declares gettimeofday. */
5346 #define connect innocuous_connect
5347
5348 /* System header to define __stub macros and hopefully few prototypes,
5349 which can conflict with char connect (); below.
5350 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5351 <limits.h> exists even on freestanding compilers. */
5352
5353 #ifdef __STDC__
5354 # include <limits.h>
5355 #else
5356 # include <assert.h>
5357 #endif
5358
5359 #undef connect
5360
5361 /* Override any GCC internal prototype to avoid an error.
5362 Use char because int might match the return type of a GCC
5363 builtin and then its argument prototype would still apply. */
5364 #ifdef __cplusplus
5365 extern "C"
5366 #endif
5367 char connect ();
5368 /* The GNU C library defines this for functions which it implements
5369 to always fail with ENOSYS. Some functions are actually named
5370 something starting with __ and the normal name is an alias. */
5371 #if defined __stub_connect || defined __stub___connect
5372 choke me
5373 #endif
5374
5375 int
5376 main ()
5377 {
5378 return connect ();
5379 ;
5380 return 0;
5381 }
5382 _ACEOF
5383 rm -f conftest.$ac_objext conftest$ac_exeext
5384 if { (ac_try="$ac_link"
5385 case "(($ac_try" in
5386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5387 *) ac_try_echo=$ac_try;;
5388 esac
5389 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5390 $as_echo "$ac_try_echo") >&5
5391 (eval "$ac_link") 2>conftest.er1
5392 ac_status=$?
5393 grep -v '^ *+' conftest.er1 >conftest.err
5394 rm -f conftest.er1
5395 cat conftest.err >&5
5396 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5397 (exit $ac_status); } && {
5398 test -z "$ac_c_werror_flag" ||
5399 test ! -s conftest.err
5400 } && test -s conftest$ac_exeext && {
5401 test "$cross_compiling" = yes ||
5402 $as_test_x conftest$ac_exeext
5403 }; then
5404 ac_cv_func_connect=yes
5405 else
5406 $as_echo "$as_me: failed program was:" >&5
5407 sed 's/^/| /' conftest.$ac_ext >&5
5408
5409 ac_cv_func_connect=no
5410 fi
5411
5412 rm -rf conftest.dSYM
5413 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5414 conftest$ac_exeext conftest.$ac_ext
5415 fi
5416 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5417 $as_echo "$ac_cv_func_connect" >&6; }
5418 if test "x$ac_cv_func_connect" = x""yes; then
5419 :
5420 else
5421 { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5422 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
5423 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5424 $as_echo_n "(cached) " >&6
5425 else
5426 ac_check_lib_save_LIBS=$LIBS
5427 LIBS="-lnsl $LIBS"
5428 cat >conftest.$ac_ext <<_ACEOF
5429 /* confdefs.h. */
5430 _ACEOF
5431 cat confdefs.h >>conftest.$ac_ext
5432 cat >>conftest.$ac_ext <<_ACEOF
5433 /* end confdefs.h. */
5434
5435 /* Override any GCC internal prototype to avoid an error.
5436 Use char because int might match the return type of a GCC
5437 builtin and then its argument prototype would still apply. */
5438 #ifdef __cplusplus
5439 extern "C"
5440 #endif
5441 char gethostbyname ();
5442 int
5443 main ()
5444 {
5445 return gethostbyname ();
5446 ;
5447 return 0;
5448 }
5449 _ACEOF
5450 rm -f conftest.$ac_objext conftest$ac_exeext
5451 if { (ac_try="$ac_link"
5452 case "(($ac_try" in
5453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5454 *) ac_try_echo=$ac_try;;
5455 esac
5456 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5457 $as_echo "$ac_try_echo") >&5
5458 (eval "$ac_link") 2>conftest.er1
5459 ac_status=$?
5460 grep -v '^ *+' conftest.er1 >conftest.err
5461 rm -f conftest.er1
5462 cat conftest.err >&5
5463 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5464 (exit $ac_status); } && {
5465 test -z "$ac_c_werror_flag" ||
5466 test ! -s conftest.err
5467 } && test -s conftest$ac_exeext && {
5468 test "$cross_compiling" = yes ||
5469 $as_test_x conftest$ac_exeext
5470 }; then
5471 ac_cv_lib_nsl_gethostbyname=yes
5472 else
5473 $as_echo "$as_me: failed program was:" >&5
5474 sed 's/^/| /' conftest.$ac_ext >&5
5475
5476 ac_cv_lib_nsl_gethostbyname=no
5477 fi
5478
5479 rm -rf conftest.dSYM
5480 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5481 conftest$ac_exeext conftest.$ac_ext
5482 LIBS=$ac_check_lib_save_LIBS
5483 fi
5484 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5485 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
5486 if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
5487 LIB_SOCKET="-lnsl $LIB_SOCKET"
5488 fi
5489
5490 { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
5491 $as_echo_n "checking for connect in -lsocket... " >&6; }
5492 if test "${ac_cv_lib_socket_connect+set}" = set; then
5493 $as_echo_n "(cached) " >&6
5494 else
5495 ac_check_lib_save_LIBS=$LIBS
5496 LIBS="-lsocket $LIBS"
5497 cat >conftest.$ac_ext <<_ACEOF
5498 /* confdefs.h. */
5499 _ACEOF
5500 cat confdefs.h >>conftest.$ac_ext
5501 cat >>conftest.$ac_ext <<_ACEOF
5502 /* end confdefs.h. */
5503
5504 /* Override any GCC internal prototype to avoid an error.
5505 Use char because int might match the return type of a GCC
5506 builtin and then its argument prototype would still apply. */
5507 #ifdef __cplusplus
5508 extern "C"
5509 #endif
5510 char connect ();
5511 int
5512 main ()
5513 {
5514 return connect ();
5515 ;
5516 return 0;
5517 }
5518 _ACEOF
5519 rm -f conftest.$ac_objext conftest$ac_exeext
5520 if { (ac_try="$ac_link"
5521 case "(($ac_try" in
5522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5523 *) ac_try_echo=$ac_try;;
5524 esac
5525 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5526 $as_echo "$ac_try_echo") >&5
5527 (eval "$ac_link") 2>conftest.er1
5528 ac_status=$?
5529 grep -v '^ *+' conftest.er1 >conftest.err
5530 rm -f conftest.er1
5531 cat conftest.err >&5
5532 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5533 (exit $ac_status); } && {
5534 test -z "$ac_c_werror_flag" ||
5535 test ! -s conftest.err
5536 } && test -s conftest$ac_exeext && {
5537 test "$cross_compiling" = yes ||
5538 $as_test_x conftest$ac_exeext
5539 }; then
5540 ac_cv_lib_socket_connect=yes
5541 else
5542 $as_echo "$as_me: failed program was:" >&5
5543 sed 's/^/| /' conftest.$ac_ext >&5
5544
5545 ac_cv_lib_socket_connect=no
5546 fi
5547
5548 rm -rf conftest.dSYM
5549 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5550 conftest$ac_exeext conftest.$ac_ext
5551 LIBS=$ac_check_lib_save_LIBS
5552 fi
5553 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
5554 $as_echo "$ac_cv_lib_socket_connect" >&6; }
5555 if test "x$ac_cv_lib_socket_connect" = x""yes; then
5556 LIB_SOCKET="-lsocket $LIB_SOCKET"
5557 fi
5558
5559
5560 fi
5561
5562 LIBS="$LIB_SOCKET $save_LIBS"
5563 { $as_echo "$as_me:$LINENO: checking for res_search" >&5
5564 $as_echo_n "checking for res_search... " >&6; }
5565 if test "${ac_cv_func_res_search+set}" = set; then
5566 $as_echo_n "(cached) " >&6
5567 else
5568 cat >conftest.$ac_ext <<_ACEOF
5569 /* confdefs.h. */
5570 _ACEOF
5571 cat confdefs.h >>conftest.$ac_ext
5572 cat >>conftest.$ac_ext <<_ACEOF
5573 /* end confdefs.h. */
5574 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
5575 For example, HP-UX 11i <limits.h> declares gettimeofday. */
5576 #define res_search innocuous_res_search
5577
5578 /* System header to define __stub macros and hopefully few prototypes,
5579 which can conflict with char res_search (); below.
5580 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5581 <limits.h> exists even on freestanding compilers. */
5582
5583 #ifdef __STDC__
5584 # include <limits.h>
5585 #else
5586 # include <assert.h>
5587 #endif
5588
5589 #undef res_search
5590
5591 /* Override any GCC internal prototype to avoid an error.
5592 Use char because int might match the return type of a GCC
5593 builtin and then its argument prototype would still apply. */
5594 #ifdef __cplusplus
5595 extern "C"
5596 #endif
5597 char res_search ();
5598 /* The GNU C library defines this for functions which it implements
5599 to always fail with ENOSYS. Some functions are actually named
5600 something starting with __ and the normal name is an alias. */
5601 #if defined __stub_res_search || defined __stub___res_search
5602 choke me
5603 #endif
5604
5605 int
5606 main ()
5607 {
5608 return res_search ();
5609 ;
5610 return 0;
5611 }
5612 _ACEOF
5613 rm -f conftest.$ac_objext conftest$ac_exeext
5614 if { (ac_try="$ac_link"
5615 case "(($ac_try" in
5616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5617 *) ac_try_echo=$ac_try;;
5618 esac
5619 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5620 $as_echo "$ac_try_echo") >&5
5621 (eval "$ac_link") 2>conftest.er1
5622 ac_status=$?
5623 grep -v '^ *+' conftest.er1 >conftest.err
5624 rm -f conftest.er1
5625 cat conftest.err >&5
5626 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5627 (exit $ac_status); } && {
5628 test -z "$ac_c_werror_flag" ||
5629 test ! -s conftest.err
5630 } && test -s conftest$ac_exeext && {
5631 test "$cross_compiling" = yes ||
5632 $as_test_x conftest$ac_exeext
5633 }; then
5634 ac_cv_func_res_search=yes
5635 else
5636 $as_echo "$as_me: failed program was:" >&5
5637 sed 's/^/| /' conftest.$ac_ext >&5
5638
5639 ac_cv_func_res_search=no
5640 fi
5641
5642 rm -rf conftest.dSYM
5643 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5644 conftest$ac_exeext conftest.$ac_ext
5645 fi
5646 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
5647 $as_echo "$ac_cv_func_res_search" >&6; }
5648 if test "x$ac_cv_func_res_search" = x""yes; then
5649 :
5650 else
5651 LIBS="-lresolv $LIB_SOCKET $save_LIBS"
5652 cat >conftest.$ac_ext <<_ACEOF
5653 /* confdefs.h. */
5654 _ACEOF
5655 cat confdefs.h >>conftest.$ac_ext
5656 cat >>conftest.$ac_ext <<_ACEOF
5657 /* end confdefs.h. */
5658 [
5659 #include <sys/types.h>
5660 #include <netinet/in.h>
5661 #include <arpa/nameser.h>
5662 #ifdef HAVE_ARPA_NAMESER_COMPAT_H
5663 #include <arpa/nameser_compat.h>
5664 #endif
5665 #include <resolv.h>]
5666 int
5667 main ()
5668 {
5669 [
5670 const char host[12]="openafs.org";
5671 u_char ans[1024];
5672 res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans));
5673 return 0;
5674 ]
5675 ;
5676 return 0;
5677 }
5678 _ACEOF
5679 rm -f conftest.$ac_objext conftest$ac_exeext
5680 if { (ac_try="$ac_link"
5681 case "(($ac_try" in
5682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5683 *) ac_try_echo=$ac_try;;
5684 esac
5685 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5686 $as_echo "$ac_try_echo") >&5
5687 (eval "$ac_link") 2>conftest.er1
5688 ac_status=$?
5689 grep -v '^ *+' conftest.er1 >conftest.err
5690 rm -f conftest.er1
5691 cat conftest.err >&5
5692 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5693 (exit $ac_status); } && {
5694 test -z "$ac_c_werror_flag" ||
5695 test ! -s conftest.err
5696 } && test -s conftest$ac_exeext && {
5697 test "$cross_compiling" = yes ||
5698 $as_test_x conftest$ac_exeext
5699 }; then
5700 LIB_SOCKET="-lresolv $LIB_SOCKET"
5701 else
5702 $as_echo "$as_me: failed program was:" >&5
5703 sed 's/^/| /' conftest.$ac_ext >&5
5704
5705
5706 fi
5707
5708 rm -rf conftest.dSYM
5709 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5710 conftest$ac_exeext conftest.$ac_ext
5711
5712 fi
5713
5714 LIBS="$LIB_SOCKET $save_LIBS"
5715
5716
5717 for ac_func in dn_expand dns_lookup
5718 do
5719 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5720 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
5721 $as_echo_n "checking for $ac_func... " >&6; }
5722 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
5723 $as_echo_n "(cached) " >&6
5724 else
5725 cat >conftest.$ac_ext <<_ACEOF
5726 /* confdefs.h. */
5727 _ACEOF
5728 cat confdefs.h >>conftest.$ac_ext
5729 cat >>conftest.$ac_ext <<_ACEOF
5730 /* end confdefs.h. */
5731 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5732 For example, HP-UX 11i <limits.h> declares gettimeofday. */
5733 #define $ac_func innocuous_$ac_func
5734
5735 /* System header to define __stub macros and hopefully few prototypes,
5736 which can conflict with char $ac_func (); below.
5737 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5738 <limits.h> exists even on freestanding compilers. */
5739
5740 #ifdef __STDC__
5741 # include <limits.h>
5742 #else
5743 # include <assert.h>
5744 #endif
5745
5746 #undef $ac_func
5747
5748 /* Override any GCC internal prototype to avoid an error.
5749 Use char because int might match the return type of a GCC
5750 builtin and then its argument prototype would still apply. */
5751 #ifdef __cplusplus
5752 extern "C"
5753 #endif
5754 char $ac_func ();
5755 /* The GNU C library defines this for functions which it implements
5756 to always fail with ENOSYS. Some functions are actually named
5757 something starting with __ and the normal name is an alias. */
5758 #if defined __stub_$ac_func || defined __stub___$ac_func
5759 choke me
5760 #endif
5761
5762 int
5763 main ()
5764 {
5765 return $ac_func ();
5766 ;
5767 return 0;
5768 }
5769 _ACEOF
5770 rm -f conftest.$ac_objext conftest$ac_exeext
5771 if { (ac_try="$ac_link"
5772 case "(($ac_try" in
5773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5774 *) ac_try_echo=$ac_try;;
5775 esac
5776 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5777 $as_echo "$ac_try_echo") >&5
5778 (eval "$ac_link") 2>conftest.er1
5779 ac_status=$?
5780 grep -v '^ *+' conftest.er1 >conftest.err
5781 rm -f conftest.er1
5782 cat conftest.err >&5
5783 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5784 (exit $ac_status); } && {
5785 test -z "$ac_c_werror_flag" ||
5786 test ! -s conftest.err
5787 } && test -s conftest$ac_exeext && {
5788 test "$cross_compiling" = yes ||
5789 $as_test_x conftest$ac_exeext
5790 }; then
5791 eval "$as_ac_var=yes"
5792 else
5793 $as_echo "$as_me: failed program was:" >&5
5794 sed 's/^/| /' conftest.$ac_ext >&5
5795
5796 eval "$as_ac_var=no"
5797 fi
5798
5799 rm -rf conftest.dSYM
5800 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5801 conftest$ac_exeext conftest.$ac_ext
5802 fi
5803 ac_res=`eval 'as_val=${'$as_ac_var'}
5804 $as_echo "$as_val"'`
5805 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
5806 $as_echo "$ac_res" >&6; }
5807 as_val=`eval 'as_val=${'$as_ac_var'}
5808 $as_echo "$as_val"'`
5809 if test "x$as_val" = x""yes; then
5810 cat >>confdefs.h <<_ACEOF
5811 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5812 _ACEOF
5813
5814 fi
5815 done
5816
5817 LIBS="$save_LIBS"
5818
5819
5820
5821
5822
5823 # Check whether --with-dbpath was given.
5824 if test "${with_dbpath+set}" = set; then
5825 withval=$with_dbpath; dbpath=$withval
5826 else
5827 dbpath=/etc/sasldb2
5828 fi
5829
5830 { $as_echo "$as_me:$LINENO: checking DB path to use" >&5
5831 $as_echo_n "checking DB path to use... " >&6; }
5832 { $as_echo "$as_me:$LINENO: result: $dbpath" >&5
5833 $as_echo "$dbpath" >&6; }
5834
5835 cat >>confdefs.h <<_ACEOF
5836 #define SASL_DB_PATH "$dbpath"
5837 _ACEOF
5838
5839
5840 { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
5841 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5842 if test "${ac_cv_path_GREP+set}" = set; then
5843 $as_echo_n "(cached) " >&6
5844 else
5845 if test -z "$GREP"; then
5846 ac_path_GREP_found=false
5847 # Loop through the user's path and test for each of PROGNAME-LIST
5848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5850 do
5851 IFS=$as_save_IFS
5852 test -z "$as_dir" && as_dir=.
5853 for ac_prog in grep ggrep; do
5854 for ac_exec_ext in '' $ac_executable_extensions; do
5855 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5856 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5857 # Check for GNU ac_path_GREP and select it if it is found.
5858 # Check for GNU $ac_path_GREP
5859 case `"$ac_path_GREP" --version 2>&1` in
5860 *GNU*)
5861 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5862 *)
5863 ac_count=0
5864 $as_echo_n 0123456789 >"conftest.in"
5865 while :
5866 do
5867 cat "conftest.in" "conftest.in" >"conftest.tmp"
5868 mv "conftest.tmp" "conftest.in"
5869 cp "conftest.in" "conftest.nl"
5870 $as_echo 'GREP' >> "conftest.nl"
5871 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5872 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5873 ac_count=`expr $ac_count + 1`
5874 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5875 # Best one so far, save it but keep looking for a better one
5876 ac_cv_path_GREP="$ac_path_GREP"
5877 ac_path_GREP_max=$ac_count
5878 fi
5879 # 10*(2^10) chars as input seems more than enough
5880 test $ac_count -gt 10 && break
5881 done
5882 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5883 esac
5884
5885 $ac_path_GREP_found && break 3
5886 done
5887 done
5888 done
5889 IFS=$as_save_IFS
5890 if test -z "$ac_cv_path_GREP"; then
5891 { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5892 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5893 { (exit 1); exit 1; }; }
5894 fi
5895 else
5896 ac_cv_path_GREP=$GREP
5897 fi
5898
5899 fi
5900 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
5901 $as_echo "$ac_cv_path_GREP" >&6; }
5902 GREP="$ac_cv_path_GREP"
5903
5904
5905 { $as_echo "$as_me:$LINENO: checking for egrep" >&5
5906 $as_echo_n "checking for egrep... " >&6; }
5907 if test "${ac_cv_path_EGREP+set}" = set; then
5908 $as_echo_n "(cached) " >&6
5909 else
5910 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5911 then ac_cv_path_EGREP="$GREP -E"
5912 else
5913 if test -z "$EGREP"; then
5914 ac_path_EGREP_found=false
5915 # Loop through the user's path and test for each of PROGNAME-LIST
5916 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5917 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5918 do
5919 IFS=$as_save_IFS
5920 test -z "$as_dir" && as_dir=.
5921 for ac_prog in egrep; do
5922 for ac_exec_ext in '' $ac_executable_extensions; do
5923 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5924 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5925 # Check for GNU ac_path_EGREP and select it if it is found.
5926 # Check for GNU $ac_path_EGREP
5927 case `"$ac_path_EGREP" --version 2>&1` in
5928 *GNU*)
5929 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5930 *)
5931 ac_count=0
5932 $as_echo_n 0123456789 >"conftest.in"
5933 while :
5934 do
5935 cat "conftest.in" "conftest.in" >"conftest.tmp"
5936 mv "conftest.tmp" "conftest.in"
5937 cp "conftest.in" "conftest.nl"
5938 $as_echo 'EGREP' >> "conftest.nl"
5939 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5940 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5941 ac_count=`expr $ac_count + 1`
5942 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5943 # Best one so far, save it but keep looking for a better one
5944 ac_cv_path_EGREP="$ac_path_EGREP"
5945 ac_path_EGREP_max=$ac_count
5946 fi
5947 # 10*(2^10) chars as input seems more than enough
5948 test $ac_count -gt 10 && break
5949 done
5950 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5951 esac
5952
5953 $ac_path_EGREP_found && break 3
5954 done
5955 done
5956 done
5957 IFS=$as_save_IFS
5958 if test -z "$ac_cv_path_EGREP"; then
5959 { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5960 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5961 { (exit 1); exit 1; }; }
5962 fi
5963 else
5964 ac_cv_path_EGREP=$EGREP
5965 fi
5966
5967 fi
5968 fi
5969 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
5970 $as_echo "$ac_cv_path_EGREP" >&6; }
5971 EGREP="$ac_cv_path_EGREP"
5972
5973
5974 { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5975 $as_echo_n "checking for ANSI C header files... " >&6; }
5976 if test "${ac_cv_header_stdc+set}" = set; then
5977 $as_echo_n "(cached) " >&6
5978 else
5979 cat >conftest.$ac_ext <<_ACEOF
5980 /* confdefs.h. */
5981 _ACEOF
5982 cat confdefs.h >>conftest.$ac_ext
5983 cat >>conftest.$ac_ext <<_ACEOF
5984 /* end confdefs.h. */
5985 #include <stdlib.h>
5986 #include <stdarg.h>
5987 #include <string.h>
5988 #include <float.h>
5989
5990 int
5991 main ()
5992 {
5993
5994 ;
5995 return 0;
5996 }
5997 _ACEOF
5998 rm -f conftest.$ac_objext
5999 if { (ac_try="$ac_compile"
6000 case "(($ac_try" in
6001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6002 *) ac_try_echo=$ac_try;;
6003 esac
6004 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6005 $as_echo "$ac_try_echo") >&5
6006 (eval "$ac_compile") 2>conftest.er1
6007 ac_status=$?
6008 grep -v '^ *+' conftest.er1 >conftest.err
6009 rm -f conftest.er1
6010 cat conftest.err >&5
6011 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6012 (exit $ac_status); } && {
6013 test -z "$ac_c_werror_flag" ||
6014 test ! -s conftest.err
6015 } && test -s conftest.$ac_objext; then
6016 ac_cv_header_stdc=yes
6017 else
6018 $as_echo "$as_me: failed program was:" >&5
6019 sed 's/^/| /' conftest.$ac_ext >&5
6020
6021 ac_cv_header_stdc=no
6022 fi
6023
6024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6025
6026 if test $ac_cv_header_stdc = yes; then
6027 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6028 cat >conftest.$ac_ext <<_ACEOF
6029 /* confdefs.h. */
6030 _ACEOF
6031 cat confdefs.h >>conftest.$ac_ext
6032 cat >>conftest.$ac_ext <<_ACEOF
6033 /* end confdefs.h. */
6034 #include <string.h>
6035
6036 _ACEOF
6037 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6038 $EGREP "memchr" >/dev/null 2>&1; then
6039 :
6040 else
6041 ac_cv_header_stdc=no
6042 fi
6043 rm -f conftest*
6044
6045 fi
6046
6047 if test $ac_cv_header_stdc = yes; then
6048 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6049 cat >conftest.$ac_ext <<_ACEOF
6050 /* confdefs.h. */
6051 _ACEOF
6052 cat confdefs.h >>conftest.$ac_ext
6053 cat >>conftest.$ac_ext <<_ACEOF
6054 /* end confdefs.h. */
6055 #include <stdlib.h>
6056
6057 _ACEOF
6058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6059 $EGREP "free" >/dev/null 2>&1; then
6060 :
6061 else
6062 ac_cv_header_stdc=no
6063 fi
6064 rm -f conftest*
6065
6066 fi
6067
6068 if test $ac_cv_header_stdc = yes; then
6069 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6070 if test "$cross_compiling" = yes; then
6071 :
6072 else
6073 cat >conftest.$ac_ext <<_ACEOF
6074 /* confdefs.h. */
6075 _ACEOF
6076 cat confdefs.h >>conftest.$ac_ext
6077 cat >>conftest.$ac_ext <<_ACEOF
6078 /* end confdefs.h. */
6079 #include <ctype.h>
6080 #include <stdlib.h>
6081 #if ((' ' & 0x0FF) == 0x020)
6082 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6083 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6084 #else
6085 # define ISLOWER(c) \
6086 (('a' <= (c) && (c) <= 'i') \
6087 || ('j' <= (c) && (c) <= 'r') \
6088 || ('s' <= (c) && (c) <= 'z'))
6089 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6090 #endif
6091
6092 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6093 int
6094 main ()
6095 {
6096 int i;
6097 for (i = 0; i < 256; i++)
6098 if (XOR (islower (i), ISLOWER (i))
6099 || toupper (i) != TOUPPER (i))
6100 return 2;
6101 return 0;
6102 }
6103 _ACEOF
6104 rm -f conftest$ac_exeext
6105 if { (ac_try="$ac_link"
6106 case "(($ac_try" in
6107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6108 *) ac_try_echo=$ac_try;;
6109 esac
6110 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6111 $as_echo "$ac_try_echo") >&5
6112 (eval "$ac_link") 2>&5
6113 ac_status=$?
6114 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6115 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6116 { (case "(($ac_try" in
6117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6118 *) ac_try_echo=$ac_try;;
6119 esac
6120 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6121 $as_echo "$ac_try_echo") >&5
6122 (eval "$ac_try") 2>&5
6123 ac_status=$?
6124 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6125 (exit $ac_status); }; }; then
6126 :
6127 else
6128 $as_echo "$as_me: program exited with status $ac_status" >&5
6129 $as_echo "$as_me: failed program was:" >&5
6130 sed 's/^/| /' conftest.$ac_ext >&5
6131
6132 ( exit $ac_status )
6133 ac_cv_header_stdc=no
6134 fi
6135 rm -rf conftest.dSYM
6136 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6137 fi
6138
6139
6140 fi
6141 fi
6142 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6143 $as_echo "$ac_cv_header_stdc" >&6; }
6144 if test $ac_cv_header_stdc = yes; then
6145
6146 cat >>confdefs.h <<\_ACEOF
6147 #define STDC_HEADERS 1
6148 _ACEOF
6149
6150 fi
6151
6152 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6163 inttypes.h stdint.h unistd.h
6164 do
6165 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6166 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6167 $as_echo_n "checking for $ac_header... " >&6; }
6168 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6169 $as_echo_n "(cached) " >&6
6170 else
6171 cat >conftest.$ac_ext <<_ACEOF
6172 /* confdefs.h. */
6173 _ACEOF
6174 cat confdefs.h >>conftest.$ac_ext
6175 cat >>conftest.$ac_ext <<_ACEOF
6176 /* end confdefs.h. */
6177 $ac_includes_default
6178
6179 #include <$ac_header>
6180 _ACEOF
6181 rm -f conftest.$ac_objext
6182 if { (ac_try="$ac_compile"
6183 case "(($ac_try" in
6184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6185 *) ac_try_echo=$ac_try;;
6186 esac
6187 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6188 $as_echo "$ac_try_echo") >&5
6189 (eval "$ac_compile") 2>conftest.er1
6190 ac_status=$?
6191 grep -v '^ *+' conftest.er1 >conftest.err
6192 rm -f conftest.er1
6193 cat conftest.err >&5
6194 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6195 (exit $ac_status); } && {
6196 test -z "$ac_c_werror_flag" ||
6197 test ! -s conftest.err
6198 } && test -s conftest.$ac_objext; then
6199 eval "$as_ac_Header=yes"
6200 else
6201 $as_echo "$as_me: failed program was:" >&5
6202 sed 's/^/| /' conftest.$ac_ext >&5
6203
6204 eval "$as_ac_Header=no"
6205 fi
6206
6207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6208 fi
6209 ac_res=`eval 'as_val=${'$as_ac_Header'}
6210 $as_echo "$as_val"'`
6211 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6212 $as_echo "$ac_res" >&6; }
6213 as_val=`eval 'as_val=${'$as_ac_Header'}
6214 $as_echo "$as_val"'`
6215 if test "x$as_val" = x""yes; then
6216 cat >>confdefs.h <<_ACEOF
6217 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6218 _ACEOF
6219
6220 fi
6221
6222 done
6223
6224
6225
6226 cmu_save_LIBS="$LIBS"
6227
6228 # Check whether --with-dblib was given.
6229 if test "${with_dblib+set}" = set; then
6230 withval=$with_dblib; dblib=$withval
6231 else
6232 dblib=auto_detect
6233 fi
6234
6235
6236
6237
6238 # Check whether --with-bdb-libdir was given.
6239 if test "${with_bdb_libdir+set}" = set; then
6240 withval=$with_bdb_libdir; with_bdb_lib=$withval
6241 else
6242 test "${with_bdb_lib+set}" = set || with_bdb_lib=none
6243 fi
6244
6245
6246 # Check whether --with-bdb-incdir was given.
6247 if test "${with_bdb_incdir+set}" = set; then
6248 withval=$with_bdb_incdir; with_bdb_inc=$withval
6249 else
6250 test "${with_bdb_inc+set}" = set || with_bdb_inc=none
6251 fi
6252
6253
6254
6255 SASL_DB_LIB=""
6256
6257 case "$dblib" in
6258 berkeley)
6259
6260
6261
6262 cmu_save_CPPFLAGS=$CPPFLAGS
6263
6264 if test -d $with_bdb_inc; then
6265 CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
6266 BDB_INCADD="-I$with_bdb_inc"
6267 else
6268 BDB_INCADD=""
6269 fi
6270
6271 if test "${ac_cv_header_db_h+set}" = set; then
6272 { $as_echo "$as_me:$LINENO: checking for db.h" >&5
6273 $as_echo_n "checking for db.h... " >&6; }
6274 if test "${ac_cv_header_db_h+set}" = set; then
6275 $as_echo_n "(cached) " >&6
6276 fi
6277 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
6278 $as_echo "$ac_cv_header_db_h" >&6; }
6279 else
6280 # Is the header compilable?
6281 { $as_echo "$as_me:$LINENO: checking db.h usability" >&5
6282 $as_echo_n "checking db.h usability... " >&6; }
6283 cat >conftest.$ac_ext <<_ACEOF
6284 /* confdefs.h. */
6285 _ACEOF
6286 cat confdefs.h >>conftest.$ac_ext
6287 cat >>conftest.$ac_ext <<_ACEOF
6288 /* end confdefs.h. */
6289 $ac_includes_default
6290 #include <db.h>
6291 _ACEOF
6292 rm -f conftest.$ac_objext
6293 if { (ac_try="$ac_compile"
6294 case "(($ac_try" in
6295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6296 *) ac_try_echo=$ac_try;;
6297 esac
6298 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6299 $as_echo "$ac_try_echo") >&5
6300 (eval "$ac_compile") 2>conftest.er1
6301 ac_status=$?
6302 grep -v '^ *+' conftest.er1 >conftest.err
6303 rm -f conftest.er1
6304 cat conftest.err >&5
6305 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6306 (exit $ac_status); } && {
6307 test -z "$ac_c_werror_flag" ||
6308 test ! -s conftest.err
6309 } && test -s conftest.$ac_objext; then
6310 ac_header_compiler=yes
6311 else
6312 $as_echo "$as_me: failed program was:" >&5
6313 sed 's/^/| /' conftest.$ac_ext >&5
6314
6315 ac_header_compiler=no
6316 fi
6317
6318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6319 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6320 $as_echo "$ac_header_compiler" >&6; }
6321
6322 # Is the header present?
6323 { $as_echo "$as_me:$LINENO: checking db.h presence" >&5
6324 $as_echo_n "checking db.h presence... " >&6; }
6325 cat >conftest.$ac_ext <<_ACEOF
6326 /* confdefs.h. */
6327 _ACEOF
6328 cat confdefs.h >>conftest.$ac_ext
6329 cat >>conftest.$ac_ext <<_ACEOF
6330 /* end confdefs.h. */
6331 #include <db.h>
6332 _ACEOF
6333 if { (ac_try="$ac_cpp conftest.$ac_ext"
6334 case "(($ac_try" in
6335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6336 *) ac_try_echo=$ac_try;;
6337 esac
6338 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6339 $as_echo "$ac_try_echo") >&5
6340 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6341 ac_status=$?
6342 grep -v '^ *+' conftest.er1 >conftest.err
6343 rm -f conftest.er1
6344 cat conftest.err >&5
6345 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6346 (exit $ac_status); } >/dev/null && {
6347 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6348 test ! -s conftest.err
6349 }; then
6350 ac_header_preproc=yes
6351 else
6352 $as_echo "$as_me: failed program was:" >&5
6353 sed 's/^/| /' conftest.$ac_ext >&5
6354
6355 ac_header_preproc=no
6356 fi
6357
6358 rm -f conftest.err conftest.$ac_ext
6359 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6360 $as_echo "$ac_header_preproc" >&6; }
6361
6362 # So? What about this header?
6363 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6364 yes:no: )
6365 { $as_echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5
6366 $as_echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6367 { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5
6368 $as_echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;}
6369 ac_header_preproc=yes
6370 ;;
6371 no:yes:* )
6372 { $as_echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5
6373 $as_echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;}
6374 { $as_echo "$as_me:$LINENO: WARNING: db.h: check for missing prerequisite headers?" >&5
6375 $as_echo "$as_me: WARNING: db.h: check for missing prerequisite headers?" >&2;}
6376 { $as_echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5
6377 $as_echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;}
6378 { $as_echo "$as_me:$LINENO: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&5
6379 $as_echo "$as_me: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&2;}
6380 { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5
6381 $as_echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;}
6382 { $as_echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5
6383 $as_echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;}
6384
6385 ;;
6386 esac
6387 { $as_echo "$as_me:$LINENO: checking for db.h" >&5
6388 $as_echo_n "checking for db.h... " >&6; }
6389 if test "${ac_cv_header_db_h+set}" = set; then
6390 $as_echo_n "(cached) " >&6
6391 else
6392 ac_cv_header_db_h=$ac_header_preproc
6393 fi
6394 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
6395 $as_echo "$ac_cv_header_db_h" >&6; }
6396
6397 fi
6398 if test "x$ac_cv_header_db_h" = x""yes; then
6399
6400 BDB_SAVE_LDFLAGS=$LDFLAGS
6401
6402 if test -d $with_bdb_lib; then
6403
6404 # this is CMU ADD LIBPATH TO
6405 if test "$andrew_cv_runpath_switch" = "none" ; then
6406 LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
6407 else
6408 LDFLAGS="-L$with_bdb_lib ${LDFLAGS} $andrew_cv_runpath_switch$with_bdb_lib"
6409 fi
6410
6411
6412 # this is CMU ADD LIBPATH TO
6413 if test "$andrew_cv_runpath_switch" = "none" ; then
6414 BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD}"
6415 else
6416 BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD} $andrew_cv_runpath_switch$with_bdb_lib"
6417 fi
6418
6419 else
6420 BDB_LIBADD=""
6421 fi
6422
6423 saved_LIBS=$LIBS
6424 for dbname in ${with_bdb} \
6425 db-5.2 db5.2 db52 \
6426 db-5.1 db5.2 db51 \
6427 db-5.0 db5.2 db50 \
6428 db-4.8 db4.8 db48 \
6429 db-4.7 db4.7 db47 \
6430 db-4.6 db4.6 db46 \
6431 db-4.5 db4.5 db45 \
6432 db-4.4 db4.4 db44 \
6433 db-4.3 db4.3 db43 \
6434 db-4.2 db4.2 db42 \
6435 db-4.1 db4.1 db41 \
6436 db-4.0 db4.0 db40 db-4 db4 \
6437 db-3.3 db3.3 db33 \
6438 db-3.2 db3.2 db32 \
6439 db-3.1 db3.1 db31 \
6440 db-3.0 db3.0 db30 db-3 db3 \
6441 db
6442 do
6443 LIBS="$saved_LIBS -l$dbname"
6444 cat >conftest.$ac_ext <<_ACEOF
6445 /* confdefs.h. */
6446 _ACEOF
6447 cat confdefs.h >>conftest.$ac_ext
6448 cat >>conftest.$ac_ext <<_ACEOF
6449 /* end confdefs.h. */
6450 #include <stdio.h>
6451 #include <db.h>
6452 int
6453 main ()
6454 {
6455 db_create(NULL, NULL, 0);
6456 ;
6457 return 0;
6458 }
6459 _ACEOF
6460 rm -f conftest.$ac_objext conftest$ac_exeext
6461 if { (ac_try="$ac_link"
6462 case "(($ac_try" in
6463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6464 *) ac_try_echo=$ac_try;;
6465 esac
6466 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6467 $as_echo "$ac_try_echo") >&5
6468 (eval "$ac_link") 2>conftest.er1
6469 ac_status=$?
6470 grep -v '^ *+' conftest.er1 >conftest.err
6471 rm -f conftest.er1
6472 cat conftest.err >&5
6473 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6474 (exit $ac_status); } && {
6475 test -z "$ac_c_werror_flag" ||
6476 test ! -s conftest.err
6477 } && test -s conftest$ac_exeext && {
6478 test "$cross_compiling" = yes ||
6479 $as_test_x conftest$ac_exeext
6480 }; then
6481 BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db
6482 else
6483 $as_echo "$as_me: failed program was:" >&5
6484 sed 's/^/| /' conftest.$ac_ext >&5
6485
6486 dblib="no"
6487 fi
6488
6489 rm -rf conftest.dSYM
6490 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6491 conftest$ac_exeext conftest.$ac_ext
6492 if test "$dblib" = "berkeley"; then break; fi
6493 done
6494 if test "$dblib" = "no"; then
6495 LIBS="$saved_LIBS -ldb"
6496 cat >conftest.$ac_ext <<_ACEOF
6497 /* confdefs.h. */
6498 _ACEOF
6499 cat confdefs.h >>conftest.$ac_ext
6500 cat >>conftest.$ac_ext <<_ACEOF
6501 /* end confdefs.h. */
6502 #include <stdio.h>
6503 #include <db.h>
6504 int
6505 main ()
6506 {
6507 db_open(NULL, 0, 0, 0, NULL, NULL, NULL);
6508 ;
6509 return 0;
6510 }
6511 _ACEOF
6512 rm -f conftest.$ac_objext conftest$ac_exeext
6513 if { (ac_try="$ac_link"
6514 case "(($ac_try" in
6515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6516 *) ac_try_echo=$ac_try;;
6517 esac
6518 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6519 $as_echo "$ac_try_echo") >&5
6520 (eval "$ac_link") 2>conftest.er1
6521 ac_status=$?
6522 grep -v '^ *+' conftest.er1 >conftest.err
6523 rm -f conftest.er1
6524 cat conftest.err >&5
6525 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6526 (exit $ac_status); } && {
6527 test -z "$ac_c_werror_flag" ||
6528 test ! -s conftest.err
6529 } && test -s conftest$ac_exeext && {
6530 test "$cross_compiling" = yes ||
6531 $as_test_x conftest$ac_exeext
6532 }; then
6533 BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
6534 else
6535 $as_echo "$as_me: failed program was:" >&5
6536 sed 's/^/| /' conftest.$ac_ext >&5
6537
6538 dblib="no"
6539 fi
6540
6541 rm -rf conftest.dSYM
6542 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6543 conftest$ac_exeext conftest.$ac_ext
6544 fi
6545 LIBS=$saved_LIBS
6546
6547 LDFLAGS=$BDB_SAVE_LDFLAGS
6548
6549 else
6550 dblib="no"
6551 fi
6552
6553
6554
6555 CPPFLAGS=$cmu_save_CPPFLAGS
6556
6557 CPPFLAGS="${CPPFLAGS} ${BDB_INCADD}"
6558 SASL_DB_INC=$BDB_INCADD
6559 SASL_DB_LIB="${BDB_LIBADD}"
6560 ;;
6561 gdbm)
6562
6563 # Check whether --with-gdbm was given.
6564 if test "${with_gdbm+set}" = set; then
6565 withval=$with_gdbm; with_gdbm="${withval}"
6566 fi
6567
6568
6569 case "$with_gdbm" in
6570 ""|yes)
6571 if test "${ac_cv_header_gdbm_h+set}" = set; then
6572 { $as_echo "$as_me:$LINENO: checking for gdbm.h" >&5
6573 $as_echo_n "checking for gdbm.h... " >&6; }
6574 if test "${ac_cv_header_gdbm_h+set}" = set; then
6575 $as_echo_n "(cached) " >&6
6576 fi
6577 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
6578 $as_echo "$ac_cv_header_gdbm_h" >&6; }
6579 else
6580 # Is the header compilable?
6581 { $as_echo "$as_me:$LINENO: checking gdbm.h usability" >&5
6582 $as_echo_n "checking gdbm.h usability... " >&6; }
6583 cat >conftest.$ac_ext <<_ACEOF
6584 /* confdefs.h. */
6585 _ACEOF
6586 cat confdefs.h >>conftest.$ac_ext
6587 cat >>conftest.$ac_ext <<_ACEOF
6588 /* end confdefs.h. */
6589 $ac_includes_default
6590 #include <gdbm.h>
6591 _ACEOF
6592 rm -f conftest.$ac_objext
6593 if { (ac_try="$ac_compile"
6594 case "(($ac_try" in
6595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6596 *) ac_try_echo=$ac_try;;
6597 esac
6598 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6599 $as_echo "$ac_try_echo") >&5
6600 (eval "$ac_compile") 2>conftest.er1
6601 ac_status=$?
6602 grep -v '^ *+' conftest.er1 >conftest.err
6603 rm -f conftest.er1
6604 cat conftest.err >&5
6605 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6606 (exit $ac_status); } && {
6607 test -z "$ac_c_werror_flag" ||
6608 test ! -s conftest.err
6609 } && test -s conftest.$ac_objext; then
6610 ac_header_compiler=yes
6611 else
6612 $as_echo "$as_me: failed program was:" >&5
6613 sed 's/^/| /' conftest.$ac_ext >&5
6614
6615 ac_header_compiler=no
6616 fi
6617
6618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6619 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6620 $as_echo "$ac_header_compiler" >&6; }
6621
6622 # Is the header present?
6623 { $as_echo "$as_me:$LINENO: checking gdbm.h presence" >&5
6624 $as_echo_n "checking gdbm.h presence... " >&6; }
6625 cat >conftest.$ac_ext <<_ACEOF
6626 /* confdefs.h. */
6627 _ACEOF
6628 cat confdefs.h >>conftest.$ac_ext
6629 cat >>conftest.$ac_ext <<_ACEOF
6630 /* end confdefs.h. */
6631 #include <gdbm.h>
6632 _ACEOF
6633 if { (ac_try="$ac_cpp conftest.$ac_ext"
6634 case "(($ac_try" in
6635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6636 *) ac_try_echo=$ac_try;;
6637 esac
6638 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6639 $as_echo "$ac_try_echo") >&5
6640 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6641 ac_status=$?
6642 grep -v '^ *+' conftest.er1 >conftest.err
6643 rm -f conftest.er1
6644 cat conftest.err >&5
6645 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6646 (exit $ac_status); } >/dev/null && {
6647 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6648 test ! -s conftest.err
6649 }; then
6650 ac_header_preproc=yes
6651 else
6652 $as_echo "$as_me: failed program was:" >&5
6653 sed 's/^/| /' conftest.$ac_ext >&5
6654
6655 ac_header_preproc=no
6656 fi
6657
6658 rm -f conftest.err conftest.$ac_ext
6659 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6660 $as_echo "$ac_header_preproc" >&6; }
6661
6662 # So? What about this header?
6663 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6664 yes:no: )
6665 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
6666 $as_echo "$as_me: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6667 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the compiler's result" >&5
6668 $as_echo "$as_me: WARNING: gdbm.h: proceeding with the compiler's result" >&2;}
6669 ac_header_preproc=yes
6670 ;;
6671 no:yes:* )
6672 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: present but cannot be compiled" >&5
6673 $as_echo "$as_me: WARNING: gdbm.h: present but cannot be compiled" >&2;}
6674 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: check for missing prerequisite headers?" >&5
6675 $as_echo "$as_me: WARNING: gdbm.h: check for missing prerequisite headers?" >&2;}
6676 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: see the Autoconf documentation" >&5
6677 $as_echo "$as_me: WARNING: gdbm.h: see the Autoconf documentation" >&2;}
6678 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: section \"Present But Cannot Be Compiled\"" >&5
6679 $as_echo "$as_me: WARNING: gdbm.h: section \"Present But Cannot Be Compiled\"" >&2;}
6680 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the preprocessor's result" >&5
6681 $as_echo "$as_me: WARNING: gdbm.h: proceeding with the preprocessor's result" >&2;}
6682 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: in the future, the compiler will take precedence" >&5
6683 $as_echo "$as_me: WARNING: gdbm.h: in the future, the compiler will take precedence" >&2;}
6684
6685 ;;
6686 esac
6687 { $as_echo "$as_me:$LINENO: checking for gdbm.h" >&5
6688 $as_echo_n "checking for gdbm.h... " >&6; }
6689 if test "${ac_cv_header_gdbm_h+set}" = set; then
6690 $as_echo_n "(cached) " >&6
6691 else
6692 ac_cv_header_gdbm_h=$ac_header_preproc
6693 fi
6694 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
6695 $as_echo "$ac_cv_header_gdbm_h" >&6; }
6696
6697 fi
6698 if test "x$ac_cv_header_gdbm_h" = x""yes; then
6699
6700 { $as_echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
6701 $as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
6702 if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
6703 $as_echo_n "(cached) " >&6
6704 else
6705 ac_check_lib_save_LIBS=$LIBS
6706 LIBS="-lgdbm $LIBS"
6707 cat >conftest.$ac_ext <<_ACEOF
6708 /* confdefs.h. */
6709 _ACEOF
6710 cat confdefs.h >>conftest.$ac_ext
6711 cat >>conftest.$ac_ext <<_ACEOF
6712 /* end confdefs.h. */
6713
6714 /* Override any GCC internal prototype to avoid an error.
6715 Use char because int might match the return type of a GCC
6716 builtin and then its argument prototype would still apply. */
6717 #ifdef __cplusplus
6718 extern "C"
6719 #endif
6720 char gdbm_open ();
6721 int
6722 main ()
6723 {
6724 return gdbm_open ();
6725 ;
6726 return 0;
6727 }
6728 _ACEOF
6729 rm -f conftest.$ac_objext conftest$ac_exeext
6730 if { (ac_try="$ac_link"
6731 case "(($ac_try" in
6732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6733 *) ac_try_echo=$ac_try;;
6734 esac
6735 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6736 $as_echo "$ac_try_echo") >&5
6737 (eval "$ac_link") 2>conftest.er1
6738 ac_status=$?
6739 grep -v '^ *+' conftest.er1 >conftest.err
6740 rm -f conftest.er1
6741 cat conftest.err >&5
6742 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6743 (exit $ac_status); } && {
6744 test -z "$ac_c_werror_flag" ||
6745 test ! -s conftest.err
6746 } && test -s conftest$ac_exeext && {
6747 test "$cross_compiling" = yes ||
6748 $as_test_x conftest$ac_exeext
6749 }; then
6750 ac_cv_lib_gdbm_gdbm_open=yes
6751 else
6752 $as_echo "$as_me: failed program was:" >&5
6753 sed 's/^/| /' conftest.$ac_ext >&5
6754
6755 ac_cv_lib_gdbm_gdbm_open=no
6756 fi
6757
6758 rm -rf conftest.dSYM
6759 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6760 conftest$ac_exeext conftest.$ac_ext
6761 LIBS=$ac_check_lib_save_LIBS
6762 fi
6763 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
6764 $as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
6765 if test "x$ac_cv_lib_gdbm_gdbm_open" = x""yes; then
6766 SASL_DB_LIB="-lgdbm"
6767 else
6768 dblib="no"
6769 fi
6770
6771 else
6772 dblib="no"
6773 fi
6774
6775
6776 ;;
6777 *)
6778 if test -d $with_gdbm; then
6779 CPPFLAGS="${CPPFLAGS} -I${with_gdbm}/include"
6780 LDFLAGS="${LDFLAGS} -L${with_gdbm}/lib"
6781 SASL_DB_LIB="-lgdbm"
6782 else
6783 with_gdbm="no"
6784 fi
6785 esac
6786 ;;
6787 ndbm)
6788 if test "${ac_cv_header_ndbm_h+set}" = set; then
6789 { $as_echo "$as_me:$LINENO: checking for ndbm.h" >&5
6790 $as_echo_n "checking for ndbm.h... " >&6; }
6791 if test "${ac_cv_header_ndbm_h+set}" = set; then
6792 $as_echo_n "(cached) " >&6
6793 fi
6794 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
6795 $as_echo "$ac_cv_header_ndbm_h" >&6; }
6796 else
6797 # Is the header compilable?
6798 { $as_echo "$as_me:$LINENO: checking ndbm.h usability" >&5
6799 $as_echo_n "checking ndbm.h usability... " >&6; }
6800 cat >conftest.$ac_ext <<_ACEOF
6801 /* confdefs.h. */
6802 _ACEOF
6803 cat confdefs.h >>conftest.$ac_ext
6804 cat >>conftest.$ac_ext <<_ACEOF
6805 /* end confdefs.h. */
6806 $ac_includes_default
6807 #include <ndbm.h>
6808 _ACEOF
6809 rm -f conftest.$ac_objext
6810 if { (ac_try="$ac_compile"
6811 case "(($ac_try" in
6812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6813 *) ac_try_echo=$ac_try;;
6814 esac
6815 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6816 $as_echo "$ac_try_echo") >&5
6817 (eval "$ac_compile") 2>conftest.er1
6818 ac_status=$?
6819 grep -v '^ *+' conftest.er1 >conftest.err
6820 rm -f conftest.er1
6821 cat conftest.err >&5
6822 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6823 (exit $ac_status); } && {
6824 test -z "$ac_c_werror_flag" ||
6825 test ! -s conftest.err
6826 } && test -s conftest.$ac_objext; then
6827 ac_header_compiler=yes
6828 else
6829 $as_echo "$as_me: failed program was:" >&5
6830 sed 's/^/| /' conftest.$ac_ext >&5
6831
6832 ac_header_compiler=no
6833 fi
6834
6835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6836 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6837 $as_echo "$ac_header_compiler" >&6; }
6838
6839 # Is the header present?
6840 { $as_echo "$as_me:$LINENO: checking ndbm.h presence" >&5
6841 $as_echo_n "checking ndbm.h presence... " >&6; }
6842 cat >conftest.$ac_ext <<_ACEOF
6843 /* confdefs.h. */
6844 _ACEOF
6845 cat confdefs.h >>conftest.$ac_ext
6846 cat >>conftest.$ac_ext <<_ACEOF
6847 /* end confdefs.h. */
6848 #include <ndbm.h>
6849 _ACEOF
6850 if { (ac_try="$ac_cpp conftest.$ac_ext"
6851 case "(($ac_try" in
6852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6853 *) ac_try_echo=$ac_try;;
6854 esac
6855 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6856 $as_echo "$ac_try_echo") >&5
6857 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6858 ac_status=$?
6859 grep -v '^ *+' conftest.er1 >conftest.err
6860 rm -f conftest.er1
6861 cat conftest.err >&5
6862 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6863 (exit $ac_status); } >/dev/null && {
6864 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6865 test ! -s conftest.err
6866 }; then
6867 ac_header_preproc=yes
6868 else
6869 $as_echo "$as_me: failed program was:" >&5
6870 sed 's/^/| /' conftest.$ac_ext >&5
6871
6872 ac_header_preproc=no
6873 fi
6874
6875 rm -f conftest.err conftest.$ac_ext
6876 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6877 $as_echo "$ac_header_preproc" >&6; }
6878
6879 # So? What about this header?
6880 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6881 yes:no: )
6882 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
6883 $as_echo "$as_me: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6884 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the compiler's result" >&5
6885 $as_echo "$as_me: WARNING: ndbm.h: proceeding with the compiler's result" >&2;}
6886 ac_header_preproc=yes
6887 ;;
6888 no:yes:* )
6889 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: present but cannot be compiled" >&5
6890 $as_echo "$as_me: WARNING: ndbm.h: present but cannot be compiled" >&2;}
6891 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: check for missing prerequisite headers?" >&5
6892 $as_echo "$as_me: WARNING: ndbm.h: check for missing prerequisite headers?" >&2;}
6893 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: see the Autoconf documentation" >&5
6894 $as_echo "$as_me: WARNING: ndbm.h: see the Autoconf documentation" >&2;}
6895 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: section \"Present But Cannot Be Compiled\"" >&5
6896 $as_echo "$as_me: WARNING: ndbm.h: section \"Present But Cannot Be Compiled\"" >&2;}
6897 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the preprocessor's result" >&5
6898 $as_echo "$as_me: WARNING: ndbm.h: proceeding with the preprocessor's result" >&2;}
6899 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: in the future, the compiler will take precedence" >&5
6900 $as_echo "$as_me: WARNING: ndbm.h: in the future, the compiler will take precedence" >&2;}
6901
6902 ;;
6903 esac
6904 { $as_echo "$as_me:$LINENO: checking for ndbm.h" >&5
6905 $as_echo_n "checking for ndbm.h... " >&6; }
6906 if test "${ac_cv_header_ndbm_h+set}" = set; then
6907 $as_echo_n "(cached) " >&6
6908 else
6909 ac_cv_header_ndbm_h=$ac_header_preproc
6910 fi
6911 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
6912 $as_echo "$ac_cv_header_ndbm_h" >&6; }
6913
6914 fi
6915 if test "x$ac_cv_header_ndbm_h" = x""yes; then
6916
6917 { $as_echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5
6918 $as_echo_n "checking for dbm_open in -lndbm... " >&6; }
6919 if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then
6920 $as_echo_n "(cached) " >&6
6921 else
6922 ac_check_lib_save_LIBS=$LIBS
6923 LIBS="-lndbm $LIBS"
6924 cat >conftest.$ac_ext <<_ACEOF
6925 /* confdefs.h. */
6926 _ACEOF
6927 cat confdefs.h >>conftest.$ac_ext
6928 cat >>conftest.$ac_ext <<_ACEOF
6929 /* end confdefs.h. */
6930
6931 /* Override any GCC internal prototype to avoid an error.
6932 Use char because int might match the return type of a GCC
6933 builtin and then its argument prototype would still apply. */
6934 #ifdef __cplusplus
6935 extern "C"
6936 #endif
6937 char dbm_open ();
6938 int
6939 main ()
6940 {
6941 return dbm_open ();
6942 ;
6943 return 0;
6944 }
6945 _ACEOF
6946 rm -f conftest.$ac_objext conftest$ac_exeext
6947 if { (ac_try="$ac_link"
6948 case "(($ac_try" in
6949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6950 *) ac_try_echo=$ac_try;;
6951 esac
6952 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6953 $as_echo "$ac_try_echo") >&5
6954 (eval "$ac_link") 2>conftest.er1
6955 ac_status=$?
6956 grep -v '^ *+' conftest.er1 >conftest.err
6957 rm -f conftest.er1
6958 cat conftest.err >&5
6959 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6960 (exit $ac_status); } && {
6961 test -z "$ac_c_werror_flag" ||
6962 test ! -s conftest.err
6963 } && test -s conftest$ac_exeext && {
6964 test "$cross_compiling" = yes ||
6965 $as_test_x conftest$ac_exeext
6966 }; then
6967 ac_cv_lib_ndbm_dbm_open=yes
6968 else
6969 $as_echo "$as_me: failed program was:" >&5
6970 sed 's/^/| /' conftest.$ac_ext >&5
6971
6972 ac_cv_lib_ndbm_dbm_open=no
6973 fi
6974
6975 rm -rf conftest.dSYM
6976 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6977 conftest$ac_exeext conftest.$ac_ext
6978 LIBS=$ac_check_lib_save_LIBS
6979 fi
6980 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_dbm_open" >&5
6981 $as_echo "$ac_cv_lib_ndbm_dbm_open" >&6; }
6982 if test "x$ac_cv_lib_ndbm_dbm_open" = x""yes; then
6983 SASL_DB_LIB="-lndbm"
6984 else
6985
6986 { $as_echo "$as_me:$LINENO: checking for dbm_open" >&5
6987 $as_echo_n "checking for dbm_open... " >&6; }
6988 if test "${ac_cv_func_dbm_open+set}" = set; then
6989 $as_echo_n "(cached) " >&6
6990 else
6991 cat >conftest.$ac_ext <<_ACEOF
6992 /* confdefs.h. */
6993 _ACEOF
6994 cat confdefs.h >>conftest.$ac_ext
6995 cat >>conftest.$ac_ext <<_ACEOF
6996 /* end confdefs.h. */
6997 /* Define dbm_open to an innocuous variant, in case <limits.h> declares dbm_open.
6998 For example, HP-UX 11i <limits.h> declares gettimeofday. */
6999 #define dbm_open innocuous_dbm_open
7000
7001 /* System header to define __stub macros and hopefully few prototypes,
7002 which can conflict with char dbm_open (); below.
7003 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7004 <limits.h> exists even on freestanding compilers. */
7005
7006 #ifdef __STDC__
7007 # include <limits.h>
7008 #else
7009 # include <assert.h>
7010 #endif
7011
7012 #undef dbm_open
7013
7014 /* Override any GCC internal prototype to avoid an error.
7015 Use char because int might match the return type of a GCC
7016 builtin and then its argument prototype would still apply. */
7017 #ifdef __cplusplus
7018 extern "C"
7019 #endif
7020 char dbm_open ();
7021 /* The GNU C library defines this for functions which it implements
7022 to always fail with ENOSYS. Some functions are actually named
7023 something starting with __ and the normal name is an alias. */
7024 #if defined __stub_dbm_open || defined __stub___dbm_open
7025 choke me
7026 #endif
7027
7028 int
7029 main ()
7030 {
7031 return dbm_open ();
7032 ;
7033 return 0;
7034 }
7035 _ACEOF
7036 rm -f conftest.$ac_objext conftest$ac_exeext
7037 if { (ac_try="$ac_link"
7038 case "(($ac_try" in
7039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7040 *) ac_try_echo=$ac_try;;
7041 esac
7042 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7043 $as_echo "$ac_try_echo") >&5
7044 (eval "$ac_link") 2>conftest.er1
7045 ac_status=$?
7046 grep -v '^ *+' conftest.er1 >conftest.err
7047 rm -f conftest.er1
7048 cat conftest.err >&5
7049 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7050 (exit $ac_status); } && {
7051 test -z "$ac_c_werror_flag" ||
7052 test ! -s conftest.err
7053 } && test -s conftest$ac_exeext && {
7054 test "$cross_compiling" = yes ||
7055 $as_test_x conftest$ac_exeext
7056 }; then
7057 ac_cv_func_dbm_open=yes
7058 else
7059 $as_echo "$as_me: failed program was:" >&5
7060 sed 's/^/| /' conftest.$ac_ext >&5
7061
7062 ac_cv_func_dbm_open=no
7063 fi
7064
7065 rm -rf conftest.dSYM
7066 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7067 conftest$ac_exeext conftest.$ac_ext
7068 fi
7069 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_dbm_open" >&5
7070 $as_echo "$ac_cv_func_dbm_open" >&6; }
7071 if test "x$ac_cv_func_dbm_open" = x""yes; then
7072 :
7073 else
7074 dblib="no"
7075 fi
7076
7077 fi
7078
7079 else
7080 dblib="no"
7081 fi
7082
7083
7084 ;;
7085 auto_detect)
7086
7087
7088
7089 cmu_save_CPPFLAGS=$CPPFLAGS
7090
7091 if test -d $with_bdb_inc; then
7092 CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
7093 BDB_INCADD="-I$with_bdb_inc"
7094 else
7095 BDB_INCADD=""
7096 fi
7097
7098 if test "${ac_cv_header_db_h+set}" = set; then
7099 { $as_echo "$as_me:$LINENO: checking for db.h" >&5
7100 $as_echo_n "checking for db.h... " >&6; }
7101 if test "${ac_cv_header_db_h+set}" = set; then
7102 $as_echo_n "(cached) " >&6
7103 fi
7104 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
7105 $as_echo "$ac_cv_header_db_h" >&6; }
7106 else
7107 # Is the header compilable?
7108 { $as_echo "$as_me:$LINENO: checking db.h usability" >&5
7109 $as_echo_n "checking db.h usability... " >&6; }
7110 cat >conftest.$ac_ext <<_ACEOF
7111 /* confdefs.h. */
7112 _ACEOF
7113 cat confdefs.h >>conftest.$ac_ext
7114 cat >>conftest.$ac_ext <<_ACEOF
7115 /* end confdefs.h. */
7116 $ac_includes_default
7117 #include <db.h>
7118 _ACEOF
7119 rm -f conftest.$ac_objext
7120 if { (ac_try="$ac_compile"
7121 case "(($ac_try" in
7122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7123 *) ac_try_echo=$ac_try;;
7124 esac
7125 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7126 $as_echo "$ac_try_echo") >&5
7127 (eval "$ac_compile") 2>conftest.er1
7128 ac_status=$?
7129 grep -v '^ *+' conftest.er1 >conftest.err
7130 rm -f conftest.er1
7131 cat conftest.err >&5
7132 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7133 (exit $ac_status); } && {
7134 test -z "$ac_c_werror_flag" ||
7135 test ! -s conftest.err
7136 } && test -s conftest.$ac_objext; then
7137 ac_header_compiler=yes
7138 else
7139 $as_echo "$as_me: failed program was:" >&5
7140 sed 's/^/| /' conftest.$ac_ext >&5
7141
7142 ac_header_compiler=no
7143 fi
7144
7145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7146 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7147 $as_echo "$ac_header_compiler" >&6; }
7148
7149 # Is the header present?
7150 { $as_echo "$as_me:$LINENO: checking db.h presence" >&5
7151 $as_echo_n "checking db.h presence... " >&6; }
7152 cat >conftest.$ac_ext <<_ACEOF
7153 /* confdefs.h. */
7154 _ACEOF
7155 cat confdefs.h >>conftest.$ac_ext
7156 cat >>conftest.$ac_ext <<_ACEOF
7157 /* end confdefs.h. */
7158 #include <db.h>
7159 _ACEOF
7160 if { (ac_try="$ac_cpp conftest.$ac_ext"
7161 case "(($ac_try" in
7162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7163 *) ac_try_echo=$ac_try;;
7164 esac
7165 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7166 $as_echo "$ac_try_echo") >&5
7167 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7168 ac_status=$?
7169 grep -v '^ *+' conftest.er1 >conftest.err
7170 rm -f conftest.er1
7171 cat conftest.err >&5
7172 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7173 (exit $ac_status); } >/dev/null && {
7174 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7175 test ! -s conftest.err
7176 }; then
7177 ac_header_preproc=yes
7178 else
7179 $as_echo "$as_me: failed program was:" >&5
7180 sed 's/^/| /' conftest.$ac_ext >&5
7181
7182 ac_header_preproc=no
7183 fi
7184
7185 rm -f conftest.err conftest.$ac_ext
7186 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7187 $as_echo "$ac_header_preproc" >&6; }
7188
7189 # So? What about this header?
7190 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7191 yes:no: )
7192 { $as_echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5
7193 $as_echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7194 { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5
7195 $as_echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;}
7196 ac_header_preproc=yes
7197 ;;
7198 no:yes:* )
7199 { $as_echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5
7200 $as_echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;}
7201 { $as_echo "$as_me:$LINENO: WARNING: db.h: check for missing prerequisite headers?" >&5
7202 $as_echo "$as_me: WARNING: db.h: check for missing prerequisite headers?" >&2;}
7203 { $as_echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5
7204 $as_echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;}
7205 { $as_echo "$as_me:$LINENO: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&5
7206 $as_echo "$as_me: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&2;}
7207 { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5
7208 $as_echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;}
7209 { $as_echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5
7210 $as_echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;}
7211
7212 ;;
7213 esac
7214 { $as_echo "$as_me:$LINENO: checking for db.h" >&5
7215 $as_echo_n "checking for db.h... " >&6; }
7216 if test "${ac_cv_header_db_h+set}" = set; then
7217 $as_echo_n "(cached) " >&6
7218 else
7219 ac_cv_header_db_h=$ac_header_preproc
7220 fi
7221 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
7222 $as_echo "$ac_cv_header_db_h" >&6; }
7223
7224 fi
7225 if test "x$ac_cv_header_db_h" = x""yes; then
7226
7227 BDB_SAVE_LDFLAGS=$LDFLAGS
7228
7229 if test -d $with_bdb_lib; then
7230
7231 # this is CMU ADD LIBPATH TO
7232 if test "$andrew_cv_runpath_switch" = "none" ; then
7233 LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
7234 else
7235 LDFLAGS="-L$with_bdb_lib ${LDFLAGS} $andrew_cv_runpath_switch$with_bdb_lib"
7236 fi
7237
7238
7239 # this is CMU ADD LIBPATH TO
7240 if test "$andrew_cv_runpath_switch" = "none" ; then
7241 BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD}"
7242 else
7243 BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD} $andrew_cv_runpath_switch$with_bdb_lib"
7244 fi
7245
7246 else
7247 BDB_LIBADD=""
7248 fi
7249
7250 saved_LIBS=$LIBS
7251 for dbname in ${with_bdb} \
7252 db-5.2 db5.2 db52 \
7253 db-5.1 db5.2 db51 \
7254 db-5.0 db5.2 db50 \
7255 db-4.8 db4.8 db48 \
7256 db-4.7 db4.7 db47 \
7257 db-4.6 db4.6 db46 \
7258 db-4.5 db4.5 db45 \
7259 db-4.4 db4.4 db44 \
7260 db-4.3 db4.3 db43 \
7261 db-4.2 db4.2 db42 \
7262 db-4.1 db4.1 db41 \
7263 db-4.0 db4.0 db40 db-4 db4 \
7264 db-3.3 db3.3 db33 \
7265 db-3.2 db3.2 db32 \
7266 db-3.1 db3.1 db31 \
7267 db-3.0 db3.0 db30 db-3 db3 \
7268 db
7269 do
7270 LIBS="$saved_LIBS -l$dbname"
7271 cat >conftest.$ac_ext <<_ACEOF
7272 /* confdefs.h. */
7273 _ACEOF
7274 cat confdefs.h >>conftest.$ac_ext
7275 cat >>conftest.$ac_ext <<_ACEOF
7276 /* end confdefs.h. */
7277 #include <stdio.h>
7278 #include <db.h>
7279 int
7280 main ()
7281 {
7282 db_create(NULL, NULL, 0);
7283 ;
7284 return 0;
7285 }
7286 _ACEOF
7287 rm -f conftest.$ac_objext conftest$ac_exeext
7288 if { (ac_try="$ac_link"
7289 case "(($ac_try" in
7290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7291 *) ac_try_echo=$ac_try;;
7292 esac
7293 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7294 $as_echo "$ac_try_echo") >&5
7295 (eval "$ac_link") 2>conftest.er1
7296 ac_status=$?
7297 grep -v '^ *+' conftest.er1 >conftest.err
7298 rm -f conftest.er1
7299 cat conftest.err >&5
7300 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7301 (exit $ac_status); } && {
7302 test -z "$ac_c_werror_flag" ||
7303 test ! -s conftest.err
7304 } && test -s conftest$ac_exeext && {
7305 test "$cross_compiling" = yes ||
7306 $as_test_x conftest$ac_exeext
7307 }; then
7308 BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db
7309 else
7310 $as_echo "$as_me: failed program was:" >&5
7311 sed 's/^/| /' conftest.$ac_ext >&5
7312
7313 dblib="no"
7314 fi
7315
7316 rm -rf conftest.dSYM
7317 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7318 conftest$ac_exeext conftest.$ac_ext
7319 if test "$dblib" = "berkeley"; then break; fi
7320 done
7321 if test "$dblib" = "no"; then
7322 LIBS="$saved_LIBS -ldb"
7323 cat >conftest.$ac_ext <<_ACEOF
7324 /* confdefs.h. */
7325 _ACEOF
7326 cat confdefs.h >>conftest.$ac_ext
7327 cat >>conftest.$ac_ext <<_ACEOF
7328 /* end confdefs.h. */
7329 #include <stdio.h>
7330 #include <db.h>
7331 int
7332 main ()
7333 {
7334 db_open(NULL, 0, 0, 0, NULL, NULL, NULL);
7335 ;
7336 return 0;
7337 }
7338 _ACEOF
7339 rm -f conftest.$ac_objext conftest$ac_exeext
7340 if { (ac_try="$ac_link"
7341 case "(($ac_try" in
7342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7343 *) ac_try_echo=$ac_try;;
7344 esac
7345 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7346 $as_echo "$ac_try_echo") >&5
7347 (eval "$ac_link") 2>conftest.er1
7348 ac_status=$?
7349 grep -v '^ *+' conftest.er1 >conftest.err
7350 rm -f conftest.er1
7351 cat conftest.err >&5
7352 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7353 (exit $ac_status); } && {
7354 test -z "$ac_c_werror_flag" ||
7355 test ! -s conftest.err
7356 } && test -s conftest$ac_exeext && {
7357 test "$cross_compiling" = yes ||
7358 $as_test_x conftest$ac_exeext
7359 }; then
7360 BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
7361 else
7362 $as_echo "$as_me: failed program was:" >&5
7363 sed 's/^/| /' conftest.$ac_ext >&5
7364
7365 dblib="no"
7366 fi
7367
7368 rm -rf conftest.dSYM
7369 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7370 conftest$ac_exeext conftest.$ac_ext
7371 fi
7372 LIBS=$saved_LIBS
7373
7374 LDFLAGS=$BDB_SAVE_LDFLAGS
7375
7376 else
7377 dblib="no"
7378 fi
7379
7380
7381
7382 CPPFLAGS=$cmu_save_CPPFLAGS
7383
7384 if test "$dblib" = no; then
7385 if test "${ac_cv_header_ndbm_h+set}" = set; then
7386 { $as_echo "$as_me:$LINENO: checking for ndbm.h" >&5
7387 $as_echo_n "checking for ndbm.h... " >&6; }
7388 if test "${ac_cv_header_ndbm_h+set}" = set; then
7389 $as_echo_n "(cached) " >&6
7390 fi
7391 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
7392 $as_echo "$ac_cv_header_ndbm_h" >&6; }
7393 else
7394 # Is the header compilable?
7395 { $as_echo "$as_me:$LINENO: checking ndbm.h usability" >&5
7396 $as_echo_n "checking ndbm.h usability... " >&6; }
7397 cat >conftest.$ac_ext <<_ACEOF
7398 /* confdefs.h. */
7399 _ACEOF
7400 cat confdefs.h >>conftest.$ac_ext
7401 cat >>conftest.$ac_ext <<_ACEOF
7402 /* end confdefs.h. */
7403 $ac_includes_default
7404 #include <ndbm.h>
7405 _ACEOF
7406 rm -f conftest.$ac_objext
7407 if { (ac_try="$ac_compile"
7408 case "(($ac_try" in
7409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7410 *) ac_try_echo=$ac_try;;
7411 esac
7412 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7413 $as_echo "$ac_try_echo") >&5
7414 (eval "$ac_compile") 2>conftest.er1
7415 ac_status=$?
7416 grep -v '^ *+' conftest.er1 >conftest.err
7417 rm -f conftest.er1
7418 cat conftest.err >&5
7419 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7420 (exit $ac_status); } && {
7421 test -z "$ac_c_werror_flag" ||
7422 test ! -s conftest.err
7423 } && test -s conftest.$ac_objext; then
7424 ac_header_compiler=yes
7425 else
7426 $as_echo "$as_me: failed program was:" >&5
7427 sed 's/^/| /' conftest.$ac_ext >&5
7428
7429 ac_header_compiler=no
7430 fi
7431
7432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7433 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7434 $as_echo "$ac_header_compiler" >&6; }
7435
7436 # Is the header present?
7437 { $as_echo "$as_me:$LINENO: checking ndbm.h presence" >&5
7438 $as_echo_n "checking ndbm.h presence... " >&6; }
7439 cat >conftest.$ac_ext <<_ACEOF
7440 /* confdefs.h. */
7441 _ACEOF
7442 cat confdefs.h >>conftest.$ac_ext
7443 cat >>conftest.$ac_ext <<_ACEOF
7444 /* end confdefs.h. */
7445 #include <ndbm.h>
7446 _ACEOF
7447 if { (ac_try="$ac_cpp conftest.$ac_ext"
7448 case "(($ac_try" in
7449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7450 *) ac_try_echo=$ac_try;;
7451 esac
7452 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7453 $as_echo "$ac_try_echo") >&5
7454 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7455 ac_status=$?
7456 grep -v '^ *+' conftest.er1 >conftest.err
7457 rm -f conftest.er1
7458 cat conftest.err >&5
7459 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7460 (exit $ac_status); } >/dev/null && {
7461 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7462 test ! -s conftest.err
7463 }; then
7464 ac_header_preproc=yes
7465 else
7466 $as_echo "$as_me: failed program was:" >&5
7467 sed 's/^/| /' conftest.$ac_ext >&5
7468
7469 ac_header_preproc=no
7470 fi
7471
7472 rm -f conftest.err conftest.$ac_ext
7473 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7474 $as_echo "$ac_header_preproc" >&6; }
7475
7476 # So? What about this header?
7477 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7478 yes:no: )
7479 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
7480 $as_echo "$as_me: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7481 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the compiler's result" >&5
7482 $as_echo "$as_me: WARNING: ndbm.h: proceeding with the compiler's result" >&2;}
7483 ac_header_preproc=yes
7484 ;;
7485 no:yes:* )
7486 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: present but cannot be compiled" >&5
7487 $as_echo "$as_me: WARNING: ndbm.h: present but cannot be compiled" >&2;}
7488 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: check for missing prerequisite headers?" >&5
7489 $as_echo "$as_me: WARNING: ndbm.h: check for missing prerequisite headers?" >&2;}
7490 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: see the Autoconf documentation" >&5
7491 $as_echo "$as_me: WARNING: ndbm.h: see the Autoconf documentation" >&2;}
7492 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: section \"Present But Cannot Be Compiled\"" >&5
7493 $as_echo "$as_me: WARNING: ndbm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7494 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the preprocessor's result" >&5
7495 $as_echo "$as_me: WARNING: ndbm.h: proceeding with the preprocessor's result" >&2;}
7496 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: in the future, the compiler will take precedence" >&5
7497 $as_echo "$as_me: WARNING: ndbm.h: in the future, the compiler will take precedence" >&2;}
7498
7499 ;;
7500 esac
7501 { $as_echo "$as_me:$LINENO: checking for ndbm.h" >&5
7502 $as_echo_n "checking for ndbm.h... " >&6; }
7503 if test "${ac_cv_header_ndbm_h+set}" = set; then
7504 $as_echo_n "(cached) " >&6
7505 else
7506 ac_cv_header_ndbm_h=$ac_header_preproc
7507 fi
7508 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
7509 $as_echo "$ac_cv_header_ndbm_h" >&6; }
7510
7511 fi
7512 if test "x$ac_cv_header_ndbm_h" = x""yes; then
7513
7514 { $as_echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5
7515 $as_echo_n "checking for dbm_open in -lndbm... " >&6; }
7516 if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then
7517 $as_echo_n "(cached) " >&6
7518 else
7519 ac_check_lib_save_LIBS=$LIBS
7520 LIBS="-lndbm $LIBS"
7521 cat >conftest.$ac_ext <<_ACEOF
7522 /* confdefs.h. */
7523 _ACEOF
7524 cat confdefs.h >>conftest.$ac_ext
7525 cat >>conftest.$ac_ext <<_ACEOF
7526 /* end confdefs.h. */
7527
7528 /* Override any GCC internal prototype to avoid an error.
7529 Use char because int might match the return type of a GCC
7530 builtin and then its argument prototype would still apply. */
7531 #ifdef __cplusplus
7532 extern "C"
7533 #endif
7534 char dbm_open ();
7535 int
7536 main ()
7537 {
7538 return dbm_open ();
7539 ;
7540 return 0;
7541 }
7542 _ACEOF
7543 rm -f conftest.$ac_objext conftest$ac_exeext
7544 if { (ac_try="$ac_link"
7545 case "(($ac_try" in
7546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7547 *) ac_try_echo=$ac_try;;
7548 esac
7549 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7550 $as_echo "$ac_try_echo") >&5
7551 (eval "$ac_link") 2>conftest.er1
7552 ac_status=$?
7553 grep -v '^ *+' conftest.er1 >conftest.err
7554 rm -f conftest.er1
7555 cat conftest.err >&5
7556 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7557 (exit $ac_status); } && {
7558 test -z "$ac_c_werror_flag" ||
7559 test ! -s conftest.err
7560 } && test -s conftest$ac_exeext && {
7561 test "$cross_compiling" = yes ||
7562 $as_test_x conftest$ac_exeext
7563 }; then
7564 ac_cv_lib_ndbm_dbm_open=yes
7565 else
7566 $as_echo "$as_me: failed program was:" >&5
7567 sed 's/^/| /' conftest.$ac_ext >&5
7568
7569 ac_cv_lib_ndbm_dbm_open=no
7570 fi
7571
7572 rm -rf conftest.dSYM
7573 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7574 conftest$ac_exeext conftest.$ac_ext
7575 LIBS=$ac_check_lib_save_LIBS
7576 fi
7577 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_dbm_open" >&5
7578 $as_echo "$ac_cv_lib_ndbm_dbm_open" >&6; }
7579 if test "x$ac_cv_lib_ndbm_dbm_open" = x""yes; then
7580 dblib="ndbm"; SASL_DB_LIB="-lndbm"
7581 else
7582 dblib="weird"
7583 fi
7584
7585 else
7586 dblib="no"
7587 fi
7588
7589
7590 if test "$dblib" = "weird"; then
7591 { $as_echo "$as_me:$LINENO: checking for dbm_open" >&5
7592 $as_echo_n "checking for dbm_open... " >&6; }
7593 if test "${ac_cv_func_dbm_open+set}" = set; then
7594 $as_echo_n "(cached) " >&6
7595 else
7596 cat >conftest.$ac_ext <<_ACEOF
7597 /* confdefs.h. */
7598 _ACEOF
7599 cat confdefs.h >>conftest.$ac_ext
7600 cat >>conftest.$ac_ext <<_ACEOF
7601 /* end confdefs.h. */
7602 /* Define dbm_open to an innocuous variant, in case <limits.h> declares dbm_open.
7603 For example, HP-UX 11i <limits.h> declares gettimeofday. */
7604 #define dbm_open innocuous_dbm_open
7605
7606 /* System header to define __stub macros and hopefully few prototypes,
7607 which can conflict with char dbm_open (); below.
7608 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7609 <limits.h> exists even on freestanding compilers. */
7610
7611 #ifdef __STDC__
7612 # include <limits.h>
7613 #else
7614 # include <assert.h>
7615 #endif
7616
7617 #undef dbm_open
7618
7619 /* Override any GCC internal prototype to avoid an error.
7620 Use char because int might match the return type of a GCC
7621 builtin and then its argument prototype would still apply. */
7622 #ifdef __cplusplus
7623 extern "C"
7624 #endif
7625 char dbm_open ();
7626 /* The GNU C library defines this for functions which it implements
7627 to always fail with ENOSYS. Some functions are actually named
7628 something starting with __ and the normal name is an alias. */
7629 #if defined __stub_dbm_open || defined __stub___dbm_open
7630 choke me
7631 #endif
7632
7633 int
7634 main ()
7635 {
7636 return dbm_open ();
7637 ;
7638 return 0;
7639 }
7640 _ACEOF
7641 rm -f conftest.$ac_objext conftest$ac_exeext
7642 if { (ac_try="$ac_link"
7643 case "(($ac_try" in
7644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7645 *) ac_try_echo=$ac_try;;
7646 esac
7647 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7648 $as_echo "$ac_try_echo") >&5
7649 (eval "$ac_link") 2>conftest.er1
7650 ac_status=$?
7651 grep -v '^ *+' conftest.er1 >conftest.err
7652 rm -f conftest.er1
7653 cat conftest.err >&5
7654 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7655 (exit $ac_status); } && {
7656 test -z "$ac_c_werror_flag" ||
7657 test ! -s conftest.err
7658 } && test -s conftest$ac_exeext && {
7659 test "$cross_compiling" = yes ||
7660 $as_test_x conftest$ac_exeext
7661 }; then
7662 ac_cv_func_dbm_open=yes
7663 else
7664 $as_echo "$as_me: failed program was:" >&5
7665 sed 's/^/| /' conftest.$ac_ext >&5
7666
7667 ac_cv_func_dbm_open=no
7668 fi
7669
7670 rm -rf conftest.dSYM
7671 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7672 conftest$ac_exeext conftest.$ac_ext
7673 fi
7674 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_dbm_open" >&5
7675 $as_echo "$ac_cv_func_dbm_open" >&6; }
7676 if test "x$ac_cv_func_dbm_open" = x""yes; then
7677 dblib="ndbm"
7678 else
7679 dblib="no"
7680 fi
7681
7682 fi
7683
7684 if test "$dblib" = no; then
7685 if test "${ac_cv_header_gdbm_h+set}" = set; then
7686 { $as_echo "$as_me:$LINENO: checking for gdbm.h" >&5
7687 $as_echo_n "checking for gdbm.h... " >&6; }
7688 if test "${ac_cv_header_gdbm_h+set}" = set; then
7689 $as_echo_n "(cached) " >&6
7690 fi
7691 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
7692 $as_echo "$ac_cv_header_gdbm_h" >&6; }
7693 else
7694 # Is the header compilable?
7695 { $as_echo "$as_me:$LINENO: checking gdbm.h usability" >&5
7696 $as_echo_n "checking gdbm.h usability... " >&6; }
7697 cat >conftest.$ac_ext <<_ACEOF
7698 /* confdefs.h. */
7699 _ACEOF
7700 cat confdefs.h >>conftest.$ac_ext
7701 cat >>conftest.$ac_ext <<_ACEOF
7702 /* end confdefs.h. */
7703 $ac_includes_default
7704 #include <gdbm.h>
7705 _ACEOF
7706 rm -f conftest.$ac_objext
7707 if { (ac_try="$ac_compile"
7708 case "(($ac_try" in
7709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7710 *) ac_try_echo=$ac_try;;
7711 esac
7712 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7713 $as_echo "$ac_try_echo") >&5
7714 (eval "$ac_compile") 2>conftest.er1
7715 ac_status=$?
7716 grep -v '^ *+' conftest.er1 >conftest.err
7717 rm -f conftest.er1
7718 cat conftest.err >&5
7719 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7720 (exit $ac_status); } && {
7721 test -z "$ac_c_werror_flag" ||
7722 test ! -s conftest.err
7723 } && test -s conftest.$ac_objext; then
7724 ac_header_compiler=yes
7725 else
7726 $as_echo "$as_me: failed program was:" >&5
7727 sed 's/^/| /' conftest.$ac_ext >&5
7728
7729 ac_header_compiler=no
7730 fi
7731
7732 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7733 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7734 $as_echo "$ac_header_compiler" >&6; }
7735
7736 # Is the header present?
7737 { $as_echo "$as_me:$LINENO: checking gdbm.h presence" >&5
7738 $as_echo_n "checking gdbm.h presence... " >&6; }
7739 cat >conftest.$ac_ext <<_ACEOF
7740 /* confdefs.h. */
7741 _ACEOF
7742 cat confdefs.h >>conftest.$ac_ext
7743 cat >>conftest.$ac_ext <<_ACEOF
7744 /* end confdefs.h. */
7745 #include <gdbm.h>
7746 _ACEOF
7747 if { (ac_try="$ac_cpp conftest.$ac_ext"
7748 case "(($ac_try" in
7749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7750 *) ac_try_echo=$ac_try;;
7751 esac
7752 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7753 $as_echo "$ac_try_echo") >&5
7754 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7755 ac_status=$?
7756 grep -v '^ *+' conftest.er1 >conftest.err
7757 rm -f conftest.er1
7758 cat conftest.err >&5
7759 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7760 (exit $ac_status); } >/dev/null && {
7761 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7762 test ! -s conftest.err
7763 }; then
7764 ac_header_preproc=yes
7765 else
7766 $as_echo "$as_me: failed program was:" >&5
7767 sed 's/^/| /' conftest.$ac_ext >&5
7768
7769 ac_header_preproc=no
7770 fi
7771
7772 rm -f conftest.err conftest.$ac_ext
7773 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7774 $as_echo "$ac_header_preproc" >&6; }
7775
7776 # So? What about this header?
7777 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7778 yes:no: )
7779 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
7780 $as_echo "$as_me: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7781 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the compiler's result" >&5
7782 $as_echo "$as_me: WARNING: gdbm.h: proceeding with the compiler's result" >&2;}
7783 ac_header_preproc=yes
7784 ;;
7785 no:yes:* )
7786 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: present but cannot be compiled" >&5
7787 $as_echo "$as_me: WARNING: gdbm.h: present but cannot be compiled" >&2;}
7788 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: check for missing prerequisite headers?" >&5
7789 $as_echo "$as_me: WARNING: gdbm.h: check for missing prerequisite headers?" >&2;}
7790 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: see the Autoconf documentation" >&5
7791 $as_echo "$as_me: WARNING: gdbm.h: see the Autoconf documentation" >&2;}
7792 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: section \"Present But Cannot Be Compiled\"" >&5
7793 $as_echo "$as_me: WARNING: gdbm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7794 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the preprocessor's result" >&5
7795 $as_echo "$as_me: WARNING: gdbm.h: proceeding with the preprocessor's result" >&2;}
7796 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: in the future, the compiler will take precedence" >&5
7797 $as_echo "$as_me: WARNING: gdbm.h: in the future, the compiler will take precedence" >&2;}
7798
7799 ;;
7800 esac
7801 { $as_echo "$as_me:$LINENO: checking for gdbm.h" >&5
7802 $as_echo_n "checking for gdbm.h... " >&6; }
7803 if test "${ac_cv_header_gdbm_h+set}" = set; then
7804 $as_echo_n "(cached) " >&6
7805 else
7806 ac_cv_header_gdbm_h=$ac_header_preproc
7807 fi
7808 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
7809 $as_echo "$ac_cv_header_gdbm_h" >&6; }
7810
7811 fi
7812 if test "x$ac_cv_header_gdbm_h" = x""yes; then
7813
7814 { $as_echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
7815 $as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
7816 if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
7817 $as_echo_n "(cached) " >&6
7818 else
7819 ac_check_lib_save_LIBS=$LIBS
7820 LIBS="-lgdbm $LIBS"
7821 cat >conftest.$ac_ext <<_ACEOF
7822 /* confdefs.h. */
7823 _ACEOF
7824 cat confdefs.h >>conftest.$ac_ext
7825 cat >>conftest.$ac_ext <<_ACEOF
7826 /* end confdefs.h. */
7827
7828 /* Override any GCC internal prototype to avoid an error.
7829 Use char because int might match the return type of a GCC
7830 builtin and then its argument prototype would still apply. */
7831 #ifdef __cplusplus
7832 extern "C"
7833 #endif
7834 char gdbm_open ();
7835 int
7836 main ()
7837 {
7838 return gdbm_open ();
7839 ;
7840 return 0;
7841 }
7842 _ACEOF
7843 rm -f conftest.$ac_objext conftest$ac_exeext
7844 if { (ac_try="$ac_link"
7845 case "(($ac_try" in
7846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7847 *) ac_try_echo=$ac_try;;
7848 esac
7849 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7850 $as_echo "$ac_try_echo") >&5
7851 (eval "$ac_link") 2>conftest.er1
7852 ac_status=$?
7853 grep -v '^ *+' conftest.er1 >conftest.err
7854 rm -f conftest.er1
7855 cat conftest.err >&5
7856 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7857 (exit $ac_status); } && {
7858 test -z "$ac_c_werror_flag" ||
7859 test ! -s conftest.err
7860 } && test -s conftest$ac_exeext && {
7861 test "$cross_compiling" = yes ||
7862 $as_test_x conftest$ac_exeext
7863 }; then
7864 ac_cv_lib_gdbm_gdbm_open=yes
7865 else
7866 $as_echo "$as_me: failed program was:" >&5
7867 sed 's/^/| /' conftest.$ac_ext >&5
7868
7869 ac_cv_lib_gdbm_gdbm_open=no
7870 fi
7871
7872 rm -rf conftest.dSYM
7873 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7874 conftest$ac_exeext conftest.$ac_ext
7875 LIBS=$ac_check_lib_save_LIBS
7876 fi
7877 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
7878 $as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
7879 if test "x$ac_cv_lib_gdbm_gdbm_open" = x""yes; then
7880 dblib="gdbm";
7881 SASL_DB_LIB="-lgdbm"
7882 else
7883 dblib="no"
7884 fi
7885
7886 else
7887 dblib="no"
7888 fi
7889
7890
7891 fi
7892 else
7893 CPPFLAGS="${CPPFLAGS} ${BDB_INCADD}"
7894 SASL_DB_INC=$BDB_INCADD
7895 SASL_DB_LIB="${BDB_LIBADD}"
7896 fi
7897 ;;
7898 none)
7899 ;;
7900 no)
7901 ;;
7902 *)
7903 { $as_echo "$as_me:$LINENO: WARNING: Bad DB library implementation specified;" >&5
7904 $as_echo "$as_me: WARNING: Bad DB library implementation specified;" >&2;}
7905 { { $as_echo "$as_me:$LINENO: error: Use either \"berkeley\", \"gdbm\", \"ndbm\" or \"none\"" >&5
7906 $as_echo "$as_me: error: Use either \"berkeley\", \"gdbm\", \"ndbm\" or \"none\"" >&2;}
7907 { (exit 1); exit 1; }; }
7908 dblib=no
7909 ;;
7910 esac
7911 LIBS="$cmu_save_LIBS"
7912
7913 { $as_echo "$as_me:$LINENO: checking DB library to use" >&5
7914 $as_echo_n "checking DB library to use... " >&6; }
7915 { $as_echo "$as_me:$LINENO: result: $dblib" >&5
7916 $as_echo "$dblib" >&6; }
7917
7918 SASL_DB_BACKEND="db_${dblib}.lo"
7919 SASL_DB_BACKEND_STATIC="db_${dblib}.o allockey.o"
7920 SASL_DB_BACKEND_STATIC_SRCS="\$(top_srcdir)/sasldb/db_${dblib}.c \$(top_srcdir)/sasldb/allockey.c"
7921 SASL_DB_UTILS="saslpasswd2 sasldblistusers2"
7922 SASL_DB_MANS="saslpasswd2.8 sasldblistusers2.8"
7923
7924 case "$dblib" in
7925 gdbm)
7926 SASL_MECHS="$SASL_MECHS libsasldb.la"
7927
7928 cat >>confdefs.h <<\_ACEOF
7929 #define SASL_GDBM /**/
7930 _ACEOF
7931
7932 ;;
7933 ndbm)
7934 SASL_MECHS="$SASL_MECHS libsasldb.la"
7935
7936 cat >>confdefs.h <<\_ACEOF
7937 #define SASL_NDBM /**/
7938 _ACEOF
7939
7940 ;;
7941 berkeley)
7942 SASL_MECHS="$SASL_MECHS libsasldb.la"
7943
7944 cat >>confdefs.h <<\_ACEOF
7945 #define SASL_BERKELEYDB /**/
7946 _ACEOF
7947
7948 ;;
7949 *)
7950 { $as_echo "$as_me:$LINENO: WARNING: Disabling SASL authentication database support" >&5
7951 $as_echo "$as_me: WARNING: Disabling SASL authentication database support" >&2;}
7952 SASL_DB_BACKEND="db_none.lo"
7953 SASL_DB_BACKEND_STATIC="db_none.o"
7954 SASL_DB_BACKEND_STATIC_SRCS="\$(top_srcdir)/sasldb/db_none.c"
7955 SASL_DB_UTILS=""
7956 SASL_DB_MANS=""
7957 SASL_DB_LIB=""
7958 ;;
7959 esac
7960
7961 if test "$enable_static" = yes; then
7962 if test "$dblib" != "none"; then
7963 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/sasldb.c $SASL_DB_BACKEND_STATIC_SRCS"
7964 SASL_STATIC_OBJS="$SASL_STATIC_OBJS sasldb.o $SASL_DB_BACKEND_STATIC"
7965
7966 cat >>confdefs.h <<\_ACEOF
7967 #define STATIC_SASLDB /**/
7968 _ACEOF
7969
7970 else
7971 SASL_STATIC_OBJS="$SASL_STATIC_OBJS $SASL_DB_BACKEND_STATIC"
7972 SASL_STATIC_SRCS="$SASL_STATIC_SRCS $SASL_DB_BACKEND_STATIC_SRCS"
7973 fi
7974 fi
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984 # Do we not install the SASL DB man pages?
7985 if test "x$SASL_DB_MANS" = "x"; then
7986 NO_SASL_DB_MANS_TRUE=
7987 NO_SASL_DB_MANS_FALSE='#'
7988 else
7989 NO_SASL_DB_MANS_TRUE='#'
7990 NO_SASL_DB_MANS_FALSE=
7991 fi
7992
7993
7994 # Check whether --enable-keep_db_open was given.
7995 if test "${enable_keep_db_open+set}" = set; then
7996 enableval=$enable_keep_db_open; keep_db_open=$enableval
7997 else
7998 keep_db_open=no
7999 fi
8000
8001
8002 # Disable if Berkeley DB is not used
8003 if test "$dblib" != berkeley; then
8004 keep_db_open=no
8005 fi
8006
8007 if test "$keep_db_open" = yes; then
8008
8009 cat >>confdefs.h <<\_ACEOF
8010 #define KEEP_DB_OPEN /**/
8011 _ACEOF
8012
8013 fi
8014 { $as_echo "$as_me:$LINENO: checking if Berkeley DB handle is kept open in SASLDB" >&5
8015 $as_echo_n "checking if Berkeley DB handle is kept open in SASLDB... " >&6; }
8016 { $as_echo "$as_me:$LINENO: result: $keep_db_open" >&5
8017 $as_echo "$keep_db_open" >&6; }
8018
8019 { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
8020 $as_echo_n "checking for dlopen in -ldl... " >&6; }
8021 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
8022 $as_echo_n "(cached) " >&6
8023 else
8024 ac_check_lib_save_LIBS=$LIBS
8025 LIBS="-ldl $LIBS"
8026 cat >conftest.$ac_ext <<_ACEOF
8027 /* confdefs.h. */
8028 _ACEOF
8029 cat confdefs.h >>conftest.$ac_ext
8030 cat >>conftest.$ac_ext <<_ACEOF
8031 /* end confdefs.h. */
8032
8033 /* Override any GCC internal prototype to avoid an error.
8034 Use char because int might match the return type of a GCC
8035 builtin and then its argument prototype would still apply. */
8036 #ifdef __cplusplus
8037 extern "C"
8038 #endif
8039 char dlopen ();
8040 int
8041 main ()
8042 {
8043 return dlopen ();
8044 ;
8045 return 0;
8046 }
8047 _ACEOF
8048 rm -f conftest.$ac_objext conftest$ac_exeext
8049 if { (ac_try="$ac_link"
8050 case "(($ac_try" in
8051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8052 *) ac_try_echo=$ac_try;;
8053 esac
8054 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8055 $as_echo "$ac_try_echo") >&5
8056 (eval "$ac_link") 2>conftest.er1
8057 ac_status=$?
8058 grep -v '^ *+' conftest.er1 >conftest.err
8059 rm -f conftest.er1
8060 cat conftest.err >&5
8061 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8062 (exit $ac_status); } && {
8063 test -z "$ac_c_werror_flag" ||
8064 test ! -s conftest.err
8065 } && test -s conftest$ac_exeext && {
8066 test "$cross_compiling" = yes ||
8067 $as_test_x conftest$ac_exeext
8068 }; then
8069 ac_cv_lib_dl_dlopen=yes
8070 else
8071 $as_echo "$as_me: failed program was:" >&5
8072 sed 's/^/| /' conftest.$ac_ext >&5
8073
8074 ac_cv_lib_dl_dlopen=no
8075 fi
8076
8077 rm -rf conftest.dSYM
8078 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8079 conftest$ac_exeext conftest.$ac_ext
8080 LIBS=$ac_check_lib_save_LIBS
8081 fi
8082 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
8083 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
8084 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
8085 SASL_DL_LIB="-ldl"
8086 else
8087 SASL_DL_LIB=""
8088 fi
8089
8090
8091
8092
8093
8094 # Check whether --with-devrandom was given.
8095 if test "${with_devrandom+set}" = set; then
8096 withval=$with_devrandom; devrandom=$withval
8097 else
8098 devrandom=/dev/random
8099 fi
8100
8101 { $as_echo "$as_me:$LINENO: checking /dev/random to use" >&5
8102 $as_echo_n "checking /dev/random to use... " >&6; }
8103 { $as_echo "$as_me:$LINENO: result: $devrandom" >&5
8104 $as_echo "$devrandom" >&6; }
8105
8106 cat >>confdefs.h <<_ACEOF
8107 #define SASL_DEV_RANDOM "$devrandom"
8108 _ACEOF
8109
8110
8111
8112 for ac_prog in nm
8113 do
8114 # Extract the first word of "$ac_prog", so it can be a program name with args.
8115 set dummy $ac_prog; ac_word=$2
8116 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
8117 $as_echo_n "checking for $ac_word... " >&6; }
8118 if test "${ac_cv_prog_NM+set}" = set; then
8119 $as_echo_n "(cached) " >&6
8120 else
8121 if test -n "$NM"; then
8122 ac_cv_prog_NM="$NM" # Let the user override the test.
8123 else
8124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8125 for as_dir in $PATH
8126 do
8127 IFS=$as_save_IFS
8128 test -z "$as_dir" && as_dir=.
8129 for ac_exec_ext in '' $ac_executable_extensions; do
8130 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8131 ac_cv_prog_NM="$ac_prog"
8132 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8133 break 2
8134 fi
8135 done
8136 done
8137 IFS=$as_save_IFS
8138
8139 fi
8140 fi
8141 NM=$ac_cv_prog_NM
8142 if test -n "$NM"; then
8143 { $as_echo "$as_me:$LINENO: result: $NM" >&5
8144 $as_echo "$NM" >&6; }
8145 else
8146 { $as_echo "$as_me:$LINENO: result: no" >&5
8147 $as_echo "no" >&6; }
8148 fi
8149
8150
8151 test -n "$NM" && break
8152 done
8153
8154
8155 { $as_echo "$as_me:$LINENO: checking for underscore before symbols" >&5
8156 $as_echo_n "checking for underscore before symbols... " >&6; }
8157 if test "${sasl_cv_uscore+set}" = set; then
8158 $as_echo_n "(cached) " >&6
8159 else
8160
8161 echo "main(){int i=1;}
8162 foo(){int i=6;}" > conftest.c
8163 ${CC} -o a.out conftest.c > /dev/null
8164 if (${NM} a.out | grep _foo) > /dev/null; then
8165 sasl_cv_uscore=yes
8166 else
8167 sasl_cv_uscore=no
8168 fi
8169 fi
8170
8171 { $as_echo "$as_me:$LINENO: result: $sasl_cv_uscore" >&5
8172 $as_echo "$sasl_cv_uscore" >&6; }
8173 rm -f conftest.c a.out
8174
8175 if test $sasl_cv_uscore = yes; then
8176 if test $ac_cv_lib_dl_dlopen = yes ; then
8177 { $as_echo "$as_me:$LINENO: checking whether dlsym adds the underscore for us" >&5
8178 $as_echo_n "checking whether dlsym adds the underscore for us... " >&6; }
8179 cmu_save_LIBS="$LIBS"
8180 LIBS="$LIBS $SASL_DL_LIB"
8181 if test "${sasl_cv_dlsym_adds_uscore+set}" = set; then
8182 $as_echo_n "(cached) " >&6
8183 else
8184 if test "$cross_compiling" = yes; then
8185 { $as_echo "$as_me:$LINENO: WARNING: cross-compiler" >&5
8186 $as_echo "$as_me: WARNING: cross-compiler" >&2;}
8187 else
8188 cat >conftest.$ac_ext <<_ACEOF
8189 /* confdefs.h. */
8190 _ACEOF
8191 cat confdefs.h >>conftest.$ac_ext
8192 cat >>conftest.$ac_ext <<_ACEOF
8193 /* end confdefs.h. */
8194
8195 #include <dlfcn.h>
8196 #include <stdio.h>
8197 foo() { int i=0;}
8198 main() { void *self, *ptr1, *ptr2; self=dlopen(NULL,RTLD_LAZY);
8199 if(self) { ptr1=dlsym(self,"foo"); ptr2=dlsym(self,"_foo");
8200 if(ptr1 && !ptr2) exit(0); } exit(1); }
8201
8202 _ACEOF
8203 rm -f conftest$ac_exeext
8204 if { (ac_try="$ac_link"
8205 case "(($ac_try" in
8206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8207 *) ac_try_echo=$ac_try;;
8208 esac
8209 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8210 $as_echo "$ac_try_echo") >&5
8211 (eval "$ac_link") 2>&5
8212 ac_status=$?
8213 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8214 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8215 { (case "(($ac_try" in
8216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8217 *) ac_try_echo=$ac_try;;
8218 esac
8219 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8220 $as_echo "$ac_try_echo") >&5
8221 (eval "$ac_try") 2>&5
8222 ac_status=$?
8223 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8224 (exit $ac_status); }; }; then
8225 sasl_cv_dlsym_adds_uscore=yes
8226 else
8227 $as_echo "$as_me: program exited with status $ac_status" >&5
8228 $as_echo "$as_me: failed program was:" >&5
8229 sed 's/^/| /' conftest.$ac_ext >&5
8230
8231 ( exit $ac_status )
8232 sasl_cv_dlsym_adds_uscore=no
8233
8234 cat >>confdefs.h <<\_ACEOF
8235 #define DLSYM_NEEDS_UNDERSCORE /**/
8236 _ACEOF
8237
8238 fi
8239 rm -rf conftest.dSYM
8240 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8241 fi
8242
8243
8244 fi
8245
8246 LIBS="$cmu_save_LIBS"
8247 { $as_echo "$as_me:$LINENO: result: $sasl_cv_dlsym_adds_uscore" >&5
8248 $as_echo "$sasl_cv_dlsym_adds_uscore" >&6; }
8249 fi
8250 fi
8251
8252
8253 for ac_func in syslog
8254 do
8255 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8256 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
8257 $as_echo_n "checking for $ac_func... " >&6; }
8258 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8259 $as_echo_n "(cached) " >&6
8260 else
8261 cat >conftest.$ac_ext <<_ACEOF
8262 /* confdefs.h. */
8263 _ACEOF
8264 cat confdefs.h >>conftest.$ac_ext
8265 cat >>conftest.$ac_ext <<_ACEOF
8266 /* end confdefs.h. */
8267 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
8268 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8269 #define $ac_func innocuous_$ac_func
8270
8271 /* System header to define __stub macros and hopefully few prototypes,
8272 which can conflict with char $ac_func (); below.
8273 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8274 <limits.h> exists even on freestanding compilers. */
8275
8276 #ifdef __STDC__
8277 # include <limits.h>
8278 #else
8279 # include <assert.h>
8280 #endif
8281
8282 #undef $ac_func
8283
8284 /* Override any GCC internal prototype to avoid an error.
8285 Use char because int might match the return type of a GCC
8286 builtin and then its argument prototype would still apply. */
8287 #ifdef __cplusplus
8288 extern "C"
8289 #endif
8290 char $ac_func ();
8291 /* The GNU C library defines this for functions which it implements
8292 to always fail with ENOSYS. Some functions are actually named
8293 something starting with __ and the normal name is an alias. */
8294 #if defined __stub_$ac_func || defined __stub___$ac_func
8295 choke me
8296 #endif
8297
8298 int
8299 main ()
8300 {
8301 return $ac_func ();
8302 ;
8303 return 0;
8304 }
8305 _ACEOF
8306 rm -f conftest.$ac_objext conftest$ac_exeext
8307 if { (ac_try="$ac_link"
8308 case "(($ac_try" in
8309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8310 *) ac_try_echo=$ac_try;;
8311 esac
8312 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8313 $as_echo "$ac_try_echo") >&5
8314 (eval "$ac_link") 2>conftest.er1
8315 ac_status=$?
8316 grep -v '^ *+' conftest.er1 >conftest.err
8317 rm -f conftest.er1
8318 cat conftest.err >&5
8319 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8320 (exit $ac_status); } && {
8321 test -z "$ac_c_werror_flag" ||
8322 test ! -s conftest.err
8323 } && test -s conftest$ac_exeext && {
8324 test "$cross_compiling" = yes ||
8325 $as_test_x conftest$ac_exeext
8326 }; then
8327 eval "$as_ac_var=yes"
8328 else
8329 $as_echo "$as_me: failed program was:" >&5
8330 sed 's/^/| /' conftest.$ac_ext >&5
8331
8332 eval "$as_ac_var=no"
8333 fi
8334
8335 rm -rf conftest.dSYM
8336 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8337 conftest$ac_exeext conftest.$ac_ext
8338 fi
8339 ac_res=`eval 'as_val=${'$as_ac_var'}
8340 $as_echo "$as_val"'`
8341 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
8342 $as_echo "$ac_res" >&6; }
8343 as_val=`eval 'as_val=${'$as_ac_var'}
8344 $as_echo "$as_val"'`
8345 if test "x$as_val" = x""yes; then
8346 cat >>confdefs.h <<_ACEOF
8347 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8348 _ACEOF
8349
8350 fi
8351 done
8352
8353
8354
8355 # Check whether --with-pam was given.
8356 if test "${with_pam+set}" = set; then
8357 withval=$with_pam; with_pam=$withval
8358 else
8359 with_pam=yes
8360 fi
8361
8362 if test "$with_pam" != no; then
8363 if test -d $with_pam; then
8364 CPPFLAGS="$CPPFLAGS -I${with_pam}/include"
8365 LDFLAGS="$LDFLAGS -L${with_pam}/lib"
8366 fi
8367
8368
8369 for ac_header in security/pam_appl.h pam/pam_appl.h
8370 do
8371 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8372 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8373 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
8374 $as_echo_n "checking for $ac_header... " >&6; }
8375 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8376 $as_echo_n "(cached) " >&6
8377 fi
8378 ac_res=`eval 'as_val=${'$as_ac_Header'}
8379 $as_echo "$as_val"'`
8380 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
8381 $as_echo "$ac_res" >&6; }
8382 else
8383 # Is the header compilable?
8384 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
8385 $as_echo_n "checking $ac_header usability... " >&6; }
8386 cat >conftest.$ac_ext <<_ACEOF
8387 /* confdefs.h. */
8388 _ACEOF
8389 cat confdefs.h >>conftest.$ac_ext
8390 cat >>conftest.$ac_ext <<_ACEOF
8391 /* end confdefs.h. */
8392 $ac_includes_default
8393 #include <$ac_header>
8394 _ACEOF
8395 rm -f conftest.$ac_objext
8396 if { (ac_try="$ac_compile"
8397 case "(($ac_try" in
8398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8399 *) ac_try_echo=$ac_try;;
8400 esac
8401 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8402 $as_echo "$ac_try_echo") >&5
8403 (eval "$ac_compile") 2>conftest.er1
8404 ac_status=$?
8405 grep -v '^ *+' conftest.er1 >conftest.err
8406 rm -f conftest.er1
8407 cat conftest.err >&5
8408 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8409 (exit $ac_status); } && {
8410 test -z "$ac_c_werror_flag" ||
8411 test ! -s conftest.err
8412 } && test -s conftest.$ac_objext; then
8413 ac_header_compiler=yes
8414 else
8415 $as_echo "$as_me: failed program was:" >&5
8416 sed 's/^/| /' conftest.$ac_ext >&5
8417
8418 ac_header_compiler=no
8419 fi
8420
8421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8422 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8423 $as_echo "$ac_header_compiler" >&6; }
8424
8425 # Is the header present?
8426 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
8427 $as_echo_n "checking $ac_header presence... " >&6; }
8428 cat >conftest.$ac_ext <<_ACEOF
8429 /* confdefs.h. */
8430 _ACEOF
8431 cat confdefs.h >>conftest.$ac_ext
8432 cat >>conftest.$ac_ext <<_ACEOF
8433 /* end confdefs.h. */
8434 #include <$ac_header>
8435 _ACEOF
8436 if { (ac_try="$ac_cpp conftest.$ac_ext"
8437 case "(($ac_try" in
8438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8439 *) ac_try_echo=$ac_try;;
8440 esac
8441 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8442 $as_echo "$ac_try_echo") >&5
8443 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8444 ac_status=$?
8445 grep -v '^ *+' conftest.er1 >conftest.err
8446 rm -f conftest.er1
8447 cat conftest.err >&5
8448 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8449 (exit $ac_status); } >/dev/null && {
8450 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8451 test ! -s conftest.err
8452 }; then
8453 ac_header_preproc=yes
8454 else
8455 $as_echo "$as_me: failed program was:" >&5
8456 sed 's/^/| /' conftest.$ac_ext >&5
8457
8458 ac_header_preproc=no
8459 fi
8460
8461 rm -f conftest.err conftest.$ac_ext
8462 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8463 $as_echo "$ac_header_preproc" >&6; }
8464
8465 # So? What about this header?
8466 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8467 yes:no: )
8468 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8469 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8470 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8471 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8472 ac_header_preproc=yes
8473 ;;
8474 no:yes:* )
8475 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8476 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8477 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8478 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8479 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8480 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8481 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8482 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8483 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8484 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8485 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8486 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8487
8488 ;;
8489 esac
8490 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
8491 $as_echo_n "checking for $ac_header... " >&6; }
8492 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8493 $as_echo_n "(cached) " >&6
8494 else
8495 eval "$as_ac_Header=\$ac_header_preproc"
8496 fi
8497 ac_res=`eval 'as_val=${'$as_ac_Header'}
8498 $as_echo "$as_val"'`
8499 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
8500 $as_echo "$ac_res" >&6; }
8501
8502 fi
8503 as_val=`eval 'as_val=${'$as_ac_Header'}
8504 $as_echo "$as_val"'`
8505 if test "x$as_val" = x""yes; then
8506 cat >>confdefs.h <<_ACEOF
8507 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8508 _ACEOF
8509
8510 fi
8511
8512 done
8513
8514 cmu_save_LIBS="$LIBS"
8515 { $as_echo "$as_me:$LINENO: checking for pam_start" >&5
8516 $as_echo_n "checking for pam_start... " >&6; }
8517 if test "${ac_cv_func_pam_start+set}" = set; then
8518 $as_echo_n "(cached) " >&6
8519 else
8520 cat >conftest.$ac_ext <<_ACEOF
8521 /* confdefs.h. */
8522 _ACEOF
8523 cat confdefs.h >>conftest.$ac_ext
8524 cat >>conftest.$ac_ext <<_ACEOF
8525 /* end confdefs.h. */
8526 /* Define pam_start to an innocuous variant, in case <limits.h> declares pam_start.
8527 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8528 #define pam_start innocuous_pam_start
8529
8530 /* System header to define __stub macros and hopefully few prototypes,
8531 which can conflict with char pam_start (); below.
8532 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8533 <limits.h> exists even on freestanding compilers. */
8534
8535 #ifdef __STDC__
8536 # include <limits.h>
8537 #else
8538 # include <assert.h>
8539 #endif
8540
8541 #undef pam_start
8542
8543 /* Override any GCC internal prototype to avoid an error.
8544 Use char because int might match the return type of a GCC
8545 builtin and then its argument prototype would still apply. */
8546 #ifdef __cplusplus
8547 extern "C"
8548 #endif
8549 char pam_start ();
8550 /* The GNU C library defines this for functions which it implements
8551 to always fail with ENOSYS. Some functions are actually named
8552 something starting with __ and the normal name is an alias. */
8553 #if defined __stub_pam_start || defined __stub___pam_start
8554 choke me
8555 #endif
8556
8557 int
8558 main ()
8559 {
8560 return pam_start ();
8561 ;
8562 return 0;
8563 }
8564 _ACEOF
8565 rm -f conftest.$ac_objext conftest$ac_exeext
8566 if { (ac_try="$ac_link"
8567 case "(($ac_try" in
8568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8569 *) ac_try_echo=$ac_try;;
8570 esac
8571 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8572 $as_echo "$ac_try_echo") >&5
8573 (eval "$ac_link") 2>conftest.er1
8574 ac_status=$?
8575 grep -v '^ *+' conftest.er1 >conftest.err
8576 rm -f conftest.er1
8577 cat conftest.err >&5
8578 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8579 (exit $ac_status); } && {
8580 test -z "$ac_c_werror_flag" ||
8581 test ! -s conftest.err
8582 } && test -s conftest$ac_exeext && {
8583 test "$cross_compiling" = yes ||
8584 $as_test_x conftest$ac_exeext
8585 }; then
8586 ac_cv_func_pam_start=yes
8587 else
8588 $as_echo "$as_me: failed program was:" >&5
8589 sed 's/^/| /' conftest.$ac_ext >&5
8590
8591 ac_cv_func_pam_start=no
8592 fi
8593
8594 rm -rf conftest.dSYM
8595 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8596 conftest$ac_exeext conftest.$ac_ext
8597 fi
8598 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_pam_start" >&5
8599 $as_echo "$ac_cv_func_pam_start" >&6; }
8600 if test "x$ac_cv_func_pam_start" = x""yes; then
8601 :
8602 else
8603 LIBS="-lpam $LIBS"
8604 cat >conftest.$ac_ext <<_ACEOF
8605 /* confdefs.h. */
8606 _ACEOF
8607 cat confdefs.h >>conftest.$ac_ext
8608 cat >>conftest.$ac_ext <<_ACEOF
8609 /* end confdefs.h. */
8610
8611 #include <sys/types.h>
8612 #ifdef HAVE_PAM_PAM_APPL_H
8613 #include <pam/pam_appl.h>
8614 #endif
8615 #ifdef HAVE_SECURITY_PAM_H
8616 #include <security/pam_appl.h>
8617 #endif
8618 int
8619 main ()
8620 {
8621
8622 const char *service="foo";
8623 const char *user="bar";
8624 pam_handle_t *pamh;
8625 struct pam_conv *conv;
8626 int baz;
8627 baz = pam_start(service, user, conv, &pamh);
8628 return 0;
8629
8630 ;
8631 return 0;
8632 }
8633 _ACEOF
8634 rm -f conftest.$ac_objext conftest$ac_exeext
8635 if { (ac_try="$ac_link"
8636 case "(($ac_try" in
8637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8638 *) ac_try_echo=$ac_try;;
8639 esac
8640 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8641 $as_echo "$ac_try_echo") >&5
8642 (eval "$ac_link") 2>conftest.er1
8643 ac_status=$?
8644 grep -v '^ *+' conftest.er1 >conftest.err
8645 rm -f conftest.er1
8646 cat conftest.err >&5
8647 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8648 (exit $ac_status); } && {
8649 test -z "$ac_c_werror_flag" ||
8650 test ! -s conftest.err
8651 } && test -s conftest$ac_exeext && {
8652 test "$cross_compiling" = yes ||
8653 $as_test_x conftest$ac_exeext
8654 }; then
8655 LIBPAM="-lpam"
8656 else
8657 $as_echo "$as_me: failed program was:" >&5
8658 sed 's/^/| /' conftest.$ac_ext >&5
8659
8660
8661 fi
8662
8663 rm -rf conftest.dSYM
8664 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8665 conftest$ac_exeext conftest.$ac_ext
8666
8667 fi
8668
8669 LIBS="$cmu_save_LIBS $LIBPAM"
8670 fi
8671
8672
8673 # Check whether --with-saslauthd was given.
8674 if test "${with_saslauthd+set}" = set; then
8675 withval=$with_saslauthd; with_saslauthd=$withval
8676 else
8677 with_saslauthd=yes
8678 fi
8679
8680 if test "$with_saslauthd" != no; then
8681 if test "$with_saslauthd" = yes; then
8682 with_saslauthd="/var/state/saslauthd"
8683 fi
8684
8685 cat >>confdefs.h <<\_ACEOF
8686 #define HAVE_SASLAUTHD /**/
8687 _ACEOF
8688
8689
8690 cat >>confdefs.h <<_ACEOF
8691 #define PATH_SASLAUTHD_RUNDIR "$with_saslauthd"
8692 _ACEOF
8693
8694 fi
8695 if test "$with_saslauthd" != no; then
8696 SASLAUTHD_TRUE=
8697 SASLAUTHD_FALSE='#'
8698 else
8699 SASLAUTHD_TRUE='#'
8700 SASLAUTHD_FALSE=
8701 fi
8702
8703 { $as_echo "$as_me:$LINENO: checking if I should include saslauthd" >&5
8704 $as_echo_n "checking if I should include saslauthd... " >&6; }
8705 { $as_echo "$as_me:$LINENO: result: $with_saslauthd" >&5
8706 $as_echo "$with_saslauthd" >&6; }
8707
8708
8709 # Check whether --with-authdaemond was given.
8710 if test "${with_authdaemond+set}" = set; then
8711 withval=$with_authdaemond; with_authdaemon=$withval
8712 else
8713 with_authdaemon=yes
8714 fi
8715
8716 if test "$with_authdaemon" != no; then
8717 if test "$with_authdaemon" = yes; then
8718 with_authdaemon="/dev/null"
8719 fi
8720
8721 cat >>confdefs.h <<\_ACEOF
8722 #define HAVE_AUTHDAEMON /**/
8723 _ACEOF
8724
8725
8726 cat >>confdefs.h <<_ACEOF
8727 #define PATH_AUTHDAEMON_SOCKET "$with_authdaemon"
8728 _ACEOF
8729
8730 fi
8731 { $as_echo "$as_me:$LINENO: checking to include Courier authdaemond support" >&5
8732 $as_echo_n "checking to include Courier authdaemond support... " >&6; }
8733 { $as_echo "$as_me:$LINENO: result: $with_authdaemon" >&5
8734 $as_echo "$with_authdaemon" >&6; }
8735
8736
8737 # Check whether --with-pwcheck was given.
8738 if test "${with_pwcheck+set}" = set; then
8739 withval=$with_pwcheck; with_pwcheck=$withval
8740 else
8741 with_pwcheck=no
8742 fi
8743
8744 if test "$with_pwcheck" != no; then
8745 if test "$with_pwcheck" = yes; then
8746 with_pwcheck=/var/pwcheck
8747 fi
8748
8749 cat >>confdefs.h <<\_ACEOF
8750 #define HAVE_PWCHECK /**/
8751 _ACEOF
8752
8753
8754 cat >>confdefs.h <<_ACEOF
8755 #define PWCHECKDIR "$with_pwcheck"
8756 _ACEOF
8757
8758 { $as_echo "$as_me:$LINENO: checking for getspnam" >&5
8759 $as_echo_n "checking for getspnam... " >&6; }
8760 if test "${ac_cv_func_getspnam+set}" = set; then
8761 $as_echo_n "(cached) " >&6
8762 else
8763 cat >conftest.$ac_ext <<_ACEOF
8764 /* confdefs.h. */
8765 _ACEOF
8766 cat confdefs.h >>conftest.$ac_ext
8767 cat >>conftest.$ac_ext <<_ACEOF
8768 /* end confdefs.h. */
8769 /* Define getspnam to an innocuous variant, in case <limits.h> declares getspnam.
8770 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8771 #define getspnam innocuous_getspnam
8772
8773 /* System header to define __stub macros and hopefully few prototypes,
8774 which can conflict with char getspnam (); below.
8775 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8776 <limits.h> exists even on freestanding compilers. */
8777
8778 #ifdef __STDC__
8779 # include <limits.h>
8780 #else
8781 # include <assert.h>
8782 #endif
8783
8784 #undef getspnam
8785
8786 /* Override any GCC internal prototype to avoid an error.
8787 Use char because int might match the return type of a GCC
8788 builtin and then its argument prototype would still apply. */
8789 #ifdef __cplusplus
8790 extern "C"
8791 #endif
8792 char getspnam ();
8793 /* The GNU C library defines this for functions which it implements
8794 to always fail with ENOSYS. Some functions are actually named
8795 something starting with __ and the normal name is an alias. */
8796 #if defined __stub_getspnam || defined __stub___getspnam
8797 choke me
8798 #endif
8799
8800 int
8801 main ()
8802 {
8803 return getspnam ();
8804 ;
8805 return 0;
8806 }
8807 _ACEOF
8808 rm -f conftest.$ac_objext conftest$ac_exeext
8809 if { (ac_try="$ac_link"
8810 case "(($ac_try" in
8811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8812 *) ac_try_echo=$ac_try;;
8813 esac
8814 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8815 $as_echo "$ac_try_echo") >&5
8816 (eval "$ac_link") 2>conftest.er1
8817 ac_status=$?
8818 grep -v '^ *+' conftest.er1 >conftest.err
8819 rm -f conftest.er1
8820 cat conftest.err >&5
8821 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8822 (exit $ac_status); } && {
8823 test -z "$ac_c_werror_flag" ||
8824 test ! -s conftest.err
8825 } && test -s conftest$ac_exeext && {
8826 test "$cross_compiling" = yes ||
8827 $as_test_x conftest$ac_exeext
8828 }; then
8829 ac_cv_func_getspnam=yes
8830 else
8831 $as_echo "$as_me: failed program was:" >&5
8832 sed 's/^/| /' conftest.$ac_ext >&5
8833
8834 ac_cv_func_getspnam=no
8835 fi
8836
8837 rm -rf conftest.dSYM
8838 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8839 conftest$ac_exeext conftest.$ac_ext
8840 fi
8841 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_getspnam" >&5
8842 $as_echo "$ac_cv_func_getspnam" >&6; }
8843 if test "x$ac_cv_func_getspnam" = x""yes; then
8844 PWCHECKMETH="getspnam"
8845 else
8846 PWCHECKMETH="getpwnam"
8847 fi
8848
8849
8850 fi
8851 if test "$with_pwcheck" != no; then
8852 PWCHECK_TRUE=
8853 PWCHECK_FALSE='#'
8854 else
8855 PWCHECK_TRUE='#'
8856 PWCHECK_FALSE=
8857 fi
8858
8859 { $as_echo "$as_me:$LINENO: checking if I should include pwcheck" >&5
8860 $as_echo_n "checking if I should include pwcheck... " >&6; }
8861 { $as_echo "$as_me:$LINENO: result: $with_pwcheck" >&5
8862 $as_echo "$with_pwcheck" >&6; }
8863
8864
8865 # Check whether --with-ipctype was given.
8866 if test "${with_ipctype+set}" = set; then
8867 withval=$with_ipctype; with_ipctype=$withval
8868 else
8869 with_ipctype="unix"
8870 fi
8871
8872 IPCTYPE=$with_ipctype
8873
8874 LIB_DOOR=
8875 if test "$with_ipctype" = "doors"; then
8876 LIB_DOOR="-ldoor"
8877
8878 cat >>confdefs.h <<\_ACEOF
8879 #define USE_DOORS /**/
8880 _ACEOF
8881
8882 fi
8883
8884
8885 # Check whether --enable-alwaystrue was given.
8886 if test "${enable_alwaystrue+set}" = set; then
8887 enableval=$enable_alwaystrue; enable_alwaystrue=$enableval
8888 else
8889 enable_alwaystrue=no
8890 fi
8891
8892 if test "$enable_alwaystrue" = yes; then
8893
8894 cat >>confdefs.h <<\_ACEOF
8895 #define HAVE_ALWAYSTRUE /**/
8896 _ACEOF
8897
8898 fi
8899 { $as_echo "$as_me:$LINENO: checking if I should include the alwaystrue verifier" >&5
8900 $as_echo_n "checking if I should include the alwaystrue verifier... " >&6; }
8901 { $as_echo "$as_me:$LINENO: result: $enable_alwaystrue" >&5
8902 $as_echo "$enable_alwaystrue" >&6; }
8903
8904 # Check whether --enable-checkapop was given.
8905 if test "${enable_checkapop+set}" = set; then
8906 enableval=$enable_checkapop; checkapop=$enableval
8907 else
8908 checkapop=yes
8909 fi
8910
8911
8912 { $as_echo "$as_me:$LINENO: checking if we should enable sasl_checkapop" >&5
8913 $as_echo_n "checking if we should enable sasl_checkapop... " >&6; }
8914 if test "$checkapop" != no; then
8915 { $as_echo "$as_me:$LINENO: result: enabled" >&5
8916 $as_echo "enabled" >&6; }
8917
8918 cat >>confdefs.h <<\_ACEOF
8919 #define DO_SASL_CHECKAPOP /**/
8920 _ACEOF
8921
8922 else
8923 { $as_echo "$as_me:$LINENO: result: disabled" >&5
8924 $as_echo "disabled" >&6; }
8925 fi
8926
8927 # Check whether --enable-cram was given.
8928 if test "${enable_cram+set}" = set; then
8929 enableval=$enable_cram; cram=$enableval
8930 else
8931 cram=yes
8932 fi
8933
8934
8935 { $as_echo "$as_me:$LINENO: checking CRAM-MD5" >&5
8936 $as_echo_n "checking CRAM-MD5... " >&6; }
8937 if test "$cram" != no; then
8938 { $as_echo "$as_me:$LINENO: result: enabled" >&5
8939 $as_echo "enabled" >&6; }
8940 SASL_MECHS="$SASL_MECHS libcrammd5.la"
8941 if test "$enable_obsolete_cram_attr" = yes; then
8942 CPPFLAGS="$CPPFLAGS -DOBSOLETE_CRAM_ATTR=1"
8943 fi
8944 if test "$enable_static" = yes; then
8945 SASL_STATIC_OBJS="$SASL_STATIC_OBJS cram.o"
8946 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/cram.c"
8947
8948 cat >>confdefs.h <<\_ACEOF
8949 #define STATIC_CRAMMD5 /**/
8950 _ACEOF
8951
8952 fi
8953 else
8954 { $as_echo "$as_me:$LINENO: result: disabled" >&5
8955 $as_echo "disabled" >&6; }
8956 fi
8957
8958
8959 # Check whether --with-lib-subdir was given.
8960 if test "${with_lib_subdir+set}" = set; then
8961 withval=$with_lib_subdir;
8962 fi
8963
8964 # The cast to long int works around a bug in the HP C Compiler
8965 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8966 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8967 # This bug is HP SR number 8606223364.
8968 { $as_echo "$as_me:$LINENO: checking size of long" >&5
8969 $as_echo_n "checking size of long... " >&6; }
8970 if test "${ac_cv_sizeof_long+set}" = set; then
8971 $as_echo_n "(cached) " >&6
8972 else
8973 if test "$cross_compiling" = yes; then
8974 # Depending upon the size, compute the lo and hi bounds.
8975 cat >conftest.$ac_ext <<_ACEOF
8976 /* confdefs.h. */
8977 _ACEOF
8978 cat confdefs.h >>conftest.$ac_ext
8979 cat >>conftest.$ac_ext <<_ACEOF
8980 /* end confdefs.h. */
8981 $ac_includes_default
8982 int
8983 main ()
8984 {
8985 static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
8986 test_array [0] = 0
8987
8988 ;
8989 return 0;
8990 }
8991 _ACEOF
8992 rm -f conftest.$ac_objext
8993 if { (ac_try="$ac_compile"
8994 case "(($ac_try" in
8995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8996 *) ac_try_echo=$ac_try;;
8997 esac
8998 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8999 $as_echo "$ac_try_echo") >&5
9000 (eval "$ac_compile") 2>conftest.er1
9001 ac_status=$?
9002 grep -v '^ *+' conftest.er1 >conftest.err
9003 rm -f conftest.er1
9004 cat conftest.err >&5
9005 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9006 (exit $ac_status); } && {
9007 test -z "$ac_c_werror_flag" ||
9008 test ! -s conftest.err
9009 } && test -s conftest.$ac_objext; then
9010 ac_lo=0 ac_mid=0
9011 while :; do
9012 cat >conftest.$ac_ext <<_ACEOF
9013 /* confdefs.h. */
9014 _ACEOF
9015 cat confdefs.h >>conftest.$ac_ext
9016 cat >>conftest.$ac_ext <<_ACEOF
9017 /* end confdefs.h. */
9018 $ac_includes_default
9019 int
9020 main ()
9021 {
9022 static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
9023 test_array [0] = 0
9024
9025 ;
9026 return 0;
9027 }
9028 _ACEOF
9029 rm -f conftest.$ac_objext
9030 if { (ac_try="$ac_compile"
9031 case "(($ac_try" in
9032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9033 *) ac_try_echo=$ac_try;;
9034 esac
9035 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9036 $as_echo "$ac_try_echo") >&5
9037 (eval "$ac_compile") 2>conftest.er1
9038 ac_status=$?
9039 grep -v '^ *+' conftest.er1 >conftest.err
9040 rm -f conftest.er1
9041 cat conftest.err >&5
9042 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9043 (exit $ac_status); } && {
9044 test -z "$ac_c_werror_flag" ||
9045 test ! -s conftest.err
9046 } && test -s conftest.$ac_objext; then
9047 ac_hi=$ac_mid; break
9048 else
9049 $as_echo "$as_me: failed program was:" >&5
9050 sed 's/^/| /' conftest.$ac_ext >&5
9051
9052 ac_lo=`expr $ac_mid + 1`
9053 if test $ac_lo -le $ac_mid; then
9054 ac_lo= ac_hi=
9055 break
9056 fi
9057 ac_mid=`expr 2 '*' $ac_mid + 1`
9058 fi
9059
9060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9061 done
9062 else
9063 $as_echo "$as_me: failed program was:" >&5
9064 sed 's/^/| /' conftest.$ac_ext >&5
9065
9066 cat >conftest.$ac_ext <<_ACEOF
9067 /* confdefs.h. */
9068 _ACEOF
9069 cat confdefs.h >>conftest.$ac_ext
9070 cat >>conftest.$ac_ext <<_ACEOF
9071 /* end confdefs.h. */
9072 $ac_includes_default
9073 int
9074 main ()
9075 {
9076 static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
9077 test_array [0] = 0
9078
9079 ;
9080 return 0;
9081 }
9082 _ACEOF
9083 rm -f conftest.$ac_objext
9084 if { (ac_try="$ac_compile"
9085 case "(($ac_try" in
9086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9087 *) ac_try_echo=$ac_try;;
9088 esac
9089 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9090 $as_echo "$ac_try_echo") >&5
9091 (eval "$ac_compile") 2>conftest.er1
9092 ac_status=$?
9093 grep -v '^ *+' conftest.er1 >conftest.err
9094 rm -f conftest.er1
9095 cat conftest.err >&5
9096 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9097 (exit $ac_status); } && {
9098 test -z "$ac_c_werror_flag" ||
9099 test ! -s conftest.err
9100 } && test -s conftest.$ac_objext; then
9101 ac_hi=-1 ac_mid=-1
9102 while :; do
9103 cat >conftest.$ac_ext <<_ACEOF
9104 /* confdefs.h. */
9105 _ACEOF
9106 cat confdefs.h >>conftest.$ac_ext
9107 cat >>conftest.$ac_ext <<_ACEOF
9108 /* end confdefs.h. */
9109 $ac_includes_default
9110 int
9111 main ()
9112 {
9113 static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
9114 test_array [0] = 0
9115
9116 ;
9117 return 0;
9118 }
9119 _ACEOF
9120 rm -f conftest.$ac_objext
9121 if { (ac_try="$ac_compile"
9122 case "(($ac_try" in
9123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9124 *) ac_try_echo=$ac_try;;
9125 esac
9126 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9127 $as_echo "$ac_try_echo") >&5
9128 (eval "$ac_compile") 2>conftest.er1
9129 ac_status=$?
9130 grep -v '^ *+' conftest.er1 >conftest.err
9131 rm -f conftest.er1
9132 cat conftest.err >&5
9133 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9134 (exit $ac_status); } && {
9135 test -z "$ac_c_werror_flag" ||
9136 test ! -s conftest.err
9137 } && test -s conftest.$ac_objext; then
9138 ac_lo=$ac_mid; break
9139 else
9140 $as_echo "$as_me: failed program was:" >&5
9141 sed 's/^/| /' conftest.$ac_ext >&5
9142
9143 ac_hi=`expr '(' $ac_mid ')' - 1`
9144 if test $ac_mid -le $ac_hi; then
9145 ac_lo= ac_hi=
9146 break
9147 fi
9148 ac_mid=`expr 2 '*' $ac_mid`
9149 fi
9150
9151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9152 done
9153 else
9154 $as_echo "$as_me: failed program was:" >&5
9155 sed 's/^/| /' conftest.$ac_ext >&5
9156
9157 ac_lo= ac_hi=
9158 fi
9159
9160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9161 fi
9162
9163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9164 # Binary search between lo and hi bounds.
9165 while test "x$ac_lo" != "x$ac_hi"; do
9166 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9167 cat >conftest.$ac_ext <<_ACEOF
9168 /* confdefs.h. */
9169 _ACEOF
9170 cat confdefs.h >>conftest.$ac_ext
9171 cat >>conftest.$ac_ext <<_ACEOF
9172 /* end confdefs.h. */
9173 $ac_includes_default
9174 int
9175 main ()
9176 {
9177 static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
9178 test_array [0] = 0
9179
9180 ;
9181 return 0;
9182 }
9183 _ACEOF
9184 rm -f conftest.$ac_objext
9185 if { (ac_try="$ac_compile"
9186 case "(($ac_try" in
9187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9188 *) ac_try_echo=$ac_try;;
9189 esac
9190 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9191 $as_echo "$ac_try_echo") >&5
9192 (eval "$ac_compile") 2>conftest.er1
9193 ac_status=$?
9194 grep -v '^ *+' conftest.er1 >conftest.err
9195 rm -f conftest.er1
9196 cat conftest.err >&5
9197 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9198 (exit $ac_status); } && {
9199 test -z "$ac_c_werror_flag" ||
9200 test ! -s conftest.err
9201 } && test -s conftest.$ac_objext; then
9202 ac_hi=$ac_mid
9203 else
9204 $as_echo "$as_me: failed program was:" >&5
9205 sed 's/^/| /' conftest.$ac_ext >&5
9206
9207 ac_lo=`expr '(' $ac_mid ')' + 1`
9208 fi
9209
9210 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9211 done
9212 case $ac_lo in
9213 ?*) ac_cv_sizeof_long=$ac_lo;;
9214 '') if test "$ac_cv_type_long" = yes; then
9215 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9216 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9217 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
9218 See \`config.log' for more details." >&5
9219 $as_echo "$as_me: error: cannot compute sizeof (long)
9220 See \`config.log' for more details." >&2;}
9221 { (exit 77); exit 77; }; }; }
9222 else
9223 ac_cv_sizeof_long=0
9224 fi ;;
9225 esac
9226 else
9227 cat >conftest.$ac_ext <<_ACEOF
9228 /* confdefs.h. */
9229 _ACEOF
9230 cat confdefs.h >>conftest.$ac_ext
9231 cat >>conftest.$ac_ext <<_ACEOF
9232 /* end confdefs.h. */
9233 $ac_includes_default
9234 static long int longval () { return (long int) (sizeof (long)); }
9235 static unsigned long int ulongval () { return (long int) (sizeof (long)); }
9236 #include <stdio.h>
9237 #include <stdlib.h>
9238 int
9239 main ()
9240 {
9241
9242 FILE *f = fopen ("conftest.val", "w");
9243 if (! f)
9244 return 1;
9245 if (((long int) (sizeof (long))) < 0)
9246 {
9247 long int i = longval ();
9248 if (i != ((long int) (sizeof (long))))
9249 return 1;
9250 fprintf (f, "%ld", i);
9251 }
9252 else
9253 {
9254 unsigned long int i = ulongval ();
9255 if (i != ((long int) (sizeof (long))))
9256 return 1;
9257 fprintf (f, "%lu", i);
9258 }
9259 /* Do not output a trailing newline, as this causes \r\n confusion
9260 on some platforms. */
9261 return ferror (f) || fclose (f) != 0;
9262
9263 ;
9264 return 0;
9265 }
9266 _ACEOF
9267 rm -f conftest$ac_exeext
9268 if { (ac_try="$ac_link"
9269 case "(($ac_try" in
9270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9271 *) ac_try_echo=$ac_try;;
9272 esac
9273 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9274 $as_echo "$ac_try_echo") >&5
9275 (eval "$ac_link") 2>&5
9276 ac_status=$?
9277 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9278 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9279 { (case "(($ac_try" in
9280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9281 *) ac_try_echo=$ac_try;;
9282 esac
9283 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9284 $as_echo "$ac_try_echo") >&5
9285 (eval "$ac_try") 2>&5
9286 ac_status=$?
9287 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9288 (exit $ac_status); }; }; then
9289 ac_cv_sizeof_long=`cat conftest.val`
9290 else
9291 $as_echo "$as_me: program exited with status $ac_status" >&5
9292 $as_echo "$as_me: failed program was:" >&5
9293 sed 's/^/| /' conftest.$ac_ext >&5
9294
9295 ( exit $ac_status )
9296 if test "$ac_cv_type_long" = yes; then
9297 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9298 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9299 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
9300 See \`config.log' for more details." >&5
9301 $as_echo "$as_me: error: cannot compute sizeof (long)
9302 See \`config.log' for more details." >&2;}
9303 { (exit 77); exit 77; }; }; }
9304 else
9305 ac_cv_sizeof_long=0
9306 fi
9307 fi
9308 rm -rf conftest.dSYM
9309 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9310 fi
9311 rm -f conftest.val
9312 fi
9313 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
9314 $as_echo "$ac_cv_sizeof_long" >&6; }
9315
9316
9317
9318 cat >>confdefs.h <<_ACEOF
9319 #define SIZEOF_LONG $ac_cv_sizeof_long
9320 _ACEOF
9321
9322
9323 { $as_echo "$as_me:$LINENO: checking what directory libraries are found in" >&5
9324 $as_echo_n "checking what directory libraries are found in... " >&6; }
9325 if test "${ac_cv_cmu_lib_subdir+set}" = set; then
9326 $as_echo_n "(cached) " >&6
9327 else
9328 test "X$with_lib_subdir" = "Xyes" && with_lib_subdir=
9329 test "X$with_lib_subdir" = "Xno" && with_lib_subdir=
9330 if test "X$with_lib_subdir" = "X" ; then
9331 ac_cv_cmu_lib_subdir=lib
9332 if test $ac_cv_sizeof_long -eq 4 ; then
9333 test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32
9334 fi
9335 if test $ac_cv_sizeof_long -eq 8 ; then
9336 test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64
9337 fi
9338 else
9339 ac_cv_cmu_lib_subdir=$with_lib_subdir
9340 fi
9341 fi
9342 { $as_echo "$as_me:$LINENO: result: $ac_cv_cmu_lib_subdir" >&5
9343 $as_echo "$ac_cv_cmu_lib_subdir" >&6; }
9344 CMU_LIB_SUBDIR=$ac_cv_cmu_lib_subdir
9345
9346
9347
9348
9349
9350 # Check whether --with-openssl was given.
9351 if test "${with_openssl+set}" = set; then
9352 withval=$with_openssl; with_openssl=$withval
9353 else
9354 with_openssl="yes"
9355 fi
9356
9357
9358 save_CPPFLAGS=$CPPFLAGS
9359 save_LDFLAGS=$LDFLAGS
9360
9361 if test -d $with_openssl; then
9362 CPPFLAGS="${CPPFLAGS} -I${with_openssl}/include"
9363
9364 # this is CMU ADD LIBPATH
9365 if test "$andrew_cv_runpath_switch" = "none" ; then
9366 LDFLAGS="-L${with_openssl}/$CMU_LIB_SUBDIR ${LDFLAGS}"
9367 else
9368 LDFLAGS="-L${with_openssl}/$CMU_LIB_SUBDIR $andrew_cv_runpath_switch${with_openssl}/$CMU_LIB_SUBDIR ${LDFLAGS}"
9369 fi
9370
9371 fi
9372
9373 case "$with_openssl" in
9374 no)
9375 with_openssl="no";;
9376 *)
9377 LIB_RSAREF=""
9378 { $as_echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lrsaref" >&5
9379 $as_echo_n "checking for RSAPublicEncrypt in -lrsaref... " >&6; }
9380 if test "${ac_cv_lib_rsaref_RSAPublicEncrypt+set}" = set; then
9381 $as_echo_n "(cached) " >&6
9382 else
9383 ac_check_lib_save_LIBS=$LIBS
9384 LIBS="-lrsaref $LIBS"
9385 cat >conftest.$ac_ext <<_ACEOF
9386 /* confdefs.h. */
9387 _ACEOF
9388 cat confdefs.h >>conftest.$ac_ext
9389 cat >>conftest.$ac_ext <<_ACEOF
9390 /* end confdefs.h. */
9391
9392 /* Override any GCC internal prototype to avoid an error.
9393 Use char because int might match the return type of a GCC
9394 builtin and then its argument prototype would still apply. */
9395 #ifdef __cplusplus
9396 extern "C"
9397 #endif
9398 char RSAPublicEncrypt ();
9399 int
9400 main ()
9401 {
9402 return RSAPublicEncrypt ();
9403 ;
9404 return 0;
9405 }
9406 _ACEOF
9407 rm -f conftest.$ac_objext conftest$ac_exeext
9408 if { (ac_try="$ac_link"
9409 case "(($ac_try" in
9410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9411 *) ac_try_echo=$ac_try;;
9412 esac
9413 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9414 $as_echo "$ac_try_echo") >&5
9415 (eval "$ac_link") 2>conftest.er1
9416 ac_status=$?
9417 grep -v '^ *+' conftest.er1 >conftest.err
9418 rm -f conftest.er1
9419 cat conftest.err >&5
9420 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9421 (exit $ac_status); } && {
9422 test -z "$ac_c_werror_flag" ||
9423 test ! -s conftest.err
9424 } && test -s conftest$ac_exeext && {
9425 test "$cross_compiling" = yes ||
9426 $as_test_x conftest$ac_exeext
9427 }; then
9428 ac_cv_lib_rsaref_RSAPublicEncrypt=yes
9429 else
9430 $as_echo "$as_me: failed program was:" >&5
9431 sed 's/^/| /' conftest.$ac_ext >&5
9432
9433 ac_cv_lib_rsaref_RSAPublicEncrypt=no
9434 fi
9435
9436 rm -rf conftest.dSYM
9437 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9438 conftest$ac_exeext conftest.$ac_ext
9439 LIBS=$ac_check_lib_save_LIBS
9440 fi
9441 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rsaref_RSAPublicEncrypt" >&5
9442 $as_echo "$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6; }
9443 if test "x$ac_cv_lib_rsaref_RSAPublicEncrypt" = x""yes; then
9444 cmu_have_rsaref=yes;
9445 { $as_echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lRSAglue" >&5
9446 $as_echo_n "checking for RSAPublicEncrypt in -lRSAglue... " >&6; }
9447 if test "${ac_cv_lib_RSAglue_RSAPublicEncrypt+set}" = set; then
9448 $as_echo_n "(cached) " >&6
9449 else
9450 ac_check_lib_save_LIBS=$LIBS
9451 LIBS="-lRSAglue $LIBS"
9452 cat >conftest.$ac_ext <<_ACEOF
9453 /* confdefs.h. */
9454 _ACEOF
9455 cat confdefs.h >>conftest.$ac_ext
9456 cat >>conftest.$ac_ext <<_ACEOF
9457 /* end confdefs.h. */
9458
9459 /* Override any GCC internal prototype to avoid an error.
9460 Use char because int might match the return type of a GCC
9461 builtin and then its argument prototype would still apply. */
9462 #ifdef __cplusplus
9463 extern "C"
9464 #endif
9465 char RSAPublicEncrypt ();
9466 int
9467 main ()
9468 {
9469 return RSAPublicEncrypt ();
9470 ;
9471 return 0;
9472 }
9473 _ACEOF
9474 rm -f conftest.$ac_objext conftest$ac_exeext
9475 if { (ac_try="$ac_link"
9476 case "(($ac_try" in
9477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9478 *) ac_try_echo=$ac_try;;
9479 esac
9480 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9481 $as_echo "$ac_try_echo") >&5
9482 (eval "$ac_link") 2>conftest.er1
9483 ac_status=$?
9484 grep -v '^ *+' conftest.er1 >conftest.err
9485 rm -f conftest.er1
9486 cat conftest.err >&5
9487 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9488 (exit $ac_status); } && {
9489 test -z "$ac_c_werror_flag" ||
9490 test ! -s conftest.err
9491 } && test -s conftest$ac_exeext && {
9492 test "$cross_compiling" = yes ||
9493 $as_test_x conftest$ac_exeext
9494 }; then
9495 ac_cv_lib_RSAglue_RSAPublicEncrypt=yes
9496 else
9497 $as_echo "$as_me: failed program was:" >&5
9498 sed 's/^/| /' conftest.$ac_ext >&5
9499
9500 ac_cv_lib_RSAglue_RSAPublicEncrypt=no
9501 fi
9502
9503 rm -rf conftest.dSYM
9504 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9505 conftest$ac_exeext conftest.$ac_ext
9506 LIBS=$ac_check_lib_save_LIBS
9507 fi
9508 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_RSAglue_RSAPublicEncrypt" >&5
9509 $as_echo "$ac_cv_lib_RSAglue_RSAPublicEncrypt" >&6; }
9510 if test "x$ac_cv_lib_RSAglue_RSAPublicEncrypt" = x""yes; then
9511 LIB_RSAREF="-lRSAglue -lrsaref"
9512 else
9513 LIB_RSAREF="-lrsaref"
9514 fi
9515
9516 else
9517 cmu_have_rsaref=no
9518 fi
9519
9520
9521 if test "${ac_cv_header_openssl_evp_h+set}" = set; then
9522 { $as_echo "$as_me:$LINENO: checking for openssl/evp.h" >&5
9523 $as_echo_n "checking for openssl/evp.h... " >&6; }
9524 if test "${ac_cv_header_openssl_evp_h+set}" = set; then
9525 $as_echo_n "(cached) " >&6
9526 fi
9527 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_evp_h" >&5
9528 $as_echo "$ac_cv_header_openssl_evp_h" >&6; }
9529 else
9530 # Is the header compilable?
9531 { $as_echo "$as_me:$LINENO: checking openssl/evp.h usability" >&5
9532 $as_echo_n "checking openssl/evp.h usability... " >&6; }
9533 cat >conftest.$ac_ext <<_ACEOF
9534 /* confdefs.h. */
9535 _ACEOF
9536 cat confdefs.h >>conftest.$ac_ext
9537 cat >>conftest.$ac_ext <<_ACEOF
9538 /* end confdefs.h. */
9539 $ac_includes_default
9540 #include <openssl/evp.h>
9541 _ACEOF
9542 rm -f conftest.$ac_objext
9543 if { (ac_try="$ac_compile"
9544 case "(($ac_try" in
9545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9546 *) ac_try_echo=$ac_try;;
9547 esac
9548 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9549 $as_echo "$ac_try_echo") >&5
9550 (eval "$ac_compile") 2>conftest.er1
9551 ac_status=$?
9552 grep -v '^ *+' conftest.er1 >conftest.err
9553 rm -f conftest.er1
9554 cat conftest.err >&5
9555 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9556 (exit $ac_status); } && {
9557 test -z "$ac_c_werror_flag" ||
9558 test ! -s conftest.err
9559 } && test -s conftest.$ac_objext; then
9560 ac_header_compiler=yes
9561 else
9562 $as_echo "$as_me: failed program was:" >&5
9563 sed 's/^/| /' conftest.$ac_ext >&5
9564
9565 ac_header_compiler=no
9566 fi
9567
9568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9569 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9570 $as_echo "$ac_header_compiler" >&6; }
9571
9572 # Is the header present?
9573 { $as_echo "$as_me:$LINENO: checking openssl/evp.h presence" >&5
9574 $as_echo_n "checking openssl/evp.h presence... " >&6; }
9575 cat >conftest.$ac_ext <<_ACEOF
9576 /* confdefs.h. */
9577 _ACEOF
9578 cat confdefs.h >>conftest.$ac_ext
9579 cat >>conftest.$ac_ext <<_ACEOF
9580 /* end confdefs.h. */
9581 #include <openssl/evp.h>
9582 _ACEOF
9583 if { (ac_try="$ac_cpp conftest.$ac_ext"
9584 case "(($ac_try" in
9585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9586 *) ac_try_echo=$ac_try;;
9587 esac
9588 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9589 $as_echo "$ac_try_echo") >&5
9590 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9591 ac_status=$?
9592 grep -v '^ *+' conftest.er1 >conftest.err
9593 rm -f conftest.er1
9594 cat conftest.err >&5
9595 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9596 (exit $ac_status); } >/dev/null && {
9597 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9598 test ! -s conftest.err
9599 }; then
9600 ac_header_preproc=yes
9601 else
9602 $as_echo "$as_me: failed program was:" >&5
9603 sed 's/^/| /' conftest.$ac_ext >&5
9604
9605 ac_header_preproc=no
9606 fi
9607
9608 rm -f conftest.err conftest.$ac_ext
9609 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9610 $as_echo "$ac_header_preproc" >&6; }
9611
9612 # So? What about this header?
9613 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9614 yes:no: )
9615 { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: accepted by the compiler, rejected by the preprocessor!" >&5
9616 $as_echo "$as_me: WARNING: openssl/evp.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9617 { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: proceeding with the compiler's result" >&5
9618 $as_echo "$as_me: WARNING: openssl/evp.h: proceeding with the compiler's result" >&2;}
9619 ac_header_preproc=yes
9620 ;;
9621 no:yes:* )
9622 { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: present but cannot be compiled" >&5
9623 $as_echo "$as_me: WARNING: openssl/evp.h: present but cannot be compiled" >&2;}
9624 { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: check for missing prerequisite headers?" >&5
9625 $as_echo "$as_me: WARNING: openssl/evp.h: check for missing prerequisite headers?" >&2;}
9626 { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: see the Autoconf documentation" >&5
9627 $as_echo "$as_me: WARNING: openssl/evp.h: see the Autoconf documentation" >&2;}
9628 { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: section \"Present But Cannot Be Compiled\"" >&5
9629 $as_echo "$as_me: WARNING: openssl/evp.h: section \"Present But Cannot Be Compiled\"" >&2;}
9630 { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: proceeding with the preprocessor's result" >&5
9631 $as_echo "$as_me: WARNING: openssl/evp.h: proceeding with the preprocessor's result" >&2;}
9632 { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: in the future, the compiler will take precedence" >&5
9633 $as_echo "$as_me: WARNING: openssl/evp.h: in the future, the compiler will take precedence" >&2;}
9634
9635 ;;
9636 esac
9637 { $as_echo "$as_me:$LINENO: checking for openssl/evp.h" >&5
9638 $as_echo_n "checking for openssl/evp.h... " >&6; }
9639 if test "${ac_cv_header_openssl_evp_h+set}" = set; then
9640 $as_echo_n "(cached) " >&6
9641 else
9642 ac_cv_header_openssl_evp_h=$ac_header_preproc
9643 fi
9644 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_evp_h" >&5
9645 $as_echo "$ac_cv_header_openssl_evp_h" >&6; }
9646
9647 fi
9648 if test "x$ac_cv_header_openssl_evp_h" = x""yes; then
9649
9650 { $as_echo "$as_me:$LINENO: checking for EVP_DigestInit in -lcrypto" >&5
9651 $as_echo_n "checking for EVP_DigestInit in -lcrypto... " >&6; }
9652 if test "${ac_cv_lib_crypto_EVP_DigestInit+set}" = set; then
9653 $as_echo_n "(cached) " >&6
9654 else
9655 ac_check_lib_save_LIBS=$LIBS
9656 LIBS="-lcrypto $LIB_RSAREF $LIBS"
9657 cat >conftest.$ac_ext <<_ACEOF
9658 /* confdefs.h. */
9659 _ACEOF
9660 cat confdefs.h >>conftest.$ac_ext
9661 cat >>conftest.$ac_ext <<_ACEOF
9662 /* end confdefs.h. */
9663
9664 /* Override any GCC internal prototype to avoid an error.
9665 Use char because int might match the return type of a GCC
9666 builtin and then its argument prototype would still apply. */
9667 #ifdef __cplusplus
9668 extern "C"
9669 #endif
9670 char EVP_DigestInit ();
9671 int
9672 main ()
9673 {
9674 return EVP_DigestInit ();
9675 ;
9676 return 0;
9677 }
9678 _ACEOF
9679 rm -f conftest.$ac_objext conftest$ac_exeext
9680 if { (ac_try="$ac_link"
9681 case "(($ac_try" in
9682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9683 *) ac_try_echo=$ac_try;;
9684 esac
9685 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9686 $as_echo "$ac_try_echo") >&5
9687 (eval "$ac_link") 2>conftest.er1
9688 ac_status=$?
9689 grep -v '^ *+' conftest.er1 >conftest.err
9690 rm -f conftest.er1
9691 cat conftest.err >&5
9692 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9693 (exit $ac_status); } && {
9694 test -z "$ac_c_werror_flag" ||
9695 test ! -s conftest.err
9696 } && test -s conftest$ac_exeext && {
9697 test "$cross_compiling" = yes ||
9698 $as_test_x conftest$ac_exeext
9699 }; then
9700 ac_cv_lib_crypto_EVP_DigestInit=yes
9701 else
9702 $as_echo "$as_me: failed program was:" >&5
9703 sed 's/^/| /' conftest.$ac_ext >&5
9704
9705 ac_cv_lib_crypto_EVP_DigestInit=no
9706 fi
9707
9708 rm -rf conftest.dSYM
9709 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9710 conftest$ac_exeext conftest.$ac_ext
9711 LIBS=$ac_check_lib_save_LIBS
9712 fi
9713 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_EVP_DigestInit" >&5
9714 $as_echo "$ac_cv_lib_crypto_EVP_DigestInit" >&6; }
9715 if test "x$ac_cv_lib_crypto_EVP_DigestInit" = x""yes; then
9716 with_openssl="yes"
9717 else
9718 with_openssl="no"
9719 fi
9720
9721 else
9722 with_openssl=no
9723 fi
9724
9725
9726 ;;
9727 esac
9728
9729 if test "$with_openssl" != "no"; then
9730
9731 cat >>confdefs.h <<\_ACEOF
9732 #define HAVE_OPENSSL /**/
9733 _ACEOF
9734
9735 else
9736 CPPFLAGS=$save_CPPFLAGS
9737 LDFLAGS=$save_LDFLAGS
9738 fi
9739
9740 { $as_echo "$as_me:$LINENO: checking for OpenSSL" >&5
9741 $as_echo_n "checking for OpenSSL... " >&6; }
9742 { $as_echo "$as_me:$LINENO: result: $with_openssl" >&5
9743 $as_echo "$with_openssl" >&6; }
9744
9745
9746
9747 # Check whether --with-des was given.
9748 if test "${with_des+set}" = set; then
9749 withval=$with_des; with_des=$withval
9750 else
9751 with_des=yes
9752 fi
9753
9754
9755 LIB_DES=""
9756 if test "$with_des" != no; then
9757 if test -d $with_des; then
9758 CPPFLAGS="$CPPFLAGS -I${with_des}/include"
9759 LDFLAGS="$LDFLAGS -L${with_des}/lib"
9760 fi
9761
9762 if test "$with_openssl" != no; then
9763 { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -lcrypto" >&5
9764 $as_echo_n "checking for des_cbc_encrypt in -lcrypto... " >&6; }
9765 if test "${ac_cv_lib_crypto_des_cbc_encrypt+set}" = set; then
9766 $as_echo_n "(cached) " >&6
9767 else
9768 ac_check_lib_save_LIBS=$LIBS
9769 LIBS="-lcrypto $LIB_RSAREF $LIBS"
9770 cat >conftest.$ac_ext <<_ACEOF
9771 /* confdefs.h. */
9772 _ACEOF
9773 cat confdefs.h >>conftest.$ac_ext
9774 cat >>conftest.$ac_ext <<_ACEOF
9775 /* end confdefs.h. */
9776
9777 /* Override any GCC internal prototype to avoid an error.
9778 Use char because int might match the return type of a GCC
9779 builtin and then its argument prototype would still apply. */
9780 #ifdef __cplusplus
9781 extern "C"
9782 #endif
9783 char des_cbc_encrypt ();
9784 int
9785 main ()
9786 {
9787 return des_cbc_encrypt ();
9788 ;
9789 return 0;
9790 }
9791 _ACEOF
9792 rm -f conftest.$ac_objext conftest$ac_exeext
9793 if { (ac_try="$ac_link"
9794 case "(($ac_try" in
9795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9796 *) ac_try_echo=$ac_try;;
9797 esac
9798 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9799 $as_echo "$ac_try_echo") >&5
9800 (eval "$ac_link") 2>conftest.er1
9801 ac_status=$?
9802 grep -v '^ *+' conftest.er1 >conftest.err
9803 rm -f conftest.er1
9804 cat conftest.err >&5
9805 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9806 (exit $ac_status); } && {
9807 test -z "$ac_c_werror_flag" ||
9808 test ! -s conftest.err
9809 } && test -s conftest$ac_exeext && {
9810 test "$cross_compiling" = yes ||
9811 $as_test_x conftest$ac_exeext
9812 }; then
9813 ac_cv_lib_crypto_des_cbc_encrypt=yes
9814 else
9815 $as_echo "$as_me: failed program was:" >&5
9816 sed 's/^/| /' conftest.$ac_ext >&5
9817
9818 ac_cv_lib_crypto_des_cbc_encrypt=no
9819 fi
9820
9821 rm -rf conftest.dSYM
9822 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9823 conftest$ac_exeext conftest.$ac_ext
9824 LIBS=$ac_check_lib_save_LIBS
9825 fi
9826 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_des_cbc_encrypt" >&5
9827 $as_echo "$ac_cv_lib_crypto_des_cbc_encrypt" >&6; }
9828 if test "x$ac_cv_lib_crypto_des_cbc_encrypt" = x""yes; then
9829
9830 if test "${ac_cv_header_openssl_des_h+set}" = set; then
9831 { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
9832 $as_echo_n "checking for openssl/des.h... " >&6; }
9833 if test "${ac_cv_header_openssl_des_h+set}" = set; then
9834 $as_echo_n "(cached) " >&6
9835 fi
9836 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
9837 $as_echo "$ac_cv_header_openssl_des_h" >&6; }
9838 else
9839 # Is the header compilable?
9840 { $as_echo "$as_me:$LINENO: checking openssl/des.h usability" >&5
9841 $as_echo_n "checking openssl/des.h usability... " >&6; }
9842 cat >conftest.$ac_ext <<_ACEOF
9843 /* confdefs.h. */
9844 _ACEOF
9845 cat confdefs.h >>conftest.$ac_ext
9846 cat >>conftest.$ac_ext <<_ACEOF
9847 /* end confdefs.h. */
9848 $ac_includes_default
9849 #include <openssl/des.h>
9850 _ACEOF
9851 rm -f conftest.$ac_objext
9852 if { (ac_try="$ac_compile"
9853 case "(($ac_try" in
9854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9855 *) ac_try_echo=$ac_try;;
9856 esac
9857 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9858 $as_echo "$ac_try_echo") >&5
9859 (eval "$ac_compile") 2>conftest.er1
9860 ac_status=$?
9861 grep -v '^ *+' conftest.er1 >conftest.err
9862 rm -f conftest.er1
9863 cat conftest.err >&5
9864 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9865 (exit $ac_status); } && {
9866 test -z "$ac_c_werror_flag" ||
9867 test ! -s conftest.err
9868 } && test -s conftest.$ac_objext; then
9869 ac_header_compiler=yes
9870 else
9871 $as_echo "$as_me: failed program was:" >&5
9872 sed 's/^/| /' conftest.$ac_ext >&5
9873
9874 ac_header_compiler=no
9875 fi
9876
9877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9878 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9879 $as_echo "$ac_header_compiler" >&6; }
9880
9881 # Is the header present?
9882 { $as_echo "$as_me:$LINENO: checking openssl/des.h presence" >&5
9883 $as_echo_n "checking openssl/des.h presence... " >&6; }
9884 cat >conftest.$ac_ext <<_ACEOF
9885 /* confdefs.h. */
9886 _ACEOF
9887 cat confdefs.h >>conftest.$ac_ext
9888 cat >>conftest.$ac_ext <<_ACEOF
9889 /* end confdefs.h. */
9890 #include <openssl/des.h>
9891 _ACEOF
9892 if { (ac_try="$ac_cpp conftest.$ac_ext"
9893 case "(($ac_try" in
9894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9895 *) ac_try_echo=$ac_try;;
9896 esac
9897 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9898 $as_echo "$ac_try_echo") >&5
9899 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9900 ac_status=$?
9901 grep -v '^ *+' conftest.er1 >conftest.err
9902 rm -f conftest.er1
9903 cat conftest.err >&5
9904 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9905 (exit $ac_status); } >/dev/null && {
9906 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9907 test ! -s conftest.err
9908 }; then
9909 ac_header_preproc=yes
9910 else
9911 $as_echo "$as_me: failed program was:" >&5
9912 sed 's/^/| /' conftest.$ac_ext >&5
9913
9914 ac_header_preproc=no
9915 fi
9916
9917 rm -f conftest.err conftest.$ac_ext
9918 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9919 $as_echo "$ac_header_preproc" >&6; }
9920
9921 # So? What about this header?
9922 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9923 yes:no: )
9924 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&5
9925 $as_echo "$as_me: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9926 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the compiler's result" >&5
9927 $as_echo "$as_me: WARNING: openssl/des.h: proceeding with the compiler's result" >&2;}
9928 ac_header_preproc=yes
9929 ;;
9930 no:yes:* )
9931 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: present but cannot be compiled" >&5
9932 $as_echo "$as_me: WARNING: openssl/des.h: present but cannot be compiled" >&2;}
9933 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: check for missing prerequisite headers?" >&5
9934 $as_echo "$as_me: WARNING: openssl/des.h: check for missing prerequisite headers?" >&2;}
9935 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: see the Autoconf documentation" >&5
9936 $as_echo "$as_me: WARNING: openssl/des.h: see the Autoconf documentation" >&2;}
9937 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: section \"Present But Cannot Be Compiled\"" >&5
9938 $as_echo "$as_me: WARNING: openssl/des.h: section \"Present But Cannot Be Compiled\"" >&2;}
9939 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&5
9940 $as_echo "$as_me: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&2;}
9941 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&5
9942 $as_echo "$as_me: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&2;}
9943
9944 ;;
9945 esac
9946 { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
9947 $as_echo_n "checking for openssl/des.h... " >&6; }
9948 if test "${ac_cv_header_openssl_des_h+set}" = set; then
9949 $as_echo_n "(cached) " >&6
9950 else
9951 ac_cv_header_openssl_des_h=$ac_header_preproc
9952 fi
9953 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
9954 $as_echo "$ac_cv_header_openssl_des_h" >&6; }
9955
9956 fi
9957 if test "x$ac_cv_header_openssl_des_h" = x""yes; then
9958
9959 cat >>confdefs.h <<\_ACEOF
9960 #define WITH_SSL_DES /**/
9961 _ACEOF
9962
9963 LIB_DES="-lcrypto";
9964 with_des=yes
9965 else
9966 with_des=no
9967 fi
9968
9969
9970 else
9971 with_des=no
9972 fi
9973
9974
9975 if test "$with_des" = no; then
9976 { $as_echo "$as_me:$LINENO: checking for DES_cbc_encrypt in -lcrypto" >&5
9977 $as_echo_n "checking for DES_cbc_encrypt in -lcrypto... " >&6; }
9978 if test "${ac_cv_lib_crypto_DES_cbc_encrypt+set}" = set; then
9979 $as_echo_n "(cached) " >&6
9980 else
9981 ac_check_lib_save_LIBS=$LIBS
9982 LIBS="-lcrypto $LIB_RSAREF $LIBS"
9983 cat >conftest.$ac_ext <<_ACEOF
9984 /* confdefs.h. */
9985 _ACEOF
9986 cat confdefs.h >>conftest.$ac_ext
9987 cat >>conftest.$ac_ext <<_ACEOF
9988 /* end confdefs.h. */
9989
9990 /* Override any GCC internal prototype to avoid an error.
9991 Use char because int might match the return type of a GCC
9992 builtin and then its argument prototype would still apply. */
9993 #ifdef __cplusplus
9994 extern "C"
9995 #endif
9996 char DES_cbc_encrypt ();
9997 int
9998 main ()
9999 {
10000 return DES_cbc_encrypt ();
10001 ;
10002 return 0;
10003 }
10004 _ACEOF
10005 rm -f conftest.$ac_objext conftest$ac_exeext
10006 if { (ac_try="$ac_link"
10007 case "(($ac_try" in
10008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10009 *) ac_try_echo=$ac_try;;
10010 esac
10011 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10012 $as_echo "$ac_try_echo") >&5
10013 (eval "$ac_link") 2>conftest.er1
10014 ac_status=$?
10015 grep -v '^ *+' conftest.er1 >conftest.err
10016 rm -f conftest.er1
10017 cat conftest.err >&5
10018 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10019 (exit $ac_status); } && {
10020 test -z "$ac_c_werror_flag" ||
10021 test ! -s conftest.err
10022 } && test -s conftest$ac_exeext && {
10023 test "$cross_compiling" = yes ||
10024 $as_test_x conftest$ac_exeext
10025 }; then
10026 ac_cv_lib_crypto_DES_cbc_encrypt=yes
10027 else
10028 $as_echo "$as_me: failed program was:" >&5
10029 sed 's/^/| /' conftest.$ac_ext >&5
10030
10031 ac_cv_lib_crypto_DES_cbc_encrypt=no
10032 fi
10033
10034 rm -rf conftest.dSYM
10035 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10036 conftest$ac_exeext conftest.$ac_ext
10037 LIBS=$ac_check_lib_save_LIBS
10038 fi
10039 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_DES_cbc_encrypt" >&5
10040 $as_echo "$ac_cv_lib_crypto_DES_cbc_encrypt" >&6; }
10041 if test "x$ac_cv_lib_crypto_DES_cbc_encrypt" = x""yes; then
10042
10043 if test "${ac_cv_header_openssl_des_h+set}" = set; then
10044 { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
10045 $as_echo_n "checking for openssl/des.h... " >&6; }
10046 if test "${ac_cv_header_openssl_des_h+set}" = set; then
10047 $as_echo_n "(cached) " >&6
10048 fi
10049 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
10050 $as_echo "$ac_cv_header_openssl_des_h" >&6; }
10051 else
10052 # Is the header compilable?
10053 { $as_echo "$as_me:$LINENO: checking openssl/des.h usability" >&5
10054 $as_echo_n "checking openssl/des.h usability... " >&6; }
10055 cat >conftest.$ac_ext <<_ACEOF
10056 /* confdefs.h. */
10057 _ACEOF
10058 cat confdefs.h >>conftest.$ac_ext
10059 cat >>conftest.$ac_ext <<_ACEOF
10060 /* end confdefs.h. */
10061 $ac_includes_default
10062 #include <openssl/des.h>
10063 _ACEOF
10064 rm -f conftest.$ac_objext
10065 if { (ac_try="$ac_compile"
10066 case "(($ac_try" in
10067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10068 *) ac_try_echo=$ac_try;;
10069 esac
10070 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10071 $as_echo "$ac_try_echo") >&5
10072 (eval "$ac_compile") 2>conftest.er1
10073 ac_status=$?
10074 grep -v '^ *+' conftest.er1 >conftest.err
10075 rm -f conftest.er1
10076 cat conftest.err >&5
10077 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10078 (exit $ac_status); } && {
10079 test -z "$ac_c_werror_flag" ||
10080 test ! -s conftest.err
10081 } && test -s conftest.$ac_objext; then
10082 ac_header_compiler=yes
10083 else
10084 $as_echo "$as_me: failed program was:" >&5
10085 sed 's/^/| /' conftest.$ac_ext >&5
10086
10087 ac_header_compiler=no
10088 fi
10089
10090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10091 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10092 $as_echo "$ac_header_compiler" >&6; }
10093
10094 # Is the header present?
10095 { $as_echo "$as_me:$LINENO: checking openssl/des.h presence" >&5
10096 $as_echo_n "checking openssl/des.h presence... " >&6; }
10097 cat >conftest.$ac_ext <<_ACEOF
10098 /* confdefs.h. */
10099 _ACEOF
10100 cat confdefs.h >>conftest.$ac_ext
10101 cat >>conftest.$ac_ext <<_ACEOF
10102 /* end confdefs.h. */
10103 #include <openssl/des.h>
10104 _ACEOF
10105 if { (ac_try="$ac_cpp conftest.$ac_ext"
10106 case "(($ac_try" in
10107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10108 *) ac_try_echo=$ac_try;;
10109 esac
10110 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10111 $as_echo "$ac_try_echo") >&5
10112 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10113 ac_status=$?
10114 grep -v '^ *+' conftest.er1 >conftest.err
10115 rm -f conftest.er1
10116 cat conftest.err >&5
10117 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10118 (exit $ac_status); } >/dev/null && {
10119 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10120 test ! -s conftest.err
10121 }; then
10122 ac_header_preproc=yes
10123 else
10124 $as_echo "$as_me: failed program was:" >&5
10125 sed 's/^/| /' conftest.$ac_ext >&5
10126
10127 ac_header_preproc=no
10128 fi
10129
10130 rm -f conftest.err conftest.$ac_ext
10131 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10132 $as_echo "$ac_header_preproc" >&6; }
10133
10134 # So? What about this header?
10135 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10136 yes:no: )
10137 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&5
10138 $as_echo "$as_me: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10139 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the compiler's result" >&5
10140 $as_echo "$as_me: WARNING: openssl/des.h: proceeding with the compiler's result" >&2;}
10141 ac_header_preproc=yes
10142 ;;
10143 no:yes:* )
10144 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: present but cannot be compiled" >&5
10145 $as_echo "$as_me: WARNING: openssl/des.h: present but cannot be compiled" >&2;}
10146 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: check for missing prerequisite headers?" >&5
10147 $as_echo "$as_me: WARNING: openssl/des.h: check for missing prerequisite headers?" >&2;}
10148 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: see the Autoconf documentation" >&5
10149 $as_echo "$as_me: WARNING: openssl/des.h: see the Autoconf documentation" >&2;}
10150 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: section \"Present But Cannot Be Compiled\"" >&5
10151 $as_echo "$as_me: WARNING: openssl/des.h: section \"Present But Cannot Be Compiled\"" >&2;}
10152 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&5
10153 $as_echo "$as_me: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&2;}
10154 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&5
10155 $as_echo "$as_me: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&2;}
10156
10157 ;;
10158 esac
10159 { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
10160 $as_echo_n "checking for openssl/des.h... " >&6; }
10161 if test "${ac_cv_header_openssl_des_h+set}" = set; then
10162 $as_echo_n "(cached) " >&6
10163 else
10164 ac_cv_header_openssl_des_h=$ac_header_preproc
10165 fi
10166 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
10167 $as_echo "$ac_cv_header_openssl_des_h" >&6; }
10168
10169 fi
10170 if test "x$ac_cv_header_openssl_des_h" = x""yes; then
10171
10172 cat >>confdefs.h <<\_ACEOF
10173 #define WITH_SSL_DES /**/
10174 _ACEOF
10175
10176 LIB_DES="-lcrypto";
10177 with_des=yes
10178 else
10179 with_des=no
10180 fi
10181
10182
10183 else
10184 with_des=no
10185 fi
10186
10187 fi
10188 fi
10189
10190 if test "$with_des" = no; then
10191 { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
10192 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
10193 if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
10194 $as_echo_n "(cached) " >&6
10195 else
10196 ac_check_lib_save_LIBS=$LIBS
10197 LIBS="-ldes $LIBS"
10198 cat >conftest.$ac_ext <<_ACEOF
10199 /* confdefs.h. */
10200 _ACEOF
10201 cat confdefs.h >>conftest.$ac_ext
10202 cat >>conftest.$ac_ext <<_ACEOF
10203 /* end confdefs.h. */
10204
10205 /* Override any GCC internal prototype to avoid an error.
10206 Use char because int might match the return type of a GCC
10207 builtin and then its argument prototype would still apply. */
10208 #ifdef __cplusplus
10209 extern "C"
10210 #endif
10211 char des_cbc_encrypt ();
10212 int
10213 main ()
10214 {
10215 return des_cbc_encrypt ();
10216 ;
10217 return 0;
10218 }
10219 _ACEOF
10220 rm -f conftest.$ac_objext conftest$ac_exeext
10221 if { (ac_try="$ac_link"
10222 case "(($ac_try" in
10223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10224 *) ac_try_echo=$ac_try;;
10225 esac
10226 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10227 $as_echo "$ac_try_echo") >&5
10228 (eval "$ac_link") 2>conftest.er1
10229 ac_status=$?
10230 grep -v '^ *+' conftest.er1 >conftest.err
10231 rm -f conftest.er1
10232 cat conftest.err >&5
10233 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10234 (exit $ac_status); } && {
10235 test -z "$ac_c_werror_flag" ||
10236 test ! -s conftest.err
10237 } && test -s conftest$ac_exeext && {
10238 test "$cross_compiling" = yes ||
10239 $as_test_x conftest$ac_exeext
10240 }; then
10241 ac_cv_lib_des_des_cbc_encrypt=yes
10242 else
10243 $as_echo "$as_me: failed program was:" >&5
10244 sed 's/^/| /' conftest.$ac_ext >&5
10245
10246 ac_cv_lib_des_des_cbc_encrypt=no
10247 fi
10248
10249 rm -rf conftest.dSYM
10250 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10251 conftest$ac_exeext conftest.$ac_ext
10252 LIBS=$ac_check_lib_save_LIBS
10253 fi
10254 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
10255 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
10256 if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then
10257 LIB_DES="-ldes";
10258 with_des=yes
10259 else
10260 with_des=no
10261 fi
10262
10263 fi
10264
10265 if test "$with_des" = no; then
10266 { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
10267 $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
10268 if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
10269 $as_echo_n "(cached) " >&6
10270 else
10271 ac_check_lib_save_LIBS=$LIBS
10272 LIBS="-ldes425 $LIBS"
10273 cat >conftest.$ac_ext <<_ACEOF
10274 /* confdefs.h. */
10275 _ACEOF
10276 cat confdefs.h >>conftest.$ac_ext
10277 cat >>conftest.$ac_ext <<_ACEOF
10278 /* end confdefs.h. */
10279
10280 /* Override any GCC internal prototype to avoid an error.
10281 Use char because int might match the return type of a GCC
10282 builtin and then its argument prototype would still apply. */
10283 #ifdef __cplusplus
10284 extern "C"
10285 #endif
10286 char des_cbc_encrypt ();
10287 int
10288 main ()
10289 {
10290 return des_cbc_encrypt ();
10291 ;
10292 return 0;
10293 }
10294 _ACEOF
10295 rm -f conftest.$ac_objext conftest$ac_exeext
10296 if { (ac_try="$ac_link"
10297 case "(($ac_try" in
10298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10299 *) ac_try_echo=$ac_try;;
10300 esac
10301 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10302 $as_echo "$ac_try_echo") >&5
10303 (eval "$ac_link") 2>conftest.er1
10304 ac_status=$?
10305 grep -v '^ *+' conftest.er1 >conftest.err
10306 rm -f conftest.er1
10307 cat conftest.err >&5
10308 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10309 (exit $ac_status); } && {
10310 test -z "$ac_c_werror_flag" ||
10311 test ! -s conftest.err
10312 } && test -s conftest$ac_exeext && {
10313 test "$cross_compiling" = yes ||
10314 $as_test_x conftest$ac_exeext
10315 }; then
10316 ac_cv_lib_des425_des_cbc_encrypt=yes
10317 else
10318 $as_echo "$as_me: failed program was:" >&5
10319 sed 's/^/| /' conftest.$ac_ext >&5
10320
10321 ac_cv_lib_des425_des_cbc_encrypt=no
10322 fi
10323
10324 rm -rf conftest.dSYM
10325 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10326 conftest$ac_exeext conftest.$ac_ext
10327 LIBS=$ac_check_lib_save_LIBS
10328 fi
10329 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
10330 $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
10331 if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then
10332 LIB_DES="-ldes425";
10333 with_des=yes
10334 else
10335 with_des=no
10336 fi
10337
10338 fi
10339
10340 if test "$with_des" = no; then
10341 { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes524" >&5
10342 $as_echo_n "checking for des_cbc_encrypt in -ldes524... " >&6; }
10343 if test "${ac_cv_lib_des524_des_cbc_encrypt+set}" = set; then
10344 $as_echo_n "(cached) " >&6
10345 else
10346 ac_check_lib_save_LIBS=$LIBS
10347 LIBS="-ldes524 $LIBS"
10348 cat >conftest.$ac_ext <<_ACEOF
10349 /* confdefs.h. */
10350 _ACEOF
10351 cat confdefs.h >>conftest.$ac_ext
10352 cat >>conftest.$ac_ext <<_ACEOF
10353 /* end confdefs.h. */
10354
10355 /* Override any GCC internal prototype to avoid an error.
10356 Use char because int might match the return type of a GCC
10357 builtin and then its argument prototype would still apply. */
10358 #ifdef __cplusplus
10359 extern "C"
10360 #endif
10361 char des_cbc_encrypt ();
10362 int
10363 main ()
10364 {
10365 return des_cbc_encrypt ();
10366 ;
10367 return 0;
10368 }
10369 _ACEOF
10370 rm -f conftest.$ac_objext conftest$ac_exeext
10371 if { (ac_try="$ac_link"
10372 case "(($ac_try" in
10373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10374 *) ac_try_echo=$ac_try;;
10375 esac
10376 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10377 $as_echo "$ac_try_echo") >&5
10378 (eval "$ac_link") 2>conftest.er1
10379 ac_status=$?
10380 grep -v '^ *+' conftest.er1 >conftest.err
10381 rm -f conftest.er1
10382 cat conftest.err >&5
10383 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10384 (exit $ac_status); } && {
10385 test -z "$ac_c_werror_flag" ||
10386 test ! -s conftest.err
10387 } && test -s conftest$ac_exeext && {
10388 test "$cross_compiling" = yes ||
10389 $as_test_x conftest$ac_exeext
10390 }; then
10391 ac_cv_lib_des524_des_cbc_encrypt=yes
10392 else
10393 $as_echo "$as_me: failed program was:" >&5
10394 sed 's/^/| /' conftest.$ac_ext >&5
10395
10396 ac_cv_lib_des524_des_cbc_encrypt=no
10397 fi
10398
10399 rm -rf conftest.dSYM
10400 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10401 conftest$ac_exeext conftest.$ac_ext
10402 LIBS=$ac_check_lib_save_LIBS
10403 fi
10404 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_des524_des_cbc_encrypt" >&5
10405 $as_echo "$ac_cv_lib_des524_des_cbc_encrypt" >&6; }
10406 if test "x$ac_cv_lib_des524_des_cbc_encrypt" = x""yes; then
10407 LIB_DES="-ldes524";
10408 with_des=yes
10409 else
10410 with_des=no
10411 fi
10412
10413 fi
10414
10415 if test "$with_des" = no; then
10416
10417 LIB_RSAREF=""
10418 { $as_echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lrsaref" >&5
10419 $as_echo_n "checking for RSAPublicEncrypt in -lrsaref... " >&6; }
10420 if test "${ac_cv_lib_rsaref_RSAPublicEncrypt+set}" = set; then
10421 $as_echo_n "(cached) " >&6
10422 else
10423 ac_check_lib_save_LIBS=$LIBS
10424 LIBS="-lrsaref $LIBS"
10425 cat >conftest.$ac_ext <<_ACEOF
10426 /* confdefs.h. */
10427 _ACEOF
10428 cat confdefs.h >>conftest.$ac_ext
10429 cat >>conftest.$ac_ext <<_ACEOF
10430 /* end confdefs.h. */
10431
10432 /* Override any GCC internal prototype to avoid an error.
10433 Use char because int might match the return type of a GCC
10434 builtin and then its argument prototype would still apply. */
10435 #ifdef __cplusplus
10436 extern "C"
10437 #endif
10438 char RSAPublicEncrypt ();
10439 int
10440 main ()
10441 {
10442 return RSAPublicEncrypt ();
10443 ;
10444 return 0;
10445 }
10446 _ACEOF
10447 rm -f conftest.$ac_objext conftest$ac_exeext
10448 if { (ac_try="$ac_link"
10449 case "(($ac_try" in
10450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10451 *) ac_try_echo=$ac_try;;
10452 esac
10453 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10454 $as_echo "$ac_try_echo") >&5
10455 (eval "$ac_link") 2>conftest.er1
10456 ac_status=$?
10457 grep -v '^ *+' conftest.er1 >conftest.err
10458 rm -f conftest.er1
10459 cat conftest.err >&5
10460 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10461 (exit $ac_status); } && {
10462 test -z "$ac_c_werror_flag" ||
10463 test ! -s conftest.err
10464 } && test -s conftest$ac_exeext && {
10465 test "$cross_compiling" = yes ||
10466 $as_test_x conftest$ac_exeext
10467 }; then
10468 ac_cv_lib_rsaref_RSAPublicEncrypt=yes
10469 else
10470 $as_echo "$as_me: failed program was:" >&5
10471 sed 's/^/| /' conftest.$ac_ext >&5
10472
10473 ac_cv_lib_rsaref_RSAPublicEncrypt=no
10474 fi
10475
10476 rm -rf conftest.dSYM
10477 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10478 conftest$ac_exeext conftest.$ac_ext
10479 LIBS=$ac_check_lib_save_LIBS
10480 fi
10481 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rsaref_RSAPublicEncrypt" >&5
10482 $as_echo "$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6; }
10483 if test "x$ac_cv_lib_rsaref_RSAPublicEncrypt" = x""yes; then
10484 LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes
10485 else
10486 cmu_have_rsaref=no
10487 fi
10488
10489
10490 { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -lcrypto" >&5
10491 $as_echo_n "checking for des_cbc_encrypt in -lcrypto... " >&6; }
10492 if test "${ac_cv_lib_crypto_des_cbc_encrypt+set}" = set; then
10493 $as_echo_n "(cached) " >&6
10494 else
10495 ac_check_lib_save_LIBS=$LIBS
10496 LIBS="-lcrypto $LIB_RSAREF $LIBS"
10497 cat >conftest.$ac_ext <<_ACEOF
10498 /* confdefs.h. */
10499 _ACEOF
10500 cat confdefs.h >>conftest.$ac_ext
10501 cat >>conftest.$ac_ext <<_ACEOF
10502 /* end confdefs.h. */
10503
10504 /* Override any GCC internal prototype to avoid an error.
10505 Use char because int might match the return type of a GCC
10506 builtin and then its argument prototype would still apply. */
10507 #ifdef __cplusplus
10508 extern "C"
10509 #endif
10510 char des_cbc_encrypt ();
10511 int
10512 main ()
10513 {
10514 return des_cbc_encrypt ();
10515 ;
10516 return 0;
10517 }
10518 _ACEOF
10519 rm -f conftest.$ac_objext conftest$ac_exeext
10520 if { (ac_try="$ac_link"
10521 case "(($ac_try" in
10522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10523 *) ac_try_echo=$ac_try;;
10524 esac
10525 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10526 $as_echo "$ac_try_echo") >&5
10527 (eval "$ac_link") 2>conftest.er1
10528 ac_status=$?
10529 grep -v '^ *+' conftest.er1 >conftest.err
10530 rm -f conftest.er1
10531 cat conftest.err >&5
10532 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10533 (exit $ac_status); } && {
10534 test -z "$ac_c_werror_flag" ||
10535 test ! -s conftest.err
10536 } && test -s conftest$ac_exeext && {
10537 test "$cross_compiling" = yes ||
10538 $as_test_x conftest$ac_exeext
10539 }; then
10540 ac_cv_lib_crypto_des_cbc_encrypt=yes
10541 else
10542 $as_echo "$as_me: failed program was:" >&5
10543 sed 's/^/| /' conftest.$ac_ext >&5
10544
10545 ac_cv_lib_crypto_des_cbc_encrypt=no
10546 fi
10547
10548 rm -rf conftest.dSYM
10549 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10550 conftest$ac_exeext conftest.$ac_ext
10551 LIBS=$ac_check_lib_save_LIBS
10552 fi
10553 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_des_cbc_encrypt" >&5
10554 $as_echo "$ac_cv_lib_crypto_des_cbc_encrypt" >&6; }
10555 if test "x$ac_cv_lib_crypto_des_cbc_encrypt" = x""yes; then
10556
10557 if test "${ac_cv_header_openssl_des_h+set}" = set; then
10558 { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
10559 $as_echo_n "checking for openssl/des.h... " >&6; }
10560 if test "${ac_cv_header_openssl_des_h+set}" = set; then
10561 $as_echo_n "(cached) " >&6
10562 fi
10563 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
10564 $as_echo "$ac_cv_header_openssl_des_h" >&6; }
10565 else
10566 # Is the header compilable?
10567 { $as_echo "$as_me:$LINENO: checking openssl/des.h usability" >&5
10568 $as_echo_n "checking openssl/des.h usability... " >&6; }
10569 cat >conftest.$ac_ext <<_ACEOF
10570 /* confdefs.h. */
10571 _ACEOF
10572 cat confdefs.h >>conftest.$ac_ext
10573 cat >>conftest.$ac_ext <<_ACEOF
10574 /* end confdefs.h. */
10575 $ac_includes_default
10576 #include <openssl/des.h>
10577 _ACEOF
10578 rm -f conftest.$ac_objext
10579 if { (ac_try="$ac_compile"
10580 case "(($ac_try" in
10581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10582 *) ac_try_echo=$ac_try;;
10583 esac
10584 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10585 $as_echo "$ac_try_echo") >&5
10586 (eval "$ac_compile") 2>conftest.er1
10587 ac_status=$?
10588 grep -v '^ *+' conftest.er1 >conftest.err
10589 rm -f conftest.er1
10590 cat conftest.err >&5
10591 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10592 (exit $ac_status); } && {
10593 test -z "$ac_c_werror_flag" ||
10594 test ! -s conftest.err
10595 } && test -s conftest.$ac_objext; then
10596 ac_header_compiler=yes
10597 else
10598 $as_echo "$as_me: failed program was:" >&5
10599 sed 's/^/| /' conftest.$ac_ext >&5
10600
10601 ac_header_compiler=no
10602 fi
10603
10604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10605 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10606 $as_echo "$ac_header_compiler" >&6; }
10607
10608 # Is the header present?
10609 { $as_echo "$as_me:$LINENO: checking openssl/des.h presence" >&5
10610 $as_echo_n "checking openssl/des.h presence... " >&6; }
10611 cat >conftest.$ac_ext <<_ACEOF
10612 /* confdefs.h. */
10613 _ACEOF
10614 cat confdefs.h >>conftest.$ac_ext
10615 cat >>conftest.$ac_ext <<_ACEOF
10616 /* end confdefs.h. */
10617 #include <openssl/des.h>
10618 _ACEOF
10619 if { (ac_try="$ac_cpp conftest.$ac_ext"
10620 case "(($ac_try" in
10621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10622 *) ac_try_echo=$ac_try;;
10623 esac
10624 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10625 $as_echo "$ac_try_echo") >&5
10626 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10627 ac_status=$?
10628 grep -v '^ *+' conftest.er1 >conftest.err
10629 rm -f conftest.er1
10630 cat conftest.err >&5
10631 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10632 (exit $ac_status); } >/dev/null && {
10633 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10634 test ! -s conftest.err
10635 }; then
10636 ac_header_preproc=yes
10637 else
10638 $as_echo "$as_me: failed program was:" >&5
10639 sed 's/^/| /' conftest.$ac_ext >&5
10640
10641 ac_header_preproc=no
10642 fi
10643
10644 rm -f conftest.err conftest.$ac_ext
10645 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10646 $as_echo "$ac_header_preproc" >&6; }
10647
10648 # So? What about this header?
10649 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10650 yes:no: )
10651 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&5
10652 $as_echo "$as_me: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10653 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the compiler's result" >&5
10654 $as_echo "$as_me: WARNING: openssl/des.h: proceeding with the compiler's result" >&2;}
10655 ac_header_preproc=yes
10656 ;;
10657 no:yes:* )
10658 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: present but cannot be compiled" >&5
10659 $as_echo "$as_me: WARNING: openssl/des.h: present but cannot be compiled" >&2;}
10660 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: check for missing prerequisite headers?" >&5
10661 $as_echo "$as_me: WARNING: openssl/des.h: check for missing prerequisite headers?" >&2;}
10662 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: see the Autoconf documentation" >&5
10663 $as_echo "$as_me: WARNING: openssl/des.h: see the Autoconf documentation" >&2;}
10664 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: section \"Present But Cannot Be Compiled\"" >&5
10665 $as_echo "$as_me: WARNING: openssl/des.h: section \"Present But Cannot Be Compiled\"" >&2;}
10666 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&5
10667 $as_echo "$as_me: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&2;}
10668 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&5
10669 $as_echo "$as_me: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&2;}
10670
10671 ;;
10672 esac
10673 { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
10674 $as_echo_n "checking for openssl/des.h... " >&6; }
10675 if test "${ac_cv_header_openssl_des_h+set}" = set; then
10676 $as_echo_n "(cached) " >&6
10677 else
10678 ac_cv_header_openssl_des_h=$ac_header_preproc
10679 fi
10680 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
10681 $as_echo "$ac_cv_header_openssl_des_h" >&6; }
10682
10683 fi
10684 if test "x$ac_cv_header_openssl_des_h" = x""yes; then
10685
10686 cat >>confdefs.h <<\_ACEOF
10687 #define WITH_SSL_DES /**/
10688 _ACEOF
10689
10690 LIB_DES="-lcrypto";
10691 with_des=yes
10692 else
10693 with_des=no
10694 fi
10695
10696
10697 else
10698 with_des=no
10699 fi
10700
10701 fi
10702 fi
10703
10704 if test "$with_des" != no; then
10705
10706 cat >>confdefs.h <<\_ACEOF
10707 #define WITH_DES /**/
10708 _ACEOF
10709
10710 fi
10711
10712
10713
10714
10715 # Check whether --enable-digest was given.
10716 if test "${enable_digest+set}" = set; then
10717 enableval=$enable_digest; digest=$enableval
10718 else
10719 digest=yes
10720 fi
10721
10722
10723 if test "$digest" != no; then
10724 if test -d $digest; then
10725 CPPFLAGS="$CPPFLAGS -I$digest/include"
10726 LDFLAGS="$LDFLAGS -L$digest/lib"
10727 fi
10728 if test "$with_des" = no; then
10729 { $as_echo "$as_me:$LINENO: WARNING: No DES support for DIGEST-MD5" >&5
10730 $as_echo "$as_me: WARNING: No DES support for DIGEST-MD5" >&2;}
10731 fi
10732 fi
10733
10734 { $as_echo "$as_me:$LINENO: checking DIGEST-MD5" >&5
10735 $as_echo_n "checking DIGEST-MD5... " >&6; }
10736 if test "$digest" != no; then
10737 { $as_echo "$as_me:$LINENO: result: enabled" >&5
10738 $as_echo "enabled" >&6; }
10739 SASL_MECHS="$SASL_MECHS libdigestmd5.la"
10740 if test "$enable_static" = yes; then
10741 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/digestmd5.c"
10742 SASL_STATIC_OBJS="$SASL_STATIC_OBJS digestmd5.o"
10743
10744 cat >>confdefs.h <<\_ACEOF
10745 #define STATIC_DIGESTMD5 /**/
10746 _ACEOF
10747
10748 fi
10749 else
10750 { $as_echo "$as_me:$LINENO: result: disabled" >&5
10751 $as_echo "disabled" >&6; }
10752 fi
10753
10754 # Check whether --enable-scram was given.
10755 if test "${enable_scram+set}" = set; then
10756 enableval=$enable_scram; scram=$enableval
10757 else
10758 scram=yes
10759 fi
10760
10761
10762 if test "$with_openssl" = no; then
10763 { $as_echo "$as_me:$LINENO: WARNING: OpenSSL not found -- SCRAM will be disabled" >&5
10764 $as_echo "$as_me: WARNING: OpenSSL not found -- SCRAM will be disabled" >&2;}
10765 scram=no
10766 fi
10767
10768 { $as_echo "$as_me:$LINENO: checking SCRAM" >&5
10769 $as_echo_n "checking SCRAM... " >&6; }
10770 if test "$scram" != no; then
10771 { $as_echo "$as_me:$LINENO: result: enabled" >&5
10772 $as_echo "enabled" >&6; }
10773 SCRAM_LIBS="-lcrypto $LIB_RSAREF"
10774
10775 SASL_MECHS="$SASL_MECHS libscram.la"
10776 if test "$enable_static" = yes; then
10777 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/scram.c"
10778 SASL_STATIC_OBJS="$SASL_STATIC_OBJS scram.o"
10779
10780 cat >>confdefs.h <<\_ACEOF
10781 #define STATIC_SCRAM /**/
10782 _ACEOF
10783
10784 fi
10785
10786
10787 else
10788 { $as_echo "$as_me:$LINENO: result: disabled" >&5
10789 $as_echo "disabled" >&6; }
10790 fi
10791
10792 # Check whether --enable-otp was given.
10793 if test "${enable_otp+set}" = set; then
10794 enableval=$enable_otp; otp=$enableval
10795 else
10796 otp=yes
10797 fi
10798
10799
10800 if test "$with_openssl" = no; then
10801 { $as_echo "$as_me:$LINENO: WARNING: OpenSSL not found -- OTP will be disabled" >&5
10802 $as_echo "$as_me: WARNING: OpenSSL not found -- OTP will be disabled" >&2;}
10803 otp=no
10804 fi
10805
10806 { $as_echo "$as_me:$LINENO: checking OTP" >&5
10807 $as_echo_n "checking OTP... " >&6; }
10808 if test "$otp" != no; then
10809 { $as_echo "$as_me:$LINENO: result: enabled" >&5
10810 $as_echo "enabled" >&6; }
10811 OTP_LIBS="-lcrypto $LIB_RSAREF"
10812
10813 SASL_MECHS="$SASL_MECHS libotp.la"
10814 if test "$enable_static" = yes; then
10815 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/otp.c"
10816 SASL_STATIC_OBJS="$SASL_STATIC_OBJS otp.o"
10817
10818 cat >>confdefs.h <<\_ACEOF
10819 #define STATIC_OTP /**/
10820 _ACEOF
10821
10822 fi
10823
10824
10825 # Check whether --with-with-opie was given.
10826 if test "${with_with_opie+set}" = set; then
10827 withval=$with_with_opie; with_opie="${withval}"
10828 fi
10829
10830
10831 case "$with_opie" in
10832 ""|yes)
10833 { $as_echo "$as_me:$LINENO: checking for opiechallenge in -lopie" >&5
10834 $as_echo_n "checking for opiechallenge in -lopie... " >&6; }
10835 if test "${ac_cv_lib_opie_opiechallenge+set}" = set; then
10836 $as_echo_n "(cached) " >&6
10837 else
10838 ac_check_lib_save_LIBS=$LIBS
10839 LIBS="-lopie $LIBS"
10840 cat >conftest.$ac_ext <<_ACEOF
10841 /* confdefs.h. */
10842 _ACEOF
10843 cat confdefs.h >>conftest.$ac_ext
10844 cat >>conftest.$ac_ext <<_ACEOF
10845 /* end confdefs.h. */
10846
10847 /* Override any GCC internal prototype to avoid an error.
10848 Use char because int might match the return type of a GCC
10849 builtin and then its argument prototype would still apply. */
10850 #ifdef __cplusplus
10851 extern "C"
10852 #endif
10853 char opiechallenge ();
10854 int
10855 main ()
10856 {
10857 return opiechallenge ();
10858 ;
10859 return 0;
10860 }
10861 _ACEOF
10862 rm -f conftest.$ac_objext conftest$ac_exeext
10863 if { (ac_try="$ac_link"
10864 case "(($ac_try" in
10865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10866 *) ac_try_echo=$ac_try;;
10867 esac
10868 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10869 $as_echo "$ac_try_echo") >&5
10870 (eval "$ac_link") 2>conftest.er1
10871 ac_status=$?
10872 grep -v '^ *+' conftest.er1 >conftest.err
10873 rm -f conftest.er1
10874 cat conftest.err >&5
10875 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10876 (exit $ac_status); } && {
10877 test -z "$ac_c_werror_flag" ||
10878 test ! -s conftest.err
10879 } && test -s conftest$ac_exeext && {
10880 test "$cross_compiling" = yes ||
10881 $as_test_x conftest$ac_exeext
10882 }; then
10883 ac_cv_lib_opie_opiechallenge=yes
10884 else
10885 $as_echo "$as_me: failed program was:" >&5
10886 sed 's/^/| /' conftest.$ac_ext >&5
10887
10888 ac_cv_lib_opie_opiechallenge=no
10889 fi
10890
10891 rm -rf conftest.dSYM
10892 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10893 conftest$ac_exeext conftest.$ac_ext
10894 LIBS=$ac_check_lib_save_LIBS
10895 fi
10896 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_opie_opiechallenge" >&5
10897 $as_echo "$ac_cv_lib_opie_opiechallenge" >&6; }
10898 if test "x$ac_cv_lib_opie_opiechallenge" = x""yes; then
10899
10900 if test "${ac_cv_header_opie_h+set}" = set; then
10901 { $as_echo "$as_me:$LINENO: checking for opie.h" >&5
10902 $as_echo_n "checking for opie.h... " >&6; }
10903 if test "${ac_cv_header_opie_h+set}" = set; then
10904 $as_echo_n "(cached) " >&6
10905 fi
10906 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_opie_h" >&5
10907 $as_echo "$ac_cv_header_opie_h" >&6; }
10908 else
10909 # Is the header compilable?
10910 { $as_echo "$as_me:$LINENO: checking opie.h usability" >&5
10911 $as_echo_n "checking opie.h usability... " >&6; }
10912 cat >conftest.$ac_ext <<_ACEOF
10913 /* confdefs.h. */
10914 _ACEOF
10915 cat confdefs.h >>conftest.$ac_ext
10916 cat >>conftest.$ac_ext <<_ACEOF
10917 /* end confdefs.h. */
10918 $ac_includes_default
10919 #include <opie.h>
10920 _ACEOF
10921 rm -f conftest.$ac_objext
10922 if { (ac_try="$ac_compile"
10923 case "(($ac_try" in
10924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10925 *) ac_try_echo=$ac_try;;
10926 esac
10927 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10928 $as_echo "$ac_try_echo") >&5
10929 (eval "$ac_compile") 2>conftest.er1
10930 ac_status=$?
10931 grep -v '^ *+' conftest.er1 >conftest.err
10932 rm -f conftest.er1
10933 cat conftest.err >&5
10934 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10935 (exit $ac_status); } && {
10936 test -z "$ac_c_werror_flag" ||
10937 test ! -s conftest.err
10938 } && test -s conftest.$ac_objext; then
10939 ac_header_compiler=yes
10940 else
10941 $as_echo "$as_me: failed program was:" >&5
10942 sed 's/^/| /' conftest.$ac_ext >&5
10943
10944 ac_header_compiler=no
10945 fi
10946
10947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10948 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10949 $as_echo "$ac_header_compiler" >&6; }
10950
10951 # Is the header present?
10952 { $as_echo "$as_me:$LINENO: checking opie.h presence" >&5
10953 $as_echo_n "checking opie.h presence... " >&6; }
10954 cat >conftest.$ac_ext <<_ACEOF
10955 /* confdefs.h. */
10956 _ACEOF
10957 cat confdefs.h >>conftest.$ac_ext
10958 cat >>conftest.$ac_ext <<_ACEOF
10959 /* end confdefs.h. */
10960 #include <opie.h>
10961 _ACEOF
10962 if { (ac_try="$ac_cpp conftest.$ac_ext"
10963 case "(($ac_try" in
10964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10965 *) ac_try_echo=$ac_try;;
10966 esac
10967 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10968 $as_echo "$ac_try_echo") >&5
10969 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10970 ac_status=$?
10971 grep -v '^ *+' conftest.er1 >conftest.err
10972 rm -f conftest.er1
10973 cat conftest.err >&5
10974 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10975 (exit $ac_status); } >/dev/null && {
10976 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10977 test ! -s conftest.err
10978 }; then
10979 ac_header_preproc=yes
10980 else
10981 $as_echo "$as_me: failed program was:" >&5
10982 sed 's/^/| /' conftest.$ac_ext >&5
10983
10984 ac_header_preproc=no
10985 fi
10986
10987 rm -f conftest.err conftest.$ac_ext
10988 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10989 $as_echo "$ac_header_preproc" >&6; }
10990
10991 # So? What about this header?
10992 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10993 yes:no: )
10994 { $as_echo "$as_me:$LINENO: WARNING: opie.h: accepted by the compiler, rejected by the preprocessor!" >&5
10995 $as_echo "$as_me: WARNING: opie.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10996 { $as_echo "$as_me:$LINENO: WARNING: opie.h: proceeding with the compiler's result" >&5
10997 $as_echo "$as_me: WARNING: opie.h: proceeding with the compiler's result" >&2;}
10998 ac_header_preproc=yes
10999 ;;
11000 no:yes:* )
11001 { $as_echo "$as_me:$LINENO: WARNING: opie.h: present but cannot be compiled" >&5
11002 $as_echo "$as_me: WARNING: opie.h: present but cannot be compiled" >&2;}
11003 { $as_echo "$as_me:$LINENO: WARNING: opie.h: check for missing prerequisite headers?" >&5
11004 $as_echo "$as_me: WARNING: opie.h: check for missing prerequisite headers?" >&2;}
11005 { $as_echo "$as_me:$LINENO: WARNING: opie.h: see the Autoconf documentation" >&5
11006 $as_echo "$as_me: WARNING: opie.h: see the Autoconf documentation" >&2;}
11007 { $as_echo "$as_me:$LINENO: WARNING: opie.h: section \"Present But Cannot Be Compiled\"" >&5
11008 $as_echo "$as_me: WARNING: opie.h: section \"Present But Cannot Be Compiled\"" >&2;}
11009 { $as_echo "$as_me:$LINENO: WARNING: opie.h: proceeding with the preprocessor's result" >&5
11010 $as_echo "$as_me: WARNING: opie.h: proceeding with the preprocessor's result" >&2;}
11011 { $as_echo "$as_me:$LINENO: WARNING: opie.h: in the future, the compiler will take precedence" >&5
11012 $as_echo "$as_me: WARNING: opie.h: in the future, the compiler will take precedence" >&2;}
11013
11014 ;;
11015 esac
11016 { $as_echo "$as_me:$LINENO: checking for opie.h" >&5
11017 $as_echo_n "checking for opie.h... " >&6; }
11018 if test "${ac_cv_header_opie_h+set}" = set; then
11019 $as_echo_n "(cached) " >&6
11020 else
11021 ac_cv_header_opie_h=$ac_header_preproc
11022 fi
11023 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_opie_h" >&5
11024 $as_echo "$ac_cv_header_opie_h" >&6; }
11025
11026 fi
11027 if test "x$ac_cv_header_opie_h" = x""yes; then
11028 with_opie="yes"
11029 else
11030 with_opie="no"
11031 fi
11032
11033
11034 else
11035 with_opie="no"
11036 fi
11037
11038 ;;
11039 *)
11040 if test -d $with_opie; then
11041 CPPFLAGS="${CPPFLAGS} -I${with_opie}/include"
11042 LDFLAGS="${LDFLAGS} -L${with_opie}/lib"
11043 else
11044 with_opie="no"
11045 fi
11046 ;;
11047 esac
11048
11049 { $as_echo "$as_me:$LINENO: checking for OPIE" >&5
11050 $as_echo_n "checking for OPIE... " >&6; }
11051 { $as_echo "$as_me:$LINENO: result: $with_opie" >&5
11052 $as_echo "$with_opie" >&6; }
11053
11054 if test "$with_opie" != no; then
11055
11056 cat >>confdefs.h <<\_ACEOF
11057 #define HAVE_OPIE /**/
11058 _ACEOF
11059
11060 OTP_LIBS="$OTP_LIBS -lopie"
11061 fi
11062
11063
11064
11065 else
11066 { $as_echo "$as_me:$LINENO: result: disabled" >&5
11067 $as_echo "disabled" >&6; }
11068 fi
11069
11070 # Check whether --enable-srp was given.
11071 if test "${enable_srp+set}" = set; then
11072 enableval=$enable_srp; srp=$enableval
11073 else
11074 srp=no
11075 fi
11076
11077
11078 if test "$with_openssl" = no; then
11079 { $as_echo "$as_me:$LINENO: WARNING: OpenSSL not found -- SRP will be disabled" >&5
11080 $as_echo "$as_me: WARNING: OpenSSL not found -- SRP will be disabled" >&2;}
11081 srp=no
11082 fi
11083
11084 { $as_echo "$as_me:$LINENO: checking SRP" >&5
11085 $as_echo_n "checking SRP... " >&6; }
11086 if test "$srp" != no; then
11087 { $as_echo "$as_me:$LINENO: result: enabled" >&5
11088 $as_echo "enabled" >&6; }
11089 SRP_LIBS="-lcrypto $LIB_RSAREF"
11090
11091 SASL_MECHS="$SASL_MECHS libsrp.la"
11092 if test "$enable_static" = yes; then
11093 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/srp.c"
11094 SASL_STATIC_OBJS="$SASL_STATIC_OBJS srp.o"
11095
11096 cat >>confdefs.h <<\_ACEOF
11097 #define STATIC_SRP /**/
11098 _ACEOF
11099
11100 fi
11101
11102 # Check whether --enable-srp_setpass was given.
11103 if test "${enable_srp_setpass+set}" = set; then
11104 enableval=$enable_srp_setpass; srp_setpass=$enableval
11105 else
11106 srp_setpass=no
11107 fi
11108
11109
11110 { $as_echo "$as_me:$LINENO: checking if we should enable setting SRP secrets with saslpasswd" >&5
11111 $as_echo_n "checking if we should enable setting SRP secrets with saslpasswd... " >&6; }
11112 if test "$srp_setpass" != no; then
11113 { $as_echo "$as_me:$LINENO: result: enabled" >&5
11114 $as_echo "enabled" >&6; }
11115
11116 cat >>confdefs.h <<\_ACEOF
11117 #define DO_SRP_SETPASS /**/
11118 _ACEOF
11119
11120 else
11121 { $as_echo "$as_me:$LINENO: result: disabled" >&5
11122 $as_echo "disabled" >&6; }
11123 fi
11124
11125
11126 else
11127 { $as_echo "$as_me:$LINENO: result: disabled" >&5
11128 $as_echo "disabled" >&6; }
11129 fi
11130
11131
11132
11133
11134 # Check whether --enable-krb4 was given.
11135 if test "${enable_krb4+set}" = set; then
11136 enableval=$enable_krb4; krb4=$enableval
11137 else
11138 krb4=no
11139 fi
11140
11141
11142 if test "$krb4" != no; then
11143
11144 { $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
11145 $as_echo_n "checking for res_search in -lresolv... " >&6; }
11146 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
11147 $as_echo_n "(cached) " >&6
11148 else
11149 ac_check_lib_save_LIBS=$LIBS
11150 LIBS="-lresolv $LIBS"
11151 cat >conftest.$ac_ext <<_ACEOF
11152 /* confdefs.h. */
11153 _ACEOF
11154 cat confdefs.h >>conftest.$ac_ext
11155 cat >>conftest.$ac_ext <<_ACEOF
11156 /* end confdefs.h. */
11157
11158 /* Override any GCC internal prototype to avoid an error.
11159 Use char because int might match the return type of a GCC
11160 builtin and then its argument prototype would still apply. */
11161 #ifdef __cplusplus
11162 extern "C"
11163 #endif
11164 char res_search ();
11165 int
11166 main ()
11167 {
11168 return res_search ();
11169 ;
11170 return 0;
11171 }
11172 _ACEOF
11173 rm -f conftest.$ac_objext conftest$ac_exeext
11174 if { (ac_try="$ac_link"
11175 case "(($ac_try" in
11176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11177 *) ac_try_echo=$ac_try;;
11178 esac
11179 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11180 $as_echo "$ac_try_echo") >&5
11181 (eval "$ac_link") 2>conftest.er1
11182 ac_status=$?
11183 grep -v '^ *+' conftest.er1 >conftest.err
11184 rm -f conftest.er1
11185 cat conftest.err >&5
11186 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11187 (exit $ac_status); } && {
11188 test -z "$ac_c_werror_flag" ||
11189 test ! -s conftest.err
11190 } && test -s conftest$ac_exeext && {
11191 test "$cross_compiling" = yes ||
11192 $as_test_x conftest$ac_exeext
11193 }; then
11194 ac_cv_lib_resolv_res_search=yes
11195 else
11196 $as_echo "$as_me: failed program was:" >&5
11197 sed 's/^/| /' conftest.$ac_ext >&5
11198
11199 ac_cv_lib_resolv_res_search=no
11200 fi
11201
11202 rm -rf conftest.dSYM
11203 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11204 conftest$ac_exeext conftest.$ac_ext
11205 LIBS=$ac_check_lib_save_LIBS
11206 fi
11207 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
11208 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
11209 if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
11210 cat >>confdefs.h <<_ACEOF
11211 #define HAVE_LIBRESOLV 1
11212 _ACEOF
11213
11214 LIBS="-lresolv $LIBS"
11215
11216 fi
11217
11218
11219 if test -d ${krb4}; then
11220 { $as_echo "$as_me:$LINENO: checking for Kerberos includes" >&5
11221 $as_echo_n "checking for Kerberos includes... " >&6; }
11222 if test "${cyrus_krbinclude+set}" = set; then
11223 $as_echo_n "(cached) " >&6
11224 else
11225
11226 for krbhloc in include/kerberosIV include/kerberos include
11227 do
11228 if test -f ${krb4}/${krbhloc}/krb.h ; then
11229 cyrus_krbinclude=${krb4}/${krbhloc}
11230 break
11231 fi
11232 done
11233
11234 fi
11235 { $as_echo "$as_me:$LINENO: result: $cyrus_krbinclude" >&5
11236 $as_echo "$cyrus_krbinclude" >&6; }
11237
11238 if test -n "${cyrus_krbinclude}"; then
11239 CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
11240 fi
11241 LDFLAGS="$LDFLAGS -L$krb4/lib"
11242 fi
11243
11244 if test "$with_des" != no; then
11245 if test "${ac_cv_header_krb_h+set}" = set; then
11246 { $as_echo "$as_me:$LINENO: checking for krb.h" >&5
11247 $as_echo_n "checking for krb.h... " >&6; }
11248 if test "${ac_cv_header_krb_h+set}" = set; then
11249 $as_echo_n "(cached) " >&6
11250 fi
11251 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
11252 $as_echo "$ac_cv_header_krb_h" >&6; }
11253 else
11254 # Is the header compilable?
11255 { $as_echo "$as_me:$LINENO: checking krb.h usability" >&5
11256 $as_echo_n "checking krb.h usability... " >&6; }
11257 cat >conftest.$ac_ext <<_ACEOF
11258 /* confdefs.h. */
11259 _ACEOF
11260 cat confdefs.h >>conftest.$ac_ext
11261 cat >>conftest.$ac_ext <<_ACEOF
11262 /* end confdefs.h. */
11263 $ac_includes_default
11264 #include <krb.h>
11265 _ACEOF
11266 rm -f conftest.$ac_objext
11267 if { (ac_try="$ac_compile"
11268 case "(($ac_try" in
11269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11270 *) ac_try_echo=$ac_try;;
11271 esac
11272 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11273 $as_echo "$ac_try_echo") >&5
11274 (eval "$ac_compile") 2>conftest.er1
11275 ac_status=$?
11276 grep -v '^ *+' conftest.er1 >conftest.err
11277 rm -f conftest.er1
11278 cat conftest.err >&5
11279 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11280 (exit $ac_status); } && {
11281 test -z "$ac_c_werror_flag" ||
11282 test ! -s conftest.err
11283 } && test -s conftest.$ac_objext; then
11284 ac_header_compiler=yes
11285 else
11286 $as_echo "$as_me: failed program was:" >&5
11287 sed 's/^/| /' conftest.$ac_ext >&5
11288
11289 ac_header_compiler=no
11290 fi
11291
11292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11293 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11294 $as_echo "$ac_header_compiler" >&6; }
11295
11296 # Is the header present?
11297 { $as_echo "$as_me:$LINENO: checking krb.h presence" >&5
11298 $as_echo_n "checking krb.h presence... " >&6; }
11299 cat >conftest.$ac_ext <<_ACEOF
11300 /* confdefs.h. */
11301 _ACEOF
11302 cat confdefs.h >>conftest.$ac_ext
11303 cat >>conftest.$ac_ext <<_ACEOF
11304 /* end confdefs.h. */
11305 #include <krb.h>
11306 _ACEOF
11307 if { (ac_try="$ac_cpp conftest.$ac_ext"
11308 case "(($ac_try" in
11309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11310 *) ac_try_echo=$ac_try;;
11311 esac
11312 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11313 $as_echo "$ac_try_echo") >&5
11314 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11315 ac_status=$?
11316 grep -v '^ *+' conftest.er1 >conftest.err
11317 rm -f conftest.er1
11318 cat conftest.err >&5
11319 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11320 (exit $ac_status); } >/dev/null && {
11321 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11322 test ! -s conftest.err
11323 }; then
11324 ac_header_preproc=yes
11325 else
11326 $as_echo "$as_me: failed program was:" >&5
11327 sed 's/^/| /' conftest.$ac_ext >&5
11328
11329 ac_header_preproc=no
11330 fi
11331
11332 rm -f conftest.err conftest.$ac_ext
11333 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11334 $as_echo "$ac_header_preproc" >&6; }
11335
11336 # So? What about this header?
11337 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11338 yes:no: )
11339 { $as_echo "$as_me:$LINENO: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&5
11340 $as_echo "$as_me: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11341 { $as_echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the compiler's result" >&5
11342 $as_echo "$as_me: WARNING: krb.h: proceeding with the compiler's result" >&2;}
11343 ac_header_preproc=yes
11344 ;;
11345 no:yes:* )
11346 { $as_echo "$as_me:$LINENO: WARNING: krb.h: present but cannot be compiled" >&5
11347 $as_echo "$as_me: WARNING: krb.h: present but cannot be compiled" >&2;}
11348 { $as_echo "$as_me:$LINENO: WARNING: krb.h: check for missing prerequisite headers?" >&5
11349 $as_echo "$as_me: WARNING: krb.h: check for missing prerequisite headers?" >&2;}
11350 { $as_echo "$as_me:$LINENO: WARNING: krb.h: see the Autoconf documentation" >&5
11351 $as_echo "$as_me: WARNING: krb.h: see the Autoconf documentation" >&2;}
11352 { $as_echo "$as_me:$LINENO: WARNING: krb.h: section \"Present But Cannot Be Compiled\"" >&5
11353 $as_echo "$as_me: WARNING: krb.h: section \"Present But Cannot Be Compiled\"" >&2;}
11354 { $as_echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
11355 $as_echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;}
11356 { $as_echo "$as_me:$LINENO: WARNING: krb.h: in the future, the compiler will take precedence" >&5
11357 $as_echo "$as_me: WARNING: krb.h: in the future, the compiler will take precedence" >&2;}
11358
11359 ;;
11360 esac
11361 { $as_echo "$as_me:$LINENO: checking for krb.h" >&5
11362 $as_echo_n "checking for krb.h... " >&6; }
11363 if test "${ac_cv_header_krb_h+set}" = set; then
11364 $as_echo_n "(cached) " >&6
11365 else
11366 ac_cv_header_krb_h=$ac_header_preproc
11367 fi
11368 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
11369 $as_echo "$ac_cv_header_krb_h" >&6; }
11370
11371 fi
11372 if test "x$ac_cv_header_krb_h" = x""yes; then
11373
11374 { $as_echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
11375 $as_echo_n "checking for com_err in -lcom_err... " >&6; }
11376 if test "${ac_cv_lib_com_err_com_err+set}" = set; then
11377 $as_echo_n "(cached) " >&6
11378 else
11379 ac_check_lib_save_LIBS=$LIBS
11380 LIBS="-lcom_err $LIBS"
11381 cat >conftest.$ac_ext <<_ACEOF
11382 /* confdefs.h. */
11383 _ACEOF
11384 cat confdefs.h >>conftest.$ac_ext
11385 cat >>conftest.$ac_ext <<_ACEOF
11386 /* end confdefs.h. */
11387
11388 /* Override any GCC internal prototype to avoid an error.
11389 Use char because int might match the return type of a GCC
11390 builtin and then its argument prototype would still apply. */
11391 #ifdef __cplusplus
11392 extern "C"
11393 #endif
11394 char com_err ();
11395 int
11396 main ()
11397 {
11398 return com_err ();
11399 ;
11400 return 0;
11401 }
11402 _ACEOF
11403 rm -f conftest.$ac_objext conftest$ac_exeext
11404 if { (ac_try="$ac_link"
11405 case "(($ac_try" in
11406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11407 *) ac_try_echo=$ac_try;;
11408 esac
11409 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11410 $as_echo "$ac_try_echo") >&5
11411 (eval "$ac_link") 2>conftest.er1
11412 ac_status=$?
11413 grep -v '^ *+' conftest.er1 >conftest.err
11414 rm -f conftest.er1
11415 cat conftest.err >&5
11416 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11417 (exit $ac_status); } && {
11418 test -z "$ac_c_werror_flag" ||
11419 test ! -s conftest.err
11420 } && test -s conftest$ac_exeext && {
11421 test "$cross_compiling" = yes ||
11422 $as_test_x conftest$ac_exeext
11423 }; then
11424 ac_cv_lib_com_err_com_err=yes
11425 else
11426 $as_echo "$as_me: failed program was:" >&5
11427 sed 's/^/| /' conftest.$ac_ext >&5
11428
11429 ac_cv_lib_com_err_com_err=no
11430 fi
11431
11432 rm -rf conftest.dSYM
11433 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11434 conftest$ac_exeext conftest.$ac_ext
11435 LIBS=$ac_check_lib_save_LIBS
11436 fi
11437 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
11438 $as_echo "$ac_cv_lib_com_err_com_err" >&6; }
11439 if test "x$ac_cv_lib_com_err_com_err" = x""yes; then
11440
11441 { $as_echo "$as_me:$LINENO: checking for krb_mk_priv in -lkrb" >&5
11442 $as_echo_n "checking for krb_mk_priv in -lkrb... " >&6; }
11443 if test "${ac_cv_lib_krb_krb_mk_priv+set}" = set; then
11444 $as_echo_n "(cached) " >&6
11445 else
11446 ac_check_lib_save_LIBS=$LIBS
11447 LIBS="-lkrb $LIB_DES -lcom_err $LIBS"
11448 cat >conftest.$ac_ext <<_ACEOF
11449 /* confdefs.h. */
11450 _ACEOF
11451 cat confdefs.h >>conftest.$ac_ext
11452 cat >>conftest.$ac_ext <<_ACEOF
11453 /* end confdefs.h. */
11454
11455 /* Override any GCC internal prototype to avoid an error.
11456 Use char because int might match the return type of a GCC
11457 builtin and then its argument prototype would still apply. */
11458 #ifdef __cplusplus
11459 extern "C"
11460 #endif
11461 char krb_mk_priv ();
11462 int
11463 main ()
11464 {
11465 return krb_mk_priv ();
11466 ;
11467 return 0;
11468 }
11469 _ACEOF
11470 rm -f conftest.$ac_objext conftest$ac_exeext
11471 if { (ac_try="$ac_link"
11472 case "(($ac_try" in
11473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11474 *) ac_try_echo=$ac_try;;
11475 esac
11476 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11477 $as_echo "$ac_try_echo") >&5
11478 (eval "$ac_link") 2>conftest.er1
11479 ac_status=$?
11480 grep -v '^ *+' conftest.er1 >conftest.err
11481 rm -f conftest.er1
11482 cat conftest.err >&5
11483 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11484 (exit $ac_status); } && {
11485 test -z "$ac_c_werror_flag" ||
11486 test ! -s conftest.err
11487 } && test -s conftest$ac_exeext && {
11488 test "$cross_compiling" = yes ||
11489 $as_test_x conftest$ac_exeext
11490 }; then
11491 ac_cv_lib_krb_krb_mk_priv=yes
11492 else
11493 $as_echo "$as_me: failed program was:" >&5
11494 sed 's/^/| /' conftest.$ac_ext >&5
11495
11496 ac_cv_lib_krb_krb_mk_priv=no
11497 fi
11498
11499 rm -rf conftest.dSYM
11500 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11501 conftest$ac_exeext conftest.$ac_ext
11502 LIBS=$ac_check_lib_save_LIBS
11503 fi
11504 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_mk_priv" >&5
11505 $as_echo "$ac_cv_lib_krb_krb_mk_priv" >&6; }
11506 if test "x$ac_cv_lib_krb_krb_mk_priv" = x""yes; then
11507 COM_ERR="-lcom_err"; SASL_KRB_LIB="-lkrb"; krb4lib="yes"
11508 else
11509 krb4lib=no
11510 fi
11511
11512 else
11513
11514 { $as_echo "$as_me:$LINENO: checking for krb_mk_priv in -lkrb" >&5
11515 $as_echo_n "checking for krb_mk_priv in -lkrb... " >&6; }
11516 if test "${ac_cv_lib_krb_krb_mk_priv+set}" = set; then
11517 $as_echo_n "(cached) " >&6
11518 else
11519 ac_check_lib_save_LIBS=$LIBS
11520 LIBS="-lkrb $LIB_DES $LIBS"
11521 cat >conftest.$ac_ext <<_ACEOF
11522 /* confdefs.h. */
11523 _ACEOF
11524 cat confdefs.h >>conftest.$ac_ext
11525 cat >>conftest.$ac_ext <<_ACEOF
11526 /* end confdefs.h. */
11527
11528 /* Override any GCC internal prototype to avoid an error.
11529 Use char because int might match the return type of a GCC
11530 builtin and then its argument prototype would still apply. */
11531 #ifdef __cplusplus
11532 extern "C"
11533 #endif
11534 char krb_mk_priv ();
11535 int
11536 main ()
11537 {
11538 return krb_mk_priv ();
11539 ;
11540 return 0;
11541 }
11542 _ACEOF
11543 rm -f conftest.$ac_objext conftest$ac_exeext
11544 if { (ac_try="$ac_link"
11545 case "(($ac_try" in
11546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11547 *) ac_try_echo=$ac_try;;
11548 esac
11549 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11550 $as_echo "$ac_try_echo") >&5
11551 (eval "$ac_link") 2>conftest.er1
11552 ac_status=$?
11553 grep -v '^ *+' conftest.er1 >conftest.err
11554 rm -f conftest.er1
11555 cat conftest.err >&5
11556 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11557 (exit $ac_status); } && {
11558 test -z "$ac_c_werror_flag" ||
11559 test ! -s conftest.err
11560 } && test -s conftest$ac_exeext && {
11561 test "$cross_compiling" = yes ||
11562 $as_test_x conftest$ac_exeext
11563 }; then
11564 ac_cv_lib_krb_krb_mk_priv=yes
11565 else
11566 $as_echo "$as_me: failed program was:" >&5
11567 sed 's/^/| /' conftest.$ac_ext >&5
11568
11569 ac_cv_lib_krb_krb_mk_priv=no
11570 fi
11571
11572 rm -rf conftest.dSYM
11573 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11574 conftest$ac_exeext conftest.$ac_ext
11575 LIBS=$ac_check_lib_save_LIBS
11576 fi
11577 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_mk_priv" >&5
11578 $as_echo "$ac_cv_lib_krb_krb_mk_priv" >&6; }
11579 if test "x$ac_cv_lib_krb_krb_mk_priv" = x""yes; then
11580 COM_ERR=""; SASL_KRB_LIB="-lkrb"; krb4lib="yes"
11581 else
11582 krb4lib=no
11583 fi
11584
11585 fi
11586
11587 else
11588 krb4="no"
11589 fi
11590
11591
11592
11593 if test "$krb4" != "no" -a "$krb4lib" = "no"; then
11594 { $as_echo "$as_me:$LINENO: checking for krb_mk_priv in -lkrb4" >&5
11595 $as_echo_n "checking for krb_mk_priv in -lkrb4... " >&6; }
11596 if test "${ac_cv_lib_krb4_krb_mk_priv+set}" = set; then
11597 $as_echo_n "(cached) " >&6
11598 else
11599 ac_check_lib_save_LIBS=$LIBS
11600 LIBS="-lkrb4 $LIB_DES $LIBS"
11601 cat >conftest.$ac_ext <<_ACEOF
11602 /* confdefs.h. */
11603 _ACEOF
11604 cat confdefs.h >>conftest.$ac_ext
11605 cat >>conftest.$ac_ext <<_ACEOF
11606 /* end confdefs.h. */
11607
11608 /* Override any GCC internal prototype to avoid an error.
11609 Use char because int might match the return type of a GCC
11610 builtin and then its argument prototype would still apply. */
11611 #ifdef __cplusplus
11612 extern "C"
11613 #endif
11614 char krb_mk_priv ();
11615 int
11616 main ()
11617 {
11618 return krb_mk_priv ();
11619 ;
11620 return 0;
11621 }
11622 _ACEOF
11623 rm -f conftest.$ac_objext conftest$ac_exeext
11624 if { (ac_try="$ac_link"
11625 case "(($ac_try" in
11626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11627 *) ac_try_echo=$ac_try;;
11628 esac
11629 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11630 $as_echo "$ac_try_echo") >&5
11631 (eval "$ac_link") 2>conftest.er1
11632 ac_status=$?
11633 grep -v '^ *+' conftest.er1 >conftest.err
11634 rm -f conftest.er1
11635 cat conftest.err >&5
11636 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11637 (exit $ac_status); } && {
11638 test -z "$ac_c_werror_flag" ||
11639 test ! -s conftest.err
11640 } && test -s conftest$ac_exeext && {
11641 test "$cross_compiling" = yes ||
11642 $as_test_x conftest$ac_exeext
11643 }; then
11644 ac_cv_lib_krb4_krb_mk_priv=yes
11645 else
11646 $as_echo "$as_me: failed program was:" >&5
11647 sed 's/^/| /' conftest.$ac_ext >&5
11648
11649 ac_cv_lib_krb4_krb_mk_priv=no
11650 fi
11651
11652 rm -rf conftest.dSYM
11653 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11654 conftest$ac_exeext conftest.$ac_ext
11655 LIBS=$ac_check_lib_save_LIBS
11656 fi
11657 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_mk_priv" >&5
11658 $as_echo "$ac_cv_lib_krb4_krb_mk_priv" >&6; }
11659 if test "x$ac_cv_lib_krb4_krb_mk_priv" = x""yes; then
11660 COM_ERR=""; SASL_KRB_LIB="-lkrb4"; krb4=yes
11661 else
11662 krb4=no
11663 fi
11664
11665 fi
11666 if test "$krb4" = no; then
11667 { $as_echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
11668 $as_echo "$as_me: WARNING: No Kerberos V4 found" >&2;}
11669 fi
11670 else
11671 { $as_echo "$as_me:$LINENO: WARNING: No DES library found for Kerberos V4 support" >&5
11672 $as_echo "$as_me: WARNING: No DES library found for Kerberos V4 support" >&2;}
11673 krb4=no
11674 fi
11675 fi
11676
11677 if test "$krb4" != no; then
11678 cmu_save_LIBS="$LIBS"
11679 LIBS="$LIBS $SASL_KRB_LIB"
11680
11681 for ac_func in krb_get_err_text
11682 do
11683 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11684 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
11685 $as_echo_n "checking for $ac_func... " >&6; }
11686 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11687 $as_echo_n "(cached) " >&6
11688 else
11689 cat >conftest.$ac_ext <<_ACEOF
11690 /* confdefs.h. */
11691 _ACEOF
11692 cat confdefs.h >>conftest.$ac_ext
11693 cat >>conftest.$ac_ext <<_ACEOF
11694 /* end confdefs.h. */
11695 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11696 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11697 #define $ac_func innocuous_$ac_func
11698
11699 /* System header to define __stub macros and hopefully few prototypes,
11700 which can conflict with char $ac_func (); below.
11701 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11702 <limits.h> exists even on freestanding compilers. */
11703
11704 #ifdef __STDC__
11705 # include <limits.h>
11706 #else
11707 # include <assert.h>
11708 #endif
11709
11710 #undef $ac_func
11711
11712 /* Override any GCC internal prototype to avoid an error.
11713 Use char because int might match the return type of a GCC
11714 builtin and then its argument prototype would still apply. */
11715 #ifdef __cplusplus
11716 extern "C"
11717 #endif
11718 char $ac_func ();
11719 /* The GNU C library defines this for functions which it implements
11720 to always fail with ENOSYS. Some functions are actually named
11721 something starting with __ and the normal name is an alias. */
11722 #if defined __stub_$ac_func || defined __stub___$ac_func
11723 choke me
11724 #endif
11725
11726 int
11727 main ()
11728 {
11729 return $ac_func ();
11730 ;
11731 return 0;
11732 }
11733 _ACEOF
11734 rm -f conftest.$ac_objext conftest$ac_exeext
11735 if { (ac_try="$ac_link"
11736 case "(($ac_try" in
11737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11738 *) ac_try_echo=$ac_try;;
11739 esac
11740 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11741 $as_echo "$ac_try_echo") >&5
11742 (eval "$ac_link") 2>conftest.er1
11743 ac_status=$?
11744 grep -v '^ *+' conftest.er1 >conftest.err
11745 rm -f conftest.er1
11746 cat conftest.err >&5
11747 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11748 (exit $ac_status); } && {
11749 test -z "$ac_c_werror_flag" ||
11750 test ! -s conftest.err
11751 } && test -s conftest$ac_exeext && {
11752 test "$cross_compiling" = yes ||
11753 $as_test_x conftest$ac_exeext
11754 }; then
11755 eval "$as_ac_var=yes"
11756 else
11757 $as_echo "$as_me: failed program was:" >&5
11758 sed 's/^/| /' conftest.$ac_ext >&5
11759
11760 eval "$as_ac_var=no"
11761 fi
11762
11763 rm -rf conftest.dSYM
11764 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11765 conftest$ac_exeext conftest.$ac_ext
11766 fi
11767 ac_res=`eval 'as_val=${'$as_ac_var'}
11768 $as_echo "$as_val"'`
11769 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
11770 $as_echo "$ac_res" >&6; }
11771 as_val=`eval 'as_val=${'$as_ac_var'}
11772 $as_echo "$as_val"'`
11773 if test "x$as_val" = x""yes; then
11774 cat >>confdefs.h <<_ACEOF
11775 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11776 _ACEOF
11777
11778 fi
11779 done
11780
11781 LIBS="$cmu_save_LIBS"
11782 fi
11783
11784 { $as_echo "$as_me:$LINENO: checking KERBEROS_V4" >&5
11785 $as_echo_n "checking KERBEROS_V4... " >&6; }
11786 if test "$krb4" != no; then
11787 { $as_echo "$as_me:$LINENO: result: enabled" >&5
11788 $as_echo "enabled" >&6; }
11789 SASL_MECHS="$SASL_MECHS libkerberos4.la"
11790 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/kerberos4.c"
11791 SASL_STATIC_OBJS="$SASL_STATIC_OBJS kerberos4.o"
11792
11793 cat >>confdefs.h <<\_ACEOF
11794 #define STATIC_KERBEROS4 /**/
11795 _ACEOF
11796
11797
11798 cat >>confdefs.h <<\_ACEOF
11799 #define HAVE_KRB /**/
11800 _ACEOF
11801
11802 SASL_KRB_LIB="$SASL_KRB_LIB $LIB_DES $COM_ERR"
11803 else
11804 { $as_echo "$as_me:$LINENO: result: disabled" >&5
11805 $as_echo "disabled" >&6; }
11806 fi
11807
11808
11809 { $as_echo "$as_me:$LINENO: checking for crypt" >&5
11810 $as_echo_n "checking for crypt... " >&6; }
11811 if test "${ac_cv_func_crypt+set}" = set; then
11812 $as_echo_n "(cached) " >&6
11813 else
11814 cat >conftest.$ac_ext <<_ACEOF
11815 /* confdefs.h. */
11816 _ACEOF
11817 cat confdefs.h >>conftest.$ac_ext
11818 cat >>conftest.$ac_ext <<_ACEOF
11819 /* end confdefs.h. */
11820 /* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
11821 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11822 #define crypt innocuous_crypt
11823
11824 /* System header to define __stub macros and hopefully few prototypes,
11825 which can conflict with char crypt (); below.
11826 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11827 <limits.h> exists even on freestanding compilers. */
11828
11829 #ifdef __STDC__
11830 # include <limits.h>
11831 #else
11832 # include <assert.h>
11833 #endif
11834
11835 #undef crypt
11836
11837 /* Override any GCC internal prototype to avoid an error.
11838 Use char because int might match the return type of a GCC
11839 builtin and then its argument prototype would still apply. */
11840 #ifdef __cplusplus
11841 extern "C"
11842 #endif
11843 char crypt ();
11844 /* The GNU C library defines this for functions which it implements
11845 to always fail with ENOSYS. Some functions are actually named
11846 something starting with __ and the normal name is an alias. */
11847 #if defined __stub_crypt || defined __stub___crypt
11848 choke me
11849 #endif
11850
11851 int
11852 main ()
11853 {
11854 return crypt ();
11855 ;
11856 return 0;
11857 }
11858 _ACEOF
11859 rm -f conftest.$ac_objext conftest$ac_exeext
11860 if { (ac_try="$ac_link"
11861 case "(($ac_try" in
11862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11863 *) ac_try_echo=$ac_try;;
11864 esac
11865 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11866 $as_echo "$ac_try_echo") >&5
11867 (eval "$ac_link") 2>conftest.er1
11868 ac_status=$?
11869 grep -v '^ *+' conftest.er1 >conftest.err
11870 rm -f conftest.er1
11871 cat conftest.err >&5
11872 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11873 (exit $ac_status); } && {
11874 test -z "$ac_c_werror_flag" ||
11875 test ! -s conftest.err
11876 } && test -s conftest$ac_exeext && {
11877 test "$cross_compiling" = yes ||
11878 $as_test_x conftest$ac_exeext
11879 }; then
11880 ac_cv_func_crypt=yes
11881 else
11882 $as_echo "$as_me: failed program was:" >&5
11883 sed 's/^/| /' conftest.$ac_ext >&5
11884
11885 ac_cv_func_crypt=no
11886 fi
11887
11888 rm -rf conftest.dSYM
11889 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11890 conftest$ac_exeext conftest.$ac_ext
11891 fi
11892 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
11893 $as_echo "$ac_cv_func_crypt" >&6; }
11894 if test "x$ac_cv_func_crypt" = x""yes; then
11895 cmu_have_crypt=yes
11896 else
11897 { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
11898 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
11899 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
11900 $as_echo_n "(cached) " >&6
11901 else
11902 ac_check_lib_save_LIBS=$LIBS
11903 LIBS="-lcrypt $LIBS"
11904 cat >conftest.$ac_ext <<_ACEOF
11905 /* confdefs.h. */
11906 _ACEOF
11907 cat confdefs.h >>conftest.$ac_ext
11908 cat >>conftest.$ac_ext <<_ACEOF
11909 /* end confdefs.h. */
11910
11911 /* Override any GCC internal prototype to avoid an error.
11912 Use char because int might match the return type of a GCC
11913 builtin and then its argument prototype would still apply. */
11914 #ifdef __cplusplus
11915 extern "C"
11916 #endif
11917 char crypt ();
11918 int
11919 main ()
11920 {
11921 return crypt ();
11922 ;
11923 return 0;
11924 }
11925 _ACEOF
11926 rm -f conftest.$ac_objext conftest$ac_exeext
11927 if { (ac_try="$ac_link"
11928 case "(($ac_try" in
11929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11930 *) ac_try_echo=$ac_try;;
11931 esac
11932 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11933 $as_echo "$ac_try_echo") >&5
11934 (eval "$ac_link") 2>conftest.er1
11935 ac_status=$?
11936 grep -v '^ *+' conftest.er1 >conftest.err
11937 rm -f conftest.er1
11938 cat conftest.err >&5
11939 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11940 (exit $ac_status); } && {
11941 test -z "$ac_c_werror_flag" ||
11942 test ! -s conftest.err
11943 } && test -s conftest$ac_exeext && {
11944 test "$cross_compiling" = yes ||
11945 $as_test_x conftest$ac_exeext
11946 }; then
11947 ac_cv_lib_crypt_crypt=yes
11948 else
11949 $as_echo "$as_me: failed program was:" >&5
11950 sed 's/^/| /' conftest.$ac_ext >&5
11951
11952 ac_cv_lib_crypt_crypt=no
11953 fi
11954
11955 rm -rf conftest.dSYM
11956 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11957 conftest$ac_exeext conftest.$ac_ext
11958 LIBS=$ac_check_lib_save_LIBS
11959 fi
11960 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
11961 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
11962 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then
11963 LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes
11964 else
11965 cmu_have_crypt=no
11966 fi
11967
11968 fi
11969
11970
11971
11972
11973
11974 # Check whether --enable-gssapi was given.
11975 if test "${enable_gssapi+set}" = set; then
11976 enableval=$enable_gssapi; gssapi=$enableval
11977 else
11978 gssapi=yes
11979 fi
11980
11981
11982 # Check whether --with-gss_impl was given.
11983 if test "${with_gss_impl+set}" = set; then
11984 withval=$with_gss_impl; gss_impl=$withval
11985 else
11986 gss_impl=auto
11987 fi
11988
11989
11990 if test "$gssapi" != no; then
11991 platform=
11992 case "${host}" in
11993 *-*-linux*)
11994 platform=__linux
11995 ;;
11996 *-*-hpux*)
11997 platform=__hpux
11998 ;;
11999 *-*-irix*)
12000 platform=__irix
12001 ;;
12002 *-*-solaris2*)
12003 # When should we use __sunos?
12004 platform=__solaris
12005 ;;
12006 *-*-aix*)
12007 ###_AIX
12008 platform=__aix
12009 ;;
12010 *)
12011 { $as_echo "$as_me:$LINENO: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&5
12012 $as_echo "$as_me: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&2;}
12013 if test "$gss_impl" = "cybersafe"; then
12014 { { $as_echo "$as_me:$LINENO: error: CyberSafe was forced, cannot continue as platform is not supported" >&5
12015 $as_echo "$as_me: error: CyberSafe was forced, cannot continue as platform is not supported" >&2;}
12016 { (exit 1); exit 1; }; }
12017 fi
12018 ;;
12019 esac
12020
12021 cmu_saved_CPPFLAGS=$CPPFLAGS
12022
12023 if test -d ${gssapi}; then
12024 CPPFLAGS="$CPPFLAGS -I$gssapi/include"
12025 # We want to keep -I in our CPPFLAGS, but only if we succeed
12026 cmu_saved_CPPFLAGS=$CPPFLAGS
12027 ### I am not sure how useful is this (and whether this is required at all
12028 ### especially when we have to provide two -L flags for new CyberSafe
12029 LDFLAGS="$LDFLAGS -L$gssapi/lib"
12030
12031 if test -n "$platform"; then
12032 if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
12033 CPPFLAGS="$CPPFLAGS -D$platform"
12034 if test -d "${gssapi}/appsec-sdk/include"; then
12035 CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
12036 fi
12037 fi
12038 fi
12039 fi
12040 if test "${ac_cv_header_gssapi_h+set}" = set; then
12041 { $as_echo "$as_me:$LINENO: checking for gssapi.h" >&5
12042 $as_echo_n "checking for gssapi.h... " >&6; }
12043 if test "${ac_cv_header_gssapi_h+set}" = set; then
12044 $as_echo_n "(cached) " >&6
12045 fi
12046 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
12047 $as_echo "$ac_cv_header_gssapi_h" >&6; }
12048 else
12049 # Is the header compilable?
12050 { $as_echo "$as_me:$LINENO: checking gssapi.h usability" >&5
12051 $as_echo_n "checking gssapi.h usability... " >&6; }
12052 cat >conftest.$ac_ext <<_ACEOF
12053 /* confdefs.h. */
12054 _ACEOF
12055 cat confdefs.h >>conftest.$ac_ext
12056 cat >>conftest.$ac_ext <<_ACEOF
12057 /* end confdefs.h. */
12058 $ac_includes_default
12059 #include <gssapi.h>
12060 _ACEOF
12061 rm -f conftest.$ac_objext
12062 if { (ac_try="$ac_compile"
12063 case "(($ac_try" in
12064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12065 *) ac_try_echo=$ac_try;;
12066 esac
12067 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12068 $as_echo "$ac_try_echo") >&5
12069 (eval "$ac_compile") 2>conftest.er1
12070 ac_status=$?
12071 grep -v '^ *+' conftest.er1 >conftest.err
12072 rm -f conftest.er1
12073 cat conftest.err >&5
12074 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12075 (exit $ac_status); } && {
12076 test -z "$ac_c_werror_flag" ||
12077 test ! -s conftest.err
12078 } && test -s conftest.$ac_objext; then
12079 ac_header_compiler=yes
12080 else
12081 $as_echo "$as_me: failed program was:" >&5
12082 sed 's/^/| /' conftest.$ac_ext >&5
12083
12084 ac_header_compiler=no
12085 fi
12086
12087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12088 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12089 $as_echo "$ac_header_compiler" >&6; }
12090
12091 # Is the header present?
12092 { $as_echo "$as_me:$LINENO: checking gssapi.h presence" >&5
12093 $as_echo_n "checking gssapi.h presence... " >&6; }
12094 cat >conftest.$ac_ext <<_ACEOF
12095 /* confdefs.h. */
12096 _ACEOF
12097 cat confdefs.h >>conftest.$ac_ext
12098 cat >>conftest.$ac_ext <<_ACEOF
12099 /* end confdefs.h. */
12100 #include <gssapi.h>
12101 _ACEOF
12102 if { (ac_try="$ac_cpp conftest.$ac_ext"
12103 case "(($ac_try" in
12104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12105 *) ac_try_echo=$ac_try;;
12106 esac
12107 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12108 $as_echo "$ac_try_echo") >&5
12109 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12110 ac_status=$?
12111 grep -v '^ *+' conftest.er1 >conftest.err
12112 rm -f conftest.er1
12113 cat conftest.err >&5
12114 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12115 (exit $ac_status); } >/dev/null && {
12116 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12117 test ! -s conftest.err
12118 }; then
12119 ac_header_preproc=yes
12120 else
12121 $as_echo "$as_me: failed program was:" >&5
12122 sed 's/^/| /' conftest.$ac_ext >&5
12123
12124 ac_header_preproc=no
12125 fi
12126
12127 rm -f conftest.err conftest.$ac_ext
12128 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12129 $as_echo "$ac_header_preproc" >&6; }
12130
12131 # So? What about this header?
12132 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12133 yes:no: )
12134 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
12135 $as_echo "$as_me: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12136 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the compiler's result" >&5
12137 $as_echo "$as_me: WARNING: gssapi.h: proceeding with the compiler's result" >&2;}
12138 ac_header_preproc=yes
12139 ;;
12140 no:yes:* )
12141 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: present but cannot be compiled" >&5
12142 $as_echo "$as_me: WARNING: gssapi.h: present but cannot be compiled" >&2;}
12143 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: check for missing prerequisite headers?" >&5
12144 $as_echo "$as_me: WARNING: gssapi.h: check for missing prerequisite headers?" >&2;}
12145 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: see the Autoconf documentation" >&5
12146 $as_echo "$as_me: WARNING: gssapi.h: see the Autoconf documentation" >&2;}
12147 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
12148 $as_echo "$as_me: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
12149 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the preprocessor's result" >&5
12150 $as_echo "$as_me: WARNING: gssapi.h: proceeding with the preprocessor's result" >&2;}
12151 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: in the future, the compiler will take precedence" >&5
12152 $as_echo "$as_me: WARNING: gssapi.h: in the future, the compiler will take precedence" >&2;}
12153
12154 ;;
12155 esac
12156 { $as_echo "$as_me:$LINENO: checking for gssapi.h" >&5
12157 $as_echo_n "checking for gssapi.h... " >&6; }
12158 if test "${ac_cv_header_gssapi_h+set}" = set; then
12159 $as_echo_n "(cached) " >&6
12160 else
12161 ac_cv_header_gssapi_h=$ac_header_preproc
12162 fi
12163 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
12164 $as_echo "$ac_cv_header_gssapi_h" >&6; }
12165
12166 fi
12167 if test "x$ac_cv_header_gssapi_h" = x""yes; then
12168 :
12169 else
12170 if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
12171 { $as_echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
12172 $as_echo_n "checking for gssapi/gssapi.h... " >&6; }
12173 if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
12174 $as_echo_n "(cached) " >&6
12175 fi
12176 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
12177 $as_echo "$ac_cv_header_gssapi_gssapi_h" >&6; }
12178 else
12179 # Is the header compilable?
12180 { $as_echo "$as_me:$LINENO: checking gssapi/gssapi.h usability" >&5
12181 $as_echo_n "checking gssapi/gssapi.h usability... " >&6; }
12182 cat >conftest.$ac_ext <<_ACEOF
12183 /* confdefs.h. */
12184 _ACEOF
12185 cat confdefs.h >>conftest.$ac_ext
12186 cat >>conftest.$ac_ext <<_ACEOF
12187 /* end confdefs.h. */
12188 $ac_includes_default
12189 #include <gssapi/gssapi.h>
12190 _ACEOF
12191 rm -f conftest.$ac_objext
12192 if { (ac_try="$ac_compile"
12193 case "(($ac_try" in
12194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12195 *) ac_try_echo=$ac_try;;
12196 esac
12197 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12198 $as_echo "$ac_try_echo") >&5
12199 (eval "$ac_compile") 2>conftest.er1
12200 ac_status=$?
12201 grep -v '^ *+' conftest.er1 >conftest.err
12202 rm -f conftest.er1
12203 cat conftest.err >&5
12204 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12205 (exit $ac_status); } && {
12206 test -z "$ac_c_werror_flag" ||
12207 test ! -s conftest.err
12208 } && test -s conftest.$ac_objext; then
12209 ac_header_compiler=yes
12210 else
12211 $as_echo "$as_me: failed program was:" >&5
12212 sed 's/^/| /' conftest.$ac_ext >&5
12213
12214 ac_header_compiler=no
12215 fi
12216
12217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12218 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12219 $as_echo "$ac_header_compiler" >&6; }
12220
12221 # Is the header present?
12222 { $as_echo "$as_me:$LINENO: checking gssapi/gssapi.h presence" >&5
12223 $as_echo_n "checking gssapi/gssapi.h presence... " >&6; }
12224 cat >conftest.$ac_ext <<_ACEOF
12225 /* confdefs.h. */
12226 _ACEOF
12227 cat confdefs.h >>conftest.$ac_ext
12228 cat >>conftest.$ac_ext <<_ACEOF
12229 /* end confdefs.h. */
12230 #include <gssapi/gssapi.h>
12231 _ACEOF
12232 if { (ac_try="$ac_cpp conftest.$ac_ext"
12233 case "(($ac_try" in
12234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12235 *) ac_try_echo=$ac_try;;
12236 esac
12237 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12238 $as_echo "$ac_try_echo") >&5
12239 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12240 ac_status=$?
12241 grep -v '^ *+' conftest.er1 >conftest.err
12242 rm -f conftest.er1
12243 cat conftest.err >&5
12244 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12245 (exit $ac_status); } >/dev/null && {
12246 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12247 test ! -s conftest.err
12248 }; then
12249 ac_header_preproc=yes
12250 else
12251 $as_echo "$as_me: failed program was:" >&5
12252 sed 's/^/| /' conftest.$ac_ext >&5
12253
12254 ac_header_preproc=no
12255 fi
12256
12257 rm -f conftest.err conftest.$ac_ext
12258 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12259 $as_echo "$ac_header_preproc" >&6; }
12260
12261 # So? What about this header?
12262 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12263 yes:no: )
12264 { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
12265 $as_echo "$as_me: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12266 { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&5
12267 $as_echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&2;}
12268 ac_header_preproc=yes
12269 ;;
12270 no:yes:* )
12271 { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&5
12272 $as_echo "$as_me: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&2;}
12273 { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&5
12274 $as_echo "$as_me: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&2;}
12275 { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&5
12276 $as_echo "$as_me: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&2;}
12277 { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
12278 $as_echo "$as_me: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
12279 { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&5
12280 $as_echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&2;}
12281 { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&5
12282 $as_echo "$as_me: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&2;}
12283
12284 ;;
12285 esac
12286 { $as_echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
12287 $as_echo_n "checking for gssapi/gssapi.h... " >&6; }
12288 if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
12289 $as_echo_n "(cached) " >&6
12290 else
12291 ac_cv_header_gssapi_gssapi_h=$ac_header_preproc
12292 fi
12293 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
12294 $as_echo "$ac_cv_header_gssapi_gssapi_h" >&6; }
12295
12296 fi
12297 if test "x$ac_cv_header_gssapi_gssapi_h" = x""yes; then
12298 :
12299 else
12300 { $as_echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no include files found" >&5
12301 $as_echo "$as_me: WARNING: Disabling GSSAPI - no include files found" >&2;}; gssapi=no
12302 fi
12303
12304
12305 fi
12306
12307
12308
12309 for ac_header in gssapi/gssapi_ext.h
12310 do
12311 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12312 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12313 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12314 $as_echo_n "checking for $ac_header... " >&6; }
12315 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12316 $as_echo_n "(cached) " >&6
12317 fi
12318 ac_res=`eval 'as_val=${'$as_ac_Header'}
12319 $as_echo "$as_val"'`
12320 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12321 $as_echo "$ac_res" >&6; }
12322 else
12323 # Is the header compilable?
12324 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
12325 $as_echo_n "checking $ac_header usability... " >&6; }
12326 cat >conftest.$ac_ext <<_ACEOF
12327 /* confdefs.h. */
12328 _ACEOF
12329 cat confdefs.h >>conftest.$ac_ext
12330 cat >>conftest.$ac_ext <<_ACEOF
12331 /* end confdefs.h. */
12332 $ac_includes_default
12333 #include <$ac_header>
12334 _ACEOF
12335 rm -f conftest.$ac_objext
12336 if { (ac_try="$ac_compile"
12337 case "(($ac_try" in
12338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12339 *) ac_try_echo=$ac_try;;
12340 esac
12341 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12342 $as_echo "$ac_try_echo") >&5
12343 (eval "$ac_compile") 2>conftest.er1
12344 ac_status=$?
12345 grep -v '^ *+' conftest.er1 >conftest.err
12346 rm -f conftest.er1
12347 cat conftest.err >&5
12348 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12349 (exit $ac_status); } && {
12350 test -z "$ac_c_werror_flag" ||
12351 test ! -s conftest.err
12352 } && test -s conftest.$ac_objext; then
12353 ac_header_compiler=yes
12354 else
12355 $as_echo "$as_me: failed program was:" >&5
12356 sed 's/^/| /' conftest.$ac_ext >&5
12357
12358 ac_header_compiler=no
12359 fi
12360
12361 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12362 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12363 $as_echo "$ac_header_compiler" >&6; }
12364
12365 # Is the header present?
12366 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
12367 $as_echo_n "checking $ac_header presence... " >&6; }
12368 cat >conftest.$ac_ext <<_ACEOF
12369 /* confdefs.h. */
12370 _ACEOF
12371 cat confdefs.h >>conftest.$ac_ext
12372 cat >>conftest.$ac_ext <<_ACEOF
12373 /* end confdefs.h. */
12374 #include <$ac_header>
12375 _ACEOF
12376 if { (ac_try="$ac_cpp conftest.$ac_ext"
12377 case "(($ac_try" in
12378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12379 *) ac_try_echo=$ac_try;;
12380 esac
12381 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12382 $as_echo "$ac_try_echo") >&5
12383 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12384 ac_status=$?
12385 grep -v '^ *+' conftest.er1 >conftest.err
12386 rm -f conftest.er1
12387 cat conftest.err >&5
12388 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12389 (exit $ac_status); } >/dev/null && {
12390 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12391 test ! -s conftest.err
12392 }; then
12393 ac_header_preproc=yes
12394 else
12395 $as_echo "$as_me: failed program was:" >&5
12396 sed 's/^/| /' conftest.$ac_ext >&5
12397
12398 ac_header_preproc=no
12399 fi
12400
12401 rm -f conftest.err conftest.$ac_ext
12402 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12403 $as_echo "$ac_header_preproc" >&6; }
12404
12405 # So? What about this header?
12406 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12407 yes:no: )
12408 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12409 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12410 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12411 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12412 ac_header_preproc=yes
12413 ;;
12414 no:yes:* )
12415 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12416 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12417 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12418 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12419 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12420 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12421 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12422 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
12423 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12424 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12425 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12426 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12427
12428 ;;
12429 esac
12430 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12431 $as_echo_n "checking for $ac_header... " >&6; }
12432 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12433 $as_echo_n "(cached) " >&6
12434 else
12435 eval "$as_ac_Header=\$ac_header_preproc"
12436 fi
12437 ac_res=`eval 'as_val=${'$as_ac_Header'}
12438 $as_echo "$as_val"'`
12439 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12440 $as_echo "$ac_res" >&6; }
12441
12442 fi
12443 as_val=`eval 'as_val=${'$as_ac_Header'}
12444 $as_echo "$as_val"'`
12445 if test "x$as_val" = x""yes; then
12446 cat >>confdefs.h <<_ACEOF
12447 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12448 _ACEOF
12449
12450 fi
12451
12452 done
12453
12454 CPPFLAGS=$cmu_saved_CPPFLAGS
12455
12456 fi
12457
12458 if test "$gssapi" != no; then
12459 if test "$ac_cv_header_gssapi_h" = "yes" -o "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
12460
12461 cat >>confdefs.h <<\_ACEOF
12462 #define HAVE_GSSAPI_H /**/
12463 _ACEOF
12464
12465 fi
12466
12467 # We need to find out which gssapi implementation we are
12468 # using. Supported alternatives are: MIT Kerberos 5,
12469 # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal),
12470 # CyberSafe Kerberos 5 (http://www.cybersafe.com/)
12471 # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/)
12472 #
12473 # The choice is reflected in GSSAPIBASE_LIBS
12474
12475
12476 { $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
12477 $as_echo_n "checking for res_search in -lresolv... " >&6; }
12478 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
12479 $as_echo_n "(cached) " >&6
12480 else
12481 ac_check_lib_save_LIBS=$LIBS
12482 LIBS="-lresolv $LIBS"
12483 cat >conftest.$ac_ext <<_ACEOF
12484 /* confdefs.h. */
12485 _ACEOF
12486 cat confdefs.h >>conftest.$ac_ext
12487 cat >>conftest.$ac_ext <<_ACEOF
12488 /* end confdefs.h. */
12489
12490 /* Override any GCC internal prototype to avoid an error.
12491 Use char because int might match the return type of a GCC
12492 builtin and then its argument prototype would still apply. */
12493 #ifdef __cplusplus
12494 extern "C"
12495 #endif
12496 char res_search ();
12497 int
12498 main ()
12499 {
12500 return res_search ();
12501 ;
12502 return 0;
12503 }
12504 _ACEOF
12505 rm -f conftest.$ac_objext conftest$ac_exeext
12506 if { (ac_try="$ac_link"
12507 case "(($ac_try" in
12508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12509 *) ac_try_echo=$ac_try;;
12510 esac
12511 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12512 $as_echo "$ac_try_echo") >&5
12513 (eval "$ac_link") 2>conftest.er1
12514 ac_status=$?
12515 grep -v '^ *+' conftest.er1 >conftest.err
12516 rm -f conftest.er1
12517 cat conftest.err >&5
12518 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12519 (exit $ac_status); } && {
12520 test -z "$ac_c_werror_flag" ||
12521 test ! -s conftest.err
12522 } && test -s conftest$ac_exeext && {
12523 test "$cross_compiling" = yes ||
12524 $as_test_x conftest$ac_exeext
12525 }; then
12526 ac_cv_lib_resolv_res_search=yes
12527 else
12528 $as_echo "$as_me: failed program was:" >&5
12529 sed 's/^/| /' conftest.$ac_ext >&5
12530
12531 ac_cv_lib_resolv_res_search=no
12532 fi
12533
12534 rm -rf conftest.dSYM
12535 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12536 conftest$ac_exeext conftest.$ac_ext
12537 LIBS=$ac_check_lib_save_LIBS
12538 fi
12539 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
12540 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
12541 if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
12542 cat >>confdefs.h <<_ACEOF
12543 #define HAVE_LIBRESOLV 1
12544 _ACEOF
12545
12546 LIBS="-lresolv $LIBS"
12547
12548 fi
12549
12550 if test -d ${gssapi}; then
12551 gssapi_dir="${gssapi}/lib"
12552 GSSAPIBASE_LIBS="-L$gssapi_dir"
12553 GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir"
12554 else
12555 # FIXME: This is only used for building cyrus, and then only as
12556 # a real hack. it needs to be fixed.
12557 gssapi_dir="/usr/local/lib"
12558 fi
12559
12560 # Check a full link against the Heimdal libraries.
12561 # If this fails, check a full link against the MIT libraries.
12562 # If this fails, check a full link against the CyberSafe libraries.
12563 # If this fails, check a full link against the Solaris 8 and up libgss.
12564
12565 if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then
12566 gss_failed=0
12567 { $as_echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi" >&5
12568 $as_echo_n "checking for gss_unwrap in -lgssapi... " >&6; }
12569 if test "${ac_cv_lib_gssapi_gss_unwrap+set}" = set; then
12570 $as_echo_n "(cached) " >&6
12571 else
12572 ac_check_lib_save_LIBS=$LIBS
12573 LIBS="-lgssapi ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET} $LIBS"
12574 cat >conftest.$ac_ext <<_ACEOF
12575 /* confdefs.h. */
12576 _ACEOF
12577 cat confdefs.h >>conftest.$ac_ext
12578 cat >>conftest.$ac_ext <<_ACEOF
12579 /* end confdefs.h. */
12580
12581 /* Override any GCC internal prototype to avoid an error.
12582 Use char because int might match the return type of a GCC
12583 builtin and then its argument prototype would still apply. */
12584 #ifdef __cplusplus
12585 extern "C"
12586 #endif
12587 char gss_unwrap ();
12588 int
12589 main ()
12590 {
12591 return gss_unwrap ();
12592 ;
12593 return 0;
12594 }
12595 _ACEOF
12596 rm -f conftest.$ac_objext conftest$ac_exeext
12597 if { (ac_try="$ac_link"
12598 case "(($ac_try" in
12599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12600 *) ac_try_echo=$ac_try;;
12601 esac
12602 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12603 $as_echo "$ac_try_echo") >&5
12604 (eval "$ac_link") 2>conftest.er1
12605 ac_status=$?
12606 grep -v '^ *+' conftest.er1 >conftest.err
12607 rm -f conftest.er1
12608 cat conftest.err >&5
12609 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12610 (exit $ac_status); } && {
12611 test -z "$ac_c_werror_flag" ||
12612 test ! -s conftest.err
12613 } && test -s conftest$ac_exeext && {
12614 test "$cross_compiling" = yes ||
12615 $as_test_x conftest$ac_exeext
12616 }; then
12617 ac_cv_lib_gssapi_gss_unwrap=yes
12618 else
12619 $as_echo "$as_me: failed program was:" >&5
12620 sed 's/^/| /' conftest.$ac_ext >&5
12621
12622 ac_cv_lib_gssapi_gss_unwrap=no
12623 fi
12624
12625 rm -rf conftest.dSYM
12626 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12627 conftest$ac_exeext conftest.$ac_ext
12628 LIBS=$ac_check_lib_save_LIBS
12629 fi
12630 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_unwrap" >&5
12631 $as_echo "$ac_cv_lib_gssapi_gss_unwrap" >&6; }
12632 if test "x$ac_cv_lib_gssapi_gss_unwrap" = x""yes; then
12633 gss_impl="heimdal"
12634 else
12635 gss_failed=1
12636 fi
12637
12638 if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
12639 gss_impl="failed"
12640 fi
12641 fi
12642
12643 if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
12644 # check for libkrb5support first
12645 { $as_echo "$as_me:$LINENO: checking for krb5int_getspecific in -lkrb5support" >&5
12646 $as_echo_n "checking for krb5int_getspecific in -lkrb5support... " >&6; }
12647 if test "${ac_cv_lib_krb5support_krb5int_getspecific+set}" = set; then
12648 $as_echo_n "(cached) " >&6
12649 else
12650 ac_check_lib_save_LIBS=$LIBS
12651 LIBS="-lkrb5support ${LIB_SOCKET} $LIBS"
12652 cat >conftest.$ac_ext <<_ACEOF
12653 /* confdefs.h. */
12654 _ACEOF
12655 cat confdefs.h >>conftest.$ac_ext
12656 cat >>conftest.$ac_ext <<_ACEOF
12657 /* end confdefs.h. */
12658
12659 /* Override any GCC internal prototype to avoid an error.
12660 Use char because int might match the return type of a GCC
12661 builtin and then its argument prototype would still apply. */
12662 #ifdef __cplusplus
12663 extern "C"
12664 #endif
12665 char krb5int_getspecific ();
12666 int
12667 main ()
12668 {
12669 return krb5int_getspecific ();
12670 ;
12671 return 0;
12672 }
12673 _ACEOF
12674 rm -f conftest.$ac_objext conftest$ac_exeext
12675 if { (ac_try="$ac_link"
12676 case "(($ac_try" in
12677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12678 *) ac_try_echo=$ac_try;;
12679 esac
12680 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12681 $as_echo "$ac_try_echo") >&5
12682 (eval "$ac_link") 2>conftest.er1
12683 ac_status=$?
12684 grep -v '^ *+' conftest.er1 >conftest.err
12685 rm -f conftest.er1
12686 cat conftest.err >&5
12687 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12688 (exit $ac_status); } && {
12689 test -z "$ac_c_werror_flag" ||
12690 test ! -s conftest.err
12691 } && test -s conftest$ac_exeext && {
12692 test "$cross_compiling" = yes ||
12693 $as_test_x conftest$ac_exeext
12694 }; then
12695 ac_cv_lib_krb5support_krb5int_getspecific=yes
12696 else
12697 $as_echo "$as_me: failed program was:" >&5
12698 sed 's/^/| /' conftest.$ac_ext >&5
12699
12700 ac_cv_lib_krb5support_krb5int_getspecific=no
12701 fi
12702
12703 rm -rf conftest.dSYM
12704 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12705 conftest$ac_exeext conftest.$ac_ext
12706 LIBS=$ac_check_lib_save_LIBS
12707 fi
12708 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb5support_krb5int_getspecific" >&5
12709 $as_echo "$ac_cv_lib_krb5support_krb5int_getspecific" >&6; }
12710 if test "x$ac_cv_lib_krb5support_krb5int_getspecific" = x""yes; then
12711 K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a
12712 fi
12713
12714
12715 gss_failed=0
12716 { $as_echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi_krb5" >&5
12717 $as_echo_n "checking for gss_unwrap in -lgssapi_krb5... " >&6; }
12718 if test "${ac_cv_lib_gssapi_krb5_gss_unwrap+set}" = set; then
12719 $as_echo_n "(cached) " >&6
12720 else
12721 ac_check_lib_save_LIBS=$LIBS
12722 LIBS="-lgssapi_krb5 ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET} $LIBS"
12723 cat >conftest.$ac_ext <<_ACEOF
12724 /* confdefs.h. */
12725 _ACEOF
12726 cat confdefs.h >>conftest.$ac_ext
12727 cat >>conftest.$ac_ext <<_ACEOF
12728 /* end confdefs.h. */
12729
12730 /* Override any GCC internal prototype to avoid an error.
12731 Use char because int might match the return type of a GCC
12732 builtin and then its argument prototype would still apply. */
12733 #ifdef __cplusplus
12734 extern "C"
12735 #endif
12736 char gss_unwrap ();
12737 int
12738 main ()
12739 {
12740 return gss_unwrap ();
12741 ;
12742 return 0;
12743 }
12744 _ACEOF
12745 rm -f conftest.$ac_objext conftest$ac_exeext
12746 if { (ac_try="$ac_link"
12747 case "(($ac_try" in
12748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12749 *) ac_try_echo=$ac_try;;
12750 esac
12751 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12752 $as_echo "$ac_try_echo") >&5
12753 (eval "$ac_link") 2>conftest.er1
12754 ac_status=$?
12755 grep -v '^ *+' conftest.er1 >conftest.err
12756 rm -f conftest.er1
12757 cat conftest.err >&5
12758 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12759 (exit $ac_status); } && {
12760 test -z "$ac_c_werror_flag" ||
12761 test ! -s conftest.err
12762 } && test -s conftest$ac_exeext && {
12763 test "$cross_compiling" = yes ||
12764 $as_test_x conftest$ac_exeext
12765 }; then
12766 ac_cv_lib_gssapi_krb5_gss_unwrap=yes
12767 else
12768 $as_echo "$as_me: failed program was:" >&5
12769 sed 's/^/| /' conftest.$ac_ext >&5
12770
12771 ac_cv_lib_gssapi_krb5_gss_unwrap=no
12772 fi
12773
12774 rm -rf conftest.dSYM
12775 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12776 conftest$ac_exeext conftest.$ac_ext
12777 LIBS=$ac_check_lib_save_LIBS
12778 fi
12779 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_unwrap" >&5
12780 $as_echo "$ac_cv_lib_gssapi_krb5_gss_unwrap" >&6; }
12781 if test "x$ac_cv_lib_gssapi_krb5_gss_unwrap" = x""yes; then
12782 gss_impl="mit"
12783 else
12784 gss_failed=1
12785 fi
12786
12787 if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
12788 gss_impl="failed"
12789 fi
12790 fi
12791
12792 # For Cybersafe one has to set a platform define in order to make compilation work
12793 if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
12794
12795 cmu_saved_CPPFLAGS=$CPPFLAGS
12796 cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS
12797 # FIXME - Note that the libraries are in .../lib64 for 64bit kernels
12798 if test -d "${gssapi}/appsec-rt/lib"; then
12799 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib"
12800 fi
12801 CPPFLAGS="$CPPFLAGS -D$platform"
12802 if test -d "${gssapi}/appsec-sdk/include"; then
12803 CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
12804 fi
12805
12806 gss_failed=0
12807
12808 # Check for CyberSafe with two libraries first, than fall back to a single
12809 # library (older CyberSafe)
12810
12811 unset ac_cv_lib_gss_csf_gss_acq_user
12812 { $as_echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
12813 $as_echo_n "checking for csf_gss_acq_user in -lgss... " >&6; }
12814 if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
12815 $as_echo_n "(cached) " >&6
12816 else
12817 ac_check_lib_save_LIBS=$LIBS
12818 LIBS="-lgss ${GSSAPIBASE_LIBS} -lgss -lcstbk5 $LIBS"
12819 cat >conftest.$ac_ext <<_ACEOF
12820 /* confdefs.h. */
12821 _ACEOF
12822 cat confdefs.h >>conftest.$ac_ext
12823 cat >>conftest.$ac_ext <<_ACEOF
12824 /* end confdefs.h. */
12825
12826 /* Override any GCC internal prototype to avoid an error.
12827 Use char because int might match the return type of a GCC
12828 builtin and then its argument prototype would still apply. */
12829 #ifdef __cplusplus
12830 extern "C"
12831 #endif
12832 char csf_gss_acq_user ();
12833 int
12834 main ()
12835 {
12836 return csf_gss_acq_user ();
12837 ;
12838 return 0;
12839 }
12840 _ACEOF
12841 rm -f conftest.$ac_objext conftest$ac_exeext
12842 if { (ac_try="$ac_link"
12843 case "(($ac_try" in
12844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12845 *) ac_try_echo=$ac_try;;
12846 esac
12847 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12848 $as_echo "$ac_try_echo") >&5
12849 (eval "$ac_link") 2>conftest.er1
12850 ac_status=$?
12851 grep -v '^ *+' conftest.er1 >conftest.err
12852 rm -f conftest.er1
12853 cat conftest.err >&5
12854 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12855 (exit $ac_status); } && {
12856 test -z "$ac_c_werror_flag" ||
12857 test ! -s conftest.err
12858 } && test -s conftest$ac_exeext && {
12859 test "$cross_compiling" = yes ||
12860 $as_test_x conftest$ac_exeext
12861 }; then
12862 ac_cv_lib_gss_csf_gss_acq_user=yes
12863 else
12864 $as_echo "$as_me: failed program was:" >&5
12865 sed 's/^/| /' conftest.$ac_ext >&5
12866
12867 ac_cv_lib_gss_csf_gss_acq_user=no
12868 fi
12869
12870 rm -rf conftest.dSYM
12871 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12872 conftest$ac_exeext conftest.$ac_ext
12873 LIBS=$ac_check_lib_save_LIBS
12874 fi
12875 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
12876 $as_echo "$ac_cv_lib_gss_csf_gss_acq_user" >&6; }
12877 if test "x$ac_cv_lib_gss_csf_gss_acq_user" = x""yes; then
12878 gss_impl="cybersafe03"
12879 else
12880 unset ac_cv_lib_gss_csf_gss_acq_user;
12881 { $as_echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
12882 $as_echo_n "checking for csf_gss_acq_user in -lgss... " >&6; }
12883 if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
12884 $as_echo_n "(cached) " >&6
12885 else
12886 ac_check_lib_save_LIBS=$LIBS
12887 LIBS="-lgss $GSSAPIBASE_LIBS -lgss $LIBS"
12888 cat >conftest.$ac_ext <<_ACEOF
12889 /* confdefs.h. */
12890 _ACEOF
12891 cat confdefs.h >>conftest.$ac_ext
12892 cat >>conftest.$ac_ext <<_ACEOF
12893 /* end confdefs.h. */
12894
12895 /* Override any GCC internal prototype to avoid an error.
12896 Use char because int might match the return type of a GCC
12897 builtin and then its argument prototype would still apply. */
12898 #ifdef __cplusplus
12899 extern "C"
12900 #endif
12901 char csf_gss_acq_user ();
12902 int
12903 main ()
12904 {
12905 return csf_gss_acq_user ();
12906 ;
12907 return 0;
12908 }
12909 _ACEOF
12910 rm -f conftest.$ac_objext conftest$ac_exeext
12911 if { (ac_try="$ac_link"
12912 case "(($ac_try" in
12913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12914 *) ac_try_echo=$ac_try;;
12915 esac
12916 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12917 $as_echo "$ac_try_echo") >&5
12918 (eval "$ac_link") 2>conftest.er1
12919 ac_status=$?
12920 grep -v '^ *+' conftest.er1 >conftest.err
12921 rm -f conftest.er1
12922 cat conftest.err >&5
12923 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12924 (exit $ac_status); } && {
12925 test -z "$ac_c_werror_flag" ||
12926 test ! -s conftest.err
12927 } && test -s conftest$ac_exeext && {
12928 test "$cross_compiling" = yes ||
12929 $as_test_x conftest$ac_exeext
12930 }; then
12931 ac_cv_lib_gss_csf_gss_acq_user=yes
12932 else
12933 $as_echo "$as_me: failed program was:" >&5
12934 sed 's/^/| /' conftest.$ac_ext >&5
12935
12936 ac_cv_lib_gss_csf_gss_acq_user=no
12937 fi
12938
12939 rm -rf conftest.dSYM
12940 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12941 conftest$ac_exeext conftest.$ac_ext
12942 LIBS=$ac_check_lib_save_LIBS
12943 fi
12944 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
12945 $as_echo "$ac_cv_lib_gss_csf_gss_acq_user" >&6; }
12946 if test "x$ac_cv_lib_gss_csf_gss_acq_user" = x""yes; then
12947 gss_impl="cybersafe"
12948 else
12949 gss_failed=1
12950 fi
12951
12952 fi
12953
12954
12955 if test "$gss_failed" = "1"; then
12956 # Restore variables
12957 GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS
12958 CPPFLAGS=$cmu_saved_CPPFLAGS
12959
12960 if test "$gss_impl" != "auto"; then
12961 gss_impl="failed"
12962 fi
12963 fi
12964 fi
12965
12966 if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then
12967 gss_failed=0
12968 { $as_echo "$as_me:$LINENO: checking for gss_unwrap in -lgss" >&5
12969 $as_echo_n "checking for gss_unwrap in -lgss... " >&6; }
12970 if test "${ac_cv_lib_gss_gss_unwrap+set}" = set; then
12971 $as_echo_n "(cached) " >&6
12972 else
12973 ac_check_lib_save_LIBS=$LIBS
12974 LIBS="-lgss -lgss $LIBS"
12975 cat >conftest.$ac_ext <<_ACEOF
12976 /* confdefs.h. */
12977 _ACEOF
12978 cat confdefs.h >>conftest.$ac_ext
12979 cat >>conftest.$ac_ext <<_ACEOF
12980 /* end confdefs.h. */
12981
12982 /* Override any GCC internal prototype to avoid an error.
12983 Use char because int might match the return type of a GCC
12984 builtin and then its argument prototype would still apply. */
12985 #ifdef __cplusplus
12986 extern "C"
12987 #endif
12988 char gss_unwrap ();
12989 int
12990 main ()
12991 {
12992 return gss_unwrap ();
12993 ;
12994 return 0;
12995 }
12996 _ACEOF
12997 rm -f conftest.$ac_objext conftest$ac_exeext
12998 if { (ac_try="$ac_link"
12999 case "(($ac_try" in
13000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13001 *) ac_try_echo=$ac_try;;
13002 esac
13003 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13004 $as_echo "$ac_try_echo") >&5
13005 (eval "$ac_link") 2>conftest.er1
13006 ac_status=$?
13007 grep -v '^ *+' conftest.er1 >conftest.err
13008 rm -f conftest.er1
13009 cat conftest.err >&5
13010 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13011 (exit $ac_status); } && {
13012 test -z "$ac_c_werror_flag" ||
13013 test ! -s conftest.err
13014 } && test -s conftest$ac_exeext && {
13015 test "$cross_compiling" = yes ||
13016 $as_test_x conftest$ac_exeext
13017 }; then
13018 ac_cv_lib_gss_gss_unwrap=yes
13019 else
13020 $as_echo "$as_me: failed program was:" >&5
13021 sed 's/^/| /' conftest.$ac_ext >&5
13022
13023 ac_cv_lib_gss_gss_unwrap=no
13024 fi
13025
13026 rm -rf conftest.dSYM
13027 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13028 conftest$ac_exeext conftest.$ac_ext
13029 LIBS=$ac_check_lib_save_LIBS
13030 fi
13031 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gss_gss_unwrap" >&5
13032 $as_echo "$ac_cv_lib_gss_gss_unwrap" >&6; }
13033 if test "x$ac_cv_lib_gss_gss_unwrap" = x""yes; then
13034 gss_impl="seam"
13035 else
13036 gss_failed=1
13037 fi
13038
13039 if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
13040 gss_impl="failed"
13041 fi
13042 fi
13043
13044 if test "$gss_impl" = "mit"; then
13045 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}"
13046 GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
13047 elif test "$gss_impl" = "heimdal"; then
13048 CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
13049 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
13050 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}"
13051 elif test "$gss_impl" = "cybersafe03"; then
13052 # Version of CyberSafe with two libraries
13053 CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
13054 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5"
13055 # there is no static libgss for CyberSafe
13056 GSSAPIBASE_STATIC_LIBS=none
13057 elif test "$gss_impl" = "cybersafe"; then
13058 CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
13059 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss"
13060 # there is no static libgss for CyberSafe
13061 GSSAPIBASE_STATIC_LIBS=none
13062 elif test "$gss_impl" = "seam"; then
13063 GSSAPIBASE_LIBS=-lgss
13064 # there is no static libgss on Solaris 8 and up
13065 GSSAPIBASE_STATIC_LIBS=none
13066 elif test "$gss_impl" = "failed"; then
13067 gssapi="no"
13068 GSSAPIBASE_LIBS=
13069 GSSAPIBASE_STATIC_LIBS=
13070 { $as_echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - specified library not found" >&5
13071 $as_echo "$as_me: WARNING: Disabling GSSAPI - specified library not found" >&2;}
13072 else
13073 gssapi="no"
13074 GSSAPIBASE_LIBS=
13075 GSSAPIBASE_STATIC_LIBS=
13076 { $as_echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no library" >&5
13077 $as_echo "$as_me: WARNING: Disabling GSSAPI - no library" >&2;}
13078 fi
13079 fi
13080
13081 #
13082 # Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME
13083 # in gssapi\rfckrb5.h
13084 #
13085 if test "$gssapi" != "no"; then
13086 if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
13087 cat >conftest.$ac_ext <<_ACEOF
13088 /* confdefs.h. */
13089 _ACEOF
13090 cat confdefs.h >>conftest.$ac_ext
13091 cat >>conftest.$ac_ext <<_ACEOF
13092 /* end confdefs.h. */
13093 #include <gssapi/gssapi.h>
13094 #ifdef GSS_C_NT_HOSTBASED_SERVICE
13095 hostbased_service_gss_nt_yes
13096 #endif
13097 _ACEOF
13098 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13099 $EGREP "hostbased_service_gss_nt_yes" >/dev/null 2>&1; then
13100
13101 cat >>confdefs.h <<\_ACEOF
13102 #define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/
13103 _ACEOF
13104
13105 else
13106 { $as_echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
13107 $as_echo "$as_me: WARNING: Cybersafe define not found" >&2;}
13108 fi
13109 rm -f conftest*
13110
13111
13112 elif test "$ac_cv_header_gssapi_h" = "yes"; then
13113 cat >conftest.$ac_ext <<_ACEOF
13114 /* confdefs.h. */
13115 _ACEOF
13116 cat confdefs.h >>conftest.$ac_ext
13117 cat >>conftest.$ac_ext <<_ACEOF
13118 /* end confdefs.h. */
13119 #include <gssapi.h>
13120
13121 _ACEOF
13122 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13123 $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
13124
13125 cat >>confdefs.h <<\_ACEOF
13126 #define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/
13127 _ACEOF
13128
13129 fi
13130 rm -f conftest*
13131
13132 elif test "$ac_cv_header_gssapi_gssapi_h"; then
13133 cat >conftest.$ac_ext <<_ACEOF
13134 /* confdefs.h. */
13135 _ACEOF
13136 cat confdefs.h >>conftest.$ac_ext
13137 cat >>conftest.$ac_ext <<_ACEOF
13138 /* end confdefs.h. */
13139 #include <gssapi/gssapi.h>
13140
13141 _ACEOF
13142 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13143 $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
13144
13145 cat >>confdefs.h <<\_ACEOF
13146 #define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/
13147 _ACEOF
13148
13149 fi
13150 rm -f conftest*
13151
13152 fi
13153
13154 if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
13155 cat >conftest.$ac_ext <<_ACEOF
13156 /* confdefs.h. */
13157 _ACEOF
13158 cat confdefs.h >>conftest.$ac_ext
13159 cat >>conftest.$ac_ext <<_ACEOF
13160 /* end confdefs.h. */
13161 #include <gssapi/gssapi.h>
13162 #ifdef GSS_C_NT_USER_NAME
13163 user_name_yes_gss_nt
13164 #endif
13165 _ACEOF
13166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13167 $EGREP "user_name_yes_gss_nt" >/dev/null 2>&1; then
13168
13169 cat >>confdefs.h <<\_ACEOF
13170 #define HAVE_GSS_C_NT_USER_NAME /**/
13171 _ACEOF
13172
13173 else
13174 { $as_echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
13175 $as_echo "$as_me: WARNING: Cybersafe define not found" >&2;}
13176 fi
13177 rm -f conftest*
13178
13179 elif test "$ac_cv_header_gssapi_h" = "yes"; then
13180 cat >conftest.$ac_ext <<_ACEOF
13181 /* confdefs.h. */
13182 _ACEOF
13183 cat confdefs.h >>conftest.$ac_ext
13184 cat >>conftest.$ac_ext <<_ACEOF
13185 /* end confdefs.h. */
13186 #include <gssapi.h>
13187
13188 _ACEOF
13189 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13190 $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
13191
13192 cat >>confdefs.h <<\_ACEOF
13193 #define HAVE_GSS_C_NT_USER_NAME /**/
13194 _ACEOF
13195
13196 fi
13197 rm -f conftest*
13198
13199 cat >conftest.$ac_ext <<_ACEOF
13200 /* confdefs.h. */
13201 _ACEOF
13202 cat confdefs.h >>conftest.$ac_ext
13203 cat >>conftest.$ac_ext <<_ACEOF
13204 /* end confdefs.h. */
13205 #include <gssapi.h>
13206
13207 _ACEOF
13208 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13209 $EGREP "gss_inquire_attrs_for_mech" >/dev/null 2>&1; then
13210 rfc5587=yes
13211 fi
13212 rm -f conftest*
13213
13214 cat >conftest.$ac_ext <<_ACEOF
13215 /* confdefs.h. */
13216 _ACEOF
13217 cat confdefs.h >>conftest.$ac_ext
13218 cat >>conftest.$ac_ext <<_ACEOF
13219 /* end confdefs.h. */
13220 #include <gssapi.h>
13221
13222 _ACEOF
13223 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13224 $EGREP "gss_inquire_mech_for_saslname" >/dev/null 2>&1; then
13225 rfc5801=yes
13226 fi
13227 rm -f conftest*
13228
13229 elif test "$ac_cv_header_gssapi_gssapi_h"; then
13230 cat >conftest.$ac_ext <<_ACEOF
13231 /* confdefs.h. */
13232 _ACEOF
13233 cat confdefs.h >>conftest.$ac_ext
13234 cat >>conftest.$ac_ext <<_ACEOF
13235 /* end confdefs.h. */
13236 #include <gssapi/gssapi.h>
13237
13238 _ACEOF
13239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13240 $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
13241
13242 cat >>confdefs.h <<\_ACEOF
13243 #define HAVE_GSS_C_NT_USER_NAME /**/
13244 _ACEOF
13245
13246 fi
13247 rm -f conftest*
13248
13249 cat >conftest.$ac_ext <<_ACEOF
13250 /* confdefs.h. */
13251 _ACEOF
13252 cat confdefs.h >>conftest.$ac_ext
13253 cat >>conftest.$ac_ext <<_ACEOF
13254 /* end confdefs.h. */
13255 #include <gssapi/gssapi.h>
13256
13257 _ACEOF
13258 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13259 $EGREP "gss_inquire_attrs_for_mech" >/dev/null 2>&1; then
13260 rfc5587=yes
13261 fi
13262 rm -f conftest*
13263
13264 cat >conftest.$ac_ext <<_ACEOF
13265 /* confdefs.h. */
13266 _ACEOF
13267 cat confdefs.h >>conftest.$ac_ext
13268 cat >>conftest.$ac_ext <<_ACEOF
13269 /* end confdefs.h. */
13270 #include <gssapi.h>
13271
13272 _ACEOF
13273 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13274 $EGREP "gss_inquire_mech_for_saslname" >/dev/null 2>&1; then
13275 rfc5801=yes
13276 fi
13277 rm -f conftest*
13278
13279 fi
13280 fi
13281
13282 GSSAPI_LIBS=""
13283 { $as_echo "$as_me:$LINENO: checking GSSAPI" >&5
13284 $as_echo_n "checking GSSAPI... " >&6; }
13285 if test "$gssapi" != no; then
13286 { $as_echo "$as_me:$LINENO: result: with implementation ${gss_impl}" >&5
13287 $as_echo "with implementation ${gss_impl}" >&6; }
13288 { $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
13289 $as_echo_n "checking for res_search in -lresolv... " >&6; }
13290 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
13291 $as_echo_n "(cached) " >&6
13292 else
13293 ac_check_lib_save_LIBS=$LIBS
13294 LIBS="-lresolv $LIBS"
13295 cat >conftest.$ac_ext <<_ACEOF
13296 /* confdefs.h. */
13297 _ACEOF
13298 cat confdefs.h >>conftest.$ac_ext
13299 cat >>conftest.$ac_ext <<_ACEOF
13300 /* end confdefs.h. */
13301
13302 /* Override any GCC internal prototype to avoid an error.
13303 Use char because int might match the return type of a GCC
13304 builtin and then its argument prototype would still apply. */
13305 #ifdef __cplusplus
13306 extern "C"
13307 #endif
13308 char res_search ();
13309 int
13310 main ()
13311 {
13312 return res_search ();
13313 ;
13314 return 0;
13315 }
13316 _ACEOF
13317 rm -f conftest.$ac_objext conftest$ac_exeext
13318 if { (ac_try="$ac_link"
13319 case "(($ac_try" in
13320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13321 *) ac_try_echo=$ac_try;;
13322 esac
13323 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13324 $as_echo "$ac_try_echo") >&5
13325 (eval "$ac_link") 2>conftest.er1
13326 ac_status=$?
13327 grep -v '^ *+' conftest.er1 >conftest.err
13328 rm -f conftest.er1
13329 cat conftest.err >&5
13330 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13331 (exit $ac_status); } && {
13332 test -z "$ac_c_werror_flag" ||
13333 test ! -s conftest.err
13334 } && test -s conftest$ac_exeext && {
13335 test "$cross_compiling" = yes ||
13336 $as_test_x conftest$ac_exeext
13337 }; then
13338 ac_cv_lib_resolv_res_search=yes
13339 else
13340 $as_echo "$as_me: failed program was:" >&5
13341 sed 's/^/| /' conftest.$ac_ext >&5
13342
13343 ac_cv_lib_resolv_res_search=no
13344 fi
13345
13346 rm -rf conftest.dSYM
13347 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13348 conftest$ac_exeext conftest.$ac_ext
13349 LIBS=$ac_check_lib_save_LIBS
13350 fi
13351 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
13352 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
13353 if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
13354 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv"
13355 fi
13356
13357 SASL_MECHS="$SASL_MECHS libgssapiv2.la"
13358 SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o"
13359 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/gssapi.c"
13360 if test "$rfc5587" = "yes" -a "$rfc5801" = "yes"; then
13361 SASL_MECHS="$SASL_MECHS libgs2.la"
13362 SASL_STATIC_OBJS="$SASL_STATIC_OBJS gs2.o"
13363 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/gs2.c"
13364 fi
13365
13366 cmu_save_LIBS="$LIBS"
13367 LIBS="$LIBS $GSSAPIBASE_LIBS"
13368
13369 for ac_func in gsskrb5_register_acceptor_identity
13370 do
13371 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13372 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
13373 $as_echo_n "checking for $ac_func... " >&6; }
13374 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13375 $as_echo_n "(cached) " >&6
13376 else
13377 cat >conftest.$ac_ext <<_ACEOF
13378 /* confdefs.h. */
13379 _ACEOF
13380 cat confdefs.h >>conftest.$ac_ext
13381 cat >>conftest.$ac_ext <<_ACEOF
13382 /* end confdefs.h. */
13383 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13384 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13385 #define $ac_func innocuous_$ac_func
13386
13387 /* System header to define __stub macros and hopefully few prototypes,
13388 which can conflict with char $ac_func (); below.
13389 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13390 <limits.h> exists even on freestanding compilers. */
13391
13392 #ifdef __STDC__
13393 # include <limits.h>
13394 #else
13395 # include <assert.h>
13396 #endif
13397
13398 #undef $ac_func
13399
13400 /* Override any GCC internal prototype to avoid an error.
13401 Use char because int might match the return type of a GCC
13402 builtin and then its argument prototype would still apply. */
13403 #ifdef __cplusplus
13404 extern "C"
13405 #endif
13406 char $ac_func ();
13407 /* The GNU C library defines this for functions which it implements
13408 to always fail with ENOSYS. Some functions are actually named
13409 something starting with __ and the normal name is an alias. */
13410 #if defined __stub_$ac_func || defined __stub___$ac_func
13411 choke me
13412 #endif
13413
13414 int
13415 main ()
13416 {
13417 return $ac_func ();
13418 ;
13419 return 0;
13420 }
13421 _ACEOF
13422 rm -f conftest.$ac_objext conftest$ac_exeext
13423 if { (ac_try="$ac_link"
13424 case "(($ac_try" in
13425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13426 *) ac_try_echo=$ac_try;;
13427 esac
13428 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13429 $as_echo "$ac_try_echo") >&5
13430 (eval "$ac_link") 2>conftest.er1
13431 ac_status=$?
13432 grep -v '^ *+' conftest.er1 >conftest.err
13433 rm -f conftest.er1
13434 cat conftest.err >&5
13435 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13436 (exit $ac_status); } && {
13437 test -z "$ac_c_werror_flag" ||
13438 test ! -s conftest.err
13439 } && test -s conftest$ac_exeext && {
13440 test "$cross_compiling" = yes ||
13441 $as_test_x conftest$ac_exeext
13442 }; then
13443 eval "$as_ac_var=yes"
13444 else
13445 $as_echo "$as_me: failed program was:" >&5
13446 sed 's/^/| /' conftest.$ac_ext >&5
13447
13448 eval "$as_ac_var=no"
13449 fi
13450
13451 rm -rf conftest.dSYM
13452 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13453 conftest$ac_exeext conftest.$ac_ext
13454 fi
13455 ac_res=`eval 'as_val=${'$as_ac_var'}
13456 $as_echo "$as_val"'`
13457 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13458 $as_echo "$ac_res" >&6; }
13459 as_val=`eval 'as_val=${'$as_ac_var'}
13460 $as_echo "$as_val"'`
13461 if test "x$as_val" = x""yes; then
13462 cat >>confdefs.h <<_ACEOF
13463 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13464 _ACEOF
13465
13466 fi
13467 done
13468
13469
13470 for ac_func in gss_decapsulate_token
13471 do
13472 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13473 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
13474 $as_echo_n "checking for $ac_func... " >&6; }
13475 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13476 $as_echo_n "(cached) " >&6
13477 else
13478 cat >conftest.$ac_ext <<_ACEOF
13479 /* confdefs.h. */
13480 _ACEOF
13481 cat confdefs.h >>conftest.$ac_ext
13482 cat >>conftest.$ac_ext <<_ACEOF
13483 /* end confdefs.h. */
13484 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13485 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13486 #define $ac_func innocuous_$ac_func
13487
13488 /* System header to define __stub macros and hopefully few prototypes,
13489 which can conflict with char $ac_func (); below.
13490 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13491 <limits.h> exists even on freestanding compilers. */
13492
13493 #ifdef __STDC__
13494 # include <limits.h>
13495 #else
13496 # include <assert.h>
13497 #endif
13498
13499 #undef $ac_func
13500
13501 /* Override any GCC internal prototype to avoid an error.
13502 Use char because int might match the return type of a GCC
13503 builtin and then its argument prototype would still apply. */
13504 #ifdef __cplusplus
13505 extern "C"
13506 #endif
13507 char $ac_func ();
13508 /* The GNU C library defines this for functions which it implements
13509 to always fail with ENOSYS. Some functions are actually named
13510 something starting with __ and the normal name is an alias. */
13511 #if defined __stub_$ac_func || defined __stub___$ac_func
13512 choke me
13513 #endif
13514
13515 int
13516 main ()
13517 {
13518 return $ac_func ();
13519 ;
13520 return 0;
13521 }
13522 _ACEOF
13523 rm -f conftest.$ac_objext conftest$ac_exeext
13524 if { (ac_try="$ac_link"
13525 case "(($ac_try" in
13526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13527 *) ac_try_echo=$ac_try;;
13528 esac
13529 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13530 $as_echo "$ac_try_echo") >&5
13531 (eval "$ac_link") 2>conftest.er1
13532 ac_status=$?
13533 grep -v '^ *+' conftest.er1 >conftest.err
13534 rm -f conftest.er1
13535 cat conftest.err >&5
13536 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13537 (exit $ac_status); } && {
13538 test -z "$ac_c_werror_flag" ||
13539 test ! -s conftest.err
13540 } && test -s conftest$ac_exeext && {
13541 test "$cross_compiling" = yes ||
13542 $as_test_x conftest$ac_exeext
13543 }; then
13544 eval "$as_ac_var=yes"
13545 else
13546 $as_echo "$as_me: failed program was:" >&5
13547 sed 's/^/| /' conftest.$ac_ext >&5
13548
13549 eval "$as_ac_var=no"
13550 fi
13551
13552 rm -rf conftest.dSYM
13553 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13554 conftest$ac_exeext conftest.$ac_ext
13555 fi
13556 ac_res=`eval 'as_val=${'$as_ac_var'}
13557 $as_echo "$as_val"'`
13558 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13559 $as_echo "$ac_res" >&6; }
13560 as_val=`eval 'as_val=${'$as_ac_var'}
13561 $as_echo "$as_val"'`
13562 if test "x$as_val" = x""yes; then
13563 cat >>confdefs.h <<_ACEOF
13564 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13565 _ACEOF
13566
13567 fi
13568 done
13569
13570
13571 for ac_func in gss_encapsulate_token
13572 do
13573 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13574 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
13575 $as_echo_n "checking for $ac_func... " >&6; }
13576 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13577 $as_echo_n "(cached) " >&6
13578 else
13579 cat >conftest.$ac_ext <<_ACEOF
13580 /* confdefs.h. */
13581 _ACEOF
13582 cat confdefs.h >>conftest.$ac_ext
13583 cat >>conftest.$ac_ext <<_ACEOF
13584 /* end confdefs.h. */
13585 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13586 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13587 #define $ac_func innocuous_$ac_func
13588
13589 /* System header to define __stub macros and hopefully few prototypes,
13590 which can conflict with char $ac_func (); below.
13591 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13592 <limits.h> exists even on freestanding compilers. */
13593
13594 #ifdef __STDC__
13595 # include <limits.h>
13596 #else
13597 # include <assert.h>
13598 #endif
13599
13600 #undef $ac_func
13601
13602 /* Override any GCC internal prototype to avoid an error.
13603 Use char because int might match the return type of a GCC
13604 builtin and then its argument prototype would still apply. */
13605 #ifdef __cplusplus
13606 extern "C"
13607 #endif
13608 char $ac_func ();
13609 /* The GNU C library defines this for functions which it implements
13610 to always fail with ENOSYS. Some functions are actually named
13611 something starting with __ and the normal name is an alias. */
13612 #if defined __stub_$ac_func || defined __stub___$ac_func
13613 choke me
13614 #endif
13615
13616 int
13617 main ()
13618 {
13619 return $ac_func ();
13620 ;
13621 return 0;
13622 }
13623 _ACEOF
13624 rm -f conftest.$ac_objext conftest$ac_exeext
13625 if { (ac_try="$ac_link"
13626 case "(($ac_try" in
13627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13628 *) ac_try_echo=$ac_try;;
13629 esac
13630 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13631 $as_echo "$ac_try_echo") >&5
13632 (eval "$ac_link") 2>conftest.er1
13633 ac_status=$?
13634 grep -v '^ *+' conftest.er1 >conftest.err
13635 rm -f conftest.er1
13636 cat conftest.err >&5
13637 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13638 (exit $ac_status); } && {
13639 test -z "$ac_c_werror_flag" ||
13640 test ! -s conftest.err
13641 } && test -s conftest$ac_exeext && {
13642 test "$cross_compiling" = yes ||
13643 $as_test_x conftest$ac_exeext
13644 }; then
13645 eval "$as_ac_var=yes"
13646 else
13647 $as_echo "$as_me: failed program was:" >&5
13648 sed 's/^/| /' conftest.$ac_ext >&5
13649
13650 eval "$as_ac_var=no"
13651 fi
13652
13653 rm -rf conftest.dSYM
13654 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13655 conftest$ac_exeext conftest.$ac_ext
13656 fi
13657 ac_res=`eval 'as_val=${'$as_ac_var'}
13658 $as_echo "$as_val"'`
13659 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13660 $as_echo "$ac_res" >&6; }
13661 as_val=`eval 'as_val=${'$as_ac_var'}
13662 $as_echo "$as_val"'`
13663 if test "x$as_val" = x""yes; then
13664 cat >>confdefs.h <<_ACEOF
13665 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13666 _ACEOF
13667
13668 fi
13669 done
13670
13671
13672 for ac_func in gss_oid_equal
13673 do
13674 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13675 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
13676 $as_echo_n "checking for $ac_func... " >&6; }
13677 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13678 $as_echo_n "(cached) " >&6
13679 else
13680 cat >conftest.$ac_ext <<_ACEOF
13681 /* confdefs.h. */
13682 _ACEOF
13683 cat confdefs.h >>conftest.$ac_ext
13684 cat >>conftest.$ac_ext <<_ACEOF
13685 /* end confdefs.h. */
13686 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13687 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13688 #define $ac_func innocuous_$ac_func
13689
13690 /* System header to define __stub macros and hopefully few prototypes,
13691 which can conflict with char $ac_func (); below.
13692 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13693 <limits.h> exists even on freestanding compilers. */
13694
13695 #ifdef __STDC__
13696 # include <limits.h>
13697 #else
13698 # include <assert.h>
13699 #endif
13700
13701 #undef $ac_func
13702
13703 /* Override any GCC internal prototype to avoid an error.
13704 Use char because int might match the return type of a GCC
13705 builtin and then its argument prototype would still apply. */
13706 #ifdef __cplusplus
13707 extern "C"
13708 #endif
13709 char $ac_func ();
13710 /* The GNU C library defines this for functions which it implements
13711 to always fail with ENOSYS. Some functions are actually named
13712 something starting with __ and the normal name is an alias. */
13713 #if defined __stub_$ac_func || defined __stub___$ac_func
13714 choke me
13715 #endif
13716
13717 int
13718 main ()
13719 {
13720 return $ac_func ();
13721 ;
13722 return 0;
13723 }
13724 _ACEOF
13725 rm -f conftest.$ac_objext conftest$ac_exeext
13726 if { (ac_try="$ac_link"
13727 case "(($ac_try" in
13728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13729 *) ac_try_echo=$ac_try;;
13730 esac
13731 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13732 $as_echo "$ac_try_echo") >&5
13733 (eval "$ac_link") 2>conftest.er1
13734 ac_status=$?
13735 grep -v '^ *+' conftest.er1 >conftest.err
13736 rm -f conftest.er1
13737 cat conftest.err >&5
13738 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13739 (exit $ac_status); } && {
13740 test -z "$ac_c_werror_flag" ||
13741 test ! -s conftest.err
13742 } && test -s conftest$ac_exeext && {
13743 test "$cross_compiling" = yes ||
13744 $as_test_x conftest$ac_exeext
13745 }; then
13746 eval "$as_ac_var=yes"
13747 else
13748 $as_echo "$as_me: failed program was:" >&5
13749 sed 's/^/| /' conftest.$ac_ext >&5
13750
13751 eval "$as_ac_var=no"
13752 fi
13753
13754 rm -rf conftest.dSYM
13755 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13756 conftest$ac_exeext conftest.$ac_ext
13757 fi
13758 ac_res=`eval 'as_val=${'$as_ac_var'}
13759 $as_echo "$as_val"'`
13760 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13761 $as_echo "$ac_res" >&6; }
13762 as_val=`eval 'as_val=${'$as_ac_var'}
13763 $as_echo "$as_val"'`
13764 if test "x$as_val" = x""yes; then
13765 cat >>confdefs.h <<_ACEOF
13766 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13767 _ACEOF
13768
13769 fi
13770 done
13771
13772 LIBS="$cmu_save_LIBS"
13773
13774 cmu_save_LIBS="$LIBS"
13775 LIBS="$LIBS $GSSAPIBASE_LIBS"
13776
13777 for ac_func in gss_get_name_attribute
13778 do
13779 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13780 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
13781 $as_echo_n "checking for $ac_func... " >&6; }
13782 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13783 $as_echo_n "(cached) " >&6
13784 else
13785 cat >conftest.$ac_ext <<_ACEOF
13786 /* confdefs.h. */
13787 _ACEOF
13788 cat confdefs.h >>conftest.$ac_ext
13789 cat >>conftest.$ac_ext <<_ACEOF
13790 /* end confdefs.h. */
13791 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13792 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13793 #define $ac_func innocuous_$ac_func
13794
13795 /* System header to define __stub macros and hopefully few prototypes,
13796 which can conflict with char $ac_func (); below.
13797 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13798 <limits.h> exists even on freestanding compilers. */
13799
13800 #ifdef __STDC__
13801 # include <limits.h>
13802 #else
13803 # include <assert.h>
13804 #endif
13805
13806 #undef $ac_func
13807
13808 /* Override any GCC internal prototype to avoid an error.
13809 Use char because int might match the return type of a GCC
13810 builtin and then its argument prototype would still apply. */
13811 #ifdef __cplusplus
13812 extern "C"
13813 #endif
13814 char $ac_func ();
13815 /* The GNU C library defines this for functions which it implements
13816 to always fail with ENOSYS. Some functions are actually named
13817 something starting with __ and the normal name is an alias. */
13818 #if defined __stub_$ac_func || defined __stub___$ac_func
13819 choke me
13820 #endif
13821
13822 int
13823 main ()
13824 {
13825 return $ac_func ();
13826 ;
13827 return 0;
13828 }
13829 _ACEOF
13830 rm -f conftest.$ac_objext conftest$ac_exeext
13831 if { (ac_try="$ac_link"
13832 case "(($ac_try" in
13833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13834 *) ac_try_echo=$ac_try;;
13835 esac
13836 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13837 $as_echo "$ac_try_echo") >&5
13838 (eval "$ac_link") 2>conftest.er1
13839 ac_status=$?
13840 grep -v '^ *+' conftest.er1 >conftest.err
13841 rm -f conftest.er1
13842 cat conftest.err >&5
13843 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13844 (exit $ac_status); } && {
13845 test -z "$ac_c_werror_flag" ||
13846 test ! -s conftest.err
13847 } && test -s conftest$ac_exeext && {
13848 test "$cross_compiling" = yes ||
13849 $as_test_x conftest$ac_exeext
13850 }; then
13851 eval "$as_ac_var=yes"
13852 else
13853 $as_echo "$as_me: failed program was:" >&5
13854 sed 's/^/| /' conftest.$ac_ext >&5
13855
13856 eval "$as_ac_var=no"
13857 fi
13858
13859 rm -rf conftest.dSYM
13860 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13861 conftest$ac_exeext conftest.$ac_ext
13862 fi
13863 ac_res=`eval 'as_val=${'$as_ac_var'}
13864 $as_echo "$as_val"'`
13865 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13866 $as_echo "$ac_res" >&6; }
13867 as_val=`eval 'as_val=${'$as_ac_var'}
13868 $as_echo "$as_val"'`
13869 if test "x$as_val" = x""yes; then
13870 cat >>confdefs.h <<_ACEOF
13871 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13872 _ACEOF
13873
13874 fi
13875 done
13876
13877 LIBS="$cmu_save_LIBS"
13878
13879 cmu_save_LIBS="$LIBS"
13880 LIBS="$LIBS $GSSAPIBASE_LIBS"
13881 { $as_echo "$as_me:$LINENO: checking for SPNEGO support in GSSAPI libraries" >&5
13882 $as_echo_n "checking for SPNEGO support in GSSAPI libraries... " >&6; }
13883 if test "$cross_compiling" = yes; then
13884 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13885 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13886 { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
13887 See \`config.log' for more details." >&5
13888 $as_echo "$as_me: error: cannot run test program while cross compiling
13889 See \`config.log' for more details." >&2;}
13890 { (exit 1); exit 1; }; }; }
13891 else
13892 cat >conftest.$ac_ext <<_ACEOF
13893 /* confdefs.h. */
13894 _ACEOF
13895 cat confdefs.h >>conftest.$ac_ext
13896 cat >>conftest.$ac_ext <<_ACEOF
13897 /* end confdefs.h. */
13898
13899 #ifdef HAVE_GSSAPI_H
13900 #include <gssapi.h>
13901 #else
13902 #include <gssapi/gssapi.h>
13903 #endif
13904
13905 int main(void)
13906 {
13907 gss_OID_desc spnego_oid = { 6, (void *) "\x2b\x06\x01\x05\x05\x02" };
13908 gss_OID_set mech_set;
13909 OM_uint32 min_stat;
13910 int have_spnego = 0;
13911
13912 if (gss_indicate_mechs(&min_stat, &mech_set) == GSS_S_COMPLETE) {
13913 gss_test_oid_set_member(&min_stat, &spnego_oid, mech_set, &have_spnego);
13914 gss_release_oid_set(&min_stat, &mech_set);
13915 }
13916
13917 return (!have_spnego); // 0 = success, 1 = failure
13918 }
13919
13920 _ACEOF
13921 rm -f conftest$ac_exeext
13922 if { (ac_try="$ac_link"
13923 case "(($ac_try" in
13924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13925 *) ac_try_echo=$ac_try;;
13926 esac
13927 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13928 $as_echo "$ac_try_echo") >&5
13929 (eval "$ac_link") 2>&5
13930 ac_status=$?
13931 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13932 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13933 { (case "(($ac_try" in
13934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13935 *) ac_try_echo=$ac_try;;
13936 esac
13937 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13938 $as_echo "$ac_try_echo") >&5
13939 (eval "$ac_try") 2>&5
13940 ac_status=$?
13941 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13942 (exit $ac_status); }; }; then
13943
13944 cat >>confdefs.h <<\_ACEOF
13945 #define HAVE_GSS_SPNEGO /**/
13946 _ACEOF
13947
13948 { $as_echo "$as_me:$LINENO: result: yes" >&5
13949 $as_echo "yes" >&6; }
13950 else
13951 $as_echo "$as_me: program exited with status $ac_status" >&5
13952 $as_echo "$as_me: failed program was:" >&5
13953 sed 's/^/| /' conftest.$ac_ext >&5
13954
13955 ( exit $ac_status )
13956 { $as_echo "$as_me:$LINENO: result: no" >&5
13957 $as_echo "no" >&6; }
13958 fi
13959 rm -rf conftest.dSYM
13960 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13961 fi
13962
13963
13964 LIBS="$cmu_save_LIBS"
13965
13966 else
13967 { $as_echo "$as_me:$LINENO: result: disabled" >&5
13968 $as_echo "disabled" >&6; }
13969 fi
13970
13971
13972
13973
13974 if test "$gssapi" != "no"; then
13975
13976 cat >>confdefs.h <<\_ACEOF
13977 #define STATIC_GSSAPIV2 /**/
13978 _ACEOF
13979
13980 mutex_default="no"
13981 if test "$gss_impl" = "mit"; then
13982 mutex_default="yes"
13983 fi
13984 { $as_echo "$as_me:$LINENO: checking to use mutexes aroung GSS calls" >&5
13985 $as_echo_n "checking to use mutexes aroung GSS calls... " >&6; }
13986 # Check whether --enable-gss_mutexes was given.
13987 if test "${enable_gss_mutexes+set}" = set; then
13988 enableval=$enable_gss_mutexes; use_gss_mutexes=$enableval
13989 else
13990 use_gss_mutexes=$mutex_default
13991 fi
13992
13993 if test $use_gss_mutexes = "yes"; then
13994
13995 cat >>confdefs.h <<\_ACEOF
13996 #define GSS_USE_MUTEXES /**/
13997 _ACEOF
13998
13999 fi
14000 { $as_echo "$as_me:$LINENO: result: $use_gss_mutexes" >&5
14001 $as_echo "$use_gss_mutexes" >&6; }
14002 fi
14003
14004
14005
14006
14007 # Check whether --enable-plain was given.
14008 if test "${enable_plain+set}" = set; then
14009 enableval=$enable_plain; plain=$enableval
14010 else
14011 plain=yes
14012 fi
14013
14014
14015 PLAIN_LIBS=""
14016 if test "$plain" != no; then
14017 if test "$cmu_have_crypt" = yes; then
14018 PLAIN_LIBS=$LIB_CRYPT
14019 fi
14020 fi
14021
14022
14023 { $as_echo "$as_me:$LINENO: checking PLAIN" >&5
14024 $as_echo_n "checking PLAIN... " >&6; }
14025 if test "$plain" != no; then
14026 { $as_echo "$as_me:$LINENO: result: enabled" >&5
14027 $as_echo "enabled" >&6; }
14028 SASL_MECHS="$SASL_MECHS libplain.la"
14029 if test "$enable_static" = yes; then
14030 SASL_STATIC_OBJS="$SASL_STATIC_OBJS plain.o"
14031 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/plain.c"
14032
14033 cat >>confdefs.h <<\_ACEOF
14034 #define STATIC_PLAIN /**/
14035 _ACEOF
14036
14037 fi
14038 else
14039 { $as_echo "$as_me:$LINENO: result: disabled" >&5
14040 $as_echo "disabled" >&6; }
14041 fi
14042
14043
14044 # Check whether --enable-anon was given.
14045 if test "${enable_anon+set}" = set; then
14046 enableval=$enable_anon; anon=$enableval
14047 else
14048 anon=yes
14049 fi
14050
14051
14052 { $as_echo "$as_me:$LINENO: checking ANONYMOUS" >&5
14053 $as_echo_n "checking ANONYMOUS... " >&6; }
14054 if test "$anon" != no; then
14055 { $as_echo "$as_me:$LINENO: result: enabled" >&5
14056 $as_echo "enabled" >&6; }
14057 SASL_MECHS="$SASL_MECHS libanonymous.la"
14058 if test "$enable_static" = yes; then
14059 SASL_STATIC_OBJS="$SASL_STATIC_OBJS anonymous.o"
14060 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/anonymous.c"
14061
14062 cat >>confdefs.h <<\_ACEOF
14063 #define STATIC_ANONYMOUS /**/
14064 _ACEOF
14065
14066 fi
14067 else
14068 { $as_echo "$as_me:$LINENO: result: disabled" >&5
14069 $as_echo "disabled" >&6; }
14070 fi
14071
14072 # Check whether --enable-login was given.
14073 if test "${enable_login+set}" = set; then
14074 enableval=$enable_login; login=$enableval
14075 else
14076 login=no
14077 fi
14078
14079
14080 { $as_echo "$as_me:$LINENO: checking LOGIN" >&5
14081 $as_echo_n "checking LOGIN... " >&6; }
14082 if test "$login" != no; then
14083 { $as_echo "$as_me:$LINENO: result: enabled" >&5
14084 $as_echo "enabled" >&6; }
14085 SASL_MECHS="$SASL_MECHS liblogin.la"
14086 if test "$enable_static" = yes; then
14087 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/login.c"
14088 SASL_STATIC_OBJS="$SASL_STATIC_OBJS login.o"
14089
14090 cat >>confdefs.h <<\_ACEOF
14091 #define STATIC_LOGIN /**/
14092 _ACEOF
14093
14094 fi
14095 else
14096 { $as_echo "$as_me:$LINENO: result: disabled" >&5
14097 $as_echo "disabled" >&6; }
14098 fi
14099
14100 # Check whether --enable-ntlm was given.
14101 if test "${enable_ntlm+set}" = set; then
14102 enableval=$enable_ntlm; ntlm=$enableval
14103 else
14104 ntlm=no
14105 fi
14106
14107
14108 if test "$with_openssl" = no; then
14109 { $as_echo "$as_me:$LINENO: WARNING: OpenSSL not found -- NTLM will be disabled" >&5
14110 $as_echo "$as_me: WARNING: OpenSSL not found -- NTLM will be disabled" >&2;}
14111 ntlm=no
14112 fi
14113
14114 { $as_echo "$as_me:$LINENO: checking NTLM" >&5
14115 $as_echo_n "checking NTLM... " >&6; }
14116 if test "$ntlm" != no; then
14117 { $as_echo "$as_me:$LINENO: result: enabled" >&5
14118 $as_echo "enabled" >&6; }
14119 NTLM_LIBS="-lcrypto $LIB_RSAREF"
14120
14121
14122 SASL_MECHS="$SASL_MECHS libntlm.la"
14123 if test "$enable_static" = yes; then
14124 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/ntlm.c"
14125 SASL_STATIC_OBJS="$SASL_STATIC_OBJS ntlm.o"
14126
14127 cat >>confdefs.h <<\_ACEOF
14128 #define STATIC_NTLM /**/
14129 _ACEOF
14130
14131 fi
14132 else
14133 { $as_echo "$as_me:$LINENO: result: disabled" >&5
14134 $as_echo "disabled" >&6; }
14135 fi
14136
14137 # Check whether --enable-passdss was given.
14138 if test "${enable_passdss+set}" = set; then
14139 enableval=$enable_passdss; passdss=$enableval
14140 else
14141 passdss=no
14142 fi
14143
14144
14145 if test "$with_openssl" = no; then
14146 { $as_echo "$as_me:$LINENO: WARNING: OpenSSL not found -- PASSDSS will be disabled" >&5
14147 $as_echo "$as_me: WARNING: OpenSSL not found -- PASSDSS will be disabled" >&2;}
14148 passdss=no
14149 fi
14150
14151 { $as_echo "$as_me:$LINENO: checking PASSDSS" >&5
14152 $as_echo_n "checking PASSDSS... " >&6; }
14153 if test "$passdss" != no; then
14154 { $as_echo "$as_me:$LINENO: result: enabled" >&5
14155 $as_echo "enabled" >&6; }
14156 PASSDSS_LIBS="-lcrypto $LIB_RSAREF"
14157
14158
14159 SASL_MECHS="$SASL_MECHS libpassdss.la"
14160 if test "$enable_static" = yes; then
14161 SASL_STATIC_OBJS="$SASL_STATIC_OBJS passdss.o"
14162 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/passdss.c"
14163
14164 cat >>confdefs.h <<\_ACEOF
14165 #define STATIC_PASSDSS /**/
14166 _ACEOF
14167
14168 fi
14169 else
14170 { $as_echo "$as_me:$LINENO: result: disabled" >&5
14171 $as_echo "disabled" >&6; }
14172 fi
14173
14174
14175 # make the option show up so people don't whine that it is only in the
14176 # saslauthd configure script --help
14177
14178 # Check whether --with-ldap was given.
14179 if test "${with_ldap+set}" = set; then
14180 withval=$with_ldap;
14181 else
14182 with_ldap=no
14183 fi
14184
14185
14186
14187
14188 # Check whether --enable-sql was given.
14189 if test "${enable_sql+set}" = set; then
14190 enableval=$enable_sql; sql=$enableval
14191 else
14192 sql=no
14193 fi
14194
14195
14196 { $as_echo "$as_me:$LINENO: checking SQL" >&5
14197 $as_echo_n "checking SQL... " >&6; }
14198 if test "$sql" != no; then
14199 { $as_echo "$as_me:$LINENO: result: enabled" >&5
14200 $as_echo "enabled" >&6; }
14201 SASL_MECHS="$SASL_MECHS libsql.la"
14202 if test "$enable_static" = yes; then
14203 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/sql.c"
14204 SASL_STATIC_OBJS="$SASL_STATIC_OBJS sql.o"
14205
14206 cat >>confdefs.h <<\_ACEOF
14207 #define STATIC_SQL /**/
14208 _ACEOF
14209
14210 fi
14211 else
14212 { $as_echo "$as_me:$LINENO: result: disabled" >&5
14213 $as_echo "disabled" >&6; }
14214 fi
14215
14216
14217 # Check whether --with-mysql was given.
14218 if test "${with_mysql+set}" = set; then
14219 withval=$with_mysql; with_mysql=$withval
14220 else
14221 with_mysql=$sql
14222 fi
14223
14224
14225 # find location of library
14226 # presuming if one given then correct
14227 if test "${with_mysql}" = "yes"; then
14228 with_mysql=notfound
14229 for mysqlloc in lib/mysql lib mysql/lib
14230 do
14231 if test -f ${prefix}/${mysqlloc}/libmysqlclient.a; then
14232 with_mysql="${prefix}"
14233 break
14234 elif test -f /usr/local/${mysqlloc}/libmysqlclient.a; then
14235 with_mysql="/usr/local"
14236 break
14237 elif test -f /usr/${mysqlloc}/libmysqlclient.a; then
14238 with_mysql="/usr"
14239 break
14240 fi
14241 done
14242 fi
14243
14244 LIB_MYSQL=""
14245
14246 case "$with_mysql" in
14247 no) true;;
14248 notfound) { $as_echo "$as_me:$LINENO: WARNING: MySQL Library not found" >&5
14249 $as_echo "$as_me: WARNING: MySQL Library not found" >&2;}; true;;
14250 *)
14251 if test -d ${with_mysql}/lib/mysql; then
14252
14253 # this is CMU ADD LIBPATH TO
14254 if test "$andrew_cv_runpath_switch" = "none" ; then
14255 LIB_MYSQL="-L${with_mysql}/lib/mysql ${LIB_MYSQL}"
14256 else
14257 LIB_MYSQL="-L${with_mysql}/lib/mysql ${LIB_MYSQL} $andrew_cv_runpath_switch${with_mysql}/lib/mysql"
14258 fi
14259
14260 elif test -d ${with_mysql}/mysql/lib; then
14261
14262 # this is CMU ADD LIBPATH TO
14263 if test "$andrew_cv_runpath_switch" = "none" ; then
14264 LIB_MYSQL="-L${with_mysql}/mysql/lib ${LIB_MYSQL}"
14265 else
14266 LIB_MYSQL="-L${with_mysql}/mysql/lib ${LIB_MYSQL} $andrew_cv_runpath_switch${with_mysql}/mysql/lib"
14267 fi
14268
14269 elif test -d ${with_mysql}/lib; then
14270
14271 # this is CMU ADD LIBPATH TO
14272 if test "$andrew_cv_runpath_switch" = "none" ; then
14273 LIB_MYSQL="-L${with_mysql}/lib ${LIB_MYSQL}"
14274 else
14275 LIB_MYSQL="-L${with_mysql}/lib ${LIB_MYSQL} $andrew_cv_runpath_switch${with_mysql}/lib"
14276 fi
14277
14278 else
14279
14280 # this is CMU ADD LIBPATH TO
14281 if test "$andrew_cv_runpath_switch" = "none" ; then
14282 LIB_MYSQL="-L${with_mysql} ${LIB_MYSQL}"
14283 else
14284 LIB_MYSQL="-L${with_mysql} ${LIB_MYSQL} $andrew_cv_runpath_switch${with_mysql}"
14285 fi
14286
14287 fi
14288
14289 LIB_MYSQL_DIR=$LIB_MYSQL
14290 LIB_MYSQL="$LIB_MYSQL -lmysqlclient"
14291
14292 if test -d ${with_mysql}/include/mysql; then
14293 CPPFLAGS="${CPPFLAGS} -I${with_mysql}/include/mysql"
14294 elif test -d ${with_mysql}/mysql/include; then
14295 CPPFLAGS="${CPPFLAGS} -I${with_mysql}/mysql/include"
14296 elif test -d ${with_mysql}/include; then
14297 CPPFLAGS="${CPPFLAGS} -I${with_mysql}/include"
14298 else
14299 CPPFLAGS="${CPPFLAGS} -I${with_mysql}"
14300 fi
14301
14302 save_LDFLAGS=$LDFLAGS
14303 LDFLAGS="$LDFLAGS $LIB_MYSQL_DIR"
14304 { $as_echo "$as_me:$LINENO: checking for mysql_select_db in -lmysqlclient" >&5
14305 $as_echo_n "checking for mysql_select_db in -lmysqlclient... " >&6; }
14306 if test "${ac_cv_lib_mysqlclient_mysql_select_db+set}" = set; then
14307 $as_echo_n "(cached) " >&6
14308 else
14309 ac_check_lib_save_LIBS=$LIBS
14310 LIBS="-lmysqlclient $LIBS"
14311 cat >conftest.$ac_ext <<_ACEOF
14312 /* confdefs.h. */
14313 _ACEOF
14314 cat confdefs.h >>conftest.$ac_ext
14315 cat >>conftest.$ac_ext <<_ACEOF
14316 /* end confdefs.h. */
14317
14318 /* Override any GCC internal prototype to avoid an error.
14319 Use char because int might match the return type of a GCC
14320 builtin and then its argument prototype would still apply. */
14321 #ifdef __cplusplus
14322 extern "C"
14323 #endif
14324 char mysql_select_db ();
14325 int
14326 main ()
14327 {
14328 return mysql_select_db ();
14329 ;
14330 return 0;
14331 }
14332 _ACEOF
14333 rm -f conftest.$ac_objext conftest$ac_exeext
14334 if { (ac_try="$ac_link"
14335 case "(($ac_try" in
14336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14337 *) ac_try_echo=$ac_try;;
14338 esac
14339 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14340 $as_echo "$ac_try_echo") >&5
14341 (eval "$ac_link") 2>conftest.er1
14342 ac_status=$?
14343 grep -v '^ *+' conftest.er1 >conftest.err
14344 rm -f conftest.er1
14345 cat conftest.err >&5
14346 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14347 (exit $ac_status); } && {
14348 test -z "$ac_c_werror_flag" ||
14349 test ! -s conftest.err
14350 } && test -s conftest$ac_exeext && {
14351 test "$cross_compiling" = yes ||
14352 $as_test_x conftest$ac_exeext
14353 }; then
14354 ac_cv_lib_mysqlclient_mysql_select_db=yes
14355 else
14356 $as_echo "$as_me: failed program was:" >&5
14357 sed 's/^/| /' conftest.$ac_ext >&5
14358
14359 ac_cv_lib_mysqlclient_mysql_select_db=no
14360 fi
14361
14362 rm -rf conftest.dSYM
14363 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14364 conftest$ac_exeext conftest.$ac_ext
14365 LIBS=$ac_check_lib_save_LIBS
14366 fi
14367 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_mysql_select_db" >&5
14368 $as_echo "$ac_cv_lib_mysqlclient_mysql_select_db" >&6; }
14369 if test "x$ac_cv_lib_mysqlclient_mysql_select_db" = x""yes; then
14370
14371 cat >>confdefs.h <<\_ACEOF
14372 #define HAVE_MYSQL /**/
14373 _ACEOF
14374
14375 else
14376 { $as_echo "$as_me:$LINENO: WARNING: MySQL library mysqlclient does not work" >&5
14377 $as_echo "$as_me: WARNING: MySQL library mysqlclient does not work" >&2;}
14378 with_mysql=no
14379 fi
14380
14381 LDFLAGS=$save_LDFLAGS;;
14382
14383 esac
14384
14385
14386
14387 # Check whether --with-pgsql was given.
14388 if test "${with_pgsql+set}" = set; then
14389 withval=$with_pgsql; with_pgsql=$withval
14390 else
14391 with_pgsql=$sql
14392 fi
14393
14394
14395 # find location of library
14396 # presuing if one given then correct
14397 if test "${with_pgsql}" = "yes"; then
14398 with_pgsql=notfound
14399 for pgsqlloc in lib/pgsql lib pgsql/lib
14400 do
14401 if test -f ${prefix}/${pgsqlloc}/libpq.a; then
14402 with_pgsql="${prefix}"
14403 break
14404 elif test -f /usr/local/${pgsqlloc}/libpq.a; then
14405 with_pgsql="/usr/local"
14406 break
14407 elif test -f /usr/${pgsqlloc}/libpq.a; then
14408 with_pgsql="/usr"
14409 break
14410 fi
14411 done
14412 fi
14413
14414 LIB_PGSQL=""
14415
14416 case "$with_pgsql" in
14417 no) true;;
14418 notfound) { $as_echo "$as_me:$LINENO: WARNING: PostgreSQL Library not found" >&5
14419 $as_echo "$as_me: WARNING: PostgreSQL Library not found" >&2;}; true;;
14420 *)
14421 if test -d ${with_pgsql}/lib/pgsql; then
14422
14423 # this is CMU ADD LIBPATH TO
14424 if test "$andrew_cv_runpath_switch" = "none" ; then
14425 LIB_PGSQL="-L${with_pgsql}/lib/pgsql ${LIB_PGSQL}"
14426 else
14427 LIB_PGSQL="-L${with_pgsql}/lib/pgsql ${LIB_PGSQL} $andrew_cv_runpath_switch${with_pgsql}/lib/pgsql"
14428 fi
14429
14430 elif test -d ${with_pgsql}/pgsql/lib; then
14431
14432 # this is CMU ADD LIBPATH TO
14433 if test "$andrew_cv_runpath_switch" = "none" ; then
14434 LIB_PGSQL="-L${with_pgsql}/pgsql/lib ${LIB_PGSQL}"
14435 else
14436 LIB_PGSQL="-L${with_pgsql}/pgsql/lib ${LIB_PGSQL} $andrew_cv_runpath_switch${with_pgsql}/pgsql/lib"
14437 fi
14438
14439 elif test -d ${with_pgsql}/lib; then
14440
14441 # this is CMU ADD LIBPATH TO
14442 if test "$andrew_cv_runpath_switch" = "none" ; then
14443 LIB_PGSQL="-L${with_pgsql}/lib ${LIB_PGSQL}"
14444 else
14445 LIB_PGSQL="-L${with_pgsql}/lib ${LIB_PGSQL} $andrew_cv_runpath_switch${with_pgsql}/lib"
14446 fi
14447
14448 else
14449
14450 # this is CMU ADD LIBPATH TO
14451 if test "$andrew_cv_runpath_switch" = "none" ; then
14452 LIB_PGSQL="-L${with_pgsql} ${LIB_PGSQL}"
14453 else
14454 LIB_PGSQL="-L${with_pgsql} ${LIB_PGSQL} $andrew_cv_runpath_switch${with_pgsql}"
14455 fi
14456
14457 fi
14458
14459 LIB_PGSQL_DIR=$LIB_PGSQL
14460 LIB_PGSQL="$LIB_PGSQL -lpq"
14461
14462 if test -d ${with_pgsql}/include/pgsql; then
14463 CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/include/pgsql"
14464 elif test -d ${with_pgsql}/pgsql/include; then
14465 CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/pgsql/include"
14466 elif test -d ${with_pgsql}/include; then
14467 CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/include"
14468 else
14469 CPPFLAGS="${CPPFLAGS} -I${with_pgsql}"
14470 fi
14471
14472
14473 save_LDFLAGS=$LDFLAGS
14474 LDFLAGS="$LDFLAGS $LIB_PGSQL_DIR"
14475 { $as_echo "$as_me:$LINENO: checking for PQsetdbLogin in -lpq" >&5
14476 $as_echo_n "checking for PQsetdbLogin in -lpq... " >&6; }
14477 if test "${ac_cv_lib_pq_PQsetdbLogin+set}" = set; then
14478 $as_echo_n "(cached) " >&6
14479 else
14480 ac_check_lib_save_LIBS=$LIBS
14481 LIBS="-lpq $LIBS"
14482 cat >conftest.$ac_ext <<_ACEOF
14483 /* confdefs.h. */
14484 _ACEOF
14485 cat confdefs.h >>conftest.$ac_ext
14486 cat >>conftest.$ac_ext <<_ACEOF
14487 /* end confdefs.h. */
14488
14489 /* Override any GCC internal prototype to avoid an error.
14490 Use char because int might match the return type of a GCC
14491 builtin and then its argument prototype would still apply. */
14492 #ifdef __cplusplus
14493 extern "C"
14494 #endif
14495 char PQsetdbLogin ();
14496 int
14497 main ()
14498 {
14499 return PQsetdbLogin ();
14500 ;
14501 return 0;
14502 }
14503 _ACEOF
14504 rm -f conftest.$ac_objext conftest$ac_exeext
14505 if { (ac_try="$ac_link"
14506 case "(($ac_try" in
14507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14508 *) ac_try_echo=$ac_try;;
14509 esac
14510 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14511 $as_echo "$ac_try_echo") >&5
14512 (eval "$ac_link") 2>conftest.er1
14513 ac_status=$?
14514 grep -v '^ *+' conftest.er1 >conftest.err
14515 rm -f conftest.er1
14516 cat conftest.err >&5
14517 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14518 (exit $ac_status); } && {
14519 test -z "$ac_c_werror_flag" ||
14520 test ! -s conftest.err
14521 } && test -s conftest$ac_exeext && {
14522 test "$cross_compiling" = yes ||
14523 $as_test_x conftest$ac_exeext
14524 }; then
14525 ac_cv_lib_pq_PQsetdbLogin=yes
14526 else
14527 $as_echo "$as_me: failed program was:" >&5
14528 sed 's/^/| /' conftest.$ac_ext >&5
14529
14530 ac_cv_lib_pq_PQsetdbLogin=no
14531 fi
14532
14533 rm -rf conftest.dSYM
14534 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14535 conftest$ac_exeext conftest.$ac_ext
14536 LIBS=$ac_check_lib_save_LIBS
14537 fi
14538 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pq_PQsetdbLogin" >&5
14539 $as_echo "$ac_cv_lib_pq_PQsetdbLogin" >&6; }
14540 if test "x$ac_cv_lib_pq_PQsetdbLogin" = x""yes; then
14541
14542 cat >>confdefs.h <<\_ACEOF
14543 #define HAVE_PGSQL /**/
14544 _ACEOF
14545
14546 else
14547 { $as_echo "$as_me:$LINENO: WARNING: PostgreSQL Library pq does not work" >&5
14548 $as_echo "$as_me: WARNING: PostgreSQL Library pq does not work" >&2;}
14549 with_pgsql=no
14550 fi
14551
14552 LDFLAGS=$save_LDFLAGS;;
14553
14554 esac
14555
14556
14557
14558 # Check whether --with-sqlite was given.
14559 if test "${with_sqlite+set}" = set; then
14560 withval=$with_sqlite; with_sqlite=$withval
14561 else
14562 with_sqlite=$sql
14563 fi
14564
14565
14566 # find location of library
14567 # presuing if one given then correct
14568 if test "${with_sqlite}" = "yes"; then
14569 with_sqlite=notfound
14570 for sqliteloc in lib
14571 do
14572 if test -f ${prefix}/${sqliteloc}/libsqlite.a; then
14573 with_sqlite="${prefix}"
14574 break
14575 elif test -f /usr/local/${sqliteloc}/libsqlite.a; then
14576 with_sqlite="/usr/local"
14577 break
14578 elif test -f /usr/${sqliteloc}/libsqlite.a; then
14579 with_sqlite="/usr"
14580 break
14581 fi
14582 done
14583 fi
14584
14585 LIB_SQLITE=""
14586
14587 case "$with_sqlite" in
14588 no) true;;
14589 notfound) { $as_echo "$as_me:$LINENO: WARNING: SQLite Library not found" >&5
14590 $as_echo "$as_me: WARNING: SQLite Library not found" >&2;}; true;;
14591 *)
14592 if test -d ${with_sqlite}/lib; then
14593 LIB_SQLITE="-L${with_sqlite}/lib -R${with_sqlite}/lib"
14594 else
14595 LIB_SQLITE="-L${with_sqlite} -R${with_sqlite}"
14596 fi
14597
14598 LIB_SQLITE_DIR=$LIB_SQLITE
14599 LIB_SQLITE="$LIB_SQLITE -lsqlite"
14600
14601 if test -d ${with_sqlite}/include; then
14602 CPPFLAGS="${CPPFLAGS} -I${with_sqlite}/include"
14603 else
14604 CPPFLAGS="${CPPFLAGS} -I${with_sqlite}"
14605 fi
14606 { $as_echo "$as_me:$LINENO: checking for sqlite_open in -lsqlite" >&5
14607 $as_echo_n "checking for sqlite_open in -lsqlite... " >&6; }
14608 if test "${ac_cv_lib_sqlite_sqlite_open+set}" = set; then
14609 $as_echo_n "(cached) " >&6
14610 else
14611 ac_check_lib_save_LIBS=$LIBS
14612 LIBS="-lsqlite $LIB_SQLITE_DIR $LIBS"
14613 cat >conftest.$ac_ext <<_ACEOF
14614 /* confdefs.h. */
14615 _ACEOF
14616 cat confdefs.h >>conftest.$ac_ext
14617 cat >>conftest.$ac_ext <<_ACEOF
14618 /* end confdefs.h. */
14619
14620 /* Override any GCC internal prototype to avoid an error.
14621 Use char because int might match the return type of a GCC
14622 builtin and then its argument prototype would still apply. */
14623 #ifdef __cplusplus
14624 extern "C"
14625 #endif
14626 char sqlite_open ();
14627 int
14628 main ()
14629 {
14630 return sqlite_open ();
14631 ;
14632 return 0;
14633 }
14634 _ACEOF
14635 rm -f conftest.$ac_objext conftest$ac_exeext
14636 if { (ac_try="$ac_link"
14637 case "(($ac_try" in
14638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14639 *) ac_try_echo=$ac_try;;
14640 esac
14641 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14642 $as_echo "$ac_try_echo") >&5
14643 (eval "$ac_link") 2>conftest.er1
14644 ac_status=$?
14645 grep -v '^ *+' conftest.er1 >conftest.err
14646 rm -f conftest.er1
14647 cat conftest.err >&5
14648 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14649 (exit $ac_status); } && {
14650 test -z "$ac_c_werror_flag" ||
14651 test ! -s conftest.err
14652 } && test -s conftest$ac_exeext && {
14653 test "$cross_compiling" = yes ||
14654 $as_test_x conftest$ac_exeext
14655 }; then
14656 ac_cv_lib_sqlite_sqlite_open=yes
14657 else
14658 $as_echo "$as_me: failed program was:" >&5
14659 sed 's/^/| /' conftest.$ac_ext >&5
14660
14661 ac_cv_lib_sqlite_sqlite_open=no
14662 fi
14663
14664 rm -rf conftest.dSYM
14665 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14666 conftest$ac_exeext conftest.$ac_ext
14667 LIBS=$ac_check_lib_save_LIBS
14668 fi
14669 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite_sqlite_open" >&5
14670 $as_echo "$ac_cv_lib_sqlite_sqlite_open" >&6; }
14671 if test "x$ac_cv_lib_sqlite_sqlite_open" = x""yes; then
14672
14673 cat >>confdefs.h <<\_ACEOF
14674 #define HAVE_SQLITE /**/
14675 _ACEOF
14676
14677 else
14678 { $as_echo "$as_me:$LINENO: WARNING: SQLite Library sqlite does not work" >&5
14679 $as_echo "$as_me: WARNING: SQLite Library sqlite does not work" >&2;}
14680 with_sqlite=no
14681 fi
14682 ;;
14683
14684 esac
14685
14686
14687
14688 # Check whether --with-sqlite3 was given.
14689 if test "${with_sqlite3+set}" = set; then
14690 withval=$with_sqlite3; with_sqlite3=$withval
14691 else
14692 with_sqlite3=$sql
14693 fi
14694
14695
14696 # find location of library
14697 # we assume that if one given then it is correct
14698 if test "${with_sqlite3}" = "yes"; then
14699 with_sqlite3=notfound
14700 for sqlite3loc in lib
14701 do
14702 if test -f ${prefix}/${sqlite3loc}/libsqlite3.a; then
14703 with_sqlite3="${prefix}"
14704 break
14705 elif test -f /usr/local/${sqlite3loc}/libsqlite3.a; then
14706 with_sqlite3="/usr/local"
14707 break
14708 elif test -f /usr/${sqlite3loc}/libsqlite3.a; then
14709 with_sqlite3="/usr"
14710 break
14711 fi
14712 done
14713 fi
14714
14715 LIB_SQLITE3=""
14716
14717 case "$with_sqlite3" in
14718 no) true;;
14719 notfound) { $as_echo "$as_me:$LINENO: WARNING: SQLite3 Library not found" >&5
14720 $as_echo "$as_me: WARNING: SQLite3 Library not found" >&2;}; true;;
14721 *)
14722 if test -d ${with_sqlite3}/lib; then
14723 LIB_SQLITE3="-L${with_sqlite3}/lib -R${with_sqlite3}/lib"
14724 else
14725 LIB_SQLITE3="-L${with_sqlite3} -R${with_sqlite3}"
14726 fi
14727
14728 LIB_SQLITE3_DIR=$LIB_SQLITE3
14729 LIB_SQLITE3="$LIB_SQLITE3 -lsqlite3"
14730
14731 if test -d ${with_sqlite3}/include; then
14732 CPPFLAGS="${CPPFLAGS} -I${with_sqlite3}/include"
14733 else
14734 CPPFLAGS="${CPPFLAGS} -I${with_sqlite3}"
14735 fi
14736 { $as_echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5
14737 $as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
14738 if test "${ac_cv_lib_sqlite3_sqlite3_open+set}" = set; then
14739 $as_echo_n "(cached) " >&6
14740 else
14741 ac_check_lib_save_LIBS=$LIBS
14742 LIBS="-lsqlite3 $LIB_SQLITE3_DIR $LIBS"
14743 cat >conftest.$ac_ext <<_ACEOF
14744 /* confdefs.h. */
14745 _ACEOF
14746 cat confdefs.h >>conftest.$ac_ext
14747 cat >>conftest.$ac_ext <<_ACEOF
14748 /* end confdefs.h. */
14749
14750 /* Override any GCC internal prototype to avoid an error.
14751 Use char because int might match the return type of a GCC
14752 builtin and then its argument prototype would still apply. */
14753 #ifdef __cplusplus
14754 extern "C"
14755 #endif
14756 char sqlite3_open ();
14757 int
14758 main ()
14759 {
14760 return sqlite3_open ();
14761 ;
14762 return 0;
14763 }
14764 _ACEOF
14765 rm -f conftest.$ac_objext conftest$ac_exeext
14766 if { (ac_try="$ac_link"
14767 case "(($ac_try" in
14768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14769 *) ac_try_echo=$ac_try;;
14770 esac
14771 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14772 $as_echo "$ac_try_echo") >&5
14773 (eval "$ac_link") 2>conftest.er1
14774 ac_status=$?
14775 grep -v '^ *+' conftest.er1 >conftest.err
14776 rm -f conftest.er1
14777 cat conftest.err >&5
14778 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14779 (exit $ac_status); } && {
14780 test -z "$ac_c_werror_flag" ||
14781 test ! -s conftest.err
14782 } && test -s conftest$ac_exeext && {
14783 test "$cross_compiling" = yes ||
14784 $as_test_x conftest$ac_exeext
14785 }; then
14786 ac_cv_lib_sqlite3_sqlite3_open=yes
14787 else
14788 $as_echo "$as_me: failed program was:" >&5
14789 sed 's/^/| /' conftest.$ac_ext >&5
14790
14791 ac_cv_lib_sqlite3_sqlite3_open=no
14792 fi
14793
14794 rm -rf conftest.dSYM
14795 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14796 conftest$ac_exeext conftest.$ac_ext
14797 LIBS=$ac_check_lib_save_LIBS
14798 fi
14799 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
14800 $as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
14801 if test "x$ac_cv_lib_sqlite3_sqlite3_open" = x""yes; then
14802
14803 cat >>confdefs.h <<\_ACEOF
14804 #define HAVE_SQLITE3 /**/
14805 _ACEOF
14806
14807 else
14808 { $as_echo "$as_me:$LINENO: WARNING: SQLite3 Library sqlite3 does not work" >&5
14809 $as_echo "$as_me: WARNING: SQLite3 Library sqlite3 does not work" >&2;}
14810 with_sqlite3=no
14811 fi
14812 ;;
14813
14814 esac
14815
14816
14817 if test "$sql" = yes -a "$with_pgsql" = no -a "$with_mysql" = no -a "$with_sqlite" = no -a "$with_sqlite3" = no; then
14818 { { $as_echo "$as_me:$LINENO: error: --enable-sql chosen but neither Postgres nor MySQL nor SQLite nor SQLite3 found" >&5
14819 $as_echo "$as_me: error: --enable-sql chosen but neither Postgres nor MySQL nor SQLite nor SQLite3 found" >&2;}
14820 { (exit 1); exit 1; }; }
14821 fi
14822
14823 if test "$enable_shared" = yes; then
14824
14825 cat >>confdefs.h <<\_ACEOF
14826 #define DO_DLOPEN /**/
14827 _ACEOF
14828
14829 fi
14830
14831 # Check whether --enable-ldapdb was given.
14832 if test "${enable_ldapdb+set}" = set; then
14833 enableval=$enable_ldapdb; ldapdb=$enableval
14834 else
14835 ldapdb=no
14836 fi
14837
14838 { $as_echo "$as_me:$LINENO: checking LDAPDB" >&5
14839 $as_echo_n "checking LDAPDB... " >&6; }
14840 if test "$ldapdb" != no; then
14841 { $as_echo "$as_me:$LINENO: result: enabled" >&5
14842 $as_echo "enabled" >&6; }
14843
14844 if test "$with_ldap" = no; then
14845 { { $as_echo "$as_me:$LINENO: error: Cannot enable LDAPDB plugin: You need to specify --with-ldap" >&5
14846 $as_echo "$as_me: error: Cannot enable LDAPDB plugin: You need to specify --with-ldap" >&2;}
14847 { (exit 1); exit 1; }; }
14848 fi
14849
14850 save_CPPFLAGS=$CPPFLAGS
14851 save_LDFLAGS=$LDFLAGS
14852
14853 if test -d $with_ldap; then
14854 CPPFLAGS="${CPPFLAGS} -I${with_ldap}/include"
14855
14856 # this is CMU ADD LIBPATH
14857 if test "$andrew_cv_runpath_switch" = "none" ; then
14858 LDFLAGS="-L${with_ldap}/lib ${LDFLAGS}"
14859 else
14860 LDFLAGS="-L${with_ldap}/lib $andrew_cv_runpath_switch${with_ldap}/lib ${LDFLAGS}"
14861 fi
14862
14863 fi
14864
14865
14866
14867 for ac_header in ldap.h lber.h
14868 do
14869 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14870 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14871 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14872 $as_echo_n "checking for $ac_header... " >&6; }
14873 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14874 $as_echo_n "(cached) " >&6
14875 fi
14876 ac_res=`eval 'as_val=${'$as_ac_Header'}
14877 $as_echo "$as_val"'`
14878 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14879 $as_echo "$ac_res" >&6; }
14880 else
14881 # Is the header compilable?
14882 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
14883 $as_echo_n "checking $ac_header usability... " >&6; }
14884 cat >conftest.$ac_ext <<_ACEOF
14885 /* confdefs.h. */
14886 _ACEOF
14887 cat confdefs.h >>conftest.$ac_ext
14888 cat >>conftest.$ac_ext <<_ACEOF
14889 /* end confdefs.h. */
14890 $ac_includes_default
14891 #include <$ac_header>
14892 _ACEOF
14893 rm -f conftest.$ac_objext
14894 if { (ac_try="$ac_compile"
14895 case "(($ac_try" in
14896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14897 *) ac_try_echo=$ac_try;;
14898 esac
14899 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14900 $as_echo "$ac_try_echo") >&5
14901 (eval "$ac_compile") 2>conftest.er1
14902 ac_status=$?
14903 grep -v '^ *+' conftest.er1 >conftest.err
14904 rm -f conftest.er1
14905 cat conftest.err >&5
14906 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14907 (exit $ac_status); } && {
14908 test -z "$ac_c_werror_flag" ||
14909 test ! -s conftest.err
14910 } && test -s conftest.$ac_objext; then
14911 ac_header_compiler=yes
14912 else
14913 $as_echo "$as_me: failed program was:" >&5
14914 sed 's/^/| /' conftest.$ac_ext >&5
14915
14916 ac_header_compiler=no
14917 fi
14918
14919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14920 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14921 $as_echo "$ac_header_compiler" >&6; }
14922
14923 # Is the header present?
14924 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
14925 $as_echo_n "checking $ac_header presence... " >&6; }
14926 cat >conftest.$ac_ext <<_ACEOF
14927 /* confdefs.h. */
14928 _ACEOF
14929 cat confdefs.h >>conftest.$ac_ext
14930 cat >>conftest.$ac_ext <<_ACEOF
14931 /* end confdefs.h. */
14932 #include <$ac_header>
14933 _ACEOF
14934 if { (ac_try="$ac_cpp conftest.$ac_ext"
14935 case "(($ac_try" in
14936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14937 *) ac_try_echo=$ac_try;;
14938 esac
14939 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14940 $as_echo "$ac_try_echo") >&5
14941 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14942 ac_status=$?
14943 grep -v '^ *+' conftest.er1 >conftest.err
14944 rm -f conftest.er1
14945 cat conftest.err >&5
14946 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14947 (exit $ac_status); } >/dev/null && {
14948 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14949 test ! -s conftest.err
14950 }; then
14951 ac_header_preproc=yes
14952 else
14953 $as_echo "$as_me: failed program was:" >&5
14954 sed 's/^/| /' conftest.$ac_ext >&5
14955
14956 ac_header_preproc=no
14957 fi
14958
14959 rm -f conftest.err conftest.$ac_ext
14960 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14961 $as_echo "$ac_header_preproc" >&6; }
14962
14963 # So? What about this header?
14964 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14965 yes:no: )
14966 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14967 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14968 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14969 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14970 ac_header_preproc=yes
14971 ;;
14972 no:yes:* )
14973 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14974 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14975 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14976 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14977 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14978 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14979 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14980 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
14981 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14982 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14983 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14984 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14985
14986 ;;
14987 esac
14988 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
14989 $as_echo_n "checking for $ac_header... " >&6; }
14990 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14991 $as_echo_n "(cached) " >&6
14992 else
14993 eval "$as_ac_Header=\$ac_header_preproc"
14994 fi
14995 ac_res=`eval 'as_val=${'$as_ac_Header'}
14996 $as_echo "$as_val"'`
14997 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14998 $as_echo "$ac_res" >&6; }
14999
15000 fi
15001 as_val=`eval 'as_val=${'$as_ac_Header'}
15002 $as_echo "$as_val"'`
15003 if test "x$as_val" = x""yes; then
15004 cat >>confdefs.h <<_ACEOF
15005 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15006 _ACEOF
15007
15008 fi
15009
15010 done
15011
15012
15013 if test $ac_cv_header_ldap_h = yes -a $ac_cv_header_lber_h = yes; then
15014 { $as_echo "$as_me:$LINENO: checking OpenLDAP api" >&5
15015 $as_echo_n "checking OpenLDAP api... " >&6; }
15016 if test "${cmu_cv_openldap_api+set}" = set; then
15017 $as_echo_n "(cached) " >&6
15018 else
15019
15020 cat >conftest.$ac_ext <<_ACEOF
15021 /* confdefs.h. */
15022 _ACEOF
15023 cat confdefs.h >>conftest.$ac_ext
15024 cat >>conftest.$ac_ext <<_ACEOF
15025 /* end confdefs.h. */
15026
15027 #include <ldap.h>
15028
15029 #ifdef LDAP_API_FEATURE_X_OPENLDAP
15030 char *__openldap_api = LDAP_API_FEATURE_X_OPENLDAP;
15031 #endif
15032
15033 _ACEOF
15034 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15035 $EGREP "__openldap_api" >/dev/null 2>&1; then
15036 cmu_cv_openldap_api=yes
15037 else
15038 cmu_cv_openldap_api=no
15039 fi
15040 rm -f conftest*
15041
15042 fi
15043 { $as_echo "$as_me:$LINENO: result: $cmu_cv_openldap_api" >&5
15044 $as_echo "$cmu_cv_openldap_api" >&6; }
15045
15046
15047 if test "$cmu_cv_openldap_api" = yes; then
15048 { $as_echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
15049 $as_echo_n "checking for ldap_initialize in -lldap... " >&6; }
15050 if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
15051 $as_echo_n "(cached) " >&6
15052 else
15053 ac_check_lib_save_LIBS=$LIBS
15054 LIBS="-lldap -llber $LIBS"
15055 cat >conftest.$ac_ext <<_ACEOF
15056 /* confdefs.h. */
15057 _ACEOF
15058 cat confdefs.h >>conftest.$ac_ext
15059 cat >>conftest.$ac_ext <<_ACEOF
15060 /* end confdefs.h. */
15061
15062 /* Override any GCC internal prototype to avoid an error.
15063 Use char because int might match the return type of a GCC
15064 builtin and then its argument prototype would still apply. */
15065 #ifdef __cplusplus
15066 extern "C"
15067 #endif
15068 char ldap_initialize ();
15069 int
15070 main ()
15071 {
15072 return ldap_initialize ();
15073 ;
15074 return 0;
15075 }
15076 _ACEOF
15077 rm -f conftest.$ac_objext conftest$ac_exeext
15078 if { (ac_try="$ac_link"
15079 case "(($ac_try" in
15080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15081 *) ac_try_echo=$ac_try;;
15082 esac
15083 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15084 $as_echo "$ac_try_echo") >&5
15085 (eval "$ac_link") 2>conftest.er1
15086 ac_status=$?
15087 grep -v '^ *+' conftest.er1 >conftest.err
15088 rm -f conftest.er1
15089 cat conftest.err >&5
15090 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15091 (exit $ac_status); } && {
15092 test -z "$ac_c_werror_flag" ||
15093 test ! -s conftest.err
15094 } && test -s conftest$ac_exeext && {
15095 test "$cross_compiling" = yes ||
15096 $as_test_x conftest$ac_exeext
15097 }; then
15098 ac_cv_lib_ldap_ldap_initialize=yes
15099 else
15100 $as_echo "$as_me: failed program was:" >&5
15101 sed 's/^/| /' conftest.$ac_ext >&5
15102
15103 ac_cv_lib_ldap_ldap_initialize=no
15104 fi
15105
15106 rm -rf conftest.dSYM
15107 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15108 conftest$ac_exeext conftest.$ac_ext
15109 LIBS=$ac_check_lib_save_LIBS
15110 fi
15111 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
15112 $as_echo "$ac_cv_lib_ldap_ldap_initialize" >&6; }
15113 if test "x$ac_cv_lib_ldap_ldap_initialize" = x""yes; then
15114 cmu_link_openldap="-lldap -llber"
15115 else
15116 cmu_link_openldap=no
15117 fi
15118
15119 fi
15120 fi
15121
15122 if test "$cmu_cv_openldap_api" = no -o "$cmu_link_openldap" = no; then
15123 { { $as_echo "$as_me:$LINENO: error: Cannot enable LDAPDB plugin: Could not locate OpenLDAP" >&5
15124 $as_echo "$as_me: error: Cannot enable LDAPDB plugin: Could not locate OpenLDAP" >&2;}
15125 { (exit 1); exit 1; }; }
15126 else
15127 { $as_echo "$as_me:$LINENO: checking OpenLDAP version" >&5
15128 $as_echo_n "checking OpenLDAP version... " >&6; }
15129 if test "${cmu_cv_openldap_compat+set}" = set; then
15130 $as_echo_n "(cached) " >&6
15131 else
15132
15133 cat >conftest.$ac_ext <<_ACEOF
15134 /* confdefs.h. */
15135 _ACEOF
15136 cat confdefs.h >>conftest.$ac_ext
15137 cat >>conftest.$ac_ext <<_ACEOF
15138 /* end confdefs.h. */
15139
15140 #include <ldap.h>
15141
15142 /* Require 2.1.27+ and 2.2.6+ */
15143 #if LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR == 1 && LDAP_VENDOR_VERSION_PATCH > 26
15144 char *__openldap_compat = "2.1.27 or better okay";
15145 #elif LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR == 2 && LDAP_VENDOR_VERSION_PATCH > 5
15146 char *__openldap_compat = "2.2.6 or better okay";
15147 #elif LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR > 2
15148 char *__openldap_compat = "2.3 or better okay"
15149 #endif
15150
15151 _ACEOF
15152 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15153 $EGREP "__openldap_compat" >/dev/null 2>&1; then
15154 cmu_cv_openldap_compat=yes
15155 else
15156 cmu_cv_openldap_compat=no
15157 fi
15158 rm -f conftest*
15159
15160 fi
15161 { $as_echo "$as_me:$LINENO: result: $cmu_cv_openldap_compat" >&5
15162 $as_echo "$cmu_cv_openldap_compat" >&6; }
15163
15164
15165 if test "$cmu_cv_openldap_compat" = no; then
15166 { { $as_echo "$as_me:$LINENO: error: Cannot enable LDAPDB plugin: OpenLDAP library located but incompatible" >&5
15167 $as_echo "$as_me: error: Cannot enable LDAPDB plugin: OpenLDAP library located but incompatible" >&2;}
15168 { (exit 1); exit 1; }; }
15169 else
15170 LIB_LDAP=$cmu_link_openldap
15171
15172
15173 SASL_MECHS="$SASL_MECHS libldapdb.la"
15174 if test "$enable_static" = yes; then
15175 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/ldapdb.c"
15176 SASL_STATIC_OBJS="$SASL_STATIC_OBJS ldapdb.o"
15177
15178 cat >>confdefs.h <<\_ACEOF
15179 #define STATIC_LDAPDB /**/
15180 _ACEOF
15181
15182 fi
15183 fi
15184 fi
15185
15186 if test "$cmu_cv_openldap_compat" != yes; then
15187 CPPFLAGS=$save_CPPFLAGS
15188 LDFLAGS=$save_LDFLAGS
15189 fi
15190 else
15191 { $as_echo "$as_me:$LINENO: result: disabled" >&5
15192 $as_echo "disabled" >&6; }
15193 fi
15194
15195
15196
15197
15198
15199
15200
15201 # Check whether --with-plugindir was given.
15202 if test "${with_plugindir+set}" = set; then
15203 withval=$with_plugindir; plugindir=$withval
15204 else
15205 plugindir=/usr/lib/sasl2
15206 fi
15207
15208
15209 cat >>confdefs.h <<_ACEOF
15210 #define PLUGINDIR "$plugindir"
15211 _ACEOF
15212
15213
15214
15215
15216 # Check whether --with-configdir was given.
15217 if test "${with_configdir+set}" = set; then
15218 withval=$with_configdir; configdir=$withval
15219 else
15220 configdir=$plugindir:/etc/sasl2
15221 fi
15222
15223
15224 cat >>confdefs.h <<_ACEOF
15225 #define CONFIGDIR "$configdir"
15226 _ACEOF
15227
15228
15229
15230
15231 # Check whether --with-rc4 was given.
15232 if test "${with_rc4+set}" = set; then
15233 withval=$with_rc4; with_rc4=$withval
15234 else
15235 with_rc4=yes
15236 fi
15237
15238
15239 if test "$with_rc4" != no; then
15240
15241 cat >>confdefs.h <<\_ACEOF
15242 #define WITH_RC4 /**/
15243 _ACEOF
15244
15245 fi
15246
15247 building_for_macosx=no
15248 case "$host_os" in
15249 darwin*)
15250 # Check whether --enable-macos-framework was given.
15251 if test "${enable_macos_framework+set}" = set; then
15252 enableval=$enable_macos_framework; building_for_macosx=no
15253 else
15254 building_for_macosx=yes
15255 fi
15256
15257 ;;
15258 esac
15259 if test "$building_for_macosx" = yes; then
15260 MACOSX_TRUE=
15261 MACOSX_FALSE='#'
15262 else
15263 MACOSX_TRUE='#'
15264 MACOSX_FALSE=
15265 fi
15266
15267
15268 { $as_echo "$as_me:$LINENO: checking for dmalloc library" >&5
15269 $as_echo_n "checking for dmalloc library... " >&6; }
15270
15271 # Check whether --with-dmalloc was given.
15272 if test "${with_dmalloc+set}" = set; then
15273 withval=$with_dmalloc; with_dmalloc=$withval
15274 else
15275 with_dmalloc=no
15276 fi
15277
15278
15279 DMALLOC_LIBS=""
15280
15281 if test "$with_dmalloc" != "no"; then
15282 if test "$with_dmalloc" = "yes"; then
15283 with_dmalloc="/usr/local"
15284 fi
15285
15286 if test -r "$with_dmalloc/libdmalloc.a"; then
15287 DMALLOC_LIBS="$with_dmalloc/libdmalloc.a"
15288
15289 cat >>confdefs.h <<\_ACEOF
15290 #define WITH_DMALLOC /**/
15291 _ACEOF
15292
15293 { $as_echo "$as_me:$LINENO: result: yes" >&5
15294 $as_echo "yes" >&6; }
15295 elif test -r "$with_dmalloc/lib/libdmalloc.a"; then
15296 DMALLOC_LIBS="$with_dmalloc/lib/libdmalloc.a"
15297
15298 cat >>confdefs.h <<\_ACEOF
15299 #define WITH_DMALLOC /**/
15300 _ACEOF
15301
15302 { $as_echo "$as_me:$LINENO: result: yes" >&5
15303 $as_echo "yes" >&6; }
15304 else
15305 { { $as_echo "$as_me:$LINENO: error: cannot find dmalloc library" >&5
15306 $as_echo "$as_me: error: cannot find dmalloc library" >&2;}
15307 { (exit please check your installation.); exit please check your installation.; }; }
15308 fi
15309 else
15310 { $as_echo "$as_me:$LINENO: result: no" >&5
15311 $as_echo "no" >&6; }
15312 fi
15313
15314
15315
15316 { $as_echo "$as_me:$LINENO: checking for sfio library" >&5
15317 $as_echo_n "checking for sfio library... " >&6; }
15318
15319 # Check whether --with-sfio was given.
15320 if test "${with_sfio+set}" = set; then
15321 withval=$with_sfio; with_sfio=$withval
15322 else
15323 with_sfio=no
15324 fi
15325
15326
15327 if test "$with_sfio" != "no"; then
15328 if test "$with_sfio" = "yes"; then
15329 with_sfio="/usr/local"
15330 fi
15331
15332
15333
15334
15335
15336 if test -r "$with_sfio/sfio.h"; then SFIO_DIR=$with_sfio;
15337 SFIO_INC_DIR=$with_sfio
15338 elif test -r "$with_sfio/include/sfio.h"; then SFIO_DIR=$with_sfio;
15339 SFIO_INC_DIR=$with_sfio/include
15340 elif test -r "$with_sfio/include/sfio/sfio.h"; then SFIO_DIR=$with_sfio;
15341 SFIO_INC_DIR=$with_sfio/include/sfio
15342 fi
15343
15344 if test -z "$SFIO_DIR"; then
15345 { { $as_echo "$as_me:$LINENO: error: Cannot find sfio.h" >&5
15346 $as_echo "$as_me: error: Cannot find sfio.h" >&2;}
15347 { (exit Please check your SFIO installation.); exit Please check your SFIO installation.; }; }
15348 fi
15349
15350
15351 str="$SFIO_DIR/lib/libsfio.*"
15352 for i in `echo $str`; do
15353 if test -r $i; then
15354 SFIO_LIBDIR=$SFIO_DIR/lib
15355 break 2
15356 fi
15357 done
15358
15359
15360 str="$SFIO_DIR/lib/sfio/libsfio.*"
15361 for i in `echo $str`; do
15362 if test -r $i; then
15363 SFIO_LIBDIR=$SFIO_DIR/lib/sfio
15364 break 2
15365 fi
15366 done
15367
15368
15369 if test -z "$SFIO_LIBDIR"; then
15370 { { $as_echo "$as_me:$LINENO: error: Cannot find sfio library" >&5
15371 $as_echo "$as_me: error: Cannot find sfio library" >&2;}
15372 { (exit Please check your SFIO installation.); exit Please check your SFIO installation.; }; }
15373 fi
15374
15375 SFIO_INC_FLAGS="-I$SFIO_INC_DIR"
15376 SFIO_LIB_FLAGS="-L$SFIO_LIBDIR -lsfio"
15377 SMTPTEST_PROGRAM="smtptest"
15378 SASL_UTIL_LIBS_EXTRA=libsfsasl2.la
15379 SASL_UTIL_HEADERS_EXTRA=sfsasl.h
15380
15381 { $as_echo "$as_me:$LINENO: result: yes" >&5
15382 $as_echo "yes" >&6; }
15383 else
15384 { $as_echo "$as_me:$LINENO: result: no" >&5
15385 $as_echo "no" >&6; }
15386 SFIO_INC_FLAGS=""
15387 SFIO_LIB_FLAGS=""
15388 SMTPTEST_PROGRAM=""
15389 SASL_UTIL_LIBS_EXTRA=""
15390 SASL_UTIL_HEADERS_EXTRA=""
15391 fi
15392
15393
15394
15395
15396
15397
15398
15399 sasl_cv_getsubopt=no
15400 { $as_echo "$as_me:$LINENO: checking for getsubopt" >&5
15401 $as_echo_n "checking for getsubopt... " >&6; }
15402 if test "${ac_cv_func_getsubopt+set}" = set; then
15403 $as_echo_n "(cached) " >&6
15404 else
15405 cat >conftest.$ac_ext <<_ACEOF
15406 /* confdefs.h. */
15407 _ACEOF
15408 cat confdefs.h >>conftest.$ac_ext
15409 cat >>conftest.$ac_ext <<_ACEOF
15410 /* end confdefs.h. */
15411 /* Define getsubopt to an innocuous variant, in case <limits.h> declares getsubopt.
15412 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15413 #define getsubopt innocuous_getsubopt
15414
15415 /* System header to define __stub macros and hopefully few prototypes,
15416 which can conflict with char getsubopt (); below.
15417 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15418 <limits.h> exists even on freestanding compilers. */
15419
15420 #ifdef __STDC__
15421 # include <limits.h>
15422 #else
15423 # include <assert.h>
15424 #endif
15425
15426 #undef getsubopt
15427
15428 /* Override any GCC internal prototype to avoid an error.
15429 Use char because int might match the return type of a GCC
15430 builtin and then its argument prototype would still apply. */
15431 #ifdef __cplusplus
15432 extern "C"
15433 #endif
15434 char getsubopt ();
15435 /* The GNU C library defines this for functions which it implements
15436 to always fail with ENOSYS. Some functions are actually named
15437 something starting with __ and the normal name is an alias. */
15438 #if defined __stub_getsubopt || defined __stub___getsubopt
15439 choke me
15440 #endif
15441
15442 int
15443 main ()
15444 {
15445 return getsubopt ();
15446 ;
15447 return 0;
15448 }
15449 _ACEOF
15450 rm -f conftest.$ac_objext conftest$ac_exeext
15451 if { (ac_try="$ac_link"
15452 case "(($ac_try" in
15453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15454 *) ac_try_echo=$ac_try;;
15455 esac
15456 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15457 $as_echo "$ac_try_echo") >&5
15458 (eval "$ac_link") 2>conftest.er1
15459 ac_status=$?
15460 grep -v '^ *+' conftest.er1 >conftest.err
15461 rm -f conftest.er1
15462 cat conftest.err >&5
15463 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15464 (exit $ac_status); } && {
15465 test -z "$ac_c_werror_flag" ||
15466 test ! -s conftest.err
15467 } && test -s conftest$ac_exeext && {
15468 test "$cross_compiling" = yes ||
15469 $as_test_x conftest$ac_exeext
15470 }; then
15471 ac_cv_func_getsubopt=yes
15472 else
15473 $as_echo "$as_me: failed program was:" >&5
15474 sed 's/^/| /' conftest.$ac_ext >&5
15475
15476 ac_cv_func_getsubopt=no
15477 fi
15478
15479 rm -rf conftest.dSYM
15480 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15481 conftest$ac_exeext conftest.$ac_ext
15482 fi
15483 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_getsubopt" >&5
15484 $as_echo "$ac_cv_func_getsubopt" >&6; }
15485 if test "x$ac_cv_func_getsubopt" = x""yes; then
15486
15487 cat >>confdefs.h <<\_ACEOF
15488 #define HAVE_GETSUBOPT /**/
15489 _ACEOF
15490
15491 else
15492 sasl_cv_getsubopt=yes
15493 fi
15494
15495 if test $sasl_cv_getsubopt = yes; then
15496 case " $LIBOBJS " in
15497 *" getsubopt.$ac_objext "* ) ;;
15498 *) LIBOBJS="$LIBOBJS getsubopt.$ac_objext"
15499 ;;
15500 esac
15501
15502 GETSUBOPT="getsubopt.lo"
15503 fi
15504
15505
15506 sasl_cv_snprintf=no
15507 SNPRINTFOBJS=""
15508 { $as_echo "$as_me:$LINENO: checking for snprintf" >&5
15509 $as_echo_n "checking for snprintf... " >&6; }
15510 if test "${ac_cv_func_snprintf+set}" = set; then
15511 $as_echo_n "(cached) " >&6
15512 else
15513 cat >conftest.$ac_ext <<_ACEOF
15514 /* confdefs.h. */
15515 _ACEOF
15516 cat confdefs.h >>conftest.$ac_ext
15517 cat >>conftest.$ac_ext <<_ACEOF
15518 /* end confdefs.h. */
15519 /* Define snprintf to an innocuous variant, in case <limits.h> declares snprintf.
15520 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15521 #define snprintf innocuous_snprintf
15522
15523 /* System header to define __stub macros and hopefully few prototypes,
15524 which can conflict with char snprintf (); below.
15525 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15526 <limits.h> exists even on freestanding compilers. */
15527
15528 #ifdef __STDC__
15529 # include <limits.h>
15530 #else
15531 # include <assert.h>
15532 #endif
15533
15534 #undef snprintf
15535
15536 /* Override any GCC internal prototype to avoid an error.
15537 Use char because int might match the return type of a GCC
15538 builtin and then its argument prototype would still apply. */
15539 #ifdef __cplusplus
15540 extern "C"
15541 #endif
15542 char snprintf ();
15543 /* The GNU C library defines this for functions which it implements
15544 to always fail with ENOSYS. Some functions are actually named
15545 something starting with __ and the normal name is an alias. */
15546 #if defined __stub_snprintf || defined __stub___snprintf
15547 choke me
15548 #endif
15549
15550 int
15551 main ()
15552 {
15553 return snprintf ();
15554 ;
15555 return 0;
15556 }
15557 _ACEOF
15558 rm -f conftest.$ac_objext conftest$ac_exeext
15559 if { (ac_try="$ac_link"
15560 case "(($ac_try" in
15561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15562 *) ac_try_echo=$ac_try;;
15563 esac
15564 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15565 $as_echo "$ac_try_echo") >&5
15566 (eval "$ac_link") 2>conftest.er1
15567 ac_status=$?
15568 grep -v '^ *+' conftest.er1 >conftest.err
15569 rm -f conftest.er1
15570 cat conftest.err >&5
15571 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15572 (exit $ac_status); } && {
15573 test -z "$ac_c_werror_flag" ||
15574 test ! -s conftest.err
15575 } && test -s conftest$ac_exeext && {
15576 test "$cross_compiling" = yes ||
15577 $as_test_x conftest$ac_exeext
15578 }; then
15579 ac_cv_func_snprintf=yes
15580 else
15581 $as_echo "$as_me: failed program was:" >&5
15582 sed 's/^/| /' conftest.$ac_ext >&5
15583
15584 ac_cv_func_snprintf=no
15585 fi
15586
15587 rm -rf conftest.dSYM
15588 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15589 conftest$ac_exeext conftest.$ac_ext
15590 fi
15591 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_snprintf" >&5
15592 $as_echo "$ac_cv_func_snprintf" >&6; }
15593 if test "x$ac_cv_func_snprintf" = x""yes; then
15594
15595 cat >>confdefs.h <<\_ACEOF
15596 #define HAVE_SNPRINTF /**/
15597 _ACEOF
15598
15599 else
15600 sasl_cv_snprintf=yes
15601 fi
15602
15603 { $as_echo "$as_me:$LINENO: checking for vsnprintf" >&5
15604 $as_echo_n "checking for vsnprintf... " >&6; }
15605 if test "${ac_cv_func_vsnprintf+set}" = set; then
15606 $as_echo_n "(cached) " >&6
15607 else
15608 cat >conftest.$ac_ext <<_ACEOF
15609 /* confdefs.h. */
15610 _ACEOF
15611 cat confdefs.h >>conftest.$ac_ext
15612 cat >>conftest.$ac_ext <<_ACEOF
15613 /* end confdefs.h. */
15614 /* Define vsnprintf to an innocuous variant, in case <limits.h> declares vsnprintf.
15615 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15616 #define vsnprintf innocuous_vsnprintf
15617
15618 /* System header to define __stub macros and hopefully few prototypes,
15619 which can conflict with char vsnprintf (); below.
15620 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15621 <limits.h> exists even on freestanding compilers. */
15622
15623 #ifdef __STDC__
15624 # include <limits.h>
15625 #else
15626 # include <assert.h>
15627 #endif
15628
15629 #undef vsnprintf
15630
15631 /* Override any GCC internal prototype to avoid an error.
15632 Use char because int might match the return type of a GCC
15633 builtin and then its argument prototype would still apply. */
15634 #ifdef __cplusplus
15635 extern "C"
15636 #endif
15637 char vsnprintf ();
15638 /* The GNU C library defines this for functions which it implements
15639 to always fail with ENOSYS. Some functions are actually named
15640 something starting with __ and the normal name is an alias. */
15641 #if defined __stub_vsnprintf || defined __stub___vsnprintf
15642 choke me
15643 #endif
15644
15645 int
15646 main ()
15647 {
15648 return vsnprintf ();
15649 ;
15650 return 0;
15651 }
15652 _ACEOF
15653 rm -f conftest.$ac_objext conftest$ac_exeext
15654 if { (ac_try="$ac_link"
15655 case "(($ac_try" in
15656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15657 *) ac_try_echo=$ac_try;;
15658 esac
15659 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15660 $as_echo "$ac_try_echo") >&5
15661 (eval "$ac_link") 2>conftest.er1
15662 ac_status=$?
15663 grep -v '^ *+' conftest.er1 >conftest.err
15664 rm -f conftest.er1
15665 cat conftest.err >&5
15666 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15667 (exit $ac_status); } && {
15668 test -z "$ac_c_werror_flag" ||
15669 test ! -s conftest.err
15670 } && test -s conftest$ac_exeext && {
15671 test "$cross_compiling" = yes ||
15672 $as_test_x conftest$ac_exeext
15673 }; then
15674 ac_cv_func_vsnprintf=yes
15675 else
15676 $as_echo "$as_me: failed program was:" >&5
15677 sed 's/^/| /' conftest.$ac_ext >&5
15678
15679 ac_cv_func_vsnprintf=no
15680 fi
15681
15682 rm -rf conftest.dSYM
15683 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15684 conftest$ac_exeext conftest.$ac_ext
15685 fi
15686 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_vsnprintf" >&5
15687 $as_echo "$ac_cv_func_vsnprintf" >&6; }
15688 if test "x$ac_cv_func_vsnprintf" = x""yes; then
15689
15690 cat >>confdefs.h <<\_ACEOF
15691 #define HAVE_VSNPRINTF /**/
15692 _ACEOF
15693
15694 else
15695 sasl_cv_snprintf=yes
15696 fi
15697
15698 if test $sasl_cv_snprintf = yes; then
15699 case " $LIBOBJS " in
15700 *" snprintf.$ac_objext "* ) ;;
15701 *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
15702 ;;
15703 esac
15704
15705 SNPRINTFOBJS="snprintf.o"
15706 LTSNPRINTFOBJS="snprintf.lo"
15707 fi
15708
15709
15710
15711
15712 { $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
15713 $as_echo_n "checking for inet_aton in -lresolv... " >&6; }
15714 if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
15715 $as_echo_n "(cached) " >&6
15716 else
15717 ac_check_lib_save_LIBS=$LIBS
15718 LIBS="-lresolv $LIBS"
15719 cat >conftest.$ac_ext <<_ACEOF
15720 /* confdefs.h. */
15721 _ACEOF
15722 cat confdefs.h >>conftest.$ac_ext
15723 cat >>conftest.$ac_ext <<_ACEOF
15724 /* end confdefs.h. */
15725
15726 /* Override any GCC internal prototype to avoid an error.
15727 Use char because int might match the return type of a GCC
15728 builtin and then its argument prototype would still apply. */
15729 #ifdef __cplusplus
15730 extern "C"
15731 #endif
15732 char inet_aton ();
15733 int
15734 main ()
15735 {
15736 return inet_aton ();
15737 ;
15738 return 0;
15739 }
15740 _ACEOF
15741 rm -f conftest.$ac_objext conftest$ac_exeext
15742 if { (ac_try="$ac_link"
15743 case "(($ac_try" in
15744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15745 *) ac_try_echo=$ac_try;;
15746 esac
15747 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15748 $as_echo "$ac_try_echo") >&5
15749 (eval "$ac_link") 2>conftest.er1
15750 ac_status=$?
15751 grep -v '^ *+' conftest.er1 >conftest.err
15752 rm -f conftest.er1
15753 cat conftest.err >&5
15754 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15755 (exit $ac_status); } && {
15756 test -z "$ac_c_werror_flag" ||
15757 test ! -s conftest.err
15758 } && test -s conftest$ac_exeext && {
15759 test "$cross_compiling" = yes ||
15760 $as_test_x conftest$ac_exeext
15761 }; then
15762 ac_cv_lib_resolv_inet_aton=yes
15763 else
15764 $as_echo "$as_me: failed program was:" >&5
15765 sed 's/^/| /' conftest.$ac_ext >&5
15766
15767 ac_cv_lib_resolv_inet_aton=no
15768 fi
15769
15770 rm -rf conftest.dSYM
15771 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15772 conftest$ac_exeext conftest.$ac_ext
15773 LIBS=$ac_check_lib_save_LIBS
15774 fi
15775 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
15776 $as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
15777 if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then
15778 cat >>confdefs.h <<_ACEOF
15779 #define HAVE_LIBRESOLV 1
15780 _ACEOF
15781
15782 LIBS="-lresolv $LIBS"
15783
15784 fi
15785
15786
15787 GETADDRINFOOBJS=""
15788 sasl_cv_getaddrinfo=yes
15789
15790 { $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5
15791 $as_echo_n "checking for getaddrinfo... " >&6; }
15792 if test "${ac_cv_func_getaddrinfo+set}" = set; then
15793 $as_echo_n "(cached) " >&6
15794 else
15795 cat >conftest.$ac_ext <<_ACEOF
15796 /* confdefs.h. */
15797 _ACEOF
15798 cat confdefs.h >>conftest.$ac_ext
15799 cat >>conftest.$ac_ext <<_ACEOF
15800 /* end confdefs.h. */
15801 /* Define getaddrinfo to an innocuous variant, in case <limits.h> declares getaddrinfo.
15802 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15803 #define getaddrinfo innocuous_getaddrinfo
15804
15805 /* System header to define __stub macros and hopefully few prototypes,
15806 which can conflict with char getaddrinfo (); below.
15807 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15808 <limits.h> exists even on freestanding compilers. */
15809
15810 #ifdef __STDC__
15811 # include <limits.h>
15812 #else
15813 # include <assert.h>
15814 #endif
15815
15816 #undef getaddrinfo
15817
15818 /* Override any GCC internal prototype to avoid an error.
15819 Use char because int might match the return type of a GCC
15820 builtin and then its argument prototype would still apply. */
15821 #ifdef __cplusplus
15822 extern "C"
15823 #endif
15824 char getaddrinfo ();
15825 /* The GNU C library defines this for functions which it implements
15826 to always fail with ENOSYS. Some functions are actually named
15827 something starting with __ and the normal name is an alias. */
15828 #if defined __stub_getaddrinfo || defined __stub___getaddrinfo
15829 choke me
15830 #endif
15831
15832 int
15833 main ()
15834 {
15835 return getaddrinfo ();
15836 ;
15837 return 0;
15838 }
15839 _ACEOF
15840 rm -f conftest.$ac_objext conftest$ac_exeext
15841 if { (ac_try="$ac_link"
15842 case "(($ac_try" in
15843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15844 *) ac_try_echo=$ac_try;;
15845 esac
15846 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15847 $as_echo "$ac_try_echo") >&5
15848 (eval "$ac_link") 2>conftest.er1
15849 ac_status=$?
15850 grep -v '^ *+' conftest.er1 >conftest.err
15851 rm -f conftest.er1
15852 cat conftest.err >&5
15853 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15854 (exit $ac_status); } && {
15855 test -z "$ac_c_werror_flag" ||
15856 test ! -s conftest.err
15857 } && test -s conftest$ac_exeext && {
15858 test "$cross_compiling" = yes ||
15859 $as_test_x conftest$ac_exeext
15860 }; then
15861 ac_cv_func_getaddrinfo=yes
15862 else
15863 $as_echo "$as_me: failed program was:" >&5
15864 sed 's/^/| /' conftest.$ac_ext >&5
15865
15866 ac_cv_func_getaddrinfo=no
15867 fi
15868
15869 rm -rf conftest.dSYM
15870 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15871 conftest$ac_exeext conftest.$ac_ext
15872 fi
15873 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
15874 $as_echo "$ac_cv_func_getaddrinfo" >&6; }
15875 if test "x$ac_cv_func_getaddrinfo" = x""yes; then
15876 ac_cv_lib_socket_getaddrinfo=no
15877 ac_cv_lib_inet6_getaddrinfo=no
15878
15879 else
15880 { $as_echo "$as_me:$LINENO: checking for getaddrinfo in -lsocket" >&5
15881 $as_echo_n "checking for getaddrinfo in -lsocket... " >&6; }
15882 if test "${ac_cv_lib_socket_getaddrinfo+set}" = set; then
15883 $as_echo_n "(cached) " >&6
15884 else
15885 ac_check_lib_save_LIBS=$LIBS
15886 LIBS="-lsocket $LIBS"
15887 cat >conftest.$ac_ext <<_ACEOF
15888 /* confdefs.h. */
15889 _ACEOF
15890 cat confdefs.h >>conftest.$ac_ext
15891 cat >>conftest.$ac_ext <<_ACEOF
15892 /* end confdefs.h. */
15893
15894 /* Override any GCC internal prototype to avoid an error.
15895 Use char because int might match the return type of a GCC
15896 builtin and then its argument prototype would still apply. */
15897 #ifdef __cplusplus
15898 extern "C"
15899 #endif
15900 char getaddrinfo ();
15901 int
15902 main ()
15903 {
15904 return getaddrinfo ();
15905 ;
15906 return 0;
15907 }
15908 _ACEOF
15909 rm -f conftest.$ac_objext conftest$ac_exeext
15910 if { (ac_try="$ac_link"
15911 case "(($ac_try" in
15912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15913 *) ac_try_echo=$ac_try;;
15914 esac
15915 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15916 $as_echo "$ac_try_echo") >&5
15917 (eval "$ac_link") 2>conftest.er1
15918 ac_status=$?
15919 grep -v '^ *+' conftest.er1 >conftest.err
15920 rm -f conftest.er1
15921 cat conftest.err >&5
15922 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15923 (exit $ac_status); } && {
15924 test -z "$ac_c_werror_flag" ||
15925 test ! -s conftest.err
15926 } && test -s conftest$ac_exeext && {
15927 test "$cross_compiling" = yes ||
15928 $as_test_x conftest$ac_exeext
15929 }; then
15930 ac_cv_lib_socket_getaddrinfo=yes
15931 else
15932 $as_echo "$as_me: failed program was:" >&5
15933 sed 's/^/| /' conftest.$ac_ext >&5
15934
15935 ac_cv_lib_socket_getaddrinfo=no
15936 fi
15937
15938 rm -rf conftest.dSYM
15939 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15940 conftest$ac_exeext conftest.$ac_ext
15941 LIBS=$ac_check_lib_save_LIBS
15942 fi
15943 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getaddrinfo" >&5
15944 $as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; }
15945 if test "x$ac_cv_lib_socket_getaddrinfo" = x""yes; then
15946 LIBS="$LIBS -lsocket"
15947 ac_cv_lib_inet6_getaddrinfo=no
15948
15949 else
15950 { $as_echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
15951 $as_echo_n "checking whether your system has IPv6 directory... " >&6; }
15952 if test "${ipv6_cv_dir+set}" = set; then
15953 $as_echo_n "(cached) " >&6
15954 else
15955 for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
15956 if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
15957 break
15958 fi
15959 done
15960 fi
15961 { $as_echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
15962 $as_echo "$ipv6_cv_dir" >&6; }
15963 if test $ipv6_cv_dir = no; then
15964 ac_cv_lib_inet6_getaddrinfo=no
15965 else
15966 if test x$ipv6_libinet6 = x; then
15967 ipv6_libinet6=no
15968 SAVELDFLAGS="$LDFLAGS"
15969 LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
15970 fi
15971 { $as_echo "$as_me:$LINENO: checking for getaddrinfo in -linet6" >&5
15972 $as_echo_n "checking for getaddrinfo in -linet6... " >&6; }
15973 if test "${ac_cv_lib_inet6_getaddrinfo+set}" = set; then
15974 $as_echo_n "(cached) " >&6
15975 else
15976 ac_check_lib_save_LIBS=$LIBS
15977 LIBS="-linet6 $LIBS"
15978 cat >conftest.$ac_ext <<_ACEOF
15979 /* confdefs.h. */
15980 _ACEOF
15981 cat confdefs.h >>conftest.$ac_ext
15982 cat >>conftest.$ac_ext <<_ACEOF
15983 /* end confdefs.h. */
15984
15985 /* Override any GCC internal prototype to avoid an error.
15986 Use char because int might match the return type of a GCC
15987 builtin and then its argument prototype would still apply. */
15988 #ifdef __cplusplus
15989 extern "C"
15990 #endif
15991 char getaddrinfo ();
15992 int
15993 main ()
15994 {
15995 return getaddrinfo ();
15996 ;
15997 return 0;
15998 }
15999 _ACEOF
16000 rm -f conftest.$ac_objext conftest$ac_exeext
16001 if { (ac_try="$ac_link"
16002 case "(($ac_try" in
16003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16004 *) ac_try_echo=$ac_try;;
16005 esac
16006 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16007 $as_echo "$ac_try_echo") >&5
16008 (eval "$ac_link") 2>conftest.er1
16009 ac_status=$?
16010 grep -v '^ *+' conftest.er1 >conftest.err
16011 rm -f conftest.er1
16012 cat conftest.err >&5
16013 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16014 (exit $ac_status); } && {
16015 test -z "$ac_c_werror_flag" ||
16016 test ! -s conftest.err
16017 } && test -s conftest$ac_exeext && {
16018 test "$cross_compiling" = yes ||
16019 $as_test_x conftest$ac_exeext
16020 }; then
16021 ac_cv_lib_inet6_getaddrinfo=yes
16022 else
16023 $as_echo "$as_me: failed program was:" >&5
16024 sed 's/^/| /' conftest.$ac_ext >&5
16025
16026 ac_cv_lib_inet6_getaddrinfo=no
16027 fi
16028
16029 rm -rf conftest.dSYM
16030 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16031 conftest$ac_exeext conftest.$ac_ext
16032 LIBS=$ac_check_lib_save_LIBS
16033 fi
16034 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getaddrinfo" >&5
16035 $as_echo "$ac_cv_lib_inet6_getaddrinfo" >&6; }
16036 if test "x$ac_cv_lib_inet6_getaddrinfo" = x""yes; then
16037 if test $ipv6_libinet6 = no; then
16038 ipv6_libinet6=yes
16039 LIBS="$LIBS -linet6"
16040 fi
16041 fi
16042 if test $ipv6_libinet6 = no; then
16043 LDFLAGS="$SAVELDFLAGS"
16044 fi
16045 fi
16046 fi
16047
16048 fi
16049 ipv6_cv_getaddrinfo=no
16050 if test $ac_cv_func_getaddrinfo = yes -o $ac_cv_lib_socket_getaddrinfo = yes \
16051 -o $ac_cv_lib_inet6_getaddrinfo = yes
16052 then
16053 ipv6_cv_getaddrinfo=yes
16054 fi
16055 if test $ipv6_cv_getaddrinfo = no; then
16056 if test getaddrinfo = getaddrinfo; then
16057 for ipv6_cv_pfx in o n; do
16058 cat >conftest.$ac_ext <<_ACEOF
16059 /* confdefs.h. */
16060 _ACEOF
16061 cat confdefs.h >>conftest.$ac_ext
16062 cat >>conftest.$ac_ext <<_ACEOF
16063 /* end confdefs.h. */
16064 #include <netdb.h>
16065
16066 _ACEOF
16067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16068 $EGREP "${ipv6_cv_pfx}getaddrinfo" >/dev/null 2>&1; then
16069 as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}getaddrinfo" | $as_tr_sh`
16070 { $as_echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getaddrinfo" >&5
16071 $as_echo_n "checking for ${ipv6_cv_pfx}getaddrinfo... " >&6; }
16072 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16073 $as_echo_n "(cached) " >&6
16074 else
16075 cat >conftest.$ac_ext <<_ACEOF
16076 /* confdefs.h. */
16077 _ACEOF
16078 cat confdefs.h >>conftest.$ac_ext
16079 cat >>conftest.$ac_ext <<_ACEOF
16080 /* end confdefs.h. */
16081 /* Define ${ipv6_cv_pfx}getaddrinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getaddrinfo.
16082 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16083 #define ${ipv6_cv_pfx}getaddrinfo innocuous_${ipv6_cv_pfx}getaddrinfo
16084
16085 /* System header to define __stub macros and hopefully few prototypes,
16086 which can conflict with char ${ipv6_cv_pfx}getaddrinfo (); below.
16087 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16088 <limits.h> exists even on freestanding compilers. */
16089
16090 #ifdef __STDC__
16091 # include <limits.h>
16092 #else
16093 # include <assert.h>
16094 #endif
16095
16096 #undef ${ipv6_cv_pfx}getaddrinfo
16097
16098 /* Override any GCC internal prototype to avoid an error.
16099 Use char because int might match the return type of a GCC
16100 builtin and then its argument prototype would still apply. */
16101 #ifdef __cplusplus
16102 extern "C"
16103 #endif
16104 char ${ipv6_cv_pfx}getaddrinfo ();
16105 /* The GNU C library defines this for functions which it implements
16106 to always fail with ENOSYS. Some functions are actually named
16107 something starting with __ and the normal name is an alias. */
16108 #if defined __stub_${ipv6_cv_pfx}getaddrinfo || defined __stub___${ipv6_cv_pfx}getaddrinfo
16109 choke me
16110 #endif
16111
16112 int
16113 main ()
16114 {
16115 return ${ipv6_cv_pfx}getaddrinfo ();
16116 ;
16117 return 0;
16118 }
16119 _ACEOF
16120 rm -f conftest.$ac_objext conftest$ac_exeext
16121 if { (ac_try="$ac_link"
16122 case "(($ac_try" in
16123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16124 *) ac_try_echo=$ac_try;;
16125 esac
16126 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16127 $as_echo "$ac_try_echo") >&5
16128 (eval "$ac_link") 2>conftest.er1
16129 ac_status=$?
16130 grep -v '^ *+' conftest.er1 >conftest.err
16131 rm -f conftest.er1
16132 cat conftest.err >&5
16133 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16134 (exit $ac_status); } && {
16135 test -z "$ac_c_werror_flag" ||
16136 test ! -s conftest.err
16137 } && test -s conftest$ac_exeext && {
16138 test "$cross_compiling" = yes ||
16139 $as_test_x conftest$ac_exeext
16140 }; then
16141 eval "$as_ac_var=yes"
16142 else
16143 $as_echo "$as_me: failed program was:" >&5
16144 sed 's/^/| /' conftest.$ac_ext >&5
16145
16146 eval "$as_ac_var=no"
16147 fi
16148
16149 rm -rf conftest.dSYM
16150 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16151 conftest$ac_exeext conftest.$ac_ext
16152 fi
16153 ac_res=`eval 'as_val=${'$as_ac_var'}
16154 $as_echo "$as_val"'`
16155 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16156 $as_echo "$ac_res" >&6; }
16157 as_val=`eval 'as_val=${'$as_ac_var'}
16158 $as_echo "$as_val"'`
16159
16160 fi
16161 rm -f conftest*
16162
16163 if eval test X\$ac_cv_func_${ipv6_cv_pfx}getaddrinfo = Xyes; then
16164
16165 cat >>confdefs.h <<\_ACEOF
16166 #define HAVE_GETADDRINFO /**/
16167 _ACEOF
16168
16169 ipv6_cv_getaddrinfo=yes
16170 break
16171 fi
16172 done
16173 fi
16174 fi
16175 if test $ipv6_cv_getaddrinfo = yes; then
16176
16177 { $as_echo "$as_me:$LINENO: checking for gai_strerror" >&5
16178 $as_echo_n "checking for gai_strerror... " >&6; }
16179 if test "${ac_cv_func_gai_strerror+set}" = set; then
16180 $as_echo_n "(cached) " >&6
16181 else
16182 cat >conftest.$ac_ext <<_ACEOF
16183 /* confdefs.h. */
16184 _ACEOF
16185 cat confdefs.h >>conftest.$ac_ext
16186 cat >>conftest.$ac_ext <<_ACEOF
16187 /* end confdefs.h. */
16188 /* Define gai_strerror to an innocuous variant, in case <limits.h> declares gai_strerror.
16189 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16190 #define gai_strerror innocuous_gai_strerror
16191
16192 /* System header to define __stub macros and hopefully few prototypes,
16193 which can conflict with char gai_strerror (); below.
16194 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16195 <limits.h> exists even on freestanding compilers. */
16196
16197 #ifdef __STDC__
16198 # include <limits.h>
16199 #else
16200 # include <assert.h>
16201 #endif
16202
16203 #undef gai_strerror
16204
16205 /* Override any GCC internal prototype to avoid an error.
16206 Use char because int might match the return type of a GCC
16207 builtin and then its argument prototype would still apply. */
16208 #ifdef __cplusplus
16209 extern "C"
16210 #endif
16211 char gai_strerror ();
16212 /* The GNU C library defines this for functions which it implements
16213 to always fail with ENOSYS. Some functions are actually named
16214 something starting with __ and the normal name is an alias. */
16215 #if defined __stub_gai_strerror || defined __stub___gai_strerror
16216 choke me
16217 #endif
16218
16219 int
16220 main ()
16221 {
16222 return gai_strerror ();
16223 ;
16224 return 0;
16225 }
16226 _ACEOF
16227 rm -f conftest.$ac_objext conftest$ac_exeext
16228 if { (ac_try="$ac_link"
16229 case "(($ac_try" in
16230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16231 *) ac_try_echo=$ac_try;;
16232 esac
16233 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16234 $as_echo "$ac_try_echo") >&5
16235 (eval "$ac_link") 2>conftest.er1
16236 ac_status=$?
16237 grep -v '^ *+' conftest.er1 >conftest.err
16238 rm -f conftest.er1
16239 cat conftest.err >&5
16240 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16241 (exit $ac_status); } && {
16242 test -z "$ac_c_werror_flag" ||
16243 test ! -s conftest.err
16244 } && test -s conftest$ac_exeext && {
16245 test "$cross_compiling" = yes ||
16246 $as_test_x conftest$ac_exeext
16247 }; then
16248 ac_cv_func_gai_strerror=yes
16249 else
16250 $as_echo "$as_me: failed program was:" >&5
16251 sed 's/^/| /' conftest.$ac_ext >&5
16252
16253 ac_cv_func_gai_strerror=no
16254 fi
16255
16256 rm -rf conftest.dSYM
16257 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16258 conftest$ac_exeext conftest.$ac_ext
16259 fi
16260 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_gai_strerror" >&5
16261 $as_echo "$ac_cv_func_gai_strerror" >&6; }
16262 if test "x$ac_cv_func_gai_strerror" = x""yes; then
16263 ac_cv_lib_socket_gai_strerror=no
16264 ac_cv_lib_inet6_gai_strerror=no
16265
16266 else
16267 { $as_echo "$as_me:$LINENO: checking for gai_strerror in -lsocket" >&5
16268 $as_echo_n "checking for gai_strerror in -lsocket... " >&6; }
16269 if test "${ac_cv_lib_socket_gai_strerror+set}" = set; then
16270 $as_echo_n "(cached) " >&6
16271 else
16272 ac_check_lib_save_LIBS=$LIBS
16273 LIBS="-lsocket $LIBS"
16274 cat >conftest.$ac_ext <<_ACEOF
16275 /* confdefs.h. */
16276 _ACEOF
16277 cat confdefs.h >>conftest.$ac_ext
16278 cat >>conftest.$ac_ext <<_ACEOF
16279 /* end confdefs.h. */
16280
16281 /* Override any GCC internal prototype to avoid an error.
16282 Use char because int might match the return type of a GCC
16283 builtin and then its argument prototype would still apply. */
16284 #ifdef __cplusplus
16285 extern "C"
16286 #endif
16287 char gai_strerror ();
16288 int
16289 main ()
16290 {
16291 return gai_strerror ();
16292 ;
16293 return 0;
16294 }
16295 _ACEOF
16296 rm -f conftest.$ac_objext conftest$ac_exeext
16297 if { (ac_try="$ac_link"
16298 case "(($ac_try" in
16299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16300 *) ac_try_echo=$ac_try;;
16301 esac
16302 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16303 $as_echo "$ac_try_echo") >&5
16304 (eval "$ac_link") 2>conftest.er1
16305 ac_status=$?
16306 grep -v '^ *+' conftest.er1 >conftest.err
16307 rm -f conftest.er1
16308 cat conftest.err >&5
16309 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16310 (exit $ac_status); } && {
16311 test -z "$ac_c_werror_flag" ||
16312 test ! -s conftest.err
16313 } && test -s conftest$ac_exeext && {
16314 test "$cross_compiling" = yes ||
16315 $as_test_x conftest$ac_exeext
16316 }; then
16317 ac_cv_lib_socket_gai_strerror=yes
16318 else
16319 $as_echo "$as_me: failed program was:" >&5
16320 sed 's/^/| /' conftest.$ac_ext >&5
16321
16322 ac_cv_lib_socket_gai_strerror=no
16323 fi
16324
16325 rm -rf conftest.dSYM
16326 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16327 conftest$ac_exeext conftest.$ac_ext
16328 LIBS=$ac_check_lib_save_LIBS
16329 fi
16330 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_gai_strerror" >&5
16331 $as_echo "$ac_cv_lib_socket_gai_strerror" >&6; }
16332 if test "x$ac_cv_lib_socket_gai_strerror" = x""yes; then
16333 LIBS="$LIBS -lsocket"
16334 ac_cv_lib_inet6_gai_strerror=no
16335
16336 else
16337 { $as_echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
16338 $as_echo_n "checking whether your system has IPv6 directory... " >&6; }
16339 if test "${ipv6_cv_dir+set}" = set; then
16340 $as_echo_n "(cached) " >&6
16341 else
16342 for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
16343 if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
16344 break
16345 fi
16346 done
16347 fi
16348 { $as_echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
16349 $as_echo "$ipv6_cv_dir" >&6; }
16350 if test $ipv6_cv_dir = no; then
16351 ac_cv_lib_inet6_gai_strerror=no
16352 else
16353 if test x$ipv6_libinet6 = x; then
16354 ipv6_libinet6=no
16355 SAVELDFLAGS="$LDFLAGS"
16356 LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
16357 fi
16358 { $as_echo "$as_me:$LINENO: checking for gai_strerror in -linet6" >&5
16359 $as_echo_n "checking for gai_strerror in -linet6... " >&6; }
16360 if test "${ac_cv_lib_inet6_gai_strerror+set}" = set; then
16361 $as_echo_n "(cached) " >&6
16362 else
16363 ac_check_lib_save_LIBS=$LIBS
16364 LIBS="-linet6 $LIBS"
16365 cat >conftest.$ac_ext <<_ACEOF
16366 /* confdefs.h. */
16367 _ACEOF
16368 cat confdefs.h >>conftest.$ac_ext
16369 cat >>conftest.$ac_ext <<_ACEOF
16370 /* end confdefs.h. */
16371
16372 /* Override any GCC internal prototype to avoid an error.
16373 Use char because int might match the return type of a GCC
16374 builtin and then its argument prototype would still apply. */
16375 #ifdef __cplusplus
16376 extern "C"
16377 #endif
16378 char gai_strerror ();
16379 int
16380 main ()
16381 {
16382 return gai_strerror ();
16383 ;
16384 return 0;
16385 }
16386 _ACEOF
16387 rm -f conftest.$ac_objext conftest$ac_exeext
16388 if { (ac_try="$ac_link"
16389 case "(($ac_try" in
16390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16391 *) ac_try_echo=$ac_try;;
16392 esac
16393 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16394 $as_echo "$ac_try_echo") >&5
16395 (eval "$ac_link") 2>conftest.er1
16396 ac_status=$?
16397 grep -v '^ *+' conftest.er1 >conftest.err
16398 rm -f conftest.er1
16399 cat conftest.err >&5
16400 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16401 (exit $ac_status); } && {
16402 test -z "$ac_c_werror_flag" ||
16403 test ! -s conftest.err
16404 } && test -s conftest$ac_exeext && {
16405 test "$cross_compiling" = yes ||
16406 $as_test_x conftest$ac_exeext
16407 }; then
16408 ac_cv_lib_inet6_gai_strerror=yes
16409 else
16410 $as_echo "$as_me: failed program was:" >&5
16411 sed 's/^/| /' conftest.$ac_ext >&5
16412
16413 ac_cv_lib_inet6_gai_strerror=no
16414 fi
16415
16416 rm -rf conftest.dSYM
16417 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16418 conftest$ac_exeext conftest.$ac_ext
16419 LIBS=$ac_check_lib_save_LIBS
16420 fi
16421 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_gai_strerror" >&5
16422 $as_echo "$ac_cv_lib_inet6_gai_strerror" >&6; }
16423 if test "x$ac_cv_lib_inet6_gai_strerror" = x""yes; then
16424 if test $ipv6_libinet6 = no; then
16425 ipv6_libinet6=yes
16426 LIBS="$LIBS -linet6"
16427 fi
16428 fi
16429 if test $ipv6_libinet6 = no; then
16430 LDFLAGS="$SAVELDFLAGS"
16431 fi
16432 fi
16433 fi
16434
16435 fi
16436 ipv6_cv_gai_strerror=no
16437 if test $ac_cv_func_gai_strerror = yes -o $ac_cv_lib_socket_gai_strerror = yes \
16438 -o $ac_cv_lib_inet6_gai_strerror = yes
16439 then
16440 ipv6_cv_gai_strerror=yes
16441 fi
16442 if test $ipv6_cv_gai_strerror = no; then
16443 if test gai_strerror = getaddrinfo; then
16444 for ipv6_cv_pfx in o n; do
16445 cat >conftest.$ac_ext <<_ACEOF
16446 /* confdefs.h. */
16447 _ACEOF
16448 cat confdefs.h >>conftest.$ac_ext
16449 cat >>conftest.$ac_ext <<_ACEOF
16450 /* end confdefs.h. */
16451 #include <netdb.h>
16452
16453 _ACEOF
16454 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16455 $EGREP "${ipv6_cv_pfx}gai_strerror" >/dev/null 2>&1; then
16456 as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}gai_strerror" | $as_tr_sh`
16457 { $as_echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}gai_strerror" >&5
16458 $as_echo_n "checking for ${ipv6_cv_pfx}gai_strerror... " >&6; }
16459 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16460 $as_echo_n "(cached) " >&6
16461 else
16462 cat >conftest.$ac_ext <<_ACEOF
16463 /* confdefs.h. */
16464 _ACEOF
16465 cat confdefs.h >>conftest.$ac_ext
16466 cat >>conftest.$ac_ext <<_ACEOF
16467 /* end confdefs.h. */
16468 /* Define ${ipv6_cv_pfx}gai_strerror to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}gai_strerror.
16469 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16470 #define ${ipv6_cv_pfx}gai_strerror innocuous_${ipv6_cv_pfx}gai_strerror
16471
16472 /* System header to define __stub macros and hopefully few prototypes,
16473 which can conflict with char ${ipv6_cv_pfx}gai_strerror (); below.
16474 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16475 <limits.h> exists even on freestanding compilers. */
16476
16477 #ifdef __STDC__
16478 # include <limits.h>
16479 #else
16480 # include <assert.h>
16481 #endif
16482
16483 #undef ${ipv6_cv_pfx}gai_strerror
16484
16485 /* Override any GCC internal prototype to avoid an error.
16486 Use char because int might match the return type of a GCC
16487 builtin and then its argument prototype would still apply. */
16488 #ifdef __cplusplus
16489 extern "C"
16490 #endif
16491 char ${ipv6_cv_pfx}gai_strerror ();
16492 /* The GNU C library defines this for functions which it implements
16493 to always fail with ENOSYS. Some functions are actually named
16494 something starting with __ and the normal name is an alias. */
16495 #if defined __stub_${ipv6_cv_pfx}gai_strerror || defined __stub___${ipv6_cv_pfx}gai_strerror
16496 choke me
16497 #endif
16498
16499 int
16500 main ()
16501 {
16502 return ${ipv6_cv_pfx}gai_strerror ();
16503 ;
16504 return 0;
16505 }
16506 _ACEOF
16507 rm -f conftest.$ac_objext conftest$ac_exeext
16508 if { (ac_try="$ac_link"
16509 case "(($ac_try" in
16510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16511 *) ac_try_echo=$ac_try;;
16512 esac
16513 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16514 $as_echo "$ac_try_echo") >&5
16515 (eval "$ac_link") 2>conftest.er1
16516 ac_status=$?
16517 grep -v '^ *+' conftest.er1 >conftest.err
16518 rm -f conftest.er1
16519 cat conftest.err >&5
16520 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16521 (exit $ac_status); } && {
16522 test -z "$ac_c_werror_flag" ||
16523 test ! -s conftest.err
16524 } && test -s conftest$ac_exeext && {
16525 test "$cross_compiling" = yes ||
16526 $as_test_x conftest$ac_exeext
16527 }; then
16528 eval "$as_ac_var=yes"
16529 else
16530 $as_echo "$as_me: failed program was:" >&5
16531 sed 's/^/| /' conftest.$ac_ext >&5
16532
16533 eval "$as_ac_var=no"
16534 fi
16535
16536 rm -rf conftest.dSYM
16537 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16538 conftest$ac_exeext conftest.$ac_ext
16539 fi
16540 ac_res=`eval 'as_val=${'$as_ac_var'}
16541 $as_echo "$as_val"'`
16542 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16543 $as_echo "$ac_res" >&6; }
16544 as_val=`eval 'as_val=${'$as_ac_var'}
16545 $as_echo "$as_val"'`
16546
16547 fi
16548 rm -f conftest*
16549
16550 if eval test X\$ac_cv_func_${ipv6_cv_pfx}gai_strerror = Xyes; then
16551
16552 cat >>confdefs.h <<\_ACEOF
16553 #define HAVE_GETADDRINFO /**/
16554 _ACEOF
16555
16556 ipv6_cv_gai_strerror=yes
16557 break
16558 fi
16559 done
16560 fi
16561 fi
16562 if test $ipv6_cv_gai_strerror = yes; then
16563
16564 cat >>confdefs.h <<\_ACEOF
16565 #define HAVE_GETADDRINFO /**/
16566 _ACEOF
16567
16568 sasl_cv_getaddrinfo=no
16569 else
16570 :
16571 fi
16572 else
16573 :
16574 fi
16575 if test $sasl_cv_getaddrinfo = yes; then
16576 case " $LIBOBJS " in
16577 *" getaddrinfo.$ac_objext "* ) ;;
16578 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16579 ;;
16580 esac
16581
16582 GETADDRINFOOBJS="getaddrinfo.o"
16583 LTGETADDRINFOOBJS="getaddrinfo.lo"
16584 fi
16585
16586
16587
16588 GETNAMEINFOOBJS=""
16589 sasl_cv_getnameinfo=no
16590
16591 { $as_echo "$as_me:$LINENO: checking for getnameinfo" >&5
16592 $as_echo_n "checking for getnameinfo... " >&6; }
16593 if test "${ac_cv_func_getnameinfo+set}" = set; then
16594 $as_echo_n "(cached) " >&6
16595 else
16596 cat >conftest.$ac_ext <<_ACEOF
16597 /* confdefs.h. */
16598 _ACEOF
16599 cat confdefs.h >>conftest.$ac_ext
16600 cat >>conftest.$ac_ext <<_ACEOF
16601 /* end confdefs.h. */
16602 /* Define getnameinfo to an innocuous variant, in case <limits.h> declares getnameinfo.
16603 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16604 #define getnameinfo innocuous_getnameinfo
16605
16606 /* System header to define __stub macros and hopefully few prototypes,
16607 which can conflict with char getnameinfo (); below.
16608 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16609 <limits.h> exists even on freestanding compilers. */
16610
16611 #ifdef __STDC__
16612 # include <limits.h>
16613 #else
16614 # include <assert.h>
16615 #endif
16616
16617 #undef getnameinfo
16618
16619 /* Override any GCC internal prototype to avoid an error.
16620 Use char because int might match the return type of a GCC
16621 builtin and then its argument prototype would still apply. */
16622 #ifdef __cplusplus
16623 extern "C"
16624 #endif
16625 char getnameinfo ();
16626 /* The GNU C library defines this for functions which it implements
16627 to always fail with ENOSYS. Some functions are actually named
16628 something starting with __ and the normal name is an alias. */
16629 #if defined __stub_getnameinfo || defined __stub___getnameinfo
16630 choke me
16631 #endif
16632
16633 int
16634 main ()
16635 {
16636 return getnameinfo ();
16637 ;
16638 return 0;
16639 }
16640 _ACEOF
16641 rm -f conftest.$ac_objext conftest$ac_exeext
16642 if { (ac_try="$ac_link"
16643 case "(($ac_try" in
16644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16645 *) ac_try_echo=$ac_try;;
16646 esac
16647 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16648 $as_echo "$ac_try_echo") >&5
16649 (eval "$ac_link") 2>conftest.er1
16650 ac_status=$?
16651 grep -v '^ *+' conftest.er1 >conftest.err
16652 rm -f conftest.er1
16653 cat conftest.err >&5
16654 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16655 (exit $ac_status); } && {
16656 test -z "$ac_c_werror_flag" ||
16657 test ! -s conftest.err
16658 } && test -s conftest$ac_exeext && {
16659 test "$cross_compiling" = yes ||
16660 $as_test_x conftest$ac_exeext
16661 }; then
16662 ac_cv_func_getnameinfo=yes
16663 else
16664 $as_echo "$as_me: failed program was:" >&5
16665 sed 's/^/| /' conftest.$ac_ext >&5
16666
16667 ac_cv_func_getnameinfo=no
16668 fi
16669
16670 rm -rf conftest.dSYM
16671 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16672 conftest$ac_exeext conftest.$ac_ext
16673 fi
16674 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_getnameinfo" >&5
16675 $as_echo "$ac_cv_func_getnameinfo" >&6; }
16676 if test "x$ac_cv_func_getnameinfo" = x""yes; then
16677 ac_cv_lib_socket_getnameinfo=no
16678 ac_cv_lib_inet6_getnameinfo=no
16679
16680 else
16681 { $as_echo "$as_me:$LINENO: checking for getnameinfo in -lsocket" >&5
16682 $as_echo_n "checking for getnameinfo in -lsocket... " >&6; }
16683 if test "${ac_cv_lib_socket_getnameinfo+set}" = set; then
16684 $as_echo_n "(cached) " >&6
16685 else
16686 ac_check_lib_save_LIBS=$LIBS
16687 LIBS="-lsocket $LIBS"
16688 cat >conftest.$ac_ext <<_ACEOF
16689 /* confdefs.h. */
16690 _ACEOF
16691 cat confdefs.h >>conftest.$ac_ext
16692 cat >>conftest.$ac_ext <<_ACEOF
16693 /* end confdefs.h. */
16694
16695 /* Override any GCC internal prototype to avoid an error.
16696 Use char because int might match the return type of a GCC
16697 builtin and then its argument prototype would still apply. */
16698 #ifdef __cplusplus
16699 extern "C"
16700 #endif
16701 char getnameinfo ();
16702 int
16703 main ()
16704 {
16705 return getnameinfo ();
16706 ;
16707 return 0;
16708 }
16709 _ACEOF
16710 rm -f conftest.$ac_objext conftest$ac_exeext
16711 if { (ac_try="$ac_link"
16712 case "(($ac_try" in
16713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16714 *) ac_try_echo=$ac_try;;
16715 esac
16716 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16717 $as_echo "$ac_try_echo") >&5
16718 (eval "$ac_link") 2>conftest.er1
16719 ac_status=$?
16720 grep -v '^ *+' conftest.er1 >conftest.err
16721 rm -f conftest.er1
16722 cat conftest.err >&5
16723 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16724 (exit $ac_status); } && {
16725 test -z "$ac_c_werror_flag" ||
16726 test ! -s conftest.err
16727 } && test -s conftest$ac_exeext && {
16728 test "$cross_compiling" = yes ||
16729 $as_test_x conftest$ac_exeext
16730 }; then
16731 ac_cv_lib_socket_getnameinfo=yes
16732 else
16733 $as_echo "$as_me: failed program was:" >&5
16734 sed 's/^/| /' conftest.$ac_ext >&5
16735
16736 ac_cv_lib_socket_getnameinfo=no
16737 fi
16738
16739 rm -rf conftest.dSYM
16740 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16741 conftest$ac_exeext conftest.$ac_ext
16742 LIBS=$ac_check_lib_save_LIBS
16743 fi
16744 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getnameinfo" >&5
16745 $as_echo "$ac_cv_lib_socket_getnameinfo" >&6; }
16746 if test "x$ac_cv_lib_socket_getnameinfo" = x""yes; then
16747 LIBS="$LIBS -lsocket"
16748 ac_cv_lib_inet6_getnameinfo=no
16749
16750 else
16751 { $as_echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
16752 $as_echo_n "checking whether your system has IPv6 directory... " >&6; }
16753 if test "${ipv6_cv_dir+set}" = set; then
16754 $as_echo_n "(cached) " >&6
16755 else
16756 for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
16757 if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
16758 break
16759 fi
16760 done
16761 fi
16762 { $as_echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
16763 $as_echo "$ipv6_cv_dir" >&6; }
16764 if test $ipv6_cv_dir = no; then
16765 ac_cv_lib_inet6_getnameinfo=no
16766 else
16767 if test x$ipv6_libinet6 = x; then
16768 ipv6_libinet6=no
16769 SAVELDFLAGS="$LDFLAGS"
16770 LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
16771 fi
16772 { $as_echo "$as_me:$LINENO: checking for getnameinfo in -linet6" >&5
16773 $as_echo_n "checking for getnameinfo in -linet6... " >&6; }
16774 if test "${ac_cv_lib_inet6_getnameinfo+set}" = set; then
16775 $as_echo_n "(cached) " >&6
16776 else
16777 ac_check_lib_save_LIBS=$LIBS
16778 LIBS="-linet6 $LIBS"
16779 cat >conftest.$ac_ext <<_ACEOF
16780 /* confdefs.h. */
16781 _ACEOF
16782 cat confdefs.h >>conftest.$ac_ext
16783 cat >>conftest.$ac_ext <<_ACEOF
16784 /* end confdefs.h. */
16785
16786 /* Override any GCC internal prototype to avoid an error.
16787 Use char because int might match the return type of a GCC
16788 builtin and then its argument prototype would still apply. */
16789 #ifdef __cplusplus
16790 extern "C"
16791 #endif
16792 char getnameinfo ();
16793 int
16794 main ()
16795 {
16796 return getnameinfo ();
16797 ;
16798 return 0;
16799 }
16800 _ACEOF
16801 rm -f conftest.$ac_objext conftest$ac_exeext
16802 if { (ac_try="$ac_link"
16803 case "(($ac_try" in
16804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16805 *) ac_try_echo=$ac_try;;
16806 esac
16807 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16808 $as_echo "$ac_try_echo") >&5
16809 (eval "$ac_link") 2>conftest.er1
16810 ac_status=$?
16811 grep -v '^ *+' conftest.er1 >conftest.err
16812 rm -f conftest.er1
16813 cat conftest.err >&5
16814 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16815 (exit $ac_status); } && {
16816 test -z "$ac_c_werror_flag" ||
16817 test ! -s conftest.err
16818 } && test -s conftest$ac_exeext && {
16819 test "$cross_compiling" = yes ||
16820 $as_test_x conftest$ac_exeext
16821 }; then
16822 ac_cv_lib_inet6_getnameinfo=yes
16823 else
16824 $as_echo "$as_me: failed program was:" >&5
16825 sed 's/^/| /' conftest.$ac_ext >&5
16826
16827 ac_cv_lib_inet6_getnameinfo=no
16828 fi
16829
16830 rm -rf conftest.dSYM
16831 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16832 conftest$ac_exeext conftest.$ac_ext
16833 LIBS=$ac_check_lib_save_LIBS
16834 fi
16835 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getnameinfo" >&5
16836 $as_echo "$ac_cv_lib_inet6_getnameinfo" >&6; }
16837 if test "x$ac_cv_lib_inet6_getnameinfo" = x""yes; then
16838 if test $ipv6_libinet6 = no; then
16839 ipv6_libinet6=yes
16840 LIBS="$LIBS -linet6"
16841 fi
16842 fi
16843 if test $ipv6_libinet6 = no; then
16844 LDFLAGS="$SAVELDFLAGS"
16845 fi
16846 fi
16847 fi
16848
16849 fi
16850 ipv6_cv_getnameinfo=no
16851 if test $ac_cv_func_getnameinfo = yes -o $ac_cv_lib_socket_getnameinfo = yes \
16852 -o $ac_cv_lib_inet6_getnameinfo = yes
16853 then
16854 ipv6_cv_getnameinfo=yes
16855 fi
16856 if test $ipv6_cv_getnameinfo = no; then
16857 if test getnameinfo = getaddrinfo; then
16858 for ipv6_cv_pfx in o n; do
16859 cat >conftest.$ac_ext <<_ACEOF
16860 /* confdefs.h. */
16861 _ACEOF
16862 cat confdefs.h >>conftest.$ac_ext
16863 cat >>conftest.$ac_ext <<_ACEOF
16864 /* end confdefs.h. */
16865 #include <netdb.h>
16866
16867 _ACEOF
16868 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16869 $EGREP "${ipv6_cv_pfx}getnameinfo" >/dev/null 2>&1; then
16870 as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}getnameinfo" | $as_tr_sh`
16871 { $as_echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getnameinfo" >&5
16872 $as_echo_n "checking for ${ipv6_cv_pfx}getnameinfo... " >&6; }
16873 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16874 $as_echo_n "(cached) " >&6
16875 else
16876 cat >conftest.$ac_ext <<_ACEOF
16877 /* confdefs.h. */
16878 _ACEOF
16879 cat confdefs.h >>conftest.$ac_ext
16880 cat >>conftest.$ac_ext <<_ACEOF
16881 /* end confdefs.h. */
16882 /* Define ${ipv6_cv_pfx}getnameinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getnameinfo.
16883 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16884 #define ${ipv6_cv_pfx}getnameinfo innocuous_${ipv6_cv_pfx}getnameinfo
16885
16886 /* System header to define __stub macros and hopefully few prototypes,
16887 which can conflict with char ${ipv6_cv_pfx}getnameinfo (); below.
16888 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16889 <limits.h> exists even on freestanding compilers. */
16890
16891 #ifdef __STDC__
16892 # include <limits.h>
16893 #else
16894 # include <assert.h>
16895 #endif
16896
16897 #undef ${ipv6_cv_pfx}getnameinfo
16898
16899 /* Override any GCC internal prototype to avoid an error.
16900 Use char because int might match the return type of a GCC
16901 builtin and then its argument prototype would still apply. */
16902 #ifdef __cplusplus
16903 extern "C"
16904 #endif
16905 char ${ipv6_cv_pfx}getnameinfo ();
16906 /* The GNU C library defines this for functions which it implements
16907 to always fail with ENOSYS. Some functions are actually named
16908 something starting with __ and the normal name is an alias. */
16909 #if defined __stub_${ipv6_cv_pfx}getnameinfo || defined __stub___${ipv6_cv_pfx}getnameinfo
16910 choke me
16911 #endif
16912
16913 int
16914 main ()
16915 {
16916 return ${ipv6_cv_pfx}getnameinfo ();
16917 ;
16918 return 0;
16919 }
16920 _ACEOF
16921 rm -f conftest.$ac_objext conftest$ac_exeext
16922 if { (ac_try="$ac_link"
16923 case "(($ac_try" in
16924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16925 *) ac_try_echo=$ac_try;;
16926 esac
16927 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16928 $as_echo "$ac_try_echo") >&5
16929 (eval "$ac_link") 2>conftest.er1
16930 ac_status=$?
16931 grep -v '^ *+' conftest.er1 >conftest.err
16932 rm -f conftest.er1
16933 cat conftest.err >&5
16934 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16935 (exit $ac_status); } && {
16936 test -z "$ac_c_werror_flag" ||
16937 test ! -s conftest.err
16938 } && test -s conftest$ac_exeext && {
16939 test "$cross_compiling" = yes ||
16940 $as_test_x conftest$ac_exeext
16941 }; then
16942 eval "$as_ac_var=yes"
16943 else
16944 $as_echo "$as_me: failed program was:" >&5
16945 sed 's/^/| /' conftest.$ac_ext >&5
16946
16947 eval "$as_ac_var=no"
16948 fi
16949
16950 rm -rf conftest.dSYM
16951 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16952 conftest$ac_exeext conftest.$ac_ext
16953 fi
16954 ac_res=`eval 'as_val=${'$as_ac_var'}
16955 $as_echo "$as_val"'`
16956 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16957 $as_echo "$ac_res" >&6; }
16958 as_val=`eval 'as_val=${'$as_ac_var'}
16959 $as_echo "$as_val"'`
16960
16961 fi
16962 rm -f conftest*
16963
16964 if eval test X\$ac_cv_func_${ipv6_cv_pfx}getnameinfo = Xyes; then
16965
16966 cat >>confdefs.h <<\_ACEOF
16967 #define HAVE_GETADDRINFO /**/
16968 _ACEOF
16969
16970 ipv6_cv_getnameinfo=yes
16971 break
16972 fi
16973 done
16974 fi
16975 fi
16976 if test $ipv6_cv_getnameinfo = yes; then
16977
16978 cat >>confdefs.h <<\_ACEOF
16979 #define HAVE_GETNAMEINFO /**/
16980 _ACEOF
16981
16982 else
16983 sasl_cv_getnameinfo=yes
16984 fi
16985 if test $sasl_cv_getnameinfo = yes; then
16986 case " $LIBOBJS " in
16987 *" getnameinfo.$ac_objext "* ) ;;
16988 *) LIBOBJS="$LIBOBJS getnameinfo.$ac_objext"
16989 ;;
16990 esac
16991
16992 GETNAMEINFOOBJS="getnameinfo.o"
16993 LTGETNAMEINFOOBJS="getnameinfo.lo"
16994 fi
16995
16996
16997
16998 LTLIBOBJS=`echo "$LIBOBJS" | sed 's,\.[^.]* ,.lo ,g;s,\.[^.]*$,.lo,'`
16999
17000
17001 { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
17002 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
17003 if test "${ac_cv_c_const+set}" = set; then
17004 $as_echo_n "(cached) " >&6
17005 else
17006 cat >conftest.$ac_ext <<_ACEOF
17007 /* confdefs.h. */
17008 _ACEOF
17009 cat confdefs.h >>conftest.$ac_ext
17010 cat >>conftest.$ac_ext <<_ACEOF
17011 /* end confdefs.h. */
17012
17013 int
17014 main ()
17015 {
17016 /* FIXME: Include the comments suggested by Paul. */
17017 #ifndef __cplusplus
17018 /* Ultrix mips cc rejects this. */
17019 typedef int charset[2];
17020 const charset cs;
17021 /* SunOS 4.1.1 cc rejects this. */
17022 char const *const *pcpcc;
17023 char **ppc;
17024 /* NEC SVR4.0.2 mips cc rejects this. */
17025 struct point {int x, y;};
17026 static struct point const zero = {0,0};
17027 /* AIX XL C 1.02.0.0 rejects this.
17028 It does not let you subtract one const X* pointer from another in
17029 an arm of an if-expression whose if-part is not a constant
17030 expression */
17031 const char *g = "string";
17032 pcpcc = &g + (g ? g-g : 0);
17033 /* HPUX 7.0 cc rejects these. */
17034 ++pcpcc;
17035 ppc = (char**) pcpcc;
17036 pcpcc = (char const *const *) ppc;
17037 { /* SCO 3.2v4 cc rejects this. */
17038 char *t;
17039 char const *s = 0 ? (char *) 0 : (char const *) 0;
17040
17041 *t++ = 0;
17042 if (s) return 0;
17043 }
17044 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17045 int x[] = {25, 17};
17046 const int *foo = &x[0];
17047 ++foo;
17048 }
17049 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17050 typedef const int *iptr;
17051 iptr p = 0;
17052 ++p;
17053 }
17054 { /* AIX XL C 1.02.0.0 rejects this saying
17055 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17056 struct s { int j; const int *ap[3]; };
17057 struct s *b; b->j = 5;
17058 }
17059 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17060 const int foo = 10;
17061 if (!foo) return 0;
17062 }
17063 return !cs[0] && !zero.x;
17064 #endif
17065
17066 ;
17067 return 0;
17068 }
17069 _ACEOF
17070 rm -f conftest.$ac_objext
17071 if { (ac_try="$ac_compile"
17072 case "(($ac_try" in
17073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17074 *) ac_try_echo=$ac_try;;
17075 esac
17076 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17077 $as_echo "$ac_try_echo") >&5
17078 (eval "$ac_compile") 2>conftest.er1
17079 ac_status=$?
17080 grep -v '^ *+' conftest.er1 >conftest.err
17081 rm -f conftest.er1
17082 cat conftest.err >&5
17083 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17084 (exit $ac_status); } && {
17085 test -z "$ac_c_werror_flag" ||
17086 test ! -s conftest.err
17087 } && test -s conftest.$ac_objext; then
17088 ac_cv_c_const=yes
17089 else
17090 $as_echo "$as_me: failed program was:" >&5
17091 sed 's/^/| /' conftest.$ac_ext >&5
17092
17093 ac_cv_c_const=no
17094 fi
17095
17096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17097 fi
17098 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
17099 $as_echo "$ac_cv_c_const" >&6; }
17100 if test $ac_cv_c_const = no; then
17101
17102 cat >>confdefs.h <<\_ACEOF
17103 #define const /**/
17104 _ACEOF
17105
17106 fi
17107
17108 { $as_echo "$as_me:$LINENO: checking for inline" >&5
17109 $as_echo_n "checking for inline... " >&6; }
17110 if test "${ac_cv_c_inline+set}" = set; then
17111 $as_echo_n "(cached) " >&6
17112 else
17113 ac_cv_c_inline=no
17114 for ac_kw in inline __inline__ __inline; do
17115 cat >conftest.$ac_ext <<_ACEOF
17116 /* confdefs.h. */
17117 _ACEOF
17118 cat confdefs.h >>conftest.$ac_ext
17119 cat >>conftest.$ac_ext <<_ACEOF
17120 /* end confdefs.h. */
17121 #ifndef __cplusplus
17122 typedef int foo_t;
17123 static $ac_kw foo_t static_foo () {return 0; }
17124 $ac_kw foo_t foo () {return 0; }
17125 #endif
17126
17127 _ACEOF
17128 rm -f conftest.$ac_objext
17129 if { (ac_try="$ac_compile"
17130 case "(($ac_try" in
17131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17132 *) ac_try_echo=$ac_try;;
17133 esac
17134 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17135 $as_echo "$ac_try_echo") >&5
17136 (eval "$ac_compile") 2>conftest.er1
17137 ac_status=$?
17138 grep -v '^ *+' conftest.er1 >conftest.err
17139 rm -f conftest.er1
17140 cat conftest.err >&5
17141 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17142 (exit $ac_status); } && {
17143 test -z "$ac_c_werror_flag" ||
17144 test ! -s conftest.err
17145 } && test -s conftest.$ac_objext; then
17146 ac_cv_c_inline=$ac_kw
17147 else
17148 $as_echo "$as_me: failed program was:" >&5
17149 sed 's/^/| /' conftest.$ac_ext >&5
17150
17151
17152 fi
17153
17154 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17155 test "$ac_cv_c_inline" != no && break
17156 done
17157
17158 fi
17159 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
17160 $as_echo "$ac_cv_c_inline" >&6; }
17161
17162
17163 case $ac_cv_c_inline in
17164 inline | yes) ;;
17165 *)
17166 case $ac_cv_c_inline in
17167 no) ac_val=;;
17168 *) ac_val=$ac_cv_c_inline;;
17169 esac
17170 cat >>confdefs.h <<_ACEOF
17171 #ifndef __cplusplus
17172 #define inline $ac_val
17173 #endif
17174 _ACEOF
17175 ;;
17176 esac
17177
17178 { $as_echo "$as_me:$LINENO: checking for mode_t" >&5
17179 $as_echo_n "checking for mode_t... " >&6; }
17180 if test "${ac_cv_type_mode_t+set}" = set; then
17181 $as_echo_n "(cached) " >&6
17182 else
17183 ac_cv_type_mode_t=no
17184 cat >conftest.$ac_ext <<_ACEOF
17185 /* confdefs.h. */
17186 _ACEOF
17187 cat confdefs.h >>conftest.$ac_ext
17188 cat >>conftest.$ac_ext <<_ACEOF
17189 /* end confdefs.h. */
17190 $ac_includes_default
17191 int
17192 main ()
17193 {
17194 if (sizeof (mode_t))
17195 return 0;
17196 ;
17197 return 0;
17198 }
17199 _ACEOF
17200 rm -f conftest.$ac_objext
17201 if { (ac_try="$ac_compile"
17202 case "(($ac_try" in
17203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17204 *) ac_try_echo=$ac_try;;
17205 esac
17206 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17207 $as_echo "$ac_try_echo") >&5
17208 (eval "$ac_compile") 2>conftest.er1
17209 ac_status=$?
17210 grep -v '^ *+' conftest.er1 >conftest.err
17211 rm -f conftest.er1
17212 cat conftest.err >&5
17213 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17214 (exit $ac_status); } && {
17215 test -z "$ac_c_werror_flag" ||
17216 test ! -s conftest.err
17217 } && test -s conftest.$ac_objext; then
17218 cat >conftest.$ac_ext <<_ACEOF
17219 /* confdefs.h. */
17220 _ACEOF
17221 cat confdefs.h >>conftest.$ac_ext
17222 cat >>conftest.$ac_ext <<_ACEOF
17223 /* end confdefs.h. */
17224 $ac_includes_default
17225 int
17226 main ()
17227 {
17228 if (sizeof ((mode_t)))
17229 return 0;
17230 ;
17231 return 0;
17232 }
17233 _ACEOF
17234 rm -f conftest.$ac_objext
17235 if { (ac_try="$ac_compile"
17236 case "(($ac_try" in
17237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17238 *) ac_try_echo=$ac_try;;
17239 esac
17240 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17241 $as_echo "$ac_try_echo") >&5
17242 (eval "$ac_compile") 2>conftest.er1
17243 ac_status=$?
17244 grep -v '^ *+' conftest.er1 >conftest.err
17245 rm -f conftest.er1
17246 cat conftest.err >&5
17247 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17248 (exit $ac_status); } && {
17249 test -z "$ac_c_werror_flag" ||
17250 test ! -s conftest.err
17251 } && test -s conftest.$ac_objext; then
17252 :
17253 else
17254 $as_echo "$as_me: failed program was:" >&5
17255 sed 's/^/| /' conftest.$ac_ext >&5
17256
17257 ac_cv_type_mode_t=yes
17258 fi
17259
17260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17261 else
17262 $as_echo "$as_me: failed program was:" >&5
17263 sed 's/^/| /' conftest.$ac_ext >&5
17264
17265
17266 fi
17267
17268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17269 fi
17270 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
17271 $as_echo "$ac_cv_type_mode_t" >&6; }
17272 if test "x$ac_cv_type_mode_t" = x""yes; then
17273 :
17274 else
17275
17276 cat >>confdefs.h <<_ACEOF
17277 #define mode_t int
17278 _ACEOF
17279
17280 fi
17281
17282 { $as_echo "$as_me:$LINENO: checking for pid_t" >&5
17283 $as_echo_n "checking for pid_t... " >&6; }
17284 if test "${ac_cv_type_pid_t+set}" = set; then
17285 $as_echo_n "(cached) " >&6
17286 else
17287 ac_cv_type_pid_t=no
17288 cat >conftest.$ac_ext <<_ACEOF
17289 /* confdefs.h. */
17290 _ACEOF
17291 cat confdefs.h >>conftest.$ac_ext
17292 cat >>conftest.$ac_ext <<_ACEOF
17293 /* end confdefs.h. */
17294 $ac_includes_default
17295 int
17296 main ()
17297 {
17298 if (sizeof (pid_t))
17299 return 0;
17300 ;
17301 return 0;
17302 }
17303 _ACEOF
17304 rm -f conftest.$ac_objext
17305 if { (ac_try="$ac_compile"
17306 case "(($ac_try" in
17307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17308 *) ac_try_echo=$ac_try;;
17309 esac
17310 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17311 $as_echo "$ac_try_echo") >&5
17312 (eval "$ac_compile") 2>conftest.er1
17313 ac_status=$?
17314 grep -v '^ *+' conftest.er1 >conftest.err
17315 rm -f conftest.er1
17316 cat conftest.err >&5
17317 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17318 (exit $ac_status); } && {
17319 test -z "$ac_c_werror_flag" ||
17320 test ! -s conftest.err
17321 } && test -s conftest.$ac_objext; then
17322 cat >conftest.$ac_ext <<_ACEOF
17323 /* confdefs.h. */
17324 _ACEOF
17325 cat confdefs.h >>conftest.$ac_ext
17326 cat >>conftest.$ac_ext <<_ACEOF
17327 /* end confdefs.h. */
17328 $ac_includes_default
17329 int
17330 main ()
17331 {
17332 if (sizeof ((pid_t)))
17333 return 0;
17334 ;
17335 return 0;
17336 }
17337 _ACEOF
17338 rm -f conftest.$ac_objext
17339 if { (ac_try="$ac_compile"
17340 case "(($ac_try" in
17341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17342 *) ac_try_echo=$ac_try;;
17343 esac
17344 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17345 $as_echo "$ac_try_echo") >&5
17346 (eval "$ac_compile") 2>conftest.er1
17347 ac_status=$?
17348 grep -v '^ *+' conftest.er1 >conftest.err
17349 rm -f conftest.er1
17350 cat conftest.err >&5
17351 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17352 (exit $ac_status); } && {
17353 test -z "$ac_c_werror_flag" ||
17354 test ! -s conftest.err
17355 } && test -s conftest.$ac_objext; then
17356 :
17357 else
17358 $as_echo "$as_me: failed program was:" >&5
17359 sed 's/^/| /' conftest.$ac_ext >&5
17360
17361 ac_cv_type_pid_t=yes
17362 fi
17363
17364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17365 else
17366 $as_echo "$as_me: failed program was:" >&5
17367 sed 's/^/| /' conftest.$ac_ext >&5
17368
17369
17370 fi
17371
17372 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17373 fi
17374 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
17375 $as_echo "$ac_cv_type_pid_t" >&6; }
17376 if test "x$ac_cv_type_pid_t" = x""yes; then
17377 :
17378 else
17379
17380 cat >>confdefs.h <<_ACEOF
17381 #define pid_t int
17382 _ACEOF
17383
17384 fi
17385
17386 { $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
17387 $as_echo_n "checking return type of signal handlers... " >&6; }
17388 if test "${ac_cv_type_signal+set}" = set; then
17389 $as_echo_n "(cached) " >&6
17390 else
17391 cat >conftest.$ac_ext <<_ACEOF
17392 /* confdefs.h. */
17393 _ACEOF
17394 cat confdefs.h >>conftest.$ac_ext
17395 cat >>conftest.$ac_ext <<_ACEOF
17396 /* end confdefs.h. */
17397 #include <sys/types.h>
17398 #include <signal.h>
17399
17400 int
17401 main ()
17402 {
17403 return *(signal (0, 0)) (0) == 1;
17404 ;
17405 return 0;
17406 }
17407 _ACEOF
17408 rm -f conftest.$ac_objext
17409 if { (ac_try="$ac_compile"
17410 case "(($ac_try" in
17411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17412 *) ac_try_echo=$ac_try;;
17413 esac
17414 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17415 $as_echo "$ac_try_echo") >&5
17416 (eval "$ac_compile") 2>conftest.er1
17417 ac_status=$?
17418 grep -v '^ *+' conftest.er1 >conftest.err
17419 rm -f conftest.er1
17420 cat conftest.err >&5
17421 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17422 (exit $ac_status); } && {
17423 test -z "$ac_c_werror_flag" ||
17424 test ! -s conftest.err
17425 } && test -s conftest.$ac_objext; then
17426 ac_cv_type_signal=int
17427 else
17428 $as_echo "$as_me: failed program was:" >&5
17429 sed 's/^/| /' conftest.$ac_ext >&5
17430
17431 ac_cv_type_signal=void
17432 fi
17433
17434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17435 fi
17436 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
17437 $as_echo "$ac_cv_type_signal" >&6; }
17438
17439 cat >>confdefs.h <<_ACEOF
17440 #define RETSIGTYPE $ac_cv_type_signal
17441 _ACEOF
17442
17443
17444
17445 { $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
17446 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
17447 if test "${ac_cv_header_time+set}" = set; then
17448 $as_echo_n "(cached) " >&6
17449 else
17450 cat >conftest.$ac_ext <<_ACEOF
17451 /* confdefs.h. */
17452 _ACEOF
17453 cat confdefs.h >>conftest.$ac_ext
17454 cat >>conftest.$ac_ext <<_ACEOF
17455 /* end confdefs.h. */
17456 #include <sys/types.h>
17457 #include <sys/time.h>
17458 #include <time.h>
17459
17460 int
17461 main ()
17462 {
17463 if ((struct tm *) 0)
17464 return 0;
17465 ;
17466 return 0;
17467 }
17468 _ACEOF
17469 rm -f conftest.$ac_objext
17470 if { (ac_try="$ac_compile"
17471 case "(($ac_try" in
17472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17473 *) ac_try_echo=$ac_try;;
17474 esac
17475 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17476 $as_echo "$ac_try_echo") >&5
17477 (eval "$ac_compile") 2>conftest.er1
17478 ac_status=$?
17479 grep -v '^ *+' conftest.er1 >conftest.err
17480 rm -f conftest.er1
17481 cat conftest.err >&5
17482 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17483 (exit $ac_status); } && {
17484 test -z "$ac_c_werror_flag" ||
17485 test ! -s conftest.err
17486 } && test -s conftest.$ac_objext; then
17487 ac_cv_header_time=yes
17488 else
17489 $as_echo "$as_me: failed program was:" >&5
17490 sed 's/^/| /' conftest.$ac_ext >&5
17491
17492 ac_cv_header_time=no
17493 fi
17494
17495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17496 fi
17497 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
17498 $as_echo "$ac_cv_header_time" >&6; }
17499 if test $ac_cv_header_time = yes; then
17500
17501 cat >>confdefs.h <<\_ACEOF
17502 #define TIME_WITH_SYS_TIME 1
17503 _ACEOF
17504
17505 fi
17506
17507 { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
17508 $as_echo_n "checking for ANSI C header files... " >&6; }
17509 if test "${ac_cv_header_stdc+set}" = set; then
17510 $as_echo_n "(cached) " >&6
17511 else
17512 cat >conftest.$ac_ext <<_ACEOF
17513 /* confdefs.h. */
17514 _ACEOF
17515 cat confdefs.h >>conftest.$ac_ext
17516 cat >>conftest.$ac_ext <<_ACEOF
17517 /* end confdefs.h. */
17518 #include <stdlib.h>
17519 #include <stdarg.h>
17520 #include <string.h>
17521 #include <float.h>
17522
17523 int
17524 main ()
17525 {
17526
17527 ;
17528 return 0;
17529 }
17530 _ACEOF
17531 rm -f conftest.$ac_objext
17532 if { (ac_try="$ac_compile"
17533 case "(($ac_try" in
17534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17535 *) ac_try_echo=$ac_try;;
17536 esac
17537 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17538 $as_echo "$ac_try_echo") >&5
17539 (eval "$ac_compile") 2>conftest.er1
17540 ac_status=$?
17541 grep -v '^ *+' conftest.er1 >conftest.err
17542 rm -f conftest.er1
17543 cat conftest.err >&5
17544 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17545 (exit $ac_status); } && {
17546 test -z "$ac_c_werror_flag" ||
17547 test ! -s conftest.err
17548 } && test -s conftest.$ac_objext; then
17549 ac_cv_header_stdc=yes
17550 else
17551 $as_echo "$as_me: failed program was:" >&5
17552 sed 's/^/| /' conftest.$ac_ext >&5
17553
17554 ac_cv_header_stdc=no
17555 fi
17556
17557 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17558
17559 if test $ac_cv_header_stdc = yes; then
17560 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17561 cat >conftest.$ac_ext <<_ACEOF
17562 /* confdefs.h. */
17563 _ACEOF
17564 cat confdefs.h >>conftest.$ac_ext
17565 cat >>conftest.$ac_ext <<_ACEOF
17566 /* end confdefs.h. */
17567 #include <string.h>
17568
17569 _ACEOF
17570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17571 $EGREP "memchr" >/dev/null 2>&1; then
17572 :
17573 else
17574 ac_cv_header_stdc=no
17575 fi
17576 rm -f conftest*
17577
17578 fi
17579
17580 if test $ac_cv_header_stdc = yes; then
17581 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17582 cat >conftest.$ac_ext <<_ACEOF
17583 /* confdefs.h. */
17584 _ACEOF
17585 cat confdefs.h >>conftest.$ac_ext
17586 cat >>conftest.$ac_ext <<_ACEOF
17587 /* end confdefs.h. */
17588 #include <stdlib.h>
17589
17590 _ACEOF
17591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17592 $EGREP "free" >/dev/null 2>&1; then
17593 :
17594 else
17595 ac_cv_header_stdc=no
17596 fi
17597 rm -f conftest*
17598
17599 fi
17600
17601 if test $ac_cv_header_stdc = yes; then
17602 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17603 if test "$cross_compiling" = yes; then
17604 :
17605 else
17606 cat >conftest.$ac_ext <<_ACEOF
17607 /* confdefs.h. */
17608 _ACEOF
17609 cat confdefs.h >>conftest.$ac_ext
17610 cat >>conftest.$ac_ext <<_ACEOF
17611 /* end confdefs.h. */
17612 #include <ctype.h>
17613 #include <stdlib.h>
17614 #if ((' ' & 0x0FF) == 0x020)
17615 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17616 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17617 #else
17618 # define ISLOWER(c) \
17619 (('a' <= (c) && (c) <= 'i') \
17620 || ('j' <= (c) && (c) <= 'r') \
17621 || ('s' <= (c) && (c) <= 'z'))
17622 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17623 #endif
17624
17625 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17626 int
17627 main ()
17628 {
17629 int i;
17630 for (i = 0; i < 256; i++)
17631 if (XOR (islower (i), ISLOWER (i))
17632 || toupper (i) != TOUPPER (i))
17633 return 2;
17634 return 0;
17635 }
17636 _ACEOF
17637 rm -f conftest$ac_exeext
17638 if { (ac_try="$ac_link"
17639 case "(($ac_try" in
17640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17641 *) ac_try_echo=$ac_try;;
17642 esac
17643 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17644 $as_echo "$ac_try_echo") >&5
17645 (eval "$ac_link") 2>&5
17646 ac_status=$?
17647 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17648 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17649 { (case "(($ac_try" in
17650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17651 *) ac_try_echo=$ac_try;;
17652 esac
17653 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17654 $as_echo "$ac_try_echo") >&5
17655 (eval "$ac_try") 2>&5
17656 ac_status=$?
17657 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17658 (exit $ac_status); }; }; then
17659 :
17660 else
17661 $as_echo "$as_me: program exited with status $ac_status" >&5
17662 $as_echo "$as_me: failed program was:" >&5
17663 sed 's/^/| /' conftest.$ac_ext >&5
17664
17665 ( exit $ac_status )
17666 ac_cv_header_stdc=no
17667 fi
17668 rm -rf conftest.dSYM
17669 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17670 fi
17671
17672
17673 fi
17674 fi
17675 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
17676 $as_echo "$ac_cv_header_stdc" >&6; }
17677 if test $ac_cv_header_stdc = yes; then
17678
17679 cat >>confdefs.h <<\_ACEOF
17680 #define STDC_HEADERS 1
17681 _ACEOF
17682
17683 fi
17684
17685
17686
17687
17688
17689
17690 ac_header_dirent=no
17691 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17692 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17693 { $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
17694 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
17695 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17696 $as_echo_n "(cached) " >&6
17697 else
17698 cat >conftest.$ac_ext <<_ACEOF
17699 /* confdefs.h. */
17700 _ACEOF
17701 cat confdefs.h >>conftest.$ac_ext
17702 cat >>conftest.$ac_ext <<_ACEOF
17703 /* end confdefs.h. */
17704 #include <sys/types.h>
17705 #include <$ac_hdr>
17706
17707 int
17708 main ()
17709 {
17710 if ((DIR *) 0)
17711 return 0;
17712 ;
17713 return 0;
17714 }
17715 _ACEOF
17716 rm -f conftest.$ac_objext
17717 if { (ac_try="$ac_compile"
17718 case "(($ac_try" in
17719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17720 *) ac_try_echo=$ac_try;;
17721 esac
17722 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17723 $as_echo "$ac_try_echo") >&5
17724 (eval "$ac_compile") 2>conftest.er1
17725 ac_status=$?
17726 grep -v '^ *+' conftest.er1 >conftest.err
17727 rm -f conftest.er1
17728 cat conftest.err >&5
17729 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17730 (exit $ac_status); } && {
17731 test -z "$ac_c_werror_flag" ||
17732 test ! -s conftest.err
17733 } && test -s conftest.$ac_objext; then
17734 eval "$as_ac_Header=yes"
17735 else
17736 $as_echo "$as_me: failed program was:" >&5
17737 sed 's/^/| /' conftest.$ac_ext >&5
17738
17739 eval "$as_ac_Header=no"
17740 fi
17741
17742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17743 fi
17744 ac_res=`eval 'as_val=${'$as_ac_Header'}
17745 $as_echo "$as_val"'`
17746 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
17747 $as_echo "$ac_res" >&6; }
17748 as_val=`eval 'as_val=${'$as_ac_Header'}
17749 $as_echo "$as_val"'`
17750 if test "x$as_val" = x""yes; then
17751 cat >>confdefs.h <<_ACEOF
17752 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17753 _ACEOF
17754
17755 ac_header_dirent=$ac_hdr; break
17756 fi
17757
17758 done
17759 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17760 if test $ac_header_dirent = dirent.h; then
17761 { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
17762 $as_echo_n "checking for library containing opendir... " >&6; }
17763 if test "${ac_cv_search_opendir+set}" = set; then
17764 $as_echo_n "(cached) " >&6
17765 else
17766 ac_func_search_save_LIBS=$LIBS
17767 cat >conftest.$ac_ext <<_ACEOF
17768 /* confdefs.h. */
17769 _ACEOF
17770 cat confdefs.h >>conftest.$ac_ext
17771 cat >>conftest.$ac_ext <<_ACEOF
17772 /* end confdefs.h. */
17773
17774 /* Override any GCC internal prototype to avoid an error.
17775 Use char because int might match the return type of a GCC
17776 builtin and then its argument prototype would still apply. */
17777 #ifdef __cplusplus
17778 extern "C"
17779 #endif
17780 char opendir ();
17781 int
17782 main ()
17783 {
17784 return opendir ();
17785 ;
17786 return 0;
17787 }
17788 _ACEOF
17789 for ac_lib in '' dir; do
17790 if test -z "$ac_lib"; then
17791 ac_res="none required"
17792 else
17793 ac_res=-l$ac_lib
17794 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17795 fi
17796 rm -f conftest.$ac_objext conftest$ac_exeext
17797 if { (ac_try="$ac_link"
17798 case "(($ac_try" in
17799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17800 *) ac_try_echo=$ac_try;;
17801 esac
17802 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17803 $as_echo "$ac_try_echo") >&5
17804 (eval "$ac_link") 2>conftest.er1
17805 ac_status=$?
17806 grep -v '^ *+' conftest.er1 >conftest.err
17807 rm -f conftest.er1
17808 cat conftest.err >&5
17809 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17810 (exit $ac_status); } && {
17811 test -z "$ac_c_werror_flag" ||
17812 test ! -s conftest.err
17813 } && test -s conftest$ac_exeext && {
17814 test "$cross_compiling" = yes ||
17815 $as_test_x conftest$ac_exeext
17816 }; then
17817 ac_cv_search_opendir=$ac_res
17818 else
17819 $as_echo "$as_me: failed program was:" >&5
17820 sed 's/^/| /' conftest.$ac_ext >&5
17821
17822
17823 fi
17824
17825 rm -rf conftest.dSYM
17826 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17827 conftest$ac_exeext
17828 if test "${ac_cv_search_opendir+set}" = set; then
17829 break
17830 fi
17831 done
17832 if test "${ac_cv_search_opendir+set}" = set; then
17833 :
17834 else
17835 ac_cv_search_opendir=no
17836 fi
17837 rm conftest.$ac_ext
17838 LIBS=$ac_func_search_save_LIBS
17839 fi
17840 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
17841 $as_echo "$ac_cv_search_opendir" >&6; }
17842 ac_res=$ac_cv_search_opendir
17843 if test "$ac_res" != no; then
17844 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17845
17846 fi
17847
17848 else
17849 { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
17850 $as_echo_n "checking for library containing opendir... " >&6; }
17851 if test "${ac_cv_search_opendir+set}" = set; then
17852 $as_echo_n "(cached) " >&6
17853 else
17854 ac_func_search_save_LIBS=$LIBS
17855 cat >conftest.$ac_ext <<_ACEOF
17856 /* confdefs.h. */
17857 _ACEOF
17858 cat confdefs.h >>conftest.$ac_ext
17859 cat >>conftest.$ac_ext <<_ACEOF
17860 /* end confdefs.h. */
17861
17862 /* Override any GCC internal prototype to avoid an error.
17863 Use char because int might match the return type of a GCC
17864 builtin and then its argument prototype would still apply. */
17865 #ifdef __cplusplus
17866 extern "C"
17867 #endif
17868 char opendir ();
17869 int
17870 main ()
17871 {
17872 return opendir ();
17873 ;
17874 return 0;
17875 }
17876 _ACEOF
17877 for ac_lib in '' x; do
17878 if test -z "$ac_lib"; then
17879 ac_res="none required"
17880 else
17881 ac_res=-l$ac_lib
17882 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17883 fi
17884 rm -f conftest.$ac_objext conftest$ac_exeext
17885 if { (ac_try="$ac_link"
17886 case "(($ac_try" in
17887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17888 *) ac_try_echo=$ac_try;;
17889 esac
17890 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17891 $as_echo "$ac_try_echo") >&5
17892 (eval "$ac_link") 2>conftest.er1
17893 ac_status=$?
17894 grep -v '^ *+' conftest.er1 >conftest.err
17895 rm -f conftest.er1
17896 cat conftest.err >&5
17897 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17898 (exit $ac_status); } && {
17899 test -z "$ac_c_werror_flag" ||
17900 test ! -s conftest.err
17901 } && test -s conftest$ac_exeext && {
17902 test "$cross_compiling" = yes ||
17903 $as_test_x conftest$ac_exeext
17904 }; then
17905 ac_cv_search_opendir=$ac_res
17906 else
17907 $as_echo "$as_me: failed program was:" >&5
17908 sed 's/^/| /' conftest.$ac_ext >&5
17909
17910
17911 fi
17912
17913 rm -rf conftest.dSYM
17914 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17915 conftest$ac_exeext
17916 if test "${ac_cv_search_opendir+set}" = set; then
17917 break
17918 fi
17919 done
17920 if test "${ac_cv_search_opendir+set}" = set; then
17921 :
17922 else
17923 ac_cv_search_opendir=no
17924 fi
17925 rm conftest.$ac_ext
17926 LIBS=$ac_func_search_save_LIBS
17927 fi
17928 { $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
17929 $as_echo "$ac_cv_search_opendir" >&6; }
17930 ac_res=$ac_cv_search_opendir
17931 if test "$ac_res" != no; then
17932 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17933
17934 fi
17935
17936 fi
17937
17938 { $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
17939 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
17940 if test "${ac_cv_header_sys_wait_h+set}" = set; then
17941 $as_echo_n "(cached) " >&6
17942 else
17943 cat >conftest.$ac_ext <<_ACEOF
17944 /* confdefs.h. */
17945 _ACEOF
17946 cat confdefs.h >>conftest.$ac_ext
17947 cat >>conftest.$ac_ext <<_ACEOF
17948 /* end confdefs.h. */
17949 #include <sys/types.h>
17950 #include <sys/wait.h>
17951 #ifndef WEXITSTATUS
17952 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
17953 #endif
17954 #ifndef WIFEXITED
17955 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
17956 #endif
17957
17958 int
17959 main ()
17960 {
17961 int s;
17962 wait (&s);
17963 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
17964 ;
17965 return 0;
17966 }
17967 _ACEOF
17968 rm -f conftest.$ac_objext
17969 if { (ac_try="$ac_compile"
17970 case "(($ac_try" in
17971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17972 *) ac_try_echo=$ac_try;;
17973 esac
17974 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17975 $as_echo "$ac_try_echo") >&5
17976 (eval "$ac_compile") 2>conftest.er1
17977 ac_status=$?
17978 grep -v '^ *+' conftest.er1 >conftest.err
17979 rm -f conftest.er1
17980 cat conftest.err >&5
17981 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17982 (exit $ac_status); } && {
17983 test -z "$ac_c_werror_flag" ||
17984 test ! -s conftest.err
17985 } && test -s conftest.$ac_objext; then
17986 ac_cv_header_sys_wait_h=yes
17987 else
17988 $as_echo "$as_me: failed program was:" >&5
17989 sed 's/^/| /' conftest.$ac_ext >&5
17990
17991 ac_cv_header_sys_wait_h=no
17992 fi
17993
17994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17995 fi
17996 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
17997 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
17998 if test $ac_cv_header_sys_wait_h = yes; then
17999
18000 cat >>confdefs.h <<\_ACEOF
18001 #define HAVE_SYS_WAIT_H 1
18002 _ACEOF
18003
18004 fi
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023 for ac_header in des.h 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
18024 do
18025 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18026 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18027 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
18028 $as_echo_n "checking for $ac_header... " >&6; }
18029 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18030 $as_echo_n "(cached) " >&6
18031 fi
18032 ac_res=`eval 'as_val=${'$as_ac_Header'}
18033 $as_echo "$as_val"'`
18034 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18035 $as_echo "$ac_res" >&6; }
18036 else
18037 # Is the header compilable?
18038 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
18039 $as_echo_n "checking $ac_header usability... " >&6; }
18040 cat >conftest.$ac_ext <<_ACEOF
18041 /* confdefs.h. */
18042 _ACEOF
18043 cat confdefs.h >>conftest.$ac_ext
18044 cat >>conftest.$ac_ext <<_ACEOF
18045 /* end confdefs.h. */
18046 $ac_includes_default
18047 #include <$ac_header>
18048 _ACEOF
18049 rm -f conftest.$ac_objext
18050 if { (ac_try="$ac_compile"
18051 case "(($ac_try" in
18052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18053 *) ac_try_echo=$ac_try;;
18054 esac
18055 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18056 $as_echo "$ac_try_echo") >&5
18057 (eval "$ac_compile") 2>conftest.er1
18058 ac_status=$?
18059 grep -v '^ *+' conftest.er1 >conftest.err
18060 rm -f conftest.er1
18061 cat conftest.err >&5
18062 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18063 (exit $ac_status); } && {
18064 test -z "$ac_c_werror_flag" ||
18065 test ! -s conftest.err
18066 } && test -s conftest.$ac_objext; then
18067 ac_header_compiler=yes
18068 else
18069 $as_echo "$as_me: failed program was:" >&5
18070 sed 's/^/| /' conftest.$ac_ext >&5
18071
18072 ac_header_compiler=no
18073 fi
18074
18075 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18076 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18077 $as_echo "$ac_header_compiler" >&6; }
18078
18079 # Is the header present?
18080 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
18081 $as_echo_n "checking $ac_header presence... " >&6; }
18082 cat >conftest.$ac_ext <<_ACEOF
18083 /* confdefs.h. */
18084 _ACEOF
18085 cat confdefs.h >>conftest.$ac_ext
18086 cat >>conftest.$ac_ext <<_ACEOF
18087 /* end confdefs.h. */
18088 #include <$ac_header>
18089 _ACEOF
18090 if { (ac_try="$ac_cpp conftest.$ac_ext"
18091 case "(($ac_try" in
18092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18093 *) ac_try_echo=$ac_try;;
18094 esac
18095 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18096 $as_echo "$ac_try_echo") >&5
18097 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18098 ac_status=$?
18099 grep -v '^ *+' conftest.er1 >conftest.err
18100 rm -f conftest.er1
18101 cat conftest.err >&5
18102 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18103 (exit $ac_status); } >/dev/null && {
18104 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18105 test ! -s conftest.err
18106 }; then
18107 ac_header_preproc=yes
18108 else
18109 $as_echo "$as_me: failed program was:" >&5
18110 sed 's/^/| /' conftest.$ac_ext >&5
18111
18112 ac_header_preproc=no
18113 fi
18114
18115 rm -f conftest.err conftest.$ac_ext
18116 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18117 $as_echo "$ac_header_preproc" >&6; }
18118
18119 # So? What about this header?
18120 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18121 yes:no: )
18122 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18123 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18124 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18125 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18126 ac_header_preproc=yes
18127 ;;
18128 no:yes:* )
18129 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18130 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18131 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18132 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18133 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18134 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18135 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18136 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
18137 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18138 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18139 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18140 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18141
18142 ;;
18143 esac
18144 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
18145 $as_echo_n "checking for $ac_header... " >&6; }
18146 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18147 $as_echo_n "(cached) " >&6
18148 else
18149 eval "$as_ac_Header=\$ac_header_preproc"
18150 fi
18151 ac_res=`eval 'as_val=${'$as_ac_Header'}
18152 $as_echo "$as_val"'`
18153 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18154 $as_echo "$ac_res" >&6; }
18155
18156 fi
18157 as_val=`eval 'as_val=${'$as_ac_Header'}
18158 $as_echo "$as_val"'`
18159 if test "x$as_val" = x""yes; then
18160 cat >>confdefs.h <<_ACEOF
18161 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18162 _ACEOF
18163
18164 fi
18165
18166 done
18167
18168
18169
18170 { $as_echo "$as_me:$LINENO: checking whether you have ss_family in struct sockaddr_storage" >&5
18171 $as_echo_n "checking whether you have ss_family in struct sockaddr_storage... " >&6; }
18172 if test "${ipv6_cv_ss_family+set}" = set; then
18173 $as_echo_n "(cached) " >&6
18174 else
18175 cat >conftest.$ac_ext <<_ACEOF
18176 /* confdefs.h. */
18177 _ACEOF
18178 cat confdefs.h >>conftest.$ac_ext
18179 cat >>conftest.$ac_ext <<_ACEOF
18180 /* end confdefs.h. */
18181 #include <sys/types.h>
18182 #include <sys/socket.h>
18183 int
18184 main ()
18185 {
18186 struct sockaddr_storage ss; int i = ss.ss_family;
18187 ;
18188 return 0;
18189 }
18190 _ACEOF
18191 rm -f conftest.$ac_objext
18192 if { (ac_try="$ac_compile"
18193 case "(($ac_try" in
18194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18195 *) ac_try_echo=$ac_try;;
18196 esac
18197 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18198 $as_echo "$ac_try_echo") >&5
18199 (eval "$ac_compile") 2>conftest.er1
18200 ac_status=$?
18201 grep -v '^ *+' conftest.er1 >conftest.err
18202 rm -f conftest.er1
18203 cat conftest.err >&5
18204 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18205 (exit $ac_status); } && {
18206 test -z "$ac_c_werror_flag" ||
18207 test ! -s conftest.err
18208 } && test -s conftest.$ac_objext; then
18209 ipv6_cv_ss_family=yes
18210 else
18211 $as_echo "$as_me: failed program was:" >&5
18212 sed 's/^/| /' conftest.$ac_ext >&5
18213
18214 ipv6_cv_ss_family=no
18215 fi
18216
18217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18218 fi
18219 if test $ipv6_cv_ss_family = yes; then
18220
18221 cat >>confdefs.h <<\_ACEOF
18222 #define HAVE_SS_FAMILY /**/
18223 _ACEOF
18224
18225 else
18226 :
18227 fi
18228 { $as_echo "$as_me:$LINENO: result: $ipv6_cv_ss_family" >&5
18229 $as_echo "$ipv6_cv_ss_family" >&6; }
18230
18231 { $as_echo "$as_me:$LINENO: checking whether you have sa_len in struct sockaddr" >&5
18232 $as_echo_n "checking whether you have sa_len in struct sockaddr... " >&6; }
18233 if test "${ipv6_cv_sa_len+set}" = set; then
18234 $as_echo_n "(cached) " >&6
18235 else
18236 cat >conftest.$ac_ext <<_ACEOF
18237 /* confdefs.h. */
18238 _ACEOF
18239 cat confdefs.h >>conftest.$ac_ext
18240 cat >>conftest.$ac_ext <<_ACEOF
18241 /* end confdefs.h. */
18242 #include <sys/types.h>
18243 #include <sys/socket.h>
18244 int
18245 main ()
18246 {
18247 struct sockaddr sa; int i = sa.sa_len;
18248 ;
18249 return 0;
18250 }
18251 _ACEOF
18252 rm -f conftest.$ac_objext
18253 if { (ac_try="$ac_compile"
18254 case "(($ac_try" in
18255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18256 *) ac_try_echo=$ac_try;;
18257 esac
18258 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18259 $as_echo "$ac_try_echo") >&5
18260 (eval "$ac_compile") 2>conftest.er1
18261 ac_status=$?
18262 grep -v '^ *+' conftest.er1 >conftest.err
18263 rm -f conftest.er1
18264 cat conftest.err >&5
18265 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18266 (exit $ac_status); } && {
18267 test -z "$ac_c_werror_flag" ||
18268 test ! -s conftest.err
18269 } && test -s conftest.$ac_objext; then
18270 ipv6_cv_sa_len=yes
18271 else
18272 $as_echo "$as_me: failed program was:" >&5
18273 sed 's/^/| /' conftest.$ac_ext >&5
18274
18275 ipv6_cv_sa_len=no
18276 fi
18277
18278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18279 fi
18280 if test $ipv6_cv_sa_len = yes; then
18281
18282 cat >>confdefs.h <<\_ACEOF
18283 #define HAVE_SOCKADDR_SA_LEN /**/
18284 _ACEOF
18285
18286 else
18287 :
18288 fi
18289 { $as_echo "$as_me:$LINENO: result: $ipv6_cv_sa_len" >&5
18290 $as_echo "$ipv6_cv_sa_len" >&6; }
18291
18292 { $as_echo "$as_me:$LINENO: checking for socklen_t" >&5
18293 $as_echo_n "checking for socklen_t... " >&6; }
18294 if test "${ipv6_cv_socklen_t+set}" = set; then
18295 $as_echo_n "(cached) " >&6
18296 else
18297 cat >conftest.$ac_ext <<_ACEOF
18298 /* confdefs.h. */
18299 _ACEOF
18300 cat confdefs.h >>conftest.$ac_ext
18301 cat >>conftest.$ac_ext <<_ACEOF
18302 /* end confdefs.h. */
18303 #include <sys/types.h>
18304 #include <sys/socket.h>
18305 int
18306 main ()
18307 {
18308 socklen_t len = 0;
18309 ;
18310 return 0;
18311 }
18312 _ACEOF
18313 rm -f conftest.$ac_objext conftest$ac_exeext
18314 if { (ac_try="$ac_link"
18315 case "(($ac_try" in
18316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18317 *) ac_try_echo=$ac_try;;
18318 esac
18319 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18320 $as_echo "$ac_try_echo") >&5
18321 (eval "$ac_link") 2>conftest.er1
18322 ac_status=$?
18323 grep -v '^ *+' conftest.er1 >conftest.err
18324 rm -f conftest.er1
18325 cat conftest.err >&5
18326 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18327 (exit $ac_status); } && {
18328 test -z "$ac_c_werror_flag" ||
18329 test ! -s conftest.err
18330 } && test -s conftest$ac_exeext && {
18331 test "$cross_compiling" = yes ||
18332 $as_test_x conftest$ac_exeext
18333 }; then
18334 ipv6_cv_socklen_t=yes
18335 else
18336 $as_echo "$as_me: failed program was:" >&5
18337 sed 's/^/| /' conftest.$ac_ext >&5
18338
18339 ipv6_cv_socklen_t=no
18340 fi
18341
18342 rm -rf conftest.dSYM
18343 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18344 conftest$ac_exeext conftest.$ac_ext
18345 fi
18346 if test $ipv6_cv_socklen_t = yes; then
18347
18348 cat >>confdefs.h <<\_ACEOF
18349 #define HAVE_SOCKLEN_T /**/
18350 _ACEOF
18351
18352 else
18353 :
18354 fi
18355 { $as_echo "$as_me:$LINENO: result: $ipv6_cv_socklen_t" >&5
18356 $as_echo "$ipv6_cv_socklen_t" >&6; }
18357
18358 #AC_FUNC_MEMCMP
18359 #AC_FUNC_VPRINTF
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378 for ac_func in gethostname getdomainname getpwnam getspnam gettimeofday inet_aton memcpy mkdir select socket strchr strdup strerror strspn strstr strtol jrand48 getpassphrase
18379 do
18380 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18381 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18382 $as_echo_n "checking for $ac_func... " >&6; }
18383 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18384 $as_echo_n "(cached) " >&6
18385 else
18386 cat >conftest.$ac_ext <<_ACEOF
18387 /* confdefs.h. */
18388 _ACEOF
18389 cat confdefs.h >>conftest.$ac_ext
18390 cat >>conftest.$ac_ext <<_ACEOF
18391 /* end confdefs.h. */
18392 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18393 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18394 #define $ac_func innocuous_$ac_func
18395
18396 /* System header to define __stub macros and hopefully few prototypes,
18397 which can conflict with char $ac_func (); below.
18398 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18399 <limits.h> exists even on freestanding compilers. */
18400
18401 #ifdef __STDC__
18402 # include <limits.h>
18403 #else
18404 # include <assert.h>
18405 #endif
18406
18407 #undef $ac_func
18408
18409 /* Override any GCC internal prototype to avoid an error.
18410 Use char because int might match the return type of a GCC
18411 builtin and then its argument prototype would still apply. */
18412 #ifdef __cplusplus
18413 extern "C"
18414 #endif
18415 char $ac_func ();
18416 /* The GNU C library defines this for functions which it implements
18417 to always fail with ENOSYS. Some functions are actually named
18418 something starting with __ and the normal name is an alias. */
18419 #if defined __stub_$ac_func || defined __stub___$ac_func
18420 choke me
18421 #endif
18422
18423 int
18424 main ()
18425 {
18426 return $ac_func ();
18427 ;
18428 return 0;
18429 }
18430 _ACEOF
18431 rm -f conftest.$ac_objext conftest$ac_exeext
18432 if { (ac_try="$ac_link"
18433 case "(($ac_try" in
18434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18435 *) ac_try_echo=$ac_try;;
18436 esac
18437 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18438 $as_echo "$ac_try_echo") >&5
18439 (eval "$ac_link") 2>conftest.er1
18440 ac_status=$?
18441 grep -v '^ *+' conftest.er1 >conftest.err
18442 rm -f conftest.er1
18443 cat conftest.err >&5
18444 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18445 (exit $ac_status); } && {
18446 test -z "$ac_c_werror_flag" ||
18447 test ! -s conftest.err
18448 } && test -s conftest$ac_exeext && {
18449 test "$cross_compiling" = yes ||
18450 $as_test_x conftest$ac_exeext
18451 }; then
18452 eval "$as_ac_var=yes"
18453 else
18454 $as_echo "$as_me: failed program was:" >&5
18455 sed 's/^/| /' conftest.$ac_ext >&5
18456
18457 eval "$as_ac_var=no"
18458 fi
18459
18460 rm -rf conftest.dSYM
18461 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18462 conftest$ac_exeext conftest.$ac_ext
18463 fi
18464 ac_res=`eval 'as_val=${'$as_ac_var'}
18465 $as_echo "$as_val"'`
18466 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18467 $as_echo "$ac_res" >&6; }
18468 as_val=`eval 'as_val=${'$as_ac_var'}
18469 $as_echo "$as_val"'`
18470 if test "x$as_val" = x""yes; then
18471 cat >>confdefs.h <<_ACEOF
18472 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18473 _ACEOF
18474
18475 fi
18476 done
18477
18478
18479 if test $enable_cmulocal = yes; then
18480 { $as_echo "$as_me:$LINENO: WARNING: enabling CMU local kludges" >&5
18481 $as_echo "$as_me: WARNING: enabling CMU local kludges" >&2;}
18482
18483 cat >>confdefs.h <<\_ACEOF
18484 #define KRB4_IGNORE_IP_ADDRESS /**/
18485 _ACEOF
18486
18487
18488 cat >>confdefs.h <<_ACEOF
18489 #define PREFER_MECH "KERBEROS_V4"
18490 _ACEOF
18491
18492 fi
18493
18494 cat >conftest.$ac_ext <<_ACEOF
18495 /* confdefs.h. */
18496 _ACEOF
18497 cat confdefs.h >>conftest.$ac_ext
18498 cat >>conftest.$ac_ext <<_ACEOF
18499 /* end confdefs.h. */
18500 #include <sys/socket.h>
18501
18502 _ACEOF
18503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18504 $EGREP "sockaddr_storage" >/dev/null 2>&1; then
18505
18506
18507 cat >>confdefs.h <<\_ACEOF
18508 #define HAVE_STRUCT_SOCKADDR_STORAGE /**/
18509 _ACEOF
18510
18511 fi
18512 rm -f conftest*
18513
18514
18515
18516
18517
18518
18519 subdirs="$subdirs saslauthd"
18520
18521
18522
18523
18524
18525
18526
18527
18528 ac_config_headers="$ac_config_headers config.h"
18529
18530
18531 ac_config_files="$ac_config_files Makefile libsasl2.pc include/Makefile sasldb/Makefile plugins/Makefile lib/Makefile utils/Makefile doc/Makefile sample/Makefile java/Makefile java/CyrusSasl/Makefile java/Test/Makefile java/javax/Makefile java/javax/security/Makefile java/javax/security/auth/Makefile java/javax/security/auth/callback/Makefile pwcheck/Makefile man/Makefile"
18532
18533 cat >confcache <<\_ACEOF
18534 # This file is a shell script that caches the results of configure
18535 # tests run on this system so they can be shared between configure
18536 # scripts and configure runs, see configure's option --config-cache.
18537 # It is not useful on other systems. If it contains results you don't
18538 # want to keep, you may remove or edit it.
18539 #
18540 # config.status only pays attention to the cache file if you give it
18541 # the --recheck option to rerun configure.
18542 #
18543 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18544 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18545 # following values.
18546
18547 _ACEOF
18548
18549 # The following way of writing the cache mishandles newlines in values,
18550 # but we know of no workaround that is simple, portable, and efficient.
18551 # So, we kill variables containing newlines.
18552 # Ultrix sh set writes to stderr and can't be redirected directly,
18553 # and sets the high bit in the cache file unless we assign to the vars.
18554 (
18555 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18556 eval ac_val=\$$ac_var
18557 case $ac_val in #(
18558 *${as_nl}*)
18559 case $ac_var in #(
18560 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
18561 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18562 esac
18563 case $ac_var in #(
18564 _ | IFS | as_nl) ;; #(
18565 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18566 *) $as_unset $ac_var ;;
18567 esac ;;
18568 esac
18569 done
18570
18571 (set) 2>&1 |
18572 case $as_nl`(ac_space=' '; set) 2>&1` in #(
18573 *${as_nl}ac_space=\ *)
18574 # `set' does not quote correctly, so add quotes (double-quote
18575 # substitution turns \\\\ into \\, and sed turns \\ into \).
18576 sed -n \
18577 "s/'/'\\\\''/g;
18578 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18579 ;; #(
18580 *)
18581 # `set' quotes correctly as required by POSIX, so do not add quotes.
18582 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
18583 ;;
18584 esac |
18585 sort
18586 ) |
18587 sed '
18588 /^ac_cv_env_/b end
18589 t clear
18590 :clear
18591 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18592 t end
18593 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18594 :end' >>confcache
18595 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18596 if test -w "$cache_file"; then
18597 test "x$cache_file" != "x/dev/null" &&
18598 { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
18599 $as_echo "$as_me: updating cache $cache_file" >&6;}
18600 cat confcache >$cache_file
18601 else
18602 { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
18603 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
18604 fi
18605 fi
18606 rm -f confcache
18607
18608 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18609 # Let make expand exec_prefix.
18610 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18611
18612 DEFS=-DHAVE_CONFIG_H
18613
18614 ac_libobjs=
18615 ac_ltlibobjs=
18616 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18617 # 1. Remove the extension, and $U if already installed.
18618 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18619 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
18620 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
18621 # will be set to the directory where LIBOBJS objects are built.
18622 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18623 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
18624 done
18625 LIBOBJS=$ac_libobjs
18626
18627 LTLIBOBJS=$ac_ltlibobjs
18628
18629
18630 if test -n "$EXEEXT"; then
18631 am__EXEEXT_TRUE=
18632 am__EXEEXT_FALSE='#'
18633 else
18634 am__EXEEXT_TRUE='#'
18635 am__EXEEXT_FALSE=
18636 fi
18637
18638 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
18639 { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
18640 Usually this means the macro was only invoked conditionally." >&5
18641 $as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
18642 Usually this means the macro was only invoked conditionally." >&2;}
18643 { (exit 1); exit 1; }; }
18644 fi
18645 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
18646 { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
18647 Usually this means the macro was only invoked conditionally." >&5
18648 $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
18649 Usually this means the macro was only invoked conditionally." >&2;}
18650 { (exit 1); exit 1; }; }
18651 fi
18652 if test -z "${JAVA_TRUE}" && test -z "${JAVA_FALSE}"; then
18653 { { $as_echo "$as_me:$LINENO: error: conditional \"JAVA\" was never defined.
18654 Usually this means the macro was only invoked conditionally." >&5
18655 $as_echo "$as_me: error: conditional \"JAVA\" was never defined.
18656 Usually this means the macro was only invoked conditionally." >&2;}
18657 { (exit 1); exit 1; }; }
18658 fi
18659 if test -z "${SAMPLE_TRUE}" && test -z "${SAMPLE_FALSE}"; then
18660 { { $as_echo "$as_me:$LINENO: error: conditional \"SAMPLE\" was never defined.
18661 Usually this means the macro was only invoked conditionally." >&5
18662 $as_echo "$as_me: error: conditional \"SAMPLE\" was never defined.
18663 Usually this means the macro was only invoked conditionally." >&2;}
18664 { (exit 1); exit 1; }; }
18665 fi
18666 if test -z "${NO_SASL_DB_MANS_TRUE}" && test -z "${NO_SASL_DB_MANS_FALSE}"; then
18667 { { $as_echo "$as_me:$LINENO: error: conditional \"NO_SASL_DB_MANS\" was never defined.
18668 Usually this means the macro was only invoked conditionally." >&5
18669 $as_echo "$as_me: error: conditional \"NO_SASL_DB_MANS\" was never defined.
18670 Usually this means the macro was only invoked conditionally." >&2;}
18671 { (exit 1); exit 1; }; }
18672 fi
18673 if test -z "${SASLAUTHD_TRUE}" && test -z "${SASLAUTHD_FALSE}"; then
18674 { { $as_echo "$as_me:$LINENO: error: conditional \"SASLAUTHD\" was never defined.
18675 Usually this means the macro was only invoked conditionally." >&5
18676 $as_echo "$as_me: error: conditional \"SASLAUTHD\" was never defined.
18677 Usually this means the macro was only invoked conditionally." >&2;}
18678 { (exit 1); exit 1; }; }
18679 fi
18680 if test -z "${PWCHECK_TRUE}" && test -z "${PWCHECK_FALSE}"; then
18681 { { $as_echo "$as_me:$LINENO: error: conditional \"PWCHECK\" was never defined.
18682 Usually this means the macro was only invoked conditionally." >&5
18683 $as_echo "$as_me: error: conditional \"PWCHECK\" was never defined.
18684 Usually this means the macro was only invoked conditionally." >&2;}
18685 { (exit 1); exit 1; }; }
18686 fi
18687 if test -z "${MACOSX_TRUE}" && test -z "${MACOSX_FALSE}"; then
18688 { { $as_echo "$as_me:$LINENO: error: conditional \"MACOSX\" was never defined.
18689 Usually this means the macro was only invoked conditionally." >&5
18690 $as_echo "$as_me: error: conditional \"MACOSX\" was never defined.
18691 Usually this means the macro was only invoked conditionally." >&2;}
18692 { (exit 1); exit 1; }; }
18693 fi
18694
18695 : ${CONFIG_STATUS=./config.status}
18696 ac_write_fail=0
18697 ac_clean_files_save=$ac_clean_files
18698 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18699 { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18700 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
18701 cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18702 #! $SHELL
18703 # Generated by $as_me.
18704 # Run this file to recreate the current configuration.
18705 # Compiler output produced by configure, useful for debugging
18706 # configure, is in config.log if it exists.
18707
18708 debug=false
18709 ac_cs_recheck=false
18710 ac_cs_silent=false
18711 SHELL=\${CONFIG_SHELL-$SHELL}
18712 _ACEOF
18713
18714 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18715 ## --------------------- ##
18716 ## M4sh Initialization. ##
18717 ## --------------------- ##
18718
18719 # Be more Bourne compatible
18720 DUALCASE=1; export DUALCASE # for MKS sh
18721 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18722 emulate sh
18723 NULLCMD=:
18724 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18725 # is contrary to our usage. Disable this feature.
18726 alias -g '${1+"$@"}'='"$@"'
18727 setopt NO_GLOB_SUBST
18728 else
18729 case `(set -o) 2>/dev/null` in
18730 *posix*) set -o posix ;;
18731 esac
18732
18733 fi
18734
18735
18736
18737
18738 # PATH needs CR
18739 # Avoid depending upon Character Ranges.
18740 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18741 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18742 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18743 as_cr_digits='0123456789'
18744 as_cr_alnum=$as_cr_Letters$as_cr_digits
18745
18746 as_nl='
18747 '
18748 export as_nl
18749 # Printing a long string crashes Solaris 7 /usr/bin/printf.
18750 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18751 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18752 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18753 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18754 as_echo='printf %s\n'
18755 as_echo_n='printf %s'
18756 else
18757 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18758 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18759 as_echo_n='/usr/ucb/echo -n'
18760 else
18761 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18762 as_echo_n_body='eval
18763 arg=$1;
18764 case $arg in
18765 *"$as_nl"*)
18766 expr "X$arg" : "X\\(.*\\)$as_nl";
18767 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18768 esac;
18769 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18770 '
18771 export as_echo_n_body
18772 as_echo_n='sh -c $as_echo_n_body as_echo'
18773 fi
18774 export as_echo_body
18775 as_echo='sh -c $as_echo_body as_echo'
18776 fi
18777
18778 # The user is always right.
18779 if test "${PATH_SEPARATOR+set}" != set; then
18780 PATH_SEPARATOR=:
18781 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18782 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18783 PATH_SEPARATOR=';'
18784 }
18785 fi
18786
18787 # Support unset when possible.
18788 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
18789 as_unset=unset
18790 else
18791 as_unset=false
18792 fi
18793
18794
18795 # IFS
18796 # We need space, tab and new line, in precisely that order. Quoting is
18797 # there to prevent editors from complaining about space-tab.
18798 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
18799 # splitting by setting IFS to empty value.)
18800 IFS=" "" $as_nl"
18801
18802 # Find who we are. Look in the path if we contain no directory separator.
18803 case $0 in
18804 *[\\/]* ) as_myself=$0 ;;
18805 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18806 for as_dir in $PATH
18807 do
18808 IFS=$as_save_IFS
18809 test -z "$as_dir" && as_dir=.
18810 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18811 done
18812 IFS=$as_save_IFS
18813
18814 ;;
18815 esac
18816 # We did not find ourselves, most probably we were run as `sh COMMAND'
18817 # in which case we are not to be found in the path.
18818 if test "x$as_myself" = x; then
18819 as_myself=$0
18820 fi
18821 if test ! -f "$as_myself"; then
18822 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18823 { (exit 1); exit 1; }
18824 fi
18825
18826 # Work around bugs in pre-3.0 UWIN ksh.
18827 for as_var in ENV MAIL MAILPATH
18828 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
18829 done
18830 PS1='$ '
18831 PS2='> '
18832 PS4='+ '
18833
18834 # NLS nuisances.
18835 LC_ALL=C
18836 export LC_ALL
18837 LANGUAGE=C
18838 export LANGUAGE
18839
18840 # Required to use basename.
18841 if expr a : '\(a\)' >/dev/null 2>&1 &&
18842 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18843 as_expr=expr
18844 else
18845 as_expr=false
18846 fi
18847
18848 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18849 as_basename=basename
18850 else
18851 as_basename=false
18852 fi
18853
18854
18855 # Name of the executable.
18856 as_me=`$as_basename -- "$0" ||
18857 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18858 X"$0" : 'X\(//\)$' \| \
18859 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18860 $as_echo X/"$0" |
18861 sed '/^.*\/\([^/][^/]*\)\/*$/{
18862 s//\1/
18863 q
18864 }
18865 /^X\/\(\/\/\)$/{
18866 s//\1/
18867 q
18868 }
18869 /^X\/\(\/\).*/{
18870 s//\1/
18871 q
18872 }
18873 s/.*/./; q'`
18874
18875 # CDPATH.
18876 $as_unset CDPATH
18877
18878
18879
18880 as_lineno_1=$LINENO
18881 as_lineno_2=$LINENO
18882 test "x$as_lineno_1" != "x$as_lineno_2" &&
18883 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
18884
18885 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18886 # uniformly replaced by the line number. The first 'sed' inserts a
18887 # line-number line after each line using $LINENO; the second 'sed'
18888 # does the real work. The second script uses 'N' to pair each
18889 # line-number line with the line containing $LINENO, and appends
18890 # trailing '-' during substitution so that $LINENO is not a special
18891 # case at line end.
18892 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18893 # scripts with optimization help from Paolo Bonzini. Blame Lee
18894 # E. McMahon (1931-1989) for sed's syntax. :-)
18895 sed -n '
18896 p
18897 /[$]LINENO/=
18898 ' <$as_myself |
18899 sed '
18900 s/[$]LINENO.*/&-/
18901 t lineno
18902 b
18903 :lineno
18904 N
18905 :loop
18906 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
18907 t loop
18908 s/-\n.*//
18909 ' >$as_me.lineno &&
18910 chmod +x "$as_me.lineno" ||
18911 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
18912 { (exit 1); exit 1; }; }
18913
18914 # Don't try to exec as it changes $[0], causing all sort of problems
18915 # (the dirname of $[0] is not the place where we might find the
18916 # original and so on. Autoconf is especially sensitive to this).
18917 . "./$as_me.lineno"
18918 # Exit status is that of the last command.
18919 exit
18920 }
18921
18922
18923 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18924 as_dirname=dirname
18925 else
18926 as_dirname=false
18927 fi
18928
18929 ECHO_C= ECHO_N= ECHO_T=
18930 case `echo -n x` in
18931 -n*)
18932 case `echo 'x\c'` in
18933 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
18934 *) ECHO_C='\c';;
18935 esac;;
18936 *)
18937 ECHO_N='-n';;
18938 esac
18939 if expr a : '\(a\)' >/dev/null 2>&1 &&
18940 test "X`expr 00001 : '.*\(...\)'`" = X001; then
18941 as_expr=expr
18942 else
18943 as_expr=false
18944 fi
18945
18946 rm -f conf$$ conf$$.exe conf$$.file
18947 if test -d conf$$.dir; then
18948 rm -f conf$$.dir/conf$$.file
18949 else
18950 rm -f conf$$.dir
18951 mkdir conf$$.dir 2>/dev/null
18952 fi
18953 if (echo >conf$$.file) 2>/dev/null; then
18954 if ln -s conf$$.file conf$$ 2>/dev/null; then
18955 as_ln_s='ln -s'
18956 # ... but there are two gotchas:
18957 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18958 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
18959 # In both cases, we have to default to `cp -p'.
18960 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
18961 as_ln_s='cp -p'
18962 elif ln conf$$.file conf$$ 2>/dev/null; then
18963 as_ln_s=ln
18964 else
18965 as_ln_s='cp -p'
18966 fi
18967 else
18968 as_ln_s='cp -p'
18969 fi
18970 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18971 rmdir conf$$.dir 2>/dev/null
18972
18973 if mkdir -p . 2>/dev/null; then
18974 as_mkdir_p=:
18975 else
18976 test -d ./-p && rmdir ./-p
18977 as_mkdir_p=false
18978 fi
18979
18980 if test -x / >/dev/null 2>&1; then
18981 as_test_x='test -x'
18982 else
18983 if ls -dL / >/dev/null 2>&1; then
18984 as_ls_L_option=L
18985 else
18986 as_ls_L_option=
18987 fi
18988 as_test_x='
18989 eval sh -c '\''
18990 if test -d "$1"; then
18991 test -d "$1/.";
18992 else
18993 case $1 in
18994 -*)set "./$1";;
18995 esac;
18996 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
18997 ???[sx]*):;;*)false;;esac;fi
18998 '\'' sh
18999 '
19000 fi
19001 as_executable_p=$as_test_x
19002
19003 # Sed expression to map a string onto a valid CPP name.
19004 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19005
19006 # Sed expression to map a string onto a valid variable name.
19007 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19008
19009
19010 exec 6>&1
19011
19012 # Save the log message, to keep $[0] and so on meaningful, and to
19013 # report actual input values of CONFIG_FILES etc. instead of their
19014 # values after options handling.
19015 ac_log="
19016 This file was extended by $as_me, which was
19017 generated by GNU Autoconf 2.63. Invocation command line was
19018
19019 CONFIG_FILES = $CONFIG_FILES
19020 CONFIG_HEADERS = $CONFIG_HEADERS
19021 CONFIG_LINKS = $CONFIG_LINKS
19022 CONFIG_COMMANDS = $CONFIG_COMMANDS
19023 $ $0 $@
19024
19025 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19026 "
19027
19028 _ACEOF
19029
19030 case $ac_config_files in *"
19031 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19032 esac
19033
19034 case $ac_config_headers in *"
19035 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19036 esac
19037
19038
19039 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19040 # Files that config.status was made for.
19041 config_files="$ac_config_files"
19042 config_headers="$ac_config_headers"
19043 config_commands="$ac_config_commands"
19044
19045 _ACEOF
19046
19047 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19048 ac_cs_usage="\
19049 \`$as_me' instantiates files from templates according to the
19050 current configuration.
19051
19052 Usage: $0 [OPTION]... [FILE]...
19053
19054 -h, --help print this help, then exit
19055 -V, --version print version number and configuration settings, then exit
19056 -q, --quiet, --silent
19057 do not print progress messages
19058 -d, --debug don't remove temporary files
19059 --recheck update $as_me by reconfiguring in the same conditions
19060 --file=FILE[:TEMPLATE]
19061 instantiate the configuration file FILE
19062 --header=FILE[:TEMPLATE]
19063 instantiate the configuration header FILE
19064
19065 Configuration files:
19066 $config_files
19067
19068 Configuration headers:
19069 $config_headers
19070
19071 Configuration commands:
19072 $config_commands
19073
19074 Report bugs to <bug-autoconf@gnu.org>."
19075
19076 _ACEOF
19077 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19078 ac_cs_version="\\
19079 config.status
19080 configured by $0, generated by GNU Autoconf 2.63,
19081 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
19082
19083 Copyright (C) 2008 Free Software Foundation, Inc.
19084 This config.status script is free software; the Free Software Foundation
19085 gives unlimited permission to copy, distribute and modify it."
19086
19087 ac_pwd='$ac_pwd'
19088 srcdir='$srcdir'
19089 INSTALL='$INSTALL'
19090 MKDIR_P='$MKDIR_P'
19091 AWK='$AWK'
19092 test -n "\$AWK" || AWK=awk
19093 _ACEOF
19094
19095 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19096 # The default lists apply if the user does not specify any file.
19097 ac_need_defaults=:
19098 while test $# != 0
19099 do
19100 case $1 in
19101 --*=*)
19102 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19103 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19104 ac_shift=:
19105 ;;
19106 *)
19107 ac_option=$1
19108 ac_optarg=$2
19109 ac_shift=shift
19110 ;;
19111 esac
19112
19113 case $ac_option in
19114 # Handling of the options.
19115 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19116 ac_cs_recheck=: ;;
19117 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19118 $as_echo "$ac_cs_version"; exit ;;
19119 --debug | --debu | --deb | --de | --d | -d )
19120 debug=: ;;
19121 --file | --fil | --fi | --f )
19122 $ac_shift
19123 case $ac_optarg in
19124 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19125 esac
19126 CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
19127 ac_need_defaults=false;;
19128 --header | --heade | --head | --hea )
19129 $ac_shift
19130 case $ac_optarg in
19131 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19132 esac
19133 CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
19134 ac_need_defaults=false;;
19135 --he | --h)
19136 # Conflict between --help and --header
19137 { $as_echo "$as_me: error: ambiguous option: $1
19138 Try \`$0 --help' for more information." >&2
19139 { (exit 1); exit 1; }; };;
19140 --help | --hel | -h )
19141 $as_echo "$ac_cs_usage"; exit ;;
19142 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19143 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19144 ac_cs_silent=: ;;
19145
19146 # This is an error.
19147 -*) { $as_echo "$as_me: error: unrecognized option: $1
19148 Try \`$0 --help' for more information." >&2
19149 { (exit 1); exit 1; }; } ;;
19150
19151 *) ac_config_targets="$ac_config_targets $1"
19152 ac_need_defaults=false ;;
19153
19154 esac
19155 shift
19156 done
19157
19158 ac_configure_extra_args=
19159
19160 if $ac_cs_silent; then
19161 exec 6>/dev/null
19162 ac_configure_extra_args="$ac_configure_extra_args --silent"
19163 fi
19164
19165 _ACEOF
19166 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19167 if \$ac_cs_recheck; then
19168 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19169 shift
19170 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19171 CONFIG_SHELL='$SHELL'
19172 export CONFIG_SHELL
19173 exec "\$@"
19174 fi
19175
19176 _ACEOF
19177 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19178 exec 5>>config.log
19179 {
19180 echo
19181 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19182 ## Running $as_me. ##
19183 _ASBOX
19184 $as_echo "$ac_log"
19185 } >&5
19186
19187 _ACEOF
19188 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19189 #
19190 # INIT-COMMANDS
19191 #
19192 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
19193
19194 _ACEOF
19195
19196 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19197
19198 # Handling of arguments.
19199 for ac_config_target in $ac_config_targets
19200 do
19201 case $ac_config_target in
19202 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
19203 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
19204 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19205 "libsasl2.pc") CONFIG_FILES="$CONFIG_FILES libsasl2.pc" ;;
19206 "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
19207 "sasldb/Makefile") CONFIG_FILES="$CONFIG_FILES sasldb/Makefile" ;;
19208 "plugins/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/Makefile" ;;
19209 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
19210 "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
19211 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
19212 "sample/Makefile") CONFIG_FILES="$CONFIG_FILES sample/Makefile" ;;
19213 "java/Makefile") CONFIG_FILES="$CONFIG_FILES java/Makefile" ;;
19214 "java/CyrusSasl/Makefile") CONFIG_FILES="$CONFIG_FILES java/CyrusSasl/Makefile" ;;
19215 "java/Test/Makefile") CONFIG_FILES="$CONFIG_FILES java/Test/Makefile" ;;
19216 "java/javax/Makefile") CONFIG_FILES="$CONFIG_FILES java/javax/Makefile" ;;
19217 "java/javax/security/Makefile") CONFIG_FILES="$CONFIG_FILES java/javax/security/Makefile" ;;
19218 "java/javax/security/auth/Makefile") CONFIG_FILES="$CONFIG_FILES java/javax/security/auth/Makefile" ;;
19219 "java/javax/security/auth/callback/Makefile") CONFIG_FILES="$CONFIG_FILES java/javax/security/auth/callback/Makefile" ;;
19220 "pwcheck/Makefile") CONFIG_FILES="$CONFIG_FILES pwcheck/Makefile" ;;
19221 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
19222
19223 *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
19224 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19225 { (exit 1); exit 1; }; };;
19226 esac
19227 done
19228
19229
19230 # If the user did not use the arguments to specify the items to instantiate,
19231 # then the envvar interface is used. Set only those that are not.
19232 # We use the long form for the default assignment because of an extremely
19233 # bizarre bug on SunOS 4.1.3.
19234 if $ac_need_defaults; then
19235 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19236 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19237 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19238 fi
19239
19240 # Have a temporary directory for convenience. Make it in the build tree
19241 # simply because there is no reason against having it here, and in addition,
19242 # creating and moving files from /tmp can sometimes cause problems.
19243 # Hook for its removal unless debugging.
19244 # Note that there is a small window in which the directory will not be cleaned:
19245 # after its creation but before its name has been assigned to `$tmp'.
19246 $debug ||
19247 {
19248 tmp=
19249 trap 'exit_status=$?
19250 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
19251 ' 0
19252 trap '{ (exit 1); exit 1; }' 1 2 13 15
19253 }
19254 # Create a (secure) tmp directory for tmp files.
19255
19256 {
19257 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19258 test -n "$tmp" && test -d "$tmp"
19259 } ||
19260 {
19261 tmp=./conf$$-$RANDOM
19262 (umask 077 && mkdir "$tmp")
19263 } ||
19264 {
19265 $as_echo "$as_me: cannot create a temporary directory in ." >&2
19266 { (exit 1); exit 1; }
19267 }
19268
19269 # Set up the scripts for CONFIG_FILES section.
19270 # No need to generate them if there are no CONFIG_FILES.
19271 # This happens for instance with `./config.status config.h'.
19272 if test -n "$CONFIG_FILES"; then
19273
19274
19275 ac_cr='
19276 '
19277 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19278 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19279 ac_cs_awk_cr='\\r'
19280 else
19281 ac_cs_awk_cr=$ac_cr
19282 fi
19283
19284 echo 'BEGIN {' >"$tmp/subs1.awk" &&
19285 _ACEOF
19286
19287
19288 {
19289 echo "cat >conf$$subs.awk <<_ACEOF" &&
19290 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19291 echo "_ACEOF"
19292 } >conf$$subs.sh ||
19293 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
19294 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
19295 { (exit 1); exit 1; }; }
19296 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
19297 ac_delim='%!_!# '
19298 for ac_last_try in false false false false false :; do
19299 . ./conf$$subs.sh ||
19300 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
19301 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
19302 { (exit 1); exit 1; }; }
19303
19304 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19305 if test $ac_delim_n = $ac_delim_num; then
19306 break
19307 elif $ac_last_try; then
19308 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
19309 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
19310 { (exit 1); exit 1; }; }
19311 else
19312 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19313 fi
19314 done
19315 rm -f conf$$subs.sh
19316
19317 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19318 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
19319 _ACEOF
19320 sed -n '
19321 h
19322 s/^/S["/; s/!.*/"]=/
19323 p
19324 g
19325 s/^[^!]*!//
19326 :repl
19327 t repl
19328 s/'"$ac_delim"'$//
19329 t delim
19330 :nl
19331 h
19332 s/\(.\{148\}\).*/\1/
19333 t more1
19334 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19335 p
19336 n
19337 b repl
19338 :more1
19339 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19340 p
19341 g
19342 s/.\{148\}//
19343 t nl
19344 :delim
19345 h
19346 s/\(.\{148\}\).*/\1/
19347 t more2
19348 s/["\\]/\\&/g; s/^/"/; s/$/"/
19349 p
19350 b
19351 :more2
19352 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19353 p
19354 g
19355 s/.\{148\}//
19356 t delim
19357 ' <conf$$subs.awk | sed '
19358 /^[^""]/{
19359 N
19360 s/\n//
19361 }
19362 ' >>$CONFIG_STATUS || ac_write_fail=1
19363 rm -f conf$$subs.awk
19364 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19365 _ACAWK
19366 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
19367 for (key in S) S_is_set[key] = 1
19368 FS = ""
19369
19370 }
19371 {
19372 line = $ 0
19373 nfields = split(line, field, "@")
19374 substed = 0
19375 len = length(field[1])
19376 for (i = 2; i < nfields; i++) {
19377 key = field[i]
19378 keylen = length(key)
19379 if (S_is_set[key]) {
19380 value = S[key]
19381 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19382 len += length(value) + length(field[++i])
19383 substed = 1
19384 } else
19385 len += 1 + keylen
19386 }
19387
19388 print line
19389 }
19390
19391 _ACAWK
19392 _ACEOF
19393 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19394 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19395 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19396 else
19397 cat
19398 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
19399 || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
19400 $as_echo "$as_me: error: could not setup config files machinery" >&2;}
19401 { (exit 1); exit 1; }; }
19402 _ACEOF
19403
19404 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19405 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19406 # trailing colons and then remove the whole line if VPATH becomes empty
19407 # (actually we leave an empty line to preserve line numbers).
19408 if test "x$srcdir" = x.; then
19409 ac_vpsub='/^[ ]*VPATH[ ]*=/{
19410 s/:*\$(srcdir):*/:/
19411 s/:*\${srcdir}:*/:/
19412 s/:*@srcdir@:*/:/
19413 s/^\([^=]*=[ ]*\):*/\1/
19414 s/:*$//
19415 s/^[^=]*=[ ]*$//
19416 }'
19417 fi
19418
19419 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19420 fi # test -n "$CONFIG_FILES"
19421
19422 # Set up the scripts for CONFIG_HEADERS section.
19423 # No need to generate them if there are no CONFIG_HEADERS.
19424 # This happens for instance with `./config.status Makefile'.
19425 if test -n "$CONFIG_HEADERS"; then
19426 cat >"$tmp/defines.awk" <<\_ACAWK ||
19427 BEGIN {
19428 _ACEOF
19429
19430 # Transform confdefs.h into an awk script `defines.awk', embedded as
19431 # here-document in config.status, that substitutes the proper values into
19432 # config.h.in to produce config.h.
19433
19434 # Create a delimiter string that does not exist in confdefs.h, to ease
19435 # handling of long lines.
19436 ac_delim='%!_!# '
19437 for ac_last_try in false false :; do
19438 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
19439 if test -z "$ac_t"; then
19440 break
19441 elif $ac_last_try; then
19442 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
19443 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
19444 { (exit 1); exit 1; }; }
19445 else
19446 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19447 fi
19448 done
19449
19450 # For the awk script, D is an array of macro values keyed by name,
19451 # likewise P contains macro parameters if any. Preserve backslash
19452 # newline sequences.
19453
19454 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19455 sed -n '
19456 s/.\{148\}/&'"$ac_delim"'/g
19457 t rset
19458 :rset
19459 s/^[ ]*#[ ]*define[ ][ ]*/ /
19460 t def
19461 d
19462 :def
19463 s/\\$//
19464 t bsnl
19465 s/["\\]/\\&/g
19466 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19467 D["\1"]=" \3"/p
19468 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
19469 d
19470 :bsnl
19471 s/["\\]/\\&/g
19472 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19473 D["\1"]=" \3\\\\\\n"\\/p
19474 t cont
19475 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19476 t cont
19477 d
19478 :cont
19479 n
19480 s/.\{148\}/&'"$ac_delim"'/g
19481 t clear
19482 :clear
19483 s/\\$//
19484 t bsnlc
19485 s/["\\]/\\&/g; s/^/"/; s/$/"/p
19486 d
19487 :bsnlc
19488 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19489 b cont
19490 ' <confdefs.h | sed '
19491 s/'"$ac_delim"'/"\\\
19492 "/g' >>$CONFIG_STATUS || ac_write_fail=1
19493
19494 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19495 for (key in D) D_is_set[key] = 1
19496 FS = ""
19497 }
19498 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19499 line = \$ 0
19500 split(line, arg, " ")
19501 if (arg[1] == "#") {
19502 defundef = arg[2]
19503 mac1 = arg[3]
19504 } else {
19505 defundef = substr(arg[1], 2)
19506 mac1 = arg[2]
19507 }
19508 split(mac1, mac2, "(") #)
19509 macro = mac2[1]
19510 prefix = substr(line, 1, index(line, defundef) - 1)
19511 if (D_is_set[macro]) {
19512 # Preserve the white space surrounding the "#".
19513 print prefix "define", macro P[macro] D[macro]
19514 next
19515 } else {
19516 # Replace #undef with comments. This is necessary, for example,
19517 # in the case of _POSIX_SOURCE, which is predefined and required
19518 # on some systems where configure will not decide to define it.
19519 if (defundef == "undef") {
19520 print "/*", prefix defundef, macro, "*/"
19521 next
19522 }
19523 }
19524 }
19525 { print }
19526 _ACAWK
19527 _ACEOF
19528 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19529 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
19530 $as_echo "$as_me: error: could not setup config headers machinery" >&2;}
19531 { (exit 1); exit 1; }; }
19532 fi # test -n "$CONFIG_HEADERS"
19533
19534
19535 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
19536 shift
19537 for ac_tag
19538 do
19539 case $ac_tag in
19540 :[FHLC]) ac_mode=$ac_tag; continue;;
19541 esac
19542 case $ac_mode$ac_tag in
19543 :[FHL]*:*);;
19544 :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
19545 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
19546 { (exit 1); exit 1; }; };;
19547 :[FH]-) ac_tag=-:-;;
19548 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19549 esac
19550 ac_save_IFS=$IFS
19551 IFS=:
19552 set x $ac_tag
19553 IFS=$ac_save_IFS
19554 shift
19555 ac_file=$1
19556 shift
19557
19558 case $ac_mode in
19559 :L) ac_source=$1;;
19560 :[FH])
19561 ac_file_inputs=
19562 for ac_f
19563 do
19564 case $ac_f in
19565 -) ac_f="$tmp/stdin";;
19566 *) # Look for the file first in the build tree, then in the source tree
19567 # (if the path is not absolute). The absolute path cannot be DOS-style,
19568 # because $ac_f cannot contain `:'.
19569 test -f "$ac_f" ||
19570 case $ac_f in
19571 [\\/$]*) false;;
19572 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19573 esac ||
19574 { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
19575 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
19576 { (exit 1); exit 1; }; };;
19577 esac
19578 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19579 ac_file_inputs="$ac_file_inputs '$ac_f'"
19580 done
19581
19582 # Let's still pretend it is `configure' which instantiates (i.e., don't
19583 # use $as_me), people would be surprised to read:
19584 # /* config.h. Generated by config.status. */
19585 configure_input='Generated from '`
19586 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19587 `' by configure.'
19588 if test x"$ac_file" != x-; then
19589 configure_input="$ac_file. $configure_input"
19590 { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
19591 $as_echo "$as_me: creating $ac_file" >&6;}
19592 fi
19593 # Neutralize special characters interpreted by sed in replacement strings.
19594 case $configure_input in #(
19595 *\&* | *\|* | *\\* )
19596 ac_sed_conf_input=`$as_echo "$configure_input" |
19597 sed 's/[\\\\&|]/\\\\&/g'`;; #(
19598 *) ac_sed_conf_input=$configure_input;;
19599 esac
19600
19601 case $ac_tag in
19602 *:-:* | *:-) cat >"$tmp/stdin" \
19603 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
19604 $as_echo "$as_me: error: could not create $ac_file" >&2;}
19605 { (exit 1); exit 1; }; } ;;
19606 esac
19607 ;;
19608 esac
19609
19610 ac_dir=`$as_dirname -- "$ac_file" ||
19611 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19612 X"$ac_file" : 'X\(//\)[^/]' \| \
19613 X"$ac_file" : 'X\(//\)$' \| \
19614 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19615 $as_echo X"$ac_file" |
19616 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19617 s//\1/
19618 q
19619 }
19620 /^X\(\/\/\)[^/].*/{
19621 s//\1/
19622 q
19623 }
19624 /^X\(\/\/\)$/{
19625 s//\1/
19626 q
19627 }
19628 /^X\(\/\).*/{
19629 s//\1/
19630 q
19631 }
19632 s/.*/./; q'`
19633 { as_dir="$ac_dir"
19634 case $as_dir in #(
19635 -*) as_dir=./$as_dir;;
19636 esac
19637 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
19638 as_dirs=
19639 while :; do
19640 case $as_dir in #(
19641 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19642 *) as_qdir=$as_dir;;
19643 esac
19644 as_dirs="'$as_qdir' $as_dirs"
19645 as_dir=`$as_dirname -- "$as_dir" ||
19646 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19647 X"$as_dir" : 'X\(//\)[^/]' \| \
19648 X"$as_dir" : 'X\(//\)$' \| \
19649 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19650 $as_echo X"$as_dir" |
19651 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19652 s//\1/
19653 q
19654 }
19655 /^X\(\/\/\)[^/].*/{
19656 s//\1/
19657 q
19658 }
19659 /^X\(\/\/\)$/{
19660 s//\1/
19661 q
19662 }
19663 /^X\(\/\).*/{
19664 s//\1/
19665 q
19666 }
19667 s/.*/./; q'`
19668 test -d "$as_dir" && break
19669 done
19670 test -z "$as_dirs" || eval "mkdir $as_dirs"
19671 } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
19672 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
19673 { (exit 1); exit 1; }; }; }
19674 ac_builddir=.
19675
19676 case "$ac_dir" in
19677 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19678 *)
19679 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19680 # A ".." for each directory in $ac_dir_suffix.
19681 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19682 case $ac_top_builddir_sub in
19683 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19684 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19685 esac ;;
19686 esac
19687 ac_abs_top_builddir=$ac_pwd
19688 ac_abs_builddir=$ac_pwd$ac_dir_suffix
19689 # for backward compatibility:
19690 ac_top_builddir=$ac_top_build_prefix
19691
19692 case $srcdir in
19693 .) # We are building in place.
19694 ac_srcdir=.
19695 ac_top_srcdir=$ac_top_builddir_sub
19696 ac_abs_top_srcdir=$ac_pwd ;;
19697 [\\/]* | ?:[\\/]* ) # Absolute name.
19698 ac_srcdir=$srcdir$ac_dir_suffix;
19699 ac_top_srcdir=$srcdir
19700 ac_abs_top_srcdir=$srcdir ;;
19701 *) # Relative name.
19702 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19703 ac_top_srcdir=$ac_top_build_prefix$srcdir
19704 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19705 esac
19706 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19707
19708
19709 case $ac_mode in
19710 :F)
19711 #
19712 # CONFIG_FILE
19713 #
19714
19715 case $INSTALL in
19716 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19717 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
19718 esac
19719 ac_MKDIR_P=$MKDIR_P
19720 case $MKDIR_P in
19721 [\\/$]* | ?:[\\/]* ) ;;
19722 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
19723 esac
19724 _ACEOF
19725
19726 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19727 # If the template does not know about datarootdir, expand it.
19728 # FIXME: This hack should be removed a few years after 2.60.
19729 ac_datarootdir_hack=; ac_datarootdir_seen=
19730
19731 ac_sed_dataroot='
19732 /datarootdir/ {
19733 p
19734 q
19735 }
19736 /@datadir@/p
19737 /@docdir@/p
19738 /@infodir@/p
19739 /@localedir@/p
19740 /@mandir@/p
19741 '
19742 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19743 *datarootdir*) ac_datarootdir_seen=yes;;
19744 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19745 { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19746 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19747 _ACEOF
19748 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19749 ac_datarootdir_hack='
19750 s&@datadir@&$datadir&g
19751 s&@docdir@&$docdir&g
19752 s&@infodir@&$infodir&g
19753 s&@localedir@&$localedir&g
19754 s&@mandir@&$mandir&g
19755 s&\\\${datarootdir}&$datarootdir&g' ;;
19756 esac
19757 _ACEOF
19758
19759 # Neutralize VPATH when `$srcdir' = `.'.
19760 # Shell code in configure.ac might set extrasub.
19761 # FIXME: do we really want to maintain this feature?
19762 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19763 ac_sed_extra="$ac_vpsub
19764 $extrasub
19765 _ACEOF
19766 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19767 :t
19768 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19769 s|@configure_input@|$ac_sed_conf_input|;t t
19770 s&@top_builddir@&$ac_top_builddir_sub&;t t
19771 s&@top_build_prefix@&$ac_top_build_prefix&;t t
19772 s&@srcdir@&$ac_srcdir&;t t
19773 s&@abs_srcdir@&$ac_abs_srcdir&;t t
19774 s&@top_srcdir@&$ac_top_srcdir&;t t
19775 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19776 s&@builddir@&$ac_builddir&;t t
19777 s&@abs_builddir@&$ac_abs_builddir&;t t
19778 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19779 s&@INSTALL@&$ac_INSTALL&;t t
19780 s&@MKDIR_P@&$ac_MKDIR_P&;t t
19781 $ac_datarootdir_hack
19782 "
19783 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
19784 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
19785 $as_echo "$as_me: error: could not create $ac_file" >&2;}
19786 { (exit 1); exit 1; }; }
19787
19788 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
19789 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
19790 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
19791 { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19792 which seems to be undefined. Please make sure it is defined." >&5
19793 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19794 which seems to be undefined. Please make sure it is defined." >&2;}
19795
19796 rm -f "$tmp/stdin"
19797 case $ac_file in
19798 -) cat "$tmp/out" && rm -f "$tmp/out";;
19799 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
19800 esac \
19801 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
19802 $as_echo "$as_me: error: could not create $ac_file" >&2;}
19803 { (exit 1); exit 1; }; }
19804 ;;
19805 :H)
19806 #
19807 # CONFIG_HEADER
19808 #
19809 if test x"$ac_file" != x-; then
19810 {
19811 $as_echo "/* $configure_input */" \
19812 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
19813 } >"$tmp/config.h" \
19814 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
19815 $as_echo "$as_me: error: could not create $ac_file" >&2;}
19816 { (exit 1); exit 1; }; }
19817 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
19818 { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19819 $as_echo "$as_me: $ac_file is unchanged" >&6;}
19820 else
19821 rm -f "$ac_file"
19822 mv "$tmp/config.h" "$ac_file" \
19823 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
19824 $as_echo "$as_me: error: could not create $ac_file" >&2;}
19825 { (exit 1); exit 1; }; }
19826 fi
19827 else
19828 $as_echo "/* $configure_input */" \
19829 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
19830 || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
19831 $as_echo "$as_me: error: could not create -" >&2;}
19832 { (exit 1); exit 1; }; }
19833 fi
19834 # Compute "$ac_file"'s index in $config_headers.
19835 _am_arg="$ac_file"
19836 _am_stamp_count=1
19837 for _am_header in $config_headers :; do
19838 case $_am_header in
19839 $_am_arg | $_am_arg:* )
19840 break ;;
19841 * )
19842 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
19843 esac
19844 done
19845 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
19846 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19847 X"$_am_arg" : 'X\(//\)[^/]' \| \
19848 X"$_am_arg" : 'X\(//\)$' \| \
19849 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
19850 $as_echo X"$_am_arg" |
19851 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19852 s//\1/
19853 q
19854 }
19855 /^X\(\/\/\)[^/].*/{
19856 s//\1/
19857 q
19858 }
19859 /^X\(\/\/\)$/{
19860 s//\1/
19861 q
19862 }
19863 /^X\(\/\).*/{
19864 s//\1/
19865 q
19866 }
19867 s/.*/./; q'`/stamp-h$_am_stamp_count
19868 ;;
19869
19870 :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
19871 $as_echo "$as_me: executing $ac_file commands" >&6;}
19872 ;;
19873 esac
19874
19875
19876 case $ac_file$ac_mode in
19877 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
19878 # Autoconf 2.62 quotes --file arguments for eval, but not when files
19879 # are listed without --file. Let's play safe and only enable the eval
19880 # if we detect the quoting.
19881 case $CONFIG_FILES in
19882 *\'*) eval set x "$CONFIG_FILES" ;;
19883 *) set x $CONFIG_FILES ;;
19884 esac
19885 shift
19886 for mf
19887 do
19888 # Strip MF so we end up with the name of the file.
19889 mf=`echo "$mf" | sed -e 's/:.*$//'`
19890 # Check whether this is an Automake generated Makefile or not.
19891 # We used to match only the files named `Makefile.in', but
19892 # some people rename them; so instead we look at the file content.
19893 # Grep'ing the first line is not enough: some people post-process
19894 # each Makefile.in and add a new line on top of each file to say so.
19895 # Grep'ing the whole file is not good either: AIX grep has a line
19896 # limit of 2048, but all sed's we know have understand at least 4000.
19897 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
19898 dirpart=`$as_dirname -- "$mf" ||
19899 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19900 X"$mf" : 'X\(//\)[^/]' \| \
19901 X"$mf" : 'X\(//\)$' \| \
19902 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
19903 $as_echo X"$mf" |
19904 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19905 s//\1/
19906 q
19907 }
19908 /^X\(\/\/\)[^/].*/{
19909 s//\1/
19910 q
19911 }
19912 /^X\(\/\/\)$/{
19913 s//\1/
19914 q
19915 }
19916 /^X\(\/\).*/{
19917 s//\1/
19918 q
19919 }
19920 s/.*/./; q'`
19921 else
19922 continue
19923 fi
19924 # Extract the definition of DEPDIR, am__include, and am__quote
19925 # from the Makefile without running `make'.
19926 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
19927 test -z "$DEPDIR" && continue
19928 am__include=`sed -n 's/^am__include = //p' < "$mf"`
19929 test -z "am__include" && continue
19930 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
19931 # When using ansi2knr, U may be empty or an underscore; expand it
19932 U=`sed -n 's/^U = //p' < "$mf"`
19933 # Find all dependency output files, they are included files with
19934 # $(DEPDIR) in their names. We invoke sed twice because it is the
19935 # simplest approach to changing $(DEPDIR) to its actual value in the
19936 # expansion.
19937 for file in `sed -n "
19938 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
19939 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
19940 # Make sure the directory exists.
19941 test -f "$dirpart/$file" && continue
19942 fdir=`$as_dirname -- "$file" ||
19943 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19944 X"$file" : 'X\(//\)[^/]' \| \
19945 X"$file" : 'X\(//\)$' \| \
19946 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
19947 $as_echo X"$file" |
19948 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19949 s//\1/
19950 q
19951 }
19952 /^X\(\/\/\)[^/].*/{
19953 s//\1/
19954 q
19955 }
19956 /^X\(\/\/\)$/{
19957 s//\1/
19958 q
19959 }
19960 /^X\(\/\).*/{
19961 s//\1/
19962 q
19963 }
19964 s/.*/./; q'`
19965 { as_dir=$dirpart/$fdir
19966 case $as_dir in #(
19967 -*) as_dir=./$as_dir;;
19968 esac
19969 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
19970 as_dirs=
19971 while :; do
19972 case $as_dir in #(
19973 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19974 *) as_qdir=$as_dir;;
19975 esac
19976 as_dirs="'$as_qdir' $as_dirs"
19977 as_dir=`$as_dirname -- "$as_dir" ||
19978 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19979 X"$as_dir" : 'X\(//\)[^/]' \| \
19980 X"$as_dir" : 'X\(//\)$' \| \
19981 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19982 $as_echo X"$as_dir" |
19983 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19984 s//\1/
19985 q
19986 }
19987 /^X\(\/\/\)[^/].*/{
19988 s//\1/
19989 q
19990 }
19991 /^X\(\/\/\)$/{
19992 s//\1/
19993 q
19994 }
19995 /^X\(\/\).*/{
19996 s//\1/
19997 q
19998 }
19999 s/.*/./; q'`
20000 test -d "$as_dir" && break
20001 done
20002 test -z "$as_dirs" || eval "mkdir $as_dirs"
20003 } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
20004 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
20005 { (exit 1); exit 1; }; }; }
20006 # echo "creating $dirpart/$file"
20007 echo '# dummy' > "$dirpart/$file"
20008 done
20009 done
20010 }
20011 ;;
20012
20013 esac
20014 done # for ac_tag
20015
20016
20017 { (exit 0); exit 0; }
20018 _ACEOF
20019 chmod +x $CONFIG_STATUS
20020 ac_clean_files=$ac_clean_files_save
20021
20022 test $ac_write_fail = 0 ||
20023 { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
20024 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
20025 { (exit 1); exit 1; }; }
20026
20027
20028 # configure is writing to config.log, and then calls config.status.
20029 # config.status does its own redirection, appending to config.log.
20030 # Unfortunately, on DOS this fails, as config.log is still kept open
20031 # by configure, so config.status won't be able to write to it; its
20032 # output is simply discarded. So we exec the FD to /dev/null,
20033 # effectively closing config.log, so it can be properly (re)opened and
20034 # appended to by config.status. When coming back to configure, we
20035 # need to make the FD available again.
20036 if test "$no_create" != yes; then
20037 ac_cs_success=:
20038 ac_config_status_args=
20039 test "$silent" = yes &&
20040 ac_config_status_args="$ac_config_status_args --quiet"
20041 exec 5>/dev/null
20042 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20043 exec 5>>config.log
20044 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20045 # would make configure fail if this is the last instruction.
20046 $ac_cs_success || { (exit 1); exit 1; }
20047 fi
20048
20049 #
20050 # CONFIG_SUBDIRS section.
20051 #
20052 if test "$no_recursion" != yes; then
20053
20054 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20055 # so they do not pile up.
20056 ac_sub_configure_args=
20057 ac_prev=
20058 eval "set x $ac_configure_args"
20059 shift
20060 for ac_arg
20061 do
20062 if test -n "$ac_prev"; then
20063 ac_prev=
20064 continue
20065 fi
20066 case $ac_arg in
20067 -cache-file | --cache-file | --cache-fil | --cache-fi \
20068 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20069 ac_prev=cache_file ;;
20070 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
20071 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20072 | --c=*)
20073 ;;
20074 --config-cache | -C)
20075 ;;
20076 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20077 ac_prev=srcdir ;;
20078 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20079 ;;
20080 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20081 ac_prev=prefix ;;
20082 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20083 ;;
20084 --disable-option-checking)
20085 ;;
20086 *)
20087 case $ac_arg in
20088 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20089 esac
20090 ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
20091 esac
20092 done
20093
20094 # Always prepend --prefix to ensure using the same prefix
20095 # in subdir configurations.
20096 ac_arg="--prefix=$prefix"
20097 case $ac_arg in
20098 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20099 esac
20100 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20101
20102 # Pass --silent
20103 if test "$silent" = yes; then
20104 ac_sub_configure_args="--silent $ac_sub_configure_args"
20105 fi
20106
20107 # Always prepend --disable-option-checking to silence warnings, since
20108 # different subdirs can have different --enable and --with options.
20109 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
20110
20111 ac_popdir=`pwd`
20112 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
20113
20114 # Do not complain, so a configure script can configure whichever
20115 # parts of a large source tree are present.
20116 test -d "$srcdir/$ac_dir" || continue
20117
20118 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20119 $as_echo "$as_me:$LINENO: $ac_msg" >&5
20120 $as_echo "$ac_msg" >&6
20121 { as_dir="$ac_dir"
20122 case $as_dir in #(
20123 -*) as_dir=./$as_dir;;
20124 esac
20125 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
20126 as_dirs=
20127 while :; do
20128 case $as_dir in #(
20129 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20130 *) as_qdir=$as_dir;;
20131 esac
20132 as_dirs="'$as_qdir' $as_dirs"
20133 as_dir=`$as_dirname -- "$as_dir" ||
20134 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20135 X"$as_dir" : 'X\(//\)[^/]' \| \
20136 X"$as_dir" : 'X\(//\)$' \| \
20137 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20138 $as_echo X"$as_dir" |
20139 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20140 s//\1/
20141 q
20142 }
20143 /^X\(\/\/\)[^/].*/{
20144 s//\1/
20145 q
20146 }
20147 /^X\(\/\/\)$/{
20148 s//\1/
20149 q
20150 }
20151 /^X\(\/\).*/{
20152 s//\1/
20153 q
20154 }
20155 s/.*/./; q'`
20156 test -d "$as_dir" && break
20157 done
20158 test -z "$as_dirs" || eval "mkdir $as_dirs"
20159 } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
20160 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
20161 { (exit 1); exit 1; }; }; }
20162 ac_builddir=.
20163
20164 case "$ac_dir" in
20165 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20166 *)
20167 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20168 # A ".." for each directory in $ac_dir_suffix.
20169 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20170 case $ac_top_builddir_sub in
20171 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20172 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20173 esac ;;
20174 esac
20175 ac_abs_top_builddir=$ac_pwd
20176 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20177 # for backward compatibility:
20178 ac_top_builddir=$ac_top_build_prefix
20179
20180 case $srcdir in
20181 .) # We are building in place.
20182 ac_srcdir=.
20183 ac_top_srcdir=$ac_top_builddir_sub
20184 ac_abs_top_srcdir=$ac_pwd ;;
20185 [\\/]* | ?:[\\/]* ) # Absolute name.
20186 ac_srcdir=$srcdir$ac_dir_suffix;
20187 ac_top_srcdir=$srcdir
20188 ac_abs_top_srcdir=$srcdir ;;
20189 *) # Relative name.
20190 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20191 ac_top_srcdir=$ac_top_build_prefix$srcdir
20192 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20193 esac
20194 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20195
20196
20197 cd "$ac_dir"
20198
20199 # Check for guested configure; otherwise get Cygnus style configure.
20200 if test -f "$ac_srcdir/configure.gnu"; then
20201 ac_sub_configure=$ac_srcdir/configure.gnu
20202 elif test -f "$ac_srcdir/configure"; then
20203 ac_sub_configure=$ac_srcdir/configure
20204 elif test -f "$ac_srcdir/configure.in"; then
20205 # This should be Cygnus configure.
20206 ac_sub_configure=$ac_aux_dir/configure
20207 else
20208 { $as_echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
20209 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
20210 ac_sub_configure=
20211 fi
20212
20213 # The recursion is here.
20214 if test -n "$ac_sub_configure"; then
20215 # Make the cache file name correct relative to the subdirectory.
20216 case $cache_file in
20217 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
20218 *) # Relative name.
20219 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
20220 esac
20221
20222 { $as_echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
20223 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
20224 # The eval makes quoting arguments work.
20225 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20226 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
20227 { { $as_echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
20228 $as_echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
20229 { (exit 1); exit 1; }; }
20230 fi
20231
20232 cd "$ac_popdir"
20233 done
20234 fi
20235 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20236 { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20237 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20238 fi
20239
20240
20241 echo Configuration Complete. Type \'make\' to build.
0 dnl configure.ac for the SASL library
1 dnl Rob Siemborski
2 dnl Rob Earhart
3 dnl $Id: configure.ac,v 1.224 2011/09/22 14:44:15 mel Exp $
4 dnl
5 dnl Copyright (c) 2001 Carnegie Mellon University. All rights reserved.
6 dnl
7 dnl Redistribution and use in source and binary forms, with or without
8 dnl modification, are permitted provided that the following conditions
9 dnl are met:
10 dnl
11 dnl 1. Redistributions of source code must retain the above copyright
12 dnl notice, this list of conditions and the following disclaimer.
13 dnl
14 dnl 2. Redistributions in binary form must reproduce the above copyright
15 dnl notice, this list of conditions and the following disclaimer in
16 dnl the documentation and/or other materials provided with the
17 dnl distribution.
18 dnl
19 dnl 3. The name "Carnegie Mellon University" must not be used to
20 dnl endorse or promote products derived from this software without
21 dnl prior written permission. For permission or any other legal
22 dnl details, please contact
23 dnl Office of Technology Transfer
24 dnl Carnegie Mellon University
25 dnl 5000 Forbes Avenue
26 dnl Pittsburgh, PA 15213-3890
27 dnl (412) 268-4387, fax: (412) 268-7395
28 dnl tech-transfer@andrew.cmu.edu
29 dnl
30 dnl 4. Redistributions of any form whatsoever must retain the following
31 dnl acknowledgment:
32 dnl \"This product includes software developed by Computing Services
33 dnl at Carnegie Mellon University (http://www.cmu.edu/computing/).\"
34 dnl
35 dnl CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
36 dnl THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
37 dnl AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
38 dnl FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
39 dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
40 dnl AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
41 dnl OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
42 dnl
43
44 AC_PREREQ(2.63.2)
45
46 dnl
47 dnl REMINDER: When changing the version number here, please also update
48 dnl the values in win32/include/config.h and include/sasl.h as well.
49 dnl
50 AC_INIT([cyrus-sasl],
51 [2.1.26],
52 [https://git.cyrus.foundation/maniphest/],
53 [cyrus-sasl],
54 [https://docs.cyrus.foundation])
55
56 AC_CONFIG_MACRO_DIR([m4])
57
58 dnl use ./config.cache as the default cache file.
59 dnl we require a cache file to successfully configure our build.
60 if test $cache_file = "/dev/null"; then
61 cache_file="./config.cache"
62 AC_CACHE_LOAD
63 fi
64
65 AC_CONFIG_AUX_DIR(config)
66 AC_CANONICAL_HOST
67 AC_CANONICAL_TARGET
68
69 AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip -Wno-portability subdir-objects])
70
71 DIRS=""
72
73 AC_ARG_ENABLE(cmulocal,
74 [AC_HELP_STRING([--enable-cmulocal],
75 [enable local mods for CMU [[no]]])],
76 [],
77 enable_cmulocal=no)
78
79 AC_ARG_ENABLE(sample,
80 [AC_HELP_STRING([--enable-sample],
81 [compile sample code [[yes]]])],
82 enable_sample=yes)
83
84 AC_ARG_ENABLE(obsolete_cram_attr,
85 [AC_HELP_STRING([--enable-obsolete_cram_attr],
86 [enable support for cmusaslsecretCRAM-MD5 auxprop property [[yes]]])],
87 enable_obsolete_cram_attr=$enableval,
88 enable_obsolete_cram_attr=yes)
89
90 AC_PROG_CC
91 AX_PROG_CC_FOR_BUILD
92 AC_PROG_CPP
93 AC_PROG_AWK
94 AC_PROG_LN_S
95 AC_PROG_MAKE_SET
96 AC_PROG_INSTALL
97 AC_USE_SYSTEM_EXTENSIONS
98 CMU_C___ATTRIBUTE__
99
100 dnl check for -R, etc. switch
101 CMU_GUESS_RUNPATH_SWITCH
102
103 dnl xxx compatibility
104 AC_ARG_WITH(staticsasl)
105 if test "$with_staticsasl" = yes; then
106 enable_shared=yes
107 enable_static=yes
108 fi
109
110 save_target=$target
111 if test -z "$target"; then
112 target="NONE"
113 fi
114
115 # new libtool
116 AM_DISABLE_STATIC
117 AC_PROG_LIBTOOL
118
119 target=$save_target
120
121 if test "$enable_static" = yes; then
122 SASL_STATIC_LIBS=libsasl2.a
123 else
124 SASL_STATIC_LIBS=
125 fi
126
127 AC_ARG_ENABLE(staticdlopen, [ --enable-staticdlopen try dynamic plugins when we are a static libsasl [[no]] ],
128 enable_staticdlopen=$enableval,
129 enable_staticdlopen=no)
130
131 if test "$enable_staticdlopen" = yes; then
132 AC_DEFINE(TRY_DLOPEN_WHEN_STATIC,[],[Should we try to dlopen() plugins while statically compiled?])
133 fi
134
135 if test "$ac_cv_prog_gcc" = yes; then
136 CFLAGS="-Wall -W ${CFLAGS}"
137 fi
138
139 AC_ARG_WITH(purecov,[ --with-purecov link with purecov])
140 if test "$with_purecov" = yes; then
141 AC_CHECK_PROGS(PURECOV, purecov)
142 fi
143 AC_ARG_WITH(purify,[ --with-purify link with purify])
144 if test "$with_purify" = yes; then
145 AC_CHECK_PROGS(PURIFY, purify)
146 fi
147
148 AC_ARG_ENABLE(java, [ --enable-java compile Java support [[no]]],
149 enable_java=$enableval, enable_java=no)
150 if test "$enable_java" = yes; then
151 AC_PATH_PROG(JAVAC, javac, no)
152 AC_PATH_PROGS(JAVAH, javah kaffeh, no)
153 AC_CHECK_PROGS(JAVADOC, javadoc, :)
154 if test "$JAVAC" = "no" -o "$JAVAH" = "no"; then
155 AC_WARN([Disabling Java support])
156 enable_java=no
157 fi
158 else
159 # Make distcheck work
160 JAVAC="true"
161 JAVAH="true"
162 JAVADOC="true"
163 fi
164 AM_CONDITIONAL(JAVA, test "$enable_java" = yes)
165
166 if test "$enable_java" = yes; then
167 AC_MSG_CHECKING([JNI cpp flags])
168 AC_CACHE_VAL(sasl_cv_java_includes,[
169 if test `echo $JAVAH | sed 's,.*/,,'` = "kaffeh"; then
170 sasl_cv_java_includes=-I`echo $JAVAH | sed -e 's,/bin.*,/include/kaffe,'`
171 else
172 java_base=`echo $JAVAC | sed 's,/bin.*,'','`
173
174 AC_ARG_WITH(javabase, [ --with-javabase=PATH set path to find jni.h in [/usr/java/include] ],
175 java_base=$withval,)
176
177
178 sasl_cv_java_includes=''
179 for dir in `find ${java_base}/include -follow -type d -print | grep -v green_threads`; do
180 sasl_cv_java_includes="${sasl_cv_java_includes} -I$dir"
181 done
182 fi
183
184 sasl_cv_java_includes="${sasl_cv_java_includes} -I$javapath/include"])
185
186 JAVA_INCLUDES=$sasl_cv_java_includes
187 AC_SUBST(JAVA_INCLUDES)
188 AC_MSG_RESULT(ok)
189
190 JAVAROOT=".."
191 AC_SUBST(JAVAROOT)
192 JAVAC=`echo "$JAVAC" | sed 's,.*/,,'`
193 JAVAH=`echo "$JAVAH" | sed 's,.*/,,'`
194 fi
195
196 AM_CONDITIONAL(SAMPLE, test "$enable_sample" = yes)
197
198 dnl call before we do the berkeley DB checks
199 CMU_SOCKETS
200
201 dnl we extracted this to config/sasldb.m4
202 SASL_DB_PATH_CHECK()
203 SASL_DB_CHECK()
204
205 # Do we not install the SASL DB man pages?
206 AM_CONDITIONAL(NO_SASL_DB_MANS, test "x$SASL_DB_MANS" = "x")
207
208 AC_ARG_ENABLE(keep_db_open, [ --enable-keep-db-open keep handle to DB open for improved performance [[no]] ],
209 keep_db_open=$enableval,
210 keep_db_open=no)
211
212 # Disable if Berkeley DB and LMDB are not used
213 if test "$dblib" != berkeley -a "$dblib" != lmdb; then
214 keep_db_open=no
215 fi
216
217 if test "$keep_db_open" = yes; then
218 AC_DEFINE(KEEP_DB_OPEN,[],[Should we keep handle to DB open in SASLDB plugin?])
219 fi
220 AC_MSG_CHECKING(if DB handle is kept open in SASLDB)
221 AC_MSG_RESULT($keep_db_open)
222
223 AC_CHECK_LIB(dl, dlopen, SASL_DL_LIB="-ldl", SASL_DL_LIB="")
224 AC_SUBST(SASL_DL_LIB)
225
226 dnl /dev/random ?
227
228 AC_ARG_WITH(devrandom, [ --with-devrandom=PATH set the path to /dev/random [[/dev/random]] ],
229 devrandom=$withval,
230 devrandom=/dev/random)
231 AC_MSG_CHECKING(/dev/random to use)
232 AC_MSG_RESULT($devrandom)
233 AC_DEFINE_UNQUOTED(SASL_DEV_RANDOM, "$devrandom", [File to use for source of randomness])
234
235 dnl Do we need leading underscores on our symbols?
236
237 AC_CHECK_PROGS(NM, nm)
238
239 AC_MSG_CHECKING(for underscore before symbols)
240 AC_CACHE_VAL(sasl_cv_uscore,[
241 echo "void main(){int i=1;}
242 void foo(){int i=6;}" > conftest.c
243 ${CC} -o a.out conftest.c > /dev/null
244 if (${NM} a.out | grep _foo) > /dev/null; then
245 sasl_cv_uscore=yes
246 else
247 sasl_cv_uscore=no
248 fi])
249 AC_MSG_RESULT($sasl_cv_uscore)
250 rm -f conftest.c a.out
251
252 if test $sasl_cv_uscore = yes; then
253 if test $ac_cv_lib_dl_dlopen = yes ; then
254 AC_MSG_CHECKING(whether dlsym adds the underscore for us)
255 cmu_save_LIBS="$LIBS"
256 LIBS="$LIBS $SASL_DL_LIB"
257 AC_CACHE_VAL(sasl_cv_dlsym_adds_uscore,AC_TRY_RUN( [
258 #include <dlfcn.h>
259 #include <stdio.h>
260 void foo() { int i=0;}
261 void main() { void *self, *ptr1, *ptr2; self=dlopen(NULL,RTLD_LAZY);
262 if(self) { ptr1=dlsym(self,"foo"); ptr2=dlsym(self,"_foo");
263 if(ptr1 && !ptr2) exit(0); } exit(1); }
264 ], [sasl_cv_dlsym_adds_uscore=yes], sasl_cv_dlsym_adds_uscore=no
265 AC_DEFINE(DLSYM_NEEDS_UNDERSCORE, [], [Do we need a leading _ for dlsym?]),
266 AC_MSG_WARN(cross-compiler, we'll do our best)))
267 LIBS="$cmu_save_LIBS"
268 AC_MSG_RESULT($sasl_cv_dlsym_adds_uscore)
269 fi
270 fi
271
272 dnl See if we can provide a default logging function...
273 AC_CHECK_FUNCS(syslog)
274
275 AC_ARG_WITH(pam, [ --with-pam=DIR use PAM (rooted in DIR) [[yes]] ],
276 with_pam=$withval,
277 with_pam=yes)
278 if test "$with_pam" != no; then
279 if test -d $with_pam; then
280 CPPFLAGS="$CPPFLAGS -I${with_pam}/include"
281 LDFLAGS="$LDFLAGS -L${with_pam}/lib"
282 fi
283 AC_CHECK_HEADERS(security/pam_appl.h pam/pam_appl.h)
284 cmu_save_LIBS="$LIBS"
285 AC_CHECK_FUNC(pam_start, :,
286 LIBS="-lpam $LIBS"
287 AC_TRY_LINK([[
288 #include <sys/types.h>
289 #ifdef HAVE_PAM_PAM_APPL_H
290 #include <pam/pam_appl.h>
291 #endif
292 #ifdef HAVE_SECURITY_PAM_H
293 #include <security/pam_appl.h>
294 #endif]],[[
295 const char *service="foo";
296 const char *user="bar";
297 pam_handle_t *pamh;
298 struct pam_conv *conv;
299 int baz;
300 baz = pam_start(service, user, conv, &pamh);
301 return 0;
302 ]], LIBPAM="-lpam")
303 )
304 LIBS="$cmu_save_LIBS $LIBPAM"
305 fi
306
307 AC_ARG_WITH(saslauthd, [ --with-saslauthd=DIR enable use of the saslauth daemon using state dir DIR ],
308 with_saslauthd=$withval,
309 with_saslauthd=yes)
310 if test "$with_saslauthd" != no; then
311 if test "$with_saslauthd" = yes; then
312 with_saslauthd="/var/state/saslauthd"
313 fi
314 AC_DEFINE(HAVE_SASLAUTHD,[],[Include support for saslauthd?])
315 AC_DEFINE_UNQUOTED(PATH_SASLAUTHD_RUNDIR, "$with_saslauthd",
316 [Where do we look for saslauthd's socket?])
317 fi
318 AM_CONDITIONAL(SASLAUTHD, test "$with_saslauthd" != no)
319 AC_MSG_CHECKING(if I should include saslauthd)
320 AC_MSG_RESULT($with_saslauthd)
321
322 AC_ARG_WITH(authdaemond, [ --with-authdaemond=PATH enable use of authdaemon with default socket=PATH [[yes]] ],
323 with_authdaemon=$withval,
324 with_authdaemon=yes)
325 if test "$with_authdaemon" != no; then
326 if test "$with_authdaemon" = yes; then
327 with_authdaemon="/dev/null"
328 fi
329 AC_DEFINE(HAVE_AUTHDAEMON,[],[Include support for Courier's authdaemond?])
330 AC_DEFINE_UNQUOTED(PATH_AUTHDAEMON_SOCKET, "$with_authdaemon",
331 [Where do we look for Courier authdaemond's socket?])
332 fi
333 AC_MSG_CHECKING(to include Courier authdaemond support)
334 AC_MSG_RESULT($with_authdaemon)
335
336 AC_ARG_WITH(pwcheck,
337 [ --with-pwcheck=DIR enable deprecated pwcheck daemon using statedir DIR ],
338 with_pwcheck=$withval,
339 with_pwcheck=no)
340 if test "$with_pwcheck" != no; then
341 if test "$with_pwcheck" = yes; then
342 with_pwcheck=/var/pwcheck
343 fi
344 AC_DEFINE(HAVE_PWCHECK,[],[Include Support for pwcheck daemon?])
345 AC_DEFINE_UNQUOTED(PWCHECKDIR, "$with_pwcheck", [Location of pwcheck socket])
346 AC_CHECK_FUNC(getspnam,PWCHECKMETH="getspnam",PWCHECKMETH="getpwnam")
347 AC_SUBST(PWCHECKMETH)
348 fi
349 AM_CONDITIONAL(PWCHECK, test "$with_pwcheck" != no)
350 AC_MSG_CHECKING(if I should include pwcheck)
351 AC_MSG_RESULT($with_pwcheck)
352
353 AC_ARG_WITH(ipctype, [ --with-ipctype={unix,doors} use ipctype [[unix]] ],
354 with_ipctype=$withval,
355 with_ipctype="unix")
356 IPCTYPE=$with_ipctype
357 AC_SUBST(IPCTYPE)
358 LIB_DOOR=
359 if test "$with_ipctype" = "doors"; then
360 LIB_DOOR="-ldoor"
361 AC_DEFINE(USE_DOORS,[],[use the doors IPC API for saslauthd?])
362 fi
363 AC_SUBST(LIB_DOOR)
364
365 AC_ARG_ENABLE(alwaystrue, [ --enable-alwaystrue enable the alwaystrue password verifier (discouraged)],
366 enable_alwaystrue=$enableval,
367 enable_alwaystrue=no)
368 if test "$enable_alwaystrue" = yes; then
369 AC_DEFINE(HAVE_ALWAYSTRUE, [], [Enable 'alwaystrue' password verifier?])
370 fi
371 AC_MSG_CHECKING(if I should include the alwaystrue verifier)
372 AC_MSG_RESULT($enable_alwaystrue)
373
374 dnl sasl_checkapop support
375 AC_ARG_ENABLE(checkapop, [ --enable-checkapop enable use of sasl_checkapop [[yes]] ],
376 checkapop=$enableval,
377 checkapop=yes)
378
379 AC_MSG_CHECKING(if we should enable sasl_checkapop)
380 if test "$checkapop" != no; then
381 AC_MSG_RESULT(enabled)
382 AC_DEFINE(DO_SASL_CHECKAPOP, [], [should we support sasl_checkapop?])
383 else
384 AC_MSG_RESULT(disabled)
385 fi
386
387 dnl CRAM-MD5
388 AC_ARG_ENABLE(cram, [ --enable-cram enable CRAM-MD5 authentication [[yes]] ],
389 cram=$enableval,
390 cram=yes)
391
392 AC_MSG_CHECKING(CRAM-MD5)
393 if test "$cram" != no; then
394 AC_MSG_RESULT(enabled)
395 SASL_MECHS="$SASL_MECHS libcrammd5.la"
396 if test "$enable_obsolete_cram_attr" = yes; then
397 CPPFLAGS="$CPPFLAGS -DOBSOLETE_CRAM_ATTR=1"
398 fi
399 if test "$enable_static" = yes; then
400 SASL_STATIC_OBJS="$SASL_STATIC_OBJS cram.o"
401 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/cram.c"
402 AC_DEFINE(STATIC_CRAMMD5, [], [Link CRAM-MD5 Statically])
403 fi
404 else
405 AC_MSG_RESULT(disabled)
406 fi
407
408 CMU_HAVE_OPENSSL
409 AC_MSG_CHECKING(for OpenSSL)
410 AC_MSG_RESULT($with_openssl)
411
412 SASL_DES_CHK
413
414 dnl DIGEST-MD5
415 AC_ARG_ENABLE(digest, [ --enable-digest enable DIGEST-MD5 authentication [[yes]] ],
416 digest=$enableval,
417 digest=yes)
418
419 if test "$digest" != no; then
420 dnl In order to compile digest, we should look for need libdes.
421 if test -d $digest; then
422 CPPFLAGS="$CPPFLAGS -I$digest/include"
423 LDFLAGS="$LDFLAGS -L$digest/lib"
424 fi
425 if test "$with_des" = no; then
426 AC_WARN(No DES support for DIGEST-MD5)
427 fi
428 fi
429
430 AC_MSG_CHECKING(DIGEST-MD5)
431 if test "$digest" != no; then
432 AC_MSG_RESULT(enabled)
433 SASL_MECHS="$SASL_MECHS libdigestmd5.la"
434 if test "$enable_static" = yes; then
435 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/digestmd5.c"
436 SASL_STATIC_OBJS="$SASL_STATIC_OBJS digestmd5.o"
437 AC_DEFINE(STATIC_DIGESTMD5, [], [Link DIGEST-MD5 Statically])
438 fi
439 else
440 AC_MSG_RESULT(disabled)
441 fi
442
443 dnl SCRAM
444 AC_ARG_ENABLE(scram, [ --enable-scram enable SCRAM authentication [[yes]] ],
445 scram=$enableval,
446 scram=yes)
447
448 if test "$with_openssl" = no; then
449 AC_WARN([OpenSSL not found -- SCRAM will be disabled])
450 scram=no
451 fi
452
453 AC_MSG_CHECKING(SCRAM)
454 if test "$scram" != no; then
455 AC_MSG_RESULT(enabled)
456 SCRAM_LIBS="-lcrypto $LIB_RSAREF"
457
458 SASL_MECHS="$SASL_MECHS libscram.la"
459 if test "$enable_static" = yes; then
460 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/scram.c"
461 SASL_STATIC_OBJS="$SASL_STATIC_OBJS scram.o"
462 AC_DEFINE(STATIC_SCRAM, [], [Link SCRAM Statically])
463 fi
464
465 AC_SUBST(SCRAM_LIBS)
466 else
467 AC_MSG_RESULT(disabled)
468 fi
469
470 dnl OTP
471 AC_ARG_ENABLE(otp, [ --enable-otp enable OTP authentication [[yes]] ],
472 otp=$enableval,
473 otp=yes)
474
475 if test "$with_openssl" = no; then
476 AC_WARN([OpenSSL not found -- OTP will be disabled])
477 otp=no
478 fi
479
480 AC_MSG_CHECKING(OTP)
481 if test "$otp" != no; then
482 AC_MSG_RESULT(enabled)
483 OTP_LIBS="-lcrypto $LIB_RSAREF"
484
485 SASL_MECHS="$SASL_MECHS libotp.la"
486 if test "$enable_static" = yes; then
487 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/otp.c"
488 SASL_STATIC_OBJS="$SASL_STATIC_OBJS otp.o"
489 AC_DEFINE(STATIC_OTP, [], [Link OTP Statically])
490 fi
491
492 dnl Test for OPIE
493 AC_ARG_WITH(with-opie,[ --with-opie=PATH use OPIE (One Time Passwords in Everything) from PATH],
494 with_opie="${withval}")
495
496 case "$with_opie" in
497 ""|yes)
498 AC_CHECK_LIB(opie, opiechallenge, [
499 AC_CHECK_HEADER(opie.h, with_opie="yes",
500 with_opie="no")],
501 with_opie="no")
502 ;;
503 *)
504 if test -d $with_opie; then
505 CPPFLAGS="${CPPFLAGS} -I${with_opie}/include"
506 LDFLAGS="${LDFLAGS} -L${with_opie}/lib"
507 else
508 with_opie="no"
509 fi
510 ;;
511 esac
512
513 AC_MSG_CHECKING(for OPIE)
514 AC_MSG_RESULT($with_opie)
515
516 if test "$with_opie" != no; then
517 AC_DEFINE(HAVE_OPIE,[],[Use OPIE for server-side OTP?])
518 OTP_LIBS="$OTP_LIBS -lopie"
519 fi
520
521 AC_SUBST(OTP_LIBS)
522
523 else
524 AC_MSG_RESULT(disabled)
525 fi
526
527 dnl SRP
528 AC_ARG_ENABLE(srp, [ --enable-srp enable SRP authentication [[no]] ],
529 srp=$enableval,
530 srp=no)
531
532 if test "$with_openssl" = no; then
533 AC_WARN([OpenSSL not found -- SRP will be disabled])
534 srp=no
535 fi
536
537 AC_MSG_CHECKING(SRP)
538 if test "$srp" != no; then
539 AC_MSG_RESULT(enabled)
540 SRP_LIBS="-lcrypto $LIB_RSAREF"
541
542 SASL_MECHS="$SASL_MECHS libsrp.la"
543 if test "$enable_static" = yes; then
544 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/srp.c"
545 SASL_STATIC_OBJS="$SASL_STATIC_OBJS srp.o"
546 AC_DEFINE(STATIC_SRP, [], [Link SRP Statically])
547 fi
548
549 dnl srp_setpass support
550 AC_ARG_ENABLE(srp_setpass, [ --enable-srp-setpass enable setting SRP secrets with saslpasswd [[no]]],
551 srp_setpass=$enableval,
552 srp_setpass=no)
553
554 AC_MSG_CHECKING(if we should enable setting SRP secrets with saslpasswd)
555 if test "$srp_setpass" != no; then
556 AC_MSG_RESULT(enabled)
557 AC_DEFINE(DO_SRP_SETPASS, [], [should we support setpass() for SRP?])
558 else
559 AC_MSG_RESULT(disabled)
560 fi
561
562 AC_SUBST(SRP_LIBS)
563 else
564 AC_MSG_RESULT(disabled)
565 fi
566
567 dnl Kerberos based Mechanisms
568 SASL_KERBEROS_V4_CHK
569 SASL_GSSAPI_CHK
570
571 if test "$gssapi" != "no"; then
572 AC_DEFINE(STATIC_GSSAPIV2,[],[Link GSSAPI Statically])
573 AC_DEFINE(HAVE_GSSAPI,[],[Include GSSAPI/Kerberos 5 Support])
574
575 mutex_default="no"
576 if test "$gss_impl" = "mit"; then
577 mutex_default="yes"
578 elif test "$gss_impl" = "heimdal"; then
579 AC_DEFINE(KRB5_HEIMDAL,[],[Using Heimdal])
580 fi
581
582 AC_MSG_CHECKING(to use mutexes aroung GSS calls)
583 AC_ARG_ENABLE(gss_mutexes, [ --enable-gss_mutexes use mutexes around calls to the GSS library],
584 use_gss_mutexes=$enableval,
585 use_gss_mutexes=$mutex_default)
586 if test $use_gss_mutexes = "yes"; then
587 AC_DEFINE(GSS_USE_MUTEXES, [], [should we mutex-wrap calls into the GSS library?])
588 fi
589 AC_MSG_RESULT($use_gss_mutexes)
590 fi
591
592 SASL2_CRYPT_CHK
593
594 AC_ARG_ENABLE(sia, [ --enable-sia enable SIA authentication [no] ],
595 sia=$enableval,
596 sia=no)
597 LIB_SIA=""
598 if test "$sia" != no; then
599 if test -f /etc/sia/matrix.conf; then
600 AC_DEFINE(HAVE_SIA,[],[Include SIA Support])
601 LIB_SIA="-lsecurity -ldb -lm -laud"
602 else
603 AC_ERROR([No support for SIA found])
604 fi
605 fi
606 AC_SUBST(LIB_SIA)
607
608 AC_ARG_ENABLE(auth-sasldb, [ --enable-auth-sasldb enable experimental SASLdb authentication module [no] ],
609 authsasldb=$enableval,
610 authsasldb=no)
611 if test "$authsasldb" != no; then
612 if test ! -d "../sasldb"; then
613 echo "ERROR: Cannot build sasldb module outside of the full SASL source tree."
614 exit 0;
615 fi
616 AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support])
617 SASL_DB_PATH_CHECK()
618 SASL_DB_CHECK()
619 SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al"
620 fi
621
622 AC_ARG_ENABLE(httpform, [ --enable-httpform enable HTTP form authentication [[no]] ],
623 httpform=$enableval,
624 httpform=no)
625 if test "$httpform" != no; then
626 AC_DEFINE(HAVE_HTTPFORM,[],[Include HTTP form Support])
627 fi
628
629 AC_ARG_WITH(pam, [ --with-pam=DIR use PAM (rooted in DIR) [yes] ],
630 with_pam=$withval,
631 with_pam=yes)
632 if test "$with_pam" != no; then
633 if test -d $with_pam; then
634 CPPFLAGS="$CPPFLAGS -I${with_pam}/include"
635 LDFLAGS="$LDFLAGS -L${with_pam}/lib"
636 fi
637 cmu_save_LIBS="$LIBS"
638 AC_CHECK_LIB(pam, pam_start, [
639 AC_CHECK_HEADER(security/pam_appl.h,,
640 with_pam=no)],
641 with_pam=no, $SASL_DL_LIB)
642 LIBS="$cmu_save_LIBS"
643 fi
644
645 AC_MSG_CHECKING(for PAM support)
646 AC_MSG_RESULT($with_pam)
647 LIB_PAM=""
648 if test "$with_pam" != no; then
649 AC_DEFINE(HAVE_PAM,[],[Support for PAM?])
650 LIB_PAM="-lpam"
651 fi
652 AC_SUBST(LIB_PAM)
653
654 dnl PLAIN
655 SASL_PLAIN_CHK
656
657 dnl ANONYMOUS
658 AC_ARG_ENABLE(anon, [ --enable-anon enable ANONYMOUS authentication [[yes]] ],
659 anon=$enableval,
660 anon=yes)
661
662 AC_MSG_CHECKING(ANONYMOUS)
663 if test "$anon" != no; then
664 AC_MSG_RESULT(enabled)
665 SASL_MECHS="$SASL_MECHS libanonymous.la"
666 if test "$enable_static" = yes; then
667 SASL_STATIC_OBJS="$SASL_STATIC_OBJS anonymous.o"
668 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/anonymous.c"
669 AC_DEFINE(STATIC_ANONYMOUS, [], [Link ANONYMOUS Statically])
670 fi
671 else
672 AC_MSG_RESULT(disabled)
673 fi
674
675 dnl LOGIN
676 AC_ARG_ENABLE(login, [ --enable-login enable unsupported LOGIN authentication [[no]] ],
677 login=$enableval,
678 login=no)
679
680 AC_MSG_CHECKING(LOGIN)
681 if test "$login" != no; then
682 AC_MSG_RESULT(enabled)
683 SASL_MECHS="$SASL_MECHS liblogin.la"
684 if test "$enable_static" = yes; then
685 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/login.c"
686 SASL_STATIC_OBJS="$SASL_STATIC_OBJS login.o"
687 AC_DEFINE(STATIC_LOGIN,[],[Link LOGIN Statically])
688 fi
689 else
690 AC_MSG_RESULT(disabled)
691 fi
692
693 dnl NTLM
694 AC_ARG_ENABLE(ntlm, [ --enable-ntlm enable unsupported NTLM authentication [[no]] ],
695 ntlm=$enableval,
696 ntlm=no)
697
698 if test "$with_openssl" = no; then
699 AC_WARN([OpenSSL not found -- NTLM will be disabled])
700 ntlm=no
701 fi
702
703 AC_MSG_CHECKING(NTLM)
704 if test "$ntlm" != no; then
705 AC_MSG_RESULT(enabled)
706 NTLM_LIBS="-lcrypto $LIB_RSAREF"
707 AC_SUBST(NTLM_LIBS)
708
709 SASL_MECHS="$SASL_MECHS libntlm.la"
710 if test "$enable_static" = yes; then
711 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/ntlm.c"
712 SASL_STATIC_OBJS="$SASL_STATIC_OBJS ntlm.o"
713 AC_DEFINE(STATIC_NTLM,[],[Link NTLM Statically])
714 fi
715 else
716 AC_MSG_RESULT(disabled)
717 fi
718
719 dnl PASSDSS
720 AC_ARG_ENABLE(passdss, [ --enable-passdss enable PASSDSS authentication (experimental) [[no]] ],
721 passdss=$enableval,
722 passdss=no)
723
724 if test "$with_openssl" = no; then
725 AC_WARN([OpenSSL not found -- PASSDSS will be disabled])
726 passdss=no
727 fi
728
729 AC_MSG_CHECKING(PASSDSS)
730 if test "$passdss" != no; then
731 AC_MSG_RESULT(enabled)
732 PASSDSS_LIBS="-lcrypto $LIB_RSAREF"
733 AC_SUBST(PASSDSS_LIBS)
734
735 SASL_MECHS="$SASL_MECHS libpassdss.la"
736 if test "$enable_static" = yes; then
737 SASL_STATIC_OBJS="$SASL_STATIC_OBJS passdss.o"
738 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/passdss.c"
739 AC_DEFINE(STATIC_PASSDSS,[],[Link PASSDSS Statically])
740 fi
741 else
742 AC_MSG_RESULT(disabled)
743 fi
744
745
746 AC_MSG_CHECKING(to include LDAP support)
747 AC_ARG_WITH(ldap, [ --with-ldap=DIR use LDAP (in DIR) for saslauthd [no] ],
748 with_ldap=$withval,
749 with_ldap=no)
750 AC_MSG_RESULT($with_ldap)
751
752 if test -d $with_ldap; then
753 CPPFLAGS="$CPPFLAGS -I${with_ldap}/include"
754 CMU_ADD_LIBPATH(${with_ldap}/lib)
755 fi
756
757 LDAP_LIBS=""
758 if test "$with_ldap" != no; then
759 AC_CHECK_LIB(ldap, ldap_initialize, [ AC_DEFINE(HAVE_LDAP,[],[Support for LDAP?])
760 LDAP_LIBS="-lldap -llber"
761 if test "$with_openssl" != "no"; then
762 LDAP_LIBS="$LDAP_LIBS -lcrypto $LIB_RSAREF"
763 fi],,-llber)
764 fi
765 AC_SUBST(LDAP_LIBS)
766
767
768 dnl SQL
769 dnl This flag also changes the requirements of --with-mysql and --with-pgsql
770 dnl
771 dnl Desired behavior:
772 dnl
773 dnl doesn't require mysql or postgres if --disable-sql is chosen
774 dnl requires at least one (but not both) if --enable-sql is chosen
775
776 AC_ARG_ENABLE(sql, [ --enable-sql enable SQL auxprop [[no]] ],
777 sql=$enableval,
778 sql=no)
779
780 AC_MSG_CHECKING(SQL)
781 if test "$sql" != no; then
782 AC_MSG_RESULT(enabled)
783 SASL_MECHS="$SASL_MECHS libsql.la"
784 if test "$enable_static" = yes; then
785 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/sql.c"
786 SASL_STATIC_OBJS="$SASL_STATIC_OBJS sql.o"
787 AC_DEFINE(STATIC_SQL,[],[Link SQL plugin statically])
788 fi
789 else
790 AC_MSG_RESULT(disabled)
791 fi
792
793 dnl MySQL
794 AC_ARG_WITH(mysql, [ --with-mysql=PATH use MySQL from PATH ],
795 with_mysql=$withval,
796 with_mysql=$sql)
797
798 # find location of library
799 # presuming if one given then correct
800 if test "${with_mysql}" = "yes"; then
801 with_mysql=notfound
802 for mysqlloc in lib/mysql lib mysql/lib
803 do
804 if test -f ${prefix}/${mysqlloc}/libmysqlclient.a; then
805 with_mysql="${prefix}"
806 break
807 elif test -f /usr/local/${mysqlloc}/libmysqlclient.a; then
808 with_mysql="/usr/local"
809 break
810 elif test -f /usr/${mysqlloc}/libmysqlclient.a; then
811 with_mysql="/usr"
812 break
813 fi
814 done
815 fi
816
817 LIB_MYSQL=""
818
819 case "$with_mysql" in
820 no) true;;
821 notfound)
822 save_LDFLAGS=$LDFLAGS
823 LIB_MYSQL=`mysql_config --libs`
824 LIB_MYSQL="-lmysqlclient"
825 LDFLAGS="$LDFLAGS $LIB_MYSQL"
826 # CPPFLAGS="${CPPFLAGS} `mysql_config --include`"
827 AC_CHECK_LIB(mysqlclient, mysql_select_db,
828 AC_DEFINE(HAVE_MYSQL, [], [Do we have mysql support?]),
829 [AC_WARN([MySQL library mysqlclient does not work])
830 with_mysql=no])
831 LDFLAGS=$save_LDFLAGS
832 ;;
833 *)
834 if test -d ${with_mysql}/lib/mysql; then
835 CMU_ADD_LIBPATH_TO(${with_mysql}/lib/mysql, LIB_MYSQL)
836 elif test -d ${with_mysql}/mysql/lib; then
837 CMU_ADD_LIBPATH_TO(${with_mysql}/mysql/lib, LIB_MYSQL)
838 elif test -d ${with_mysql}/lib; then
839 CMU_ADD_LIBPATH_TO(${with_mysql}/lib, LIB_MYSQL)
840 else
841 CMU_ADD_LIBPATH_TO(${with_mysql}, LIB_MYSQL)
842 fi
843
844 LIB_MYSQL_DIR=$LIB_MYSQL
845 LIB_MYSQL="$LIB_MYSQL -lmysqlclient"
846
847 if test -d ${with_mysql}/include/mysql; then
848 CPPFLAGS="${CPPFLAGS} -I${with_mysql}/include/mysql"
849 elif test -d ${with_mysql}/mysql/include; then
850 CPPFLAGS="${CPPFLAGS} -I${with_mysql}/mysql/include"
851 elif test -d ${with_mysql}/include; then
852 CPPFLAGS="${CPPFLAGS} -I${with_mysql}/include"
853 elif test -d ${prefix}/include/mysql; then
854 CPPFLAGS="${CPPFLAGS} -I${prefix}/include/mysql"
855 else
856 CPPFLAGS="${CPPFLAGS} -I${with_mysql}"
857 fi
858
859 save_LDFLAGS=$LDFLAGS
860 LDFLAGS="$LDFLAGS $LIB_MYSQL_DIR"
861 AC_CHECK_LIB(mysqlclient, mysql_select_db,
862 AC_DEFINE(HAVE_MYSQL, [], [Do we have mysql support?]),
863 [AC_WARN([MySQL library mysqlclient does not work])
864 with_mysql=no])
865 LDFLAGS=$save_LDFLAGS;;
866
867 esac
868 AC_SUBST(LIB_MYSQL)
869
870 dnl PgSQL
871 AC_ARG_WITH(pgsql, [ --with-pgsql=PATH use PostgreSQL from PATH ],
872 with_pgsql=$withval,
873 with_pgsql=$sql)
874
875 # find location of library
876 # presuing if one given then correct
877 if test "${with_pgsql}" = "yes"; then
878 with_pgsql=notfound
879 for pgsqlloc in lib/pgsql lib pgsql/lib
880 do
881 if test -f ${prefix}/${pgsqlloc}/libpq.a; then
882 with_pgsql="${prefix}"
883 break
884 elif test -f /usr/local/${pgsqlloc}/libpq.a; then
885 with_pgsql="/usr/local"
886 break
887 elif test -f /usr/${pgsqlloc}/libpq.a; then
888 with_pgsql="/usr"
889 break
890 fi
891 done
892 fi
893
894 LIB_PGSQL=""
895
896 case "$with_pgsql" in
897 no) true;;
898 notfound)
899 LIB_PGSQL="-lpq"
900 # CPPFLAGS="${CPPFLAGS} -I`pg_config --includedir`"
901 save_LDFLAGS=$LDFLAGS
902 LDFLAGS="$LDFLAGS $LIB_PGSQL"
903 AC_CHECK_LIB(pq, PQsetdbLogin, AC_DEFINE(HAVE_PGSQL,[],
904 [Do we have Postgres support?]),
905 [AC_WARN([PostgreSQL Library pq does not work])
906 with_pgsql=no])
907 LDFLAGS=$save_LDFLAGS
908 ;;
909 *)
910 if test -d ${with_pgsql}/lib/pgsql; then
911 CMU_ADD_LIBPATH_TO(${with_pgsql}/lib/pgsql, LIB_PGSQL)
912 elif test -d ${with_pgsql}/pgsql/lib; then
913 CMU_ADD_LIBPATH_TO(${with_pgsql}/pgsql/lib, LIB_PGSQL)
914 elif test -d ${with_pgsql}/lib; then
915 CMU_ADD_LIBPATH_TO(${with_pgsql}/lib, LIB_PGSQL)
916 else
917 CMU_ADD_LIBPATH_TO(${with_pgsql}, LIB_PGSQL)
918 fi
919
920 LIB_PGSQL_DIR=$LIB_PGSQL
921 LIB_PGSQL="$LIB_PGSQL -lpq"
922
923 if test -d ${with_pgsql}/include/pgsql; then
924 CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/include/pgsql"
925 elif test -d ${with_pgsql}/pgsql/include; then
926 CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/pgsql/include"
927 elif test -d ${with_pgsql}/include; then
928 CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/include"
929 elif test -d ${prefix}/include; then
930 CPPFLAGS="${CPPFLAGS} -I${prefix}/include"
931 else
932 CPPFLAGS="${CPPFLAGS} -I${with_pgsql}"
933 fi
934
935
936 save_LDFLAGS=$LDFLAGS
937 LDFLAGS="$LDFLAGS $LIB_PGSQL_DIR"
938 AC_CHECK_LIB(pq, PQsetdbLogin, AC_DEFINE(HAVE_PGSQL,[],
939 [Do we have Postgres support?]),
940 [AC_WARN([PostgreSQL Library pq does not work])
941 with_pgsql=no])
942 LDFLAGS=$save_LDFLAGS;;
943
944 esac
945 AC_SUBST(LIB_PGSQL)
946
947 dnl SQLite
948 AC_ARG_WITH(sqlite, [ --with-sqlite=PATH use SQLite from PATH ],
949 with_sqlite=$withval,
950 with_sqlite=$sql)
951
952 # find location of library
953 # presuing if one given then correct
954 if test "${with_sqlite}" = "yes"; then
955 with_sqlite=notfound
956 for sqliteloc in lib
957 do
958 if test -f ${prefix}/${sqliteloc}/libsqlite.a; then
959 with_sqlite="${prefix}"
960 break
961 elif test -f /usr/local/${sqliteloc}/libsqlite.a; then
962 with_sqlite="/usr/local"
963 break
964 elif test -f /usr/${sqliteloc}/libsqlite.a; then
965 with_sqlite="/usr"
966 break
967 fi
968 done
969 fi
970
971 LIB_SQLITE=""
972
973 case "$with_sqlite" in
974 no) true;;
975 notfound) AC_WARN([SQLite Library not found]); true;;
976 *)
977 if test -d ${with_sqlite}/lib; then
978 LIB_SQLITE="-L${with_sqlite}/lib -R${with_sqlite}/lib"
979 else
980 LIB_SQLITE="-L${with_sqlite} -R${with_sqlite}"
981 fi
982
983 LIB_SQLITE_DIR=$LIB_SQLITE
984 LIB_SQLITE="$LIB_SQLITE -lsqlite"
985
986 if test -d ${with_sqlite}/include; then
987 CPPFLAGS="${CPPFLAGS} -I${with_sqlite}/include"
988 else
989 CPPFLAGS="${CPPFLAGS} -I${with_sqlite}"
990 fi
991 AC_CHECK_LIB(sqlite, sqlite_open, AC_DEFINE(HAVE_SQLITE,[],
992 [Do we have SQLite support?]),
993 [AC_WARN([SQLite Library sqlite does not work])
994 with_sqlite=no], $LIB_SQLITE_DIR);;
995
996 esac
997 AC_SUBST(LIB_SQLITE)
998
999 dnl SQLite3
1000 AC_ARG_WITH(sqlite3, [ --with-sqlite3=PATH use SQLite3 from PATH ],
1001 with_sqlite3=$withval,
1002 with_sqlite3=$sql)
1003
1004 # find location of library
1005 # we assume that if one given then it is correct
1006 if test "${with_sqlite3}" = "yes"; then
1007 with_sqlite3=notfound
1008 for sqlite3loc in lib
1009 do
1010 if test -f ${prefix}/${sqlite3loc}/libsqlite3.a; then
1011 with_sqlite3="${prefix}"
1012 break
1013 elif test -f /usr/local/${sqlite3loc}/libsqlite3.a; then
1014 with_sqlite3="/usr/local"
1015 break
1016 elif test -f /usr/${sqlite3loc}/libsqlite3.a; then
1017 with_sqlite3="/usr"
1018 break
1019 fi
1020 done
1021 fi
1022
1023 LIB_SQLITE3=""
1024
1025 case "$with_sqlite3" in
1026 no) true;;
1027 notfound) AC_WARN([SQLite3 Library not found]); true;;
1028 *)
1029 if test -d ${with_sqlite3}/lib; then
1030 LIB_SQLITE3="-L${with_sqlite3}/lib -R${with_sqlite3}/lib"
1031 else
1032 LIB_SQLITE3="-L${with_sqlite3} -R${with_sqlite3}"
1033 fi
1034
1035 LIB_SQLITE3_DIR=$LIB_SQLITE3
1036 LIB_SQLITE3="$LIB_SQLITE3 -lsqlite3"
1037
1038 if test -d ${with_sqlite3}/include; then
1039 CPPFLAGS="${CPPFLAGS} -I${with_sqlite3}/include"
1040 else
1041 CPPFLAGS="${CPPFLAGS} -I${with_sqlite3}"
1042 fi
1043 AC_CHECK_LIB(sqlite3, sqlite3_open, AC_DEFINE(HAVE_SQLITE3,[],
1044 [Do we have SQLite3 support?]),
1045 [AC_WARN([SQLite3 Library sqlite3 does not work])
1046 with_sqlite3=no], $LIB_SQLITE3_DIR);;
1047
1048 esac
1049 AC_SUBST(LIB_SQLITE3)
1050
1051 if test "$sql" = yes -a "$with_pgsql" = no -a "$with_mysql" = no -a "$with_sqlite" = no -a "$with_sqlite3" = no; then
1052 AC_ERROR([--enable-sql chosen but neither Postgres nor MySQL nor SQLite nor SQLite3 found])
1053 fi
1054
1055 if test "$enable_shared" = yes; then
1056 AC_DEFINE(DO_DLOPEN,[],[Should we build a shared plugin (via dlopen) library?])
1057 fi
1058
1059 dnl LDAPDB
1060 AC_ARG_ENABLE(ldapdb, [ --enable-ldapdb enable LDAPDB plugin [no] ],
1061 ldapdb=$enableval,
1062 ldapdb=no)
1063 AC_MSG_CHECKING(LDAPDB)
1064 if test "$ldapdb" != no; then
1065 AC_MSG_RESULT(enabled)
1066
1067 if test "$with_ldap" = no; then
1068 AC_MSG_ERROR([Cannot enable LDAPDB plugin: You need to specify --with-ldap])
1069 fi
1070
1071 save_CPPFLAGS=$CPPFLAGS
1072 save_LDFLAGS=$LDFLAGS
1073
1074 if test -d $with_ldap; then
1075 CPPFLAGS="${CPPFLAGS} -I${with_ldap}/include"
1076 CMU_ADD_LIBPATH(${with_ldap}/lib)
1077 fi
1078
1079 AC_CHECK_HEADERS(ldap.h lber.h)
1080
1081 if test $ac_cv_header_ldap_h = yes -a $ac_cv_header_lber_h = yes; then
1082 CMU_OPENLDAP_API
1083
1084 if test "$cmu_cv_openldap_api" = yes; then
1085 AC_CHECK_LIB(ldap, ldap_initialize, [ cmu_link_openldap="-lldap -llber" ], [ cmu_link_openldap=no ],-llber)
1086 fi
1087 fi
1088
1089 if test "$cmu_cv_openldap_api" = no -o "$cmu_link_openldap" = no; then
1090 AC_MSG_ERROR([Cannot enable LDAPDB plugin: Could not locate OpenLDAP])
1091 else
1092 CMU_OPENLDAP_COMPAT
1093
1094 if test "$cmu_cv_openldap_compat" = no; then
1095 AC_MSG_ERROR([Cannot enable LDAPDB plugin: OpenLDAP library located but incompatible])
1096 else
1097 LIB_LDAP=$cmu_link_openldap
1098 AC_SUBST(LIB_LDAP)
1099
1100 SASL_MECHS="$SASL_MECHS libldapdb.la"
1101 if test "$enable_static" = yes; then
1102 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/ldapdb.c"
1103 SASL_STATIC_OBJS="$SASL_STATIC_OBJS ldapdb.o"
1104 AC_DEFINE(STATIC_LDAPDB,[],[Link ldapdb plugin Statically])
1105 fi
1106 fi
1107 fi
1108
1109 if test "$cmu_cv_openldap_compat" != yes; then
1110 CPPFLAGS=$save_CPPFLAGS
1111 LDFLAGS=$save_LDFLAGS
1112 fi
1113 else
1114 AC_MSG_RESULT(disabled)
1115 fi
1116
1117 AC_SUBST(SASL_MECHS)
1118 AC_SUBST(SASL_STATIC_SRCS)
1119 AC_SUBST(SASL_STATIC_OBJS)
1120 AC_SUBST(SASL_STATIC_LIBS)
1121
1122 AC_ARG_WITH(plugindir, [ --with-plugindir=DIR set the directory where plugins will
1123 be found [[/usr/lib/sasl2]] ],
1124 plugindir=$withval,
1125 plugindir=/usr/lib/sasl2)
1126 AC_DEFINE_UNQUOTED(PLUGINDIR, "$plugindir", [Runtime plugin location])
1127 AC_SUBST(plugindir)
1128
1129 AC_ARG_WITH(configdir, [ --with-configdir=DIR set the directory where config files will
1130 be found [/usr/lib/sasl2] ],
1131 configdir=$withval,
1132 configdir=$plugindir:/etc/sasl2)
1133 AC_DEFINE_UNQUOTED(CONFIGDIR, "$configdir", [Runtime config file location])
1134 AC_SUBST(configdir)
1135
1136 dnl look for rc4 libraries. we accept the CMU one or one from openSSL
1137 AC_ARG_WITH(rc4, [ --with-rc4 use internal rc4 routines [[yes]] ],
1138 with_rc4=$withval,
1139 with_rc4=yes)
1140
1141 if test "$with_rc4" != no; then
1142 AC_DEFINE(WITH_RC4,[],[Use internal RC4 implementation?])
1143 fi
1144
1145 building_for_macosx=no
1146 case "$host_os" in
1147 darwin*)
1148 AC_ARG_ENABLE(macos-framework, [ --disable-macos-framework disable building and installing replacement SASL2 Framework for MacOS X-provided SASL Framework [[no]]],building_for_macosx=no,building_for_macosx=yes)
1149 ;;
1150 esac
1151 AM_CONDITIONAL(MACOSX, test "$building_for_macosx" = yes)
1152 AM_CONDITIONAL(WINDOWS, test "$host_os" = "mingw32")
1153
1154 dnl dmalloc tests
1155 AC_MSG_CHECKING(for dmalloc library)
1156 AC_ARG_WITH(dmalloc, [ --with-dmalloc=DIR with DMALLOC support (for test applications) [[no]] ],
1157 with_dmalloc=$withval,
1158 with_dmalloc=no)
1159
1160 DMALLOC_LIBS=""
1161
1162 if test "$with_dmalloc" != "no"; then
1163 if test "$with_dmalloc" = "yes"; then
1164 with_dmalloc="/usr/local"
1165 fi
1166
1167 if test -r "$with_dmalloc/libdmalloc.a"; then
1168 DMALLOC_LIBS="$with_dmalloc/libdmalloc.a"
1169 AC_DEFINE(WITH_DMALLOC,[],[Linking against dmalloc?])
1170 AC_MSG_RESULT(yes)
1171 elif test -r "$with_dmalloc/lib/libdmalloc.a"; then
1172 DMALLOC_LIBS="$with_dmalloc/lib/libdmalloc.a"
1173 AC_DEFINE(WITH_DMALLOC,[],[Linking against dmalloc?])
1174 AC_MSG_RESULT(yes)
1175 else
1176 AC_MSG_ERROR(cannot find dmalloc library, please check your installation.)
1177 fi
1178 else
1179 AC_MSG_RESULT(no)
1180 fi
1181
1182 AC_SUBST(DMALLOC_LIBS)
1183
1184 dnl sfio tests
1185 AC_MSG_CHECKING(for sfio library)
1186 AC_ARG_WITH(sfio, [ --with-sfio=DIR with SFIO support (for smtptest/libsfsasl) [[no]] ],
1187 with_sfio=$withval,
1188 with_sfio=no)
1189
1190 if test "$with_sfio" != "no"; then
1191 if test "$with_sfio" = "yes"; then
1192 with_sfio="/usr/local"
1193 fi
1194
1195 AC_DEFUN([SFIO_INC_CHK],
1196 [if test -r "$with_sfio$1/sfio.h"; then SFIO_DIR=$with_sfio;
1197 SFIO_INC_DIR=$with_sfio$1])
1198
1199 AC_DEFUN([SFIO_LIB_CHK],[
1200 str="$SFIO_DIR/$1/libsfio.*"
1201 for i in `echo $str`; do
1202 if test -r $i; then
1203 SFIO_LIBDIR=$SFIO_DIR/$1
1204 break 2
1205 fi
1206 done
1207 ])
1208
1209 SFIO_INC_CHK()
1210 el[]SFIO_INC_CHK(/include)
1211 el[]SFIO_INC_CHK(/include/sfio)
1212 fi
1213
1214 if test -z "$SFIO_DIR"; then
1215 AC_MSG_ERROR(Cannot find sfio.h, Please check your SFIO installation.)
1216 fi
1217
1218 SFIO_LIB_CHK(lib)
1219 SFIO_LIB_CHK(lib/sfio)
1220
1221 if test -z "$SFIO_LIBDIR"; then
1222 AC_MSG_ERROR(Cannot find sfio library, Please check your SFIO installation.)
1223 fi
1224
1225 SFIO_INC_FLAGS="-I$SFIO_INC_DIR"
1226 SFIO_LIB_FLAGS="-L$SFIO_LIBDIR -lsfio"
1227 SMTPTEST_PROGRAM="smtptest"
1228 SASL_UTIL_LIBS_EXTRA=libsfsasl2.la
1229 SASL_UTIL_HEADERS_EXTRA=sfsasl.h
1230
1231 AC_MSG_RESULT(yes)
1232 else
1233 AC_MSG_RESULT(no)
1234 SFIO_INC_FLAGS=""
1235 SFIO_LIB_FLAGS=""
1236 SMTPTEST_PROGRAM=""
1237 SASL_UTIL_LIBS_EXTRA=""
1238 SASL_UTIL_HEADERS_EXTRA=""
1239 fi
1240
1241 AC_SUBST(SFIO_INC_FLAGS)
1242 AC_SUBST(SFIO_LIB_FLAGS)
1243 AC_SUBST(SMTPTEST_PROGRAM)
1244 AC_SUBST(SASL_UTIL_LIBS_EXTRA)
1245 AC_SUBST(SASL_UTIL_HEADERS_EXTRA)
1246
1247 dnl check for getsubopt
1248 sasl_cv_getsubopt=no
1249 AC_CHECK_FUNC(getsubopt, [AC_DEFINE(HAVE_GETSUBOPT,[],
1250 [do we have getsubopt()?])], [sasl_cv_getsubopt=yes])
1251 if test $sasl_cv_getsubopt = yes; then
1252 AC_LIBOBJ(getsubopt)
1253 GETSUBOPT="getsubopt.lo"
1254 fi
1255 AC_SUBST(GETSUBOPT)
1256
1257 dnl Check for snprintf
1258 sasl_cv_snprintf=no
1259 SNPRINTFOBJS=""
1260 AC_CHECK_FUNC(snprintf, [AC_DEFINE(HAVE_SNPRINTF,[],[Does the system have snprintf()?])], [sasl_cv_snprintf=yes])
1261 AC_CHECK_FUNC(vsnprintf, [AC_DEFINE(HAVE_VSNPRINTF,[],[Does the system have vsnprintf()?])], [sasl_cv_snprintf=yes])
1262 if test $sasl_cv_snprintf = yes; then
1263 AC_LIBOBJ(snprintf)
1264 SNPRINTFOBJS="snprintf.o"
1265 LTSNPRINTFOBJS="snprintf.lo"
1266 fi
1267 AC_SUBST(SNPRINTFOBJS)
1268 AC_SUBST(LTSNPRINTFOBJS)
1269
1270 dnl do we need to link in -lresolv?
1271 AC_CHECK_LIB(resolv, inet_aton)
1272
1273 dnl Check for getaddrinfo
1274 GETADDRINFOOBJS=""
1275 sasl_cv_getaddrinfo=yes
1276 IPv6_CHECK_FUNC(getaddrinfo, [IPv6_CHECK_FUNC(gai_strerror,
1277 [AC_DEFINE(HAVE_GETADDRINFO,[],[Do we have a getaddrinfo() function?])
1278 sasl_cv_getaddrinfo=no])])
1279 if test $sasl_cv_getaddrinfo = yes; then
1280 AC_LIBOBJ(getaddrinfo)
1281 GETADDRINFOOBJS="getaddrinfo.o"
1282 LTGETADDRINFOOBJS="getaddrinfo.lo"
1283 fi
1284 AC_SUBST(GETADDRINFOOBJS)
1285 AC_SUBST(LTGETADDRINFOOBJS)
1286
1287 dnl Check for getnameinfo
1288 GETNAMEINFOOBJS=""
1289 sasl_cv_getnameinfo=no
1290 IPv6_CHECK_FUNC(getnameinfo,
1291 [AC_DEFINE(HAVE_GETNAMEINFO,[],[Do we have a getnameinfo() function?])], [sasl_cv_getnameinfo=yes])
1292 if test $sasl_cv_getnameinfo = yes; then
1293 AC_LIBOBJ(getnameinfo)
1294 GETNAMEINFOOBJS="getnameinfo.o"
1295 LTGETNAMEINFOOBJS="getnameinfo.lo"
1296 fi
1297 AC_SUBST(GETNAMEINFOOBJS)
1298 AC_SUBST(LTGETNAMEINFOOBJS)
1299
1300 LTLIBOBJS=`echo "$LIB@&t@OBJS" | sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
1301 AC_SUBST(LTLIBOBJS)
1302
1303 AC_C_CONST
1304 AC_C_INLINE
1305 AC_TYPE_MODE_T
1306 AC_TYPE_PID_T
1307 AC_TYPE_SIGNAL
1308
1309 AC_HEADER_TIME
1310 AC_HEADER_STDC
1311 AC_HEADER_DIRENT
1312 AC_HEADER_SYS_WAIT
1313 AC_CHECK_HEADERS(crypt.h des.h 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 krb5.h)
1314
1315 IPv6_CHECK_SS_FAMILY()
1316 IPv6_CHECK_SA_LEN()
1317 IPv6_CHECK_SOCKLEN_T()
1318
1319 #AC_FUNC_MEMCMP
1320 #AC_FUNC_VPRINTF
1321 AC_CHECK_FUNCS(gethostname getdomainname getpwnam getspnam gettimeofday inet_aton memcpy mkdir select socket strchr strdup strerror strspn strstr strtol jrand48 getpassphrase asprintf strlcat strlcpy)
1322
1323 if test $enable_cmulocal = yes; then
1324 AC_WARN([enabling CMU local kludges])
1325 AC_DEFINE(KRB4_IGNORE_IP_ADDRESS,[],[Ignore IP Address in Kerberos 4 tickets?])
1326 AC_DEFINE_UNQUOTED(PREFER_MECH, "KERBEROS_V4", [Force a preferred mechanism])
1327 fi
1328
1329 AC_EGREP_HEADER(sockaddr_storage, sys/socket.h, [
1330 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE,[],[Do we have struct sockaddr_stroage?])])
1331
1332 AC_SUBST(DIRS)
1333
1334 AH_TOP([
1335 /* acconfig.h - autoheader configuration input */
1336 /*
1337 * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
1338 *
1339 * Redistribution and use in source and binary forms, with or without
1340 * modification, are permitted provided that the following conditions
1341 * are met:
1342 *
1343 * 1. Redistributions of source code must retain the above copyright
1344 * notice, this list of conditions and the following disclaimer.
1345 *
1346 * 2. Redistributions in binary form must reproduce the above copyright
1347 * notice, this list of conditions and the following disclaimer in
1348 * the documentation and/or other materials provided with the
1349 * distribution.
1350 *
1351 * 3. The name "Carnegie Mellon University" must not be used to
1352 * endorse or promote products derived from this software without
1353 * prior written permission. For permission or any other legal
1354 * details, please contact
1355 * Office of Technology Transfer
1356 * Carnegie Mellon University
1357 * 5000 Forbes Avenue
1358 * Pittsburgh, PA 15213-3890
1359 * (412) 268-4387, fax: (412) 268-7395
1360 * tech-transfer@andrew.cmu.edu
1361 *
1362 * 4. Redistributions of any form whatsoever must retain the following
1363 * acknowledgment:
1364 * "This product includes software developed by Computing Services
1365 * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
1366 *
1367 * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
1368 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1369 * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
1370 * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1371 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
1372 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
1373 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1374 */
1375
1376 #ifndef CONFIG_H
1377 #define CONFIG_H
1378 ])
1379
1380 AH_BOTTOM([
1381
1382
1383 /* Create a struct iovec if we need one */
1384 #if !defined(_WIN32)
1385 #if !defined(HAVE_SYS_UIO_H)
1386 /* (win32 is handled in sasl.h) */
1387 struct iovec {
1388 char *iov_base;
1389 long iov_len;
1390 };
1391 #else
1392 #include <sys/types.h>
1393 #include <sys/uio.h>
1394 #endif
1395 #endif
1396
1397 /* location of the random number generator */
1398 #ifdef DEV_RANDOM
1399 #undef DEV_RANDOM
1400 #endif
1401 #define DEV_RANDOM SASL_DEV_RANDOM
1402
1403 /* if we've got krb_get_err_txt, we might as well use it;
1404 especially since krb_err_txt isn't in some newer distributions
1405 (MIT Kerb for Mac 4 being a notable example). If we don't have
1406 it, we fall back to the krb_err_txt array */
1407 #ifdef HAVE_KRB_GET_ERR_TEXT
1408 #define get_krb_err_txt krb_get_err_text
1409 #else
1410 #define get_krb_err_txt(X) (krb_err_txt[(X)])
1411 #endif
1412
1413 /* Make Solaris happy... */
1414 #ifndef __EXTENSIONS__
1415 #define __EXTENSIONS__
1416 #endif
1417
1418 /* Make Linux happy... */
1419 #ifndef _GNU_SOURCE
1420 #define _GNU_SOURCE
1421 #endif
1422
1423 #ifndef HAVE___ATTRIBUTE__
1424 /* Can't use attributes... */
1425 #define __attribute__(foo)
1426 #endif
1427
1428 #define SASL_PATH_ENV_VAR "SASL_PATH"
1429 #define SASL_CONF_PATH_ENV_VAR "SASL_CONF_PATH"
1430
1431 #include <stdlib.h>
1432 #include <sys/types.h>
1433 #ifndef WIN32
1434 # include <sys/socket.h>
1435 # include <netdb.h>
1436 # include <netinet/in.h>
1437 # ifdef HAVE_SYS_PARAM_H
1438 # include <sys/param.h>
1439 # endif
1440 #else /* WIN32 */
1441 # include <winsock2.h>
1442 #endif /* WIN32 */
1443 #include <string.h>
1444
1445 #ifndef HAVE_SOCKLEN_T
1446 typedef unsigned int socklen_t;
1447 #endif /* HAVE_SOCKLEN_T */
1448
1449 #if !defined(HAVE_STRUCT_SOCKADDR_STORAGE) && !defined(WIN32)
1450 #define _SS_MAXSIZE 128 /* Implementation specific max size */
1451 #define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
1452
1453 struct sockaddr_storage {
1454 struct sockaddr ss_sa;
1455 char __ss_pad2[_SS_PADSIZE];
1456 };
1457 # define ss_family ss_sa.sa_family
1458 #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
1459
1460 #ifndef AF_INET6
1461 /* Define it to something that should never appear */
1462 #define AF_INET6 AF_MAX
1463 #endif
1464
1465 #ifndef HAVE_GETADDRINFO
1466 #define getaddrinfo sasl_getaddrinfo
1467 #define freeaddrinfo sasl_freeaddrinfo
1468 #define gai_strerror sasl_gai_strerror
1469 #endif
1470
1471 #ifndef HAVE_GETNAMEINFO
1472 #define getnameinfo sasl_getnameinfo
1473 #endif
1474
1475 #if !defined(HAVE_GETNAMEINFO) || !defined(HAVE_GETADDRINFO)
1476 #include "gai.h"
1477 #endif
1478
1479 #ifndef AI_NUMERICHOST /* support glibc 2.0.x */
1480 #define AI_NUMERICHOST 4
1481 #define NI_NUMERICHOST 2
1482 #define NI_NAMEREQD 4
1483 #define NI_NUMERICSERV 8
1484 #endif
1485
1486 /* Defined in RFC 1035. max strlen is only 253 due to length bytes. */
1487 #ifndef MAXHOSTNAMELEN
1488 #define MAXHOSTNAMELEN 255
1489 #endif
1490
1491 #ifndef HAVE_SYSEXITS_H
1492 #include "exits.h"
1493 #else
1494 #include "sysexits.h"
1495 #endif
1496
1497 /* Get the correct time.h */
1498 #if TIME_WITH_SYS_TIME
1499 # include <sys/time.h>
1500 # include <time.h>
1501 #else
1502 # if HAVE_SYS_TIME_H
1503 # include <sys/time.h>
1504 # else
1505 # include <time.h>
1506 # endif
1507 #endif
1508
1509 #ifndef HIER_DELIMITER
1510 #define HIER_DELIMITER '/'
1511 #endif
1512
1513 #ifdef WIN32
1514 #define SASL_ROOT_KEY "SOFTWARE\\Carnegie Mellon\\Project Cyrus\\SASL Library"
1515 #define SASL_PLUGIN_PATH_ATTR "SearchPath"
1516 #define SASL_CONF_PATH_ATTR "ConfFile"
1517
1518 #include <windows.h>
1519 inline static unsigned int sleep(unsigned int seconds) {
1520 Sleep(seconds * 1000);
1521 return 0;
1522 }
1523 #endif
1524
1525 /* handy string manipulation functions */
1526 #ifndef HAVE_STRLCPY
1527 extern size_t saslauthd_strlcpy(char *dst, const char *src, size_t len);
1528 #define strlcpy(x,y,z) saslauthd_strlcpy((x),(y),(z))
1529 #endif
1530 #ifndef HAVE_STRLCAT
1531 extern size_t saslauthd_strlcat(char *dst, const char *src, size_t len);
1532 #define strlcat(x,y,z) saslauthd_strlcat((x),(y),(z))
1533 #endif
1534 #ifndef HAVE_ASPRINTF
1535 extern int asprintf(char **str, const char *fmt, ...);
1536 #endif
1537
1538 #endif /* CONFIG_H */
1539 ])
1540
1541 AC_CONFIG_HEADERS(config.h)
1542
1543 AC_OUTPUT(Makefile
1544 libsasl2.pc
1545 include/Makefile
1546 saslauthd/Makefile
1547 sasldb/Makefile
1548 plugins/Makefile
1549 lib/Makefile
1550 utils/Makefile
1551 doc/Makefile
1552 sample/Makefile
1553 java/Makefile
1554 java/CyrusSasl/Makefile
1555 java/Test/Makefile
1556 java/javax/Makefile
1557 java/javax/security/Makefile
1558 java/javax/security/auth/Makefile
1559 java/javax/security/auth/callback/Makefile
1560 pwcheck/Makefile
1561 man/Makefile)
1562
1563 AC_MSG_NOTICE([
1564
1565 cyrus-sasl - $VERSION
1566
1567 • Prefix: $prefix
1568 • Plugins: $SASL_MECHS
1569
1570 Now type 'make' to build $PACKAGE
1571 ])
+0
-1436
configure.in less more
0 dnl configure.in for the SASL library
1 dnl Rob Siemborski
2 dnl Rob Earhart
3 dnl $Id: configure.in,v 1.224 2011/09/22 14:44:15 mel Exp $
4 dnl
5 dnl Copyright (c) 2001 Carnegie Mellon University. All rights reserved.
6 dnl
7 dnl Redistribution and use in source and binary forms, with or without
8 dnl modification, are permitted provided that the following conditions
9 dnl are met:
10 dnl
11 dnl 1. Redistributions of source code must retain the above copyright
12 dnl notice, this list of conditions and the following disclaimer.
13 dnl
14 dnl 2. Redistributions in binary form must reproduce the above copyright
15 dnl notice, this list of conditions and the following disclaimer in
16 dnl the documentation and/or other materials provided with the
17 dnl distribution.
18 dnl
19 dnl 3. The name "Carnegie Mellon University" must not be used to
20 dnl endorse or promote products derived from this software without
21 dnl prior written permission. For permission or any other legal
22 dnl details, please contact
23 dnl Office of Technology Transfer
24 dnl Carnegie Mellon University
25 dnl 5000 Forbes Avenue
26 dnl Pittsburgh, PA 15213-3890
27 dnl (412) 268-4387, fax: (412) 268-7395
28 dnl tech-transfer@andrew.cmu.edu
29 dnl
30 dnl 4. Redistributions of any form whatsoever must retain the following
31 dnl acknowledgment:
32 dnl \"This product includes software developed by Computing Services
33 dnl at Carnegie Mellon University (http://www.cmu.edu/computing/).\"
34 dnl
35 dnl CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
36 dnl THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
37 dnl AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
38 dnl FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
39 dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
40 dnl AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
41 dnl OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
42 dnl
43 AC_INIT(lib/saslint.h)
44 AC_PREREQ([2.54])
45
46 dnl use ./config.cache as the default cache file.
47 dnl we require a cache file to successfully configure our build.
48 if test $cache_file = "/dev/null"; then
49 cache_file="./config.cache"
50 AC_CACHE_LOAD
51 fi
52
53 AC_CONFIG_AUX_DIR(config)
54 AC_CANONICAL_HOST
55 AC_CANONICAL_TARGET
56
57 dnl
58 dnl REMINDER: When changing the version number here, please also update
59 dnl the values in win32/include/config.h and include/sasl.h as well.
60 dnl
61 AM_INIT_AUTOMAKE(cyrus-sasl, 2.1.26)
62 CMU_INIT_AUTOMAKE
63
64 # and include our config dir scripts
65 ACLOCAL="$ACLOCAL -I \$(top_srcdir)/config"
66
67 DIRS=""
68
69 AC_ARG_ENABLE(cmulocal,
70 [AC_HELP_STRING([--enable-cmulocal],
71 [enable local mods for CMU [[no]]])],
72 [],
73 enable_cmulocal=no)
74
75 AC_ARG_ENABLE(sample,
76 [AC_HELP_STRING([--enable-sample],
77 [compile sample code [[yes]]])],
78 enable_sample=yes)
79
80 AC_ARG_ENABLE(obsolete_cram_attr,
81 [AC_HELP_STRING([--enable-obsolete_cram_attr],
82 [enable support for cmusaslsecretCRAM-MD5 auxprop property [[yes]]])],
83 enable_obsolete_cram_attr=$enableval,
84 enable_obsolete_cram_attr=yes)
85
86 AC_PROG_CC
87 AC_PROG_CPP
88 AC_PROG_AWK
89 AC_PROG_LN_S
90 AC_PROG_MAKE_SET
91 AC_PROG_INSTALL
92 CMU_C___ATTRIBUTE__
93
94 dnl check for -R, etc. switch
95 CMU_GUESS_RUNPATH_SWITCH
96
97 dnl xxx compatibility
98 AC_ARG_WITH(staticsasl)
99 if test "$with_staticsasl" = yes; then
100 enable_shared=yes
101 enable_static=yes
102 fi
103
104 save_target=$target
105 if test -z "$target"; then
106 target="NONE"
107 fi
108
109 # new libtool
110 AM_DISABLE_STATIC
111 AC_PROG_LIBTOOL
112
113 target=$save_target
114
115 if test "$enable_static" = yes; then
116 SASL_STATIC_LIBS=libsasl2.a
117 else
118 SASL_STATIC_LIBS=
119 fi
120
121 AC_ARG_ENABLE(staticdlopen, [ --enable-staticdlopen try dynamic plugins when we are a static libsasl [[no]] ],
122 enable_staticdlopen=$enableval,
123 enable_staticdlopen=no)
124
125 if test "$enable_staticdlopen" = yes; then
126 AC_DEFINE(TRY_DLOPEN_WHEN_STATIC,[],[Should we try to dlopen() plugins while statically compiled?])
127 fi
128
129 if test "$ac_cv_prog_gcc" = yes; then
130 CFLAGS="-Wall -W ${CFLAGS}"
131 fi
132
133 AC_ARG_WITH(purecov,[ --with-purecov link with purecov])
134 if test "$with_purecov" = yes; then
135 AC_CHECK_PROGS(PURECOV, purecov)
136 fi
137 AC_ARG_WITH(purify,[ --with-purify link with purify])
138 if test "$with_purify" = yes; then
139 AC_CHECK_PROGS(PURIFY, purify)
140 fi
141
142 AC_ARG_ENABLE(java, [ --enable-java compile Java support [[no]]],
143 enable_java=$enableval, enable_java=no)
144 if test "$enable_java" = yes; then
145 AC_PATH_PROG(JAVAC, javac, no)
146 AC_PATH_PROGS(JAVAH, javah kaffeh, no)
147 AC_CHECK_PROGS(JAVADOC, javadoc, :)
148 if test "$JAVAC" = "no" -o "$JAVAH" = "no"; then
149 AC_WARN([Disabling Java support])
150 enable_java=no
151 fi
152 else
153 # Make distcheck work
154 JAVAC="true"
155 JAVAH="true"
156 JAVADOC="true"
157 fi
158 AM_CONDITIONAL(JAVA, test "$enable_java" = yes)
159
160 if test "$enable_java" = yes; then
161 AC_MSG_CHECKING([JNI cpp flags])
162 AC_CACHE_VAL(sasl_cv_java_includes,[
163 if test `echo $JAVAH | sed 's,.*/,,'` = "kaffeh"; then
164 sasl_cv_java_includes=-I`echo $JAVAH | sed -e 's,/bin.*,/include/kaffe,'`
165 else
166 java_base=`echo $JAVAC | sed 's,/bin.*,'','`
167
168 AC_ARG_WITH(javabase, [ --with-javabase=PATH set path to find jni.h in [/usr/java/include] ],
169 java_base=$withval,)
170
171
172 sasl_cv_java_includes=''
173 for dir in `find ${java_base}/include -follow -type d -print | grep -v green_threads`; do
174 sasl_cv_java_includes="${sasl_cv_java_includes} -I$dir"
175 done
176 fi
177
178 sasl_cv_java_includes="${sasl_cv_java_includes} -I$javapath/include"])
179
180 JAVA_INCLUDES=$sasl_cv_java_includes
181 AC_SUBST(JAVA_INCLUDES)
182 AC_MSG_RESULT(ok)
183
184 JAVAROOT=".."
185 AC_SUBST(JAVAROOT)
186 JAVAC=`echo "$JAVAC" | sed 's,.*/,,'`
187 JAVAH=`echo "$JAVAH" | sed 's,.*/,,'`
188 fi
189
190 AM_CONDITIONAL(SAMPLE, test "$enable_sample" = yes)
191
192 dnl call before we do the berkeley DB checks
193 CMU_SOCKETS
194
195 dnl we extracted this to config/sasldb.m4
196 SASL_DB_PATH_CHECK()
197 SASL_DB_CHECK()
198
199 # Do we not install the SASL DB man pages?
200 AM_CONDITIONAL(NO_SASL_DB_MANS, test "x$SASL_DB_MANS" = "x")
201
202 AC_ARG_ENABLE(keep_db_open, [ --enable-keep-db-open keep handle to Berkeley DB open for improved performance [[no]] ],
203 keep_db_open=$enableval,
204 keep_db_open=no)
205
206 # Disable if Berkeley DB is not used
207 if test "$dblib" != berkeley; then
208 keep_db_open=no
209 fi
210
211 if test "$keep_db_open" = yes; then
212 AC_DEFINE(KEEP_DB_OPEN,[],[Should we keep handle to Berkeley DB open in SASLDB plugin?])
213 fi
214 AC_MSG_CHECKING(if Berkeley DB handle is kept open in SASLDB)
215 AC_MSG_RESULT($keep_db_open)
216
217 AC_CHECK_LIB(dl, dlopen, SASL_DL_LIB="-ldl", SASL_DL_LIB="")
218 AC_SUBST(SASL_DL_LIB)
219
220 dnl /dev/random ?
221
222 AC_ARG_WITH(devrandom, [ --with-devrandom=PATH set the path to /dev/random [[/dev/random]] ],
223 devrandom=$withval,
224 devrandom=/dev/random)
225 AC_MSG_CHECKING(/dev/random to use)
226 AC_MSG_RESULT($devrandom)
227 AC_DEFINE_UNQUOTED(SASL_DEV_RANDOM, "$devrandom", [File to use for source of randomness])
228
229 dnl Do we need leading underscores on our symbols?
230
231 AC_CHECK_PROGS(NM, nm)
232
233 AC_MSG_CHECKING(for underscore before symbols)
234 AC_CACHE_VAL(sasl_cv_uscore,[
235 echo "main(){int i=1;}
236 foo(){int i=6;}" > conftest.c
237 ${CC} -o a.out conftest.c > /dev/null
238 if (${NM} a.out | grep _foo) > /dev/null; then
239 sasl_cv_uscore=yes
240 else
241 sasl_cv_uscore=no
242 fi])
243 AC_MSG_RESULT($sasl_cv_uscore)
244 rm -f conftest.c a.out
245
246 if test $sasl_cv_uscore = yes; then
247 if test $ac_cv_lib_dl_dlopen = yes ; then
248 AC_MSG_CHECKING(whether dlsym adds the underscore for us)
249 cmu_save_LIBS="$LIBS"
250 LIBS="$LIBS $SASL_DL_LIB"
251 AC_CACHE_VAL(sasl_cv_dlsym_adds_uscore,AC_TRY_RUN( [
252 #include <dlfcn.h>
253 #include <stdio.h>
254 foo() { int i=0;}
255 main() { void *self, *ptr1, *ptr2; self=dlopen(NULL,RTLD_LAZY);
256 if(self) { ptr1=dlsym(self,"foo"); ptr2=dlsym(self,"_foo");
257 if(ptr1 && !ptr2) exit(0); } exit(1); }
258 ], [sasl_cv_dlsym_adds_uscore=yes], sasl_cv_dlsym_adds_uscore=no
259 AC_DEFINE(DLSYM_NEEDS_UNDERSCORE, [], [Do we need a leading _ for dlsym?]),
260 AC_MSG_WARN(cross-compiler, we'll do our best)))
261 LIBS="$cmu_save_LIBS"
262 AC_MSG_RESULT($sasl_cv_dlsym_adds_uscore)
263 fi
264 fi
265
266 dnl See if we can provide a default logging function...
267 AC_CHECK_FUNCS(syslog)
268
269 AC_ARG_WITH(pam, [ --with-pam=DIR use PAM (rooted in DIR) [[yes]] ],
270 with_pam=$withval,
271 with_pam=yes)
272 if test "$with_pam" != no; then
273 if test -d $with_pam; then
274 CPPFLAGS="$CPPFLAGS -I${with_pam}/include"
275 LDFLAGS="$LDFLAGS -L${with_pam}/lib"
276 fi
277 AC_CHECK_HEADERS(security/pam_appl.h pam/pam_appl.h)
278 cmu_save_LIBS="$LIBS"
279 AC_CHECK_FUNC(pam_start, :,
280 LIBS="-lpam $LIBS"
281 AC_TRY_LINK([[
282 #include <sys/types.h>
283 #ifdef HAVE_PAM_PAM_APPL_H
284 #include <pam/pam_appl.h>
285 #endif
286 #ifdef HAVE_SECURITY_PAM_H
287 #include <security/pam_appl.h>
288 #endif]],[[
289 const char *service="foo";
290 const char *user="bar";
291 pam_handle_t *pamh;
292 struct pam_conv *conv;
293 int baz;
294 baz = pam_start(service, user, conv, &pamh);
295 return 0;
296 ]], LIBPAM="-lpam")
297 )
298 LIBS="$cmu_save_LIBS $LIBPAM"
299 fi
300
301 AC_ARG_WITH(saslauthd, [ --with-saslauthd=DIR enable use of the saslauth daemon using state dir DIR ],
302 with_saslauthd=$withval,
303 with_saslauthd=yes)
304 if test "$with_saslauthd" != no; then
305 if test "$with_saslauthd" = yes; then
306 with_saslauthd="/var/state/saslauthd"
307 fi
308 AC_DEFINE(HAVE_SASLAUTHD,[],[Include support for saslauthd?])
309 AC_DEFINE_UNQUOTED(PATH_SASLAUTHD_RUNDIR, "$with_saslauthd",
310 [Where do we look for saslauthd's socket?])
311 fi
312 AM_CONDITIONAL(SASLAUTHD, test "$with_saslauthd" != no)
313 AC_MSG_CHECKING(if I should include saslauthd)
314 AC_MSG_RESULT($with_saslauthd)
315
316 AC_ARG_WITH(authdaemond, [ --with-authdaemond=PATH enable use of authdaemon with default socket=PATH [[yes]] ],
317 with_authdaemon=$withval,
318 with_authdaemon=yes)
319 if test "$with_authdaemon" != no; then
320 if test "$with_authdaemon" = yes; then
321 with_authdaemon="/dev/null"
322 fi
323 AC_DEFINE(HAVE_AUTHDAEMON,[],[Include support for Courier's authdaemond?])
324 AC_DEFINE_UNQUOTED(PATH_AUTHDAEMON_SOCKET, "$with_authdaemon",
325 [Where do we look for Courier authdaemond's socket?])
326 fi
327 AC_MSG_CHECKING(to include Courier authdaemond support)
328 AC_MSG_RESULT($with_authdaemon)
329
330 AC_ARG_WITH(pwcheck,
331 [ --with-pwcheck=DIR enable deprecated pwcheck daemon using statedir DIR ],
332 with_pwcheck=$withval,
333 with_pwcheck=no)
334 if test "$with_pwcheck" != no; then
335 if test "$with_pwcheck" = yes; then
336 with_pwcheck=/var/pwcheck
337 fi
338 AC_DEFINE(HAVE_PWCHECK,[],[Include Support for pwcheck daemon?])
339 AC_DEFINE_UNQUOTED(PWCHECKDIR, "$with_pwcheck", [Location of pwcheck socket])
340 AC_CHECK_FUNC(getspnam,PWCHECKMETH="getspnam",PWCHECKMETH="getpwnam")
341 AC_SUBST(PWCHECKMETH)
342 fi
343 AM_CONDITIONAL(PWCHECK, test "$with_pwcheck" != no)
344 AC_MSG_CHECKING(if I should include pwcheck)
345 AC_MSG_RESULT($with_pwcheck)
346
347 AC_ARG_WITH(ipctype, [ --with-ipctype={unix,doors} use ipctype [[unix]] ],
348 with_ipctype=$withval,
349 with_ipctype="unix")
350 IPCTYPE=$with_ipctype
351 AC_SUBST(IPCTYPE)
352 LIB_DOOR=
353 if test "$with_ipctype" = "doors"; then
354 LIB_DOOR="-ldoor"
355 AC_DEFINE(USE_DOORS,[],[use the doors IPC API for saslauthd?])
356 fi
357 AC_SUBST(LIB_DOOR)
358
359 AC_ARG_ENABLE(alwaystrue, [ --enable-alwaystrue enable the alwaystrue password verifier (discouraged)],
360 enable_alwaystrue=$enableval,
361 enable_alwaystrue=no)
362 if test "$enable_alwaystrue" = yes; then
363 AC_DEFINE(HAVE_ALWAYSTRUE, [], [Enable 'alwaystrue' password verifier?])
364 fi
365 AC_MSG_CHECKING(if I should include the alwaystrue verifier)
366 AC_MSG_RESULT($enable_alwaystrue)
367
368 dnl sasl_checkapop support
369 AC_ARG_ENABLE(checkapop, [ --enable-checkapop enable use of sasl_checkapop [[yes]] ],
370 checkapop=$enableval,
371 checkapop=yes)
372
373 AC_MSG_CHECKING(if we should enable sasl_checkapop)
374 if test "$checkapop" != no; then
375 AC_MSG_RESULT(enabled)
376 AC_DEFINE(DO_SASL_CHECKAPOP, [], [should we support sasl_checkapop?])
377 else
378 AC_MSG_RESULT(disabled)
379 fi
380
381 dnl CRAM-MD5
382 AC_ARG_ENABLE(cram, [ --enable-cram enable CRAM-MD5 authentication [[yes]] ],
383 cram=$enableval,
384 cram=yes)
385
386 AC_MSG_CHECKING(CRAM-MD5)
387 if test "$cram" != no; then
388 AC_MSG_RESULT(enabled)
389 SASL_MECHS="$SASL_MECHS libcrammd5.la"
390 if test "$enable_obsolete_cram_attr" = yes; then
391 CPPFLAGS="$CPPFLAGS -DOBSOLETE_CRAM_ATTR=1"
392 fi
393 if test "$enable_static" = yes; then
394 SASL_STATIC_OBJS="$SASL_STATIC_OBJS cram.o"
395 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/cram.c"
396 AC_DEFINE(STATIC_CRAMMD5, [], [Link CRAM-MD5 Statically])
397 fi
398 else
399 AC_MSG_RESULT(disabled)
400 fi
401
402 CMU_HAVE_OPENSSL
403 AC_MSG_CHECKING(for OpenSSL)
404 AC_MSG_RESULT($with_openssl)
405
406 SASL_DES_CHK
407
408 dnl DIGEST-MD5
409 AC_ARG_ENABLE(digest, [ --enable-digest enable DIGEST-MD5 authentication [[yes]] ],
410 digest=$enableval,
411 digest=yes)
412
413 if test "$digest" != no; then
414 dnl In order to compile digest, we should look for need libdes.
415 if test -d $digest; then
416 CPPFLAGS="$CPPFLAGS -I$digest/include"
417 LDFLAGS="$LDFLAGS -L$digest/lib"
418 fi
419 if test "$with_des" = no; then
420 AC_WARN(No DES support for DIGEST-MD5)
421 fi
422 fi
423
424 AC_MSG_CHECKING(DIGEST-MD5)
425 if test "$digest" != no; then
426 AC_MSG_RESULT(enabled)
427 SASL_MECHS="$SASL_MECHS libdigestmd5.la"
428 if test "$enable_static" = yes; then
429 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/digestmd5.c"
430 SASL_STATIC_OBJS="$SASL_STATIC_OBJS digestmd5.o"
431 AC_DEFINE(STATIC_DIGESTMD5, [], [Link DIGEST-MD5 Statically])
432 fi
433 else
434 AC_MSG_RESULT(disabled)
435 fi
436
437 dnl SCRAM
438 AC_ARG_ENABLE(scram, [ --enable-scram enable SCRAM authentication [[yes]] ],
439 scram=$enableval,
440 scram=yes)
441
442 if test "$with_openssl" = no; then
443 AC_WARN([OpenSSL not found -- SCRAM will be disabled])
444 scram=no
445 fi
446
447 AC_MSG_CHECKING(SCRAM)
448 if test "$scram" != no; then
449 AC_MSG_RESULT(enabled)
450 SCRAM_LIBS="-lcrypto $LIB_RSAREF"
451
452 SASL_MECHS="$SASL_MECHS libscram.la"
453 if test "$enable_static" = yes; then
454 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/scram.c"
455 SASL_STATIC_OBJS="$SASL_STATIC_OBJS scram.o"
456 AC_DEFINE(STATIC_SCRAM, [], [Link SCRAM Statically])
457 fi
458
459 AC_SUBST(SCRAM_LIBS)
460 else
461 AC_MSG_RESULT(disabled)
462 fi
463
464 dnl OTP
465 AC_ARG_ENABLE(otp, [ --enable-otp enable OTP authentication [[yes]] ],
466 otp=$enableval,
467 otp=yes)
468
469 if test "$with_openssl" = no; then
470 AC_WARN([OpenSSL not found -- OTP will be disabled])
471 otp=no
472 fi
473
474 AC_MSG_CHECKING(OTP)
475 if test "$otp" != no; then
476 AC_MSG_RESULT(enabled)
477 OTP_LIBS="-lcrypto $LIB_RSAREF"
478
479 SASL_MECHS="$SASL_MECHS libotp.la"
480 if test "$enable_static" = yes; then
481 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/otp.c"
482 SASL_STATIC_OBJS="$SASL_STATIC_OBJS otp.o"
483 AC_DEFINE(STATIC_OTP, [], [Link OTP Statically])
484 fi
485
486 dnl Test for OPIE
487 AC_ARG_WITH(with-opie,[ --with-opie=PATH use OPIE (One Time Passwords in Everything) from PATH],
488 with_opie="${withval}")
489
490 case "$with_opie" in
491 ""|yes)
492 AC_CHECK_LIB(opie, opiechallenge, [
493 AC_CHECK_HEADER(opie.h, with_opie="yes",
494 with_opie="no")],
495 with_opie="no")
496 ;;
497 *)
498 if test -d $with_opie; then
499 CPPFLAGS="${CPPFLAGS} -I${with_opie}/include"
500 LDFLAGS="${LDFLAGS} -L${with_opie}/lib"
501 else
502 with_opie="no"
503 fi
504 ;;
505 esac
506
507 AC_MSG_CHECKING(for OPIE)
508 AC_MSG_RESULT($with_opie)
509
510 if test "$with_opie" != no; then
511 AC_DEFINE(HAVE_OPIE,[],[Use OPIE for server-side OTP?])
512 OTP_LIBS="$OTP_LIBS -lopie"
513 fi
514
515 AC_SUBST(OTP_LIBS)
516
517 else
518 AC_MSG_RESULT(disabled)
519 fi
520
521 dnl SRP
522 AC_ARG_ENABLE(srp, [ --enable-srp enable SRP authentication [[no]] ],
523 srp=$enableval,
524 srp=no)
525
526 if test "$with_openssl" = no; then
527 AC_WARN([OpenSSL not found -- SRP will be disabled])
528 srp=no
529 fi
530
531 AC_MSG_CHECKING(SRP)
532 if test "$srp" != no; then
533 AC_MSG_RESULT(enabled)
534 SRP_LIBS="-lcrypto $LIB_RSAREF"
535
536 SASL_MECHS="$SASL_MECHS libsrp.la"
537 if test "$enable_static" = yes; then
538 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/srp.c"
539 SASL_STATIC_OBJS="$SASL_STATIC_OBJS srp.o"
540 AC_DEFINE(STATIC_SRP, [], [Link SRP Statically])
541 fi
542
543 dnl srp_setpass support
544 AC_ARG_ENABLE(srp_setpass, [ --enable-srp-setpass enable setting SRP secrets with saslpasswd [[no]]],
545 srp_setpass=$enableval,
546 srp_setpass=no)
547
548 AC_MSG_CHECKING(if we should enable setting SRP secrets with saslpasswd)
549 if test "$srp_setpass" != no; then
550 AC_MSG_RESULT(enabled)
551 AC_DEFINE(DO_SRP_SETPASS, [], [should we support setpass() for SRP?])
552 else
553 AC_MSG_RESULT(disabled)
554 fi
555
556 AC_SUBST(SRP_LIBS)
557 else
558 AC_MSG_RESULT(disabled)
559 fi
560
561 dnl Kerberos based Mechanisms
562 SASL_KERBEROS_V4_CHK
563 SASL_GSSAPI_CHK
564
565 if test "$gssapi" != "no"; then
566 AC_DEFINE(STATIC_GSSAPIV2,[],[Link GSSAPI Statically])
567 mutex_default="no"
568 if test "$gss_impl" = "mit"; then
569 mutex_default="yes"
570 fi
571 AC_MSG_CHECKING(to use mutexes aroung GSS calls)
572 AC_ARG_ENABLE(gss_mutexes, [ --enable-gss_mutexes use mutexes around calls to the GSS library],
573 use_gss_mutexes=$enableval,
574 use_gss_mutexes=$mutex_default)
575 if test $use_gss_mutexes = "yes"; then
576 AC_DEFINE(GSS_USE_MUTEXES, [], [should we mutex-wrap calls into the GSS library?])
577 fi
578 AC_MSG_RESULT($use_gss_mutexes)
579 fi
580
581 dnl PLAIN
582 SASL_PLAIN_CHK
583
584 dnl ANONYMOUS
585 AC_ARG_ENABLE(anon, [ --enable-anon enable ANONYMOUS authentication [[yes]] ],
586 anon=$enableval,
587 anon=yes)
588
589 AC_MSG_CHECKING(ANONYMOUS)
590 if test "$anon" != no; then
591 AC_MSG_RESULT(enabled)
592 SASL_MECHS="$SASL_MECHS libanonymous.la"
593 if test "$enable_static" = yes; then
594 SASL_STATIC_OBJS="$SASL_STATIC_OBJS anonymous.o"
595 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/anonymous.c"
596 AC_DEFINE(STATIC_ANONYMOUS, [], [Link ANONYMOUS Statically])
597 fi
598 else
599 AC_MSG_RESULT(disabled)
600 fi
601
602 dnl LOGIN
603 AC_ARG_ENABLE(login, [ --enable-login enable unsupported LOGIN authentication [[no]] ],
604 login=$enableval,
605 login=no)
606
607 AC_MSG_CHECKING(LOGIN)
608 if test "$login" != no; then
609 AC_MSG_RESULT(enabled)
610 SASL_MECHS="$SASL_MECHS liblogin.la"
611 if test "$enable_static" = yes; then
612 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/login.c"
613 SASL_STATIC_OBJS="$SASL_STATIC_OBJS login.o"
614 AC_DEFINE(STATIC_LOGIN,[],[Link LOGIN Statically])
615 fi
616 else
617 AC_MSG_RESULT(disabled)
618 fi
619
620 dnl NTLM
621 AC_ARG_ENABLE(ntlm, [ --enable-ntlm enable unsupported NTLM authentication [[no]] ],
622 ntlm=$enableval,
623 ntlm=no)
624
625 if test "$with_openssl" = no; then
626 AC_WARN([OpenSSL not found -- NTLM will be disabled])
627 ntlm=no
628 fi
629
630 AC_MSG_CHECKING(NTLM)
631 if test "$ntlm" != no; then
632 AC_MSG_RESULT(enabled)
633 NTLM_LIBS="-lcrypto $LIB_RSAREF"
634 AC_SUBST(NTLM_LIBS)
635
636 SASL_MECHS="$SASL_MECHS libntlm.la"
637 if test "$enable_static" = yes; then
638 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/ntlm.c"
639 SASL_STATIC_OBJS="$SASL_STATIC_OBJS ntlm.o"
640 AC_DEFINE(STATIC_NTLM,[],[Link NTLM Statically])
641 fi
642 else
643 AC_MSG_RESULT(disabled)
644 fi
645
646 dnl PASSDSS
647 AC_ARG_ENABLE(passdss, [ --enable-passdss enable PASSDSS authentication (experimental) [[no]] ],
648 passdss=$enableval,
649 passdss=no)
650
651 if test "$with_openssl" = no; then
652 AC_WARN([OpenSSL not found -- PASSDSS will be disabled])
653 passdss=no
654 fi
655
656 AC_MSG_CHECKING(PASSDSS)
657 if test "$passdss" != no; then
658 AC_MSG_RESULT(enabled)
659 PASSDSS_LIBS="-lcrypto $LIB_RSAREF"
660 AC_SUBST(PASSDSS_LIBS)
661
662 SASL_MECHS="$SASL_MECHS libpassdss.la"
663 if test "$enable_static" = yes; then
664 SASL_STATIC_OBJS="$SASL_STATIC_OBJS passdss.o"
665 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/passdss.c"
666 AC_DEFINE(STATIC_PASSDSS,[],[Link PASSDSS Statically])
667 fi
668 else
669 AC_MSG_RESULT(disabled)
670 fi
671
672
673 # make the option show up so people don't whine that it is only in the
674 # saslauthd configure script --help
675 AC_ARG_WITH(ldap, [ --with-ldap=DIR use LDAP (in DIR) for saslauthd [no] ],,with_ldap=no)
676
677
678 dnl SQL
679 dnl This flag also changes the requirements of --with-mysql and --with-pgsql
680 dnl
681 dnl Desired behavior:
682 dnl
683 dnl doesn't require mysql or postgres if --disable-sql is chosen
684 dnl requires at least one (but not both) if --enable-sql is chosen
685
686 AC_ARG_ENABLE(sql, [ --enable-sql enable SQL auxprop [[no]] ],
687 sql=$enableval,
688 sql=no)
689
690 AC_MSG_CHECKING(SQL)
691 if test "$sql" != no; then
692 AC_MSG_RESULT(enabled)
693 SASL_MECHS="$SASL_MECHS libsql.la"
694 if test "$enable_static" = yes; then
695 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/sql.c"
696 SASL_STATIC_OBJS="$SASL_STATIC_OBJS sql.o"
697 AC_DEFINE(STATIC_SQL,[],[Link SQL plugin statically])
698 fi
699 else
700 AC_MSG_RESULT(disabled)
701 fi
702
703 dnl MySQL
704 AC_ARG_WITH(mysql, [ --with-mysql=PATH use MySQL from PATH ],
705 with_mysql=$withval,
706 with_mysql=$sql)
707
708 # find location of library
709 # presuming if one given then correct
710 if test "${with_mysql}" = "yes"; then
711 with_mysql=notfound
712 for mysqlloc in lib/mysql lib mysql/lib
713 do
714 if test -f ${prefix}/${mysqlloc}/libmysqlclient.a; then
715 with_mysql="${prefix}"
716 break
717 elif test -f /usr/local/${mysqlloc}/libmysqlclient.a; then
718 with_mysql="/usr/local"
719 break
720 elif test -f /usr/${mysqlloc}/libmysqlclient.a; then
721 with_mysql="/usr"
722 break
723 fi
724 done
725 fi
726
727 LIB_MYSQL=""
728
729 case "$with_mysql" in
730 no) true;;
731 notfound) AC_WARN([MySQL Library not found]); true;;
732 *)
733 if test -d ${with_mysql}/lib/mysql; then
734 CMU_ADD_LIBPATH_TO(${with_mysql}/lib/mysql, LIB_MYSQL)
735 elif test -d ${with_mysql}/mysql/lib; then
736 CMU_ADD_LIBPATH_TO(${with_mysql}/mysql/lib, LIB_MYSQL)
737 elif test -d ${with_mysql}/lib; then
738 CMU_ADD_LIBPATH_TO(${with_mysql}/lib, LIB_MYSQL)
739 else
740 CMU_ADD_LIBPATH_TO(${with_mysql}, LIB_MYSQL)
741 fi
742
743 LIB_MYSQL_DIR=$LIB_MYSQL
744 LIB_MYSQL="$LIB_MYSQL -lmysqlclient"
745
746 if test -d ${with_mysql}/include/mysql; then
747 CPPFLAGS="${CPPFLAGS} -I${with_mysql}/include/mysql"
748 elif test -d ${with_mysql}/mysql/include; then
749 CPPFLAGS="${CPPFLAGS} -I${with_mysql}/mysql/include"
750 elif test -d ${with_mysql}/include; then
751 CPPFLAGS="${CPPFLAGS} -I${with_mysql}/include"
752 else
753 CPPFLAGS="${CPPFLAGS} -I${with_mysql}"
754 fi
755
756 save_LDFLAGS=$LDFLAGS
757 LDFLAGS="$LDFLAGS $LIB_MYSQL_DIR"
758 AC_CHECK_LIB(mysqlclient, mysql_select_db,
759 AC_DEFINE(HAVE_MYSQL, [], [Do we have mysql support?]),
760 [AC_WARN([MySQL library mysqlclient does not work])
761 with_mysql=no])
762 LDFLAGS=$save_LDFLAGS;;
763
764 esac
765 AC_SUBST(LIB_MYSQL)
766
767 dnl PgSQL
768 AC_ARG_WITH(pgsql, [ --with-pgsql=PATH use PostgreSQL from PATH ],
769 with_pgsql=$withval,
770 with_pgsql=$sql)
771
772 # find location of library
773 # presuing if one given then correct
774 if test "${with_pgsql}" = "yes"; then
775 with_pgsql=notfound
776 for pgsqlloc in lib/pgsql lib pgsql/lib
777 do
778 if test -f ${prefix}/${pgsqlloc}/libpq.a; then
779 with_pgsql="${prefix}"
780 break
781 elif test -f /usr/local/${pgsqlloc}/libpq.a; then
782 with_pgsql="/usr/local"
783 break
784 elif test -f /usr/${pgsqlloc}/libpq.a; then
785 with_pgsql="/usr"
786 break
787 fi
788 done
789 fi
790
791 LIB_PGSQL=""
792
793 case "$with_pgsql" in
794 no) true;;
795 notfound) AC_WARN([PostgreSQL Library not found]); true;;
796 *)
797 if test -d ${with_pgsql}/lib/pgsql; then
798 CMU_ADD_LIBPATH_TO(${with_pgsql}/lib/pgsql, LIB_PGSQL)
799 elif test -d ${with_pgsql}/pgsql/lib; then
800 CMU_ADD_LIBPATH_TO(${with_pgsql}/pgsql/lib, LIB_PGSQL)
801 elif test -d ${with_pgsql}/lib; then
802 CMU_ADD_LIBPATH_TO(${with_pgsql}/lib, LIB_PGSQL)
803 else
804 CMU_ADD_LIBPATH_TO(${with_pgsql}, LIB_PGSQL)
805 fi
806
807 LIB_PGSQL_DIR=$LIB_PGSQL
808 LIB_PGSQL="$LIB_PGSQL -lpq"
809
810 if test -d ${with_pgsql}/include/pgsql; then
811 CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/include/pgsql"
812 elif test -d ${with_pgsql}/pgsql/include; then
813 CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/pgsql/include"
814 elif test -d ${with_pgsql}/include; then
815 CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/include"
816 else
817 CPPFLAGS="${CPPFLAGS} -I${with_pgsql}"
818 fi
819
820
821 save_LDFLAGS=$LDFLAGS
822 LDFLAGS="$LDFLAGS $LIB_PGSQL_DIR"
823 AC_CHECK_LIB(pq, PQsetdbLogin, AC_DEFINE(HAVE_PGSQL,[],
824 [Do we have Postgres support?]),
825 [AC_WARN([PostgreSQL Library pq does not work])
826 with_pgsql=no])
827 LDFLAGS=$save_LDFLAGS;;
828
829 esac
830 AC_SUBST(LIB_PGSQL)
831
832 dnl SQLite
833 AC_ARG_WITH(sqlite, [ --with-sqlite=PATH use SQLite from PATH ],
834 with_sqlite=$withval,
835 with_sqlite=$sql)
836
837 # find location of library
838 # presuing if one given then correct
839 if test "${with_sqlite}" = "yes"; then
840 with_sqlite=notfound
841 for sqliteloc in lib
842 do
843 if test -f ${prefix}/${sqliteloc}/libsqlite.a; then
844 with_sqlite="${prefix}"
845 break
846 elif test -f /usr/local/${sqliteloc}/libsqlite.a; then
847 with_sqlite="/usr/local"
848 break
849 elif test -f /usr/${sqliteloc}/libsqlite.a; then
850 with_sqlite="/usr"
851 break
852 fi
853 done
854 fi
855
856 LIB_SQLITE=""
857
858 case "$with_sqlite" in
859 no) true;;
860 notfound) AC_WARN([SQLite Library not found]); true;;
861 *)
862 if test -d ${with_sqlite}/lib; then
863 LIB_SQLITE="-L${with_sqlite}/lib -R${with_sqlite}/lib"
864 else
865 LIB_SQLITE="-L${with_sqlite} -R${with_sqlite}"
866 fi
867
868 LIB_SQLITE_DIR=$LIB_SQLITE
869 LIB_SQLITE="$LIB_SQLITE -lsqlite"
870
871 if test -d ${with_sqlite}/include; then
872 CPPFLAGS="${CPPFLAGS} -I${with_sqlite}/include"
873 else
874 CPPFLAGS="${CPPFLAGS} -I${with_sqlite}"
875 fi
876 AC_CHECK_LIB(sqlite, sqlite_open, AC_DEFINE(HAVE_SQLITE,[],
877 [Do we have SQLite support?]),
878 [AC_WARN([SQLite Library sqlite does not work])
879 with_sqlite=no], $LIB_SQLITE_DIR);;
880
881 esac
882 AC_SUBST(LIB_SQLITE)
883
884 dnl SQLite3
885 AC_ARG_WITH(sqlite3, [ --with-sqlite3=PATH use SQLite3 from PATH ],
886 with_sqlite3=$withval,
887 with_sqlite3=$sql)
888
889 # find location of library
890 # we assume that if one given then it is correct
891 if test "${with_sqlite3}" = "yes"; then
892 with_sqlite3=notfound
893 for sqlite3loc in lib
894 do
895 if test -f ${prefix}/${sqlite3loc}/libsqlite3.a; then
896 with_sqlite3="${prefix}"
897 break
898 elif test -f /usr/local/${sqlite3loc}/libsqlite3.a; then
899 with_sqlite3="/usr/local"
900 break
901 elif test -f /usr/${sqlite3loc}/libsqlite3.a; then
902 with_sqlite3="/usr"
903 break
904 fi
905 done
906 fi
907
908 LIB_SQLITE3=""
909
910 case "$with_sqlite3" in
911 no) true;;
912 notfound) AC_WARN([SQLite3 Library not found]); true;;
913 *)
914 if test -d ${with_sqlite3}/lib; then
915 LIB_SQLITE3="-L${with_sqlite3}/lib -R${with_sqlite3}/lib"
916 else
917 LIB_SQLITE3="-L${with_sqlite3} -R${with_sqlite3}"
918 fi
919
920 LIB_SQLITE3_DIR=$LIB_SQLITE3
921 LIB_SQLITE3="$LIB_SQLITE3 -lsqlite3"
922
923 if test -d ${with_sqlite3}/include; then
924 CPPFLAGS="${CPPFLAGS} -I${with_sqlite3}/include"
925 else
926 CPPFLAGS="${CPPFLAGS} -I${with_sqlite3}"
927 fi
928 AC_CHECK_LIB(sqlite3, sqlite3_open, AC_DEFINE(HAVE_SQLITE3,[],
929 [Do we have SQLite3 support?]),
930 [AC_WARN([SQLite3 Library sqlite3 does not work])
931 with_sqlite3=no], $LIB_SQLITE3_DIR);;
932
933 esac
934 AC_SUBST(LIB_SQLITE3)
935
936 if test "$sql" = yes -a "$with_pgsql" = no -a "$with_mysql" = no -a "$with_sqlite" = no -a "$with_sqlite3" = no; then
937 AC_ERROR([--enable-sql chosen but neither Postgres nor MySQL nor SQLite nor SQLite3 found])
938 fi
939
940 if test "$enable_shared" = yes; then
941 AC_DEFINE(DO_DLOPEN,[],[Should we build a shared plugin (via dlopen) library?])
942 fi
943
944 dnl LDAPDB
945 AC_ARG_ENABLE(ldapdb, [ --enable-ldapdb enable LDAPDB plugin [no] ],
946 ldapdb=$enableval,
947 ldapdb=no)
948 AC_MSG_CHECKING(LDAPDB)
949 if test "$ldapdb" != no; then
950 AC_MSG_RESULT(enabled)
951
952 if test "$with_ldap" = no; then
953 AC_MSG_ERROR([Cannot enable LDAPDB plugin: You need to specify --with-ldap])
954 fi
955
956 save_CPPFLAGS=$CPPFLAGS
957 save_LDFLAGS=$LDFLAGS
958
959 if test -d $with_ldap; then
960 CPPFLAGS="${CPPFLAGS} -I${with_ldap}/include"
961 CMU_ADD_LIBPATH(${with_ldap}/lib)
962 fi
963
964 AC_CHECK_HEADERS(ldap.h lber.h)
965
966 if test $ac_cv_header_ldap_h = yes -a $ac_cv_header_lber_h = yes; then
967 CMU_OPENLDAP_API
968
969 if test "$cmu_cv_openldap_api" = yes; then
970 AC_CHECK_LIB(ldap, ldap_initialize, [ cmu_link_openldap="-lldap -llber" ], [ cmu_link_openldap=no ],-llber)
971 fi
972 fi
973
974 if test "$cmu_cv_openldap_api" = no -o "$cmu_link_openldap" = no; then
975 AC_MSG_ERROR([Cannot enable LDAPDB plugin: Could not locate OpenLDAP])
976 else
977 CMU_OPENLDAP_COMPAT
978
979 if test "$cmu_cv_openldap_compat" = no; then
980 AC_MSG_ERROR([Cannot enable LDAPDB plugin: OpenLDAP library located but incompatible])
981 else
982 LIB_LDAP=$cmu_link_openldap
983 AC_SUBST(LIB_LDAP)
984
985 SASL_MECHS="$SASL_MECHS libldapdb.la"
986 if test "$enable_static" = yes; then
987 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/ldapdb.c"
988 SASL_STATIC_OBJS="$SASL_STATIC_OBJS ldapdb.o"
989 AC_DEFINE(STATIC_LDAPDB,[],[Link ldapdb plugin Statically])
990 fi
991 fi
992 fi
993
994 if test "$cmu_cv_openldap_compat" != yes; then
995 CPPFLAGS=$save_CPPFLAGS
996 LDFLAGS=$save_LDFLAGS
997 fi
998 else
999 AC_MSG_RESULT(disabled)
1000 fi
1001
1002 AC_SUBST(SASL_MECHS)
1003 AC_SUBST(SASL_STATIC_SRCS)
1004 AC_SUBST(SASL_STATIC_OBJS)
1005 AC_SUBST(SASL_STATIC_LIBS)
1006
1007 AC_ARG_WITH(plugindir, [ --with-plugindir=DIR set the directory where plugins will
1008 be found [[/usr/lib/sasl2]] ],
1009 plugindir=$withval,
1010 plugindir=/usr/lib/sasl2)
1011 AC_DEFINE_UNQUOTED(PLUGINDIR, "$plugindir", [Runtime plugin location])
1012 AC_SUBST(plugindir)
1013
1014 AC_ARG_WITH(configdir, [ --with-configdir=DIR set the directory where config files will
1015 be found [/usr/lib/sasl2] ],
1016 configdir=$withval,
1017 configdir=$plugindir:/etc/sasl2)
1018 AC_DEFINE_UNQUOTED(CONFIGDIR, "$configdir", [Runtime config file location])
1019 AC_SUBST(configdir)
1020
1021 dnl look for rc4 libraries. we accept the CMU one or one from openSSL
1022 AC_ARG_WITH(rc4, [ --with-rc4 use internal rc4 routines [[yes]] ],
1023 with_rc4=$withval,
1024 with_rc4=yes)
1025
1026 if test "$with_rc4" != no; then
1027 AC_DEFINE(WITH_RC4,[],[Use internal RC4 implementation?])
1028 fi
1029
1030 building_for_macosx=no
1031 case "$host_os" in
1032 darwin*)
1033 AC_ARG_ENABLE(macos-framework, [ --disable-macos-framework disable building and installing replacement SASL2 Framework for MacOS X-provided SASL Framework [[no]]],building_for_macosx=no,building_for_macosx=yes)
1034 ;;
1035 esac
1036 AM_CONDITIONAL(MACOSX, test "$building_for_macosx" = yes)
1037
1038 dnl dmalloc tests
1039 AC_MSG_CHECKING(for dmalloc library)
1040 AC_ARG_WITH(dmalloc, [ --with-dmalloc=DIR with DMALLOC support (for test applications) [[no]] ],
1041 with_dmalloc=$withval,
1042 with_dmalloc=no)
1043
1044 DMALLOC_LIBS=""
1045
1046 if test "$with_dmalloc" != "no"; then
1047 if test "$with_dmalloc" = "yes"; then
1048 with_dmalloc="/usr/local"
1049 fi
1050
1051 if test -r "$with_dmalloc/libdmalloc.a"; then
1052 DMALLOC_LIBS="$with_dmalloc/libdmalloc.a"
1053 AC_DEFINE(WITH_DMALLOC,[],[Linking against dmalloc?])
1054 AC_MSG_RESULT(yes)
1055 elif test -r "$with_dmalloc/lib/libdmalloc.a"; then
1056 DMALLOC_LIBS="$with_dmalloc/lib/libdmalloc.a"
1057 AC_DEFINE(WITH_DMALLOC,[],[Linking against dmalloc?])
1058 AC_MSG_RESULT(yes)
1059 else
1060 AC_MSG_ERROR(cannot find dmalloc library, please check your installation.)
1061 fi
1062 else
1063 AC_MSG_RESULT(no)
1064 fi
1065
1066 AC_SUBST(DMALLOC_LIBS)
1067
1068 dnl sfio tests
1069 AC_MSG_CHECKING(for sfio library)
1070 AC_ARG_WITH(sfio, [ --with-sfio=DIR with SFIO support (for smtptest/libsfsasl) [[no]] ],
1071 with_sfio=$withval,
1072 with_sfio=no)
1073
1074 if test "$with_sfio" != "no"; then
1075 if test "$with_sfio" = "yes"; then
1076 with_sfio="/usr/local"
1077 fi
1078
1079 AC_DEFUN([SFIO_INC_CHK],
1080 [if test -r "$with_sfio$1/sfio.h"; then SFIO_DIR=$with_sfio;
1081 SFIO_INC_DIR=$with_sfio$1])
1082
1083 AC_DEFUN([SFIO_LIB_CHK],[
1084 str="$SFIO_DIR/$1/libsfio.*"
1085 for i in `echo $str`; do
1086 if test -r $i; then
1087 SFIO_LIBDIR=$SFIO_DIR/$1
1088 break 2
1089 fi
1090 done
1091 ])
1092
1093 SFIO_INC_CHK()
1094 el[]SFIO_INC_CHK(/include)
1095 el[]SFIO_INC_CHK(/include/sfio)
1096 fi
1097
1098 if test -z "$SFIO_DIR"; then
1099 AC_MSG_ERROR(Cannot find sfio.h, Please check your SFIO installation.)
1100 fi
1101
1102 SFIO_LIB_CHK(lib)
1103 SFIO_LIB_CHK(lib/sfio)
1104
1105 if test -z "$SFIO_LIBDIR"; then
1106 AC_MSG_ERROR(Cannot find sfio library, Please check your SFIO installation.)
1107 fi
1108
1109 SFIO_INC_FLAGS="-I$SFIO_INC_DIR"
1110 SFIO_LIB_FLAGS="-L$SFIO_LIBDIR -lsfio"
1111 SMTPTEST_PROGRAM="smtptest"
1112 SASL_UTIL_LIBS_EXTRA=libsfsasl2.la
1113 SASL_UTIL_HEADERS_EXTRA=sfsasl.h
1114
1115 AC_MSG_RESULT(yes)
1116 else
1117 AC_MSG_RESULT(no)
1118 SFIO_INC_FLAGS=""
1119 SFIO_LIB_FLAGS=""
1120 SMTPTEST_PROGRAM=""
1121 SASL_UTIL_LIBS_EXTRA=""
1122 SASL_UTIL_HEADERS_EXTRA=""
1123 fi
1124
1125 AC_SUBST(SFIO_INC_FLAGS)
1126 AC_SUBST(SFIO_LIB_FLAGS)
1127 AC_SUBST(SMTPTEST_PROGRAM)
1128 AC_SUBST(SASL_UTIL_LIBS_EXTRA)
1129 AC_SUBST(SASL_UTIL_HEADERS_EXTRA)
1130
1131 dnl check for getsubopt
1132 sasl_cv_getsubopt=no
1133 AC_CHECK_FUNC(getsubopt, [AC_DEFINE(HAVE_GETSUBOPT,[],
1134 [do we have getsubopt()?])], [sasl_cv_getsubopt=yes])
1135 if test $sasl_cv_getsubopt = yes; then
1136 AC_LIBOBJ(getsubopt)
1137 GETSUBOPT="getsubopt.lo"
1138 fi
1139 AC_SUBST(GETSUBOPT)
1140
1141 dnl Check for snprintf
1142 sasl_cv_snprintf=no
1143 SNPRINTFOBJS=""
1144 AC_CHECK_FUNC(snprintf, [AC_DEFINE(HAVE_SNPRINTF,[],[Does the system have snprintf()?])], [sasl_cv_snprintf=yes])
1145 AC_CHECK_FUNC(vsnprintf, [AC_DEFINE(HAVE_VSNPRINTF,[],[Does the system have vsnprintf()?])], [sasl_cv_snprintf=yes])
1146 if test $sasl_cv_snprintf = yes; then
1147 AC_LIBOBJ(snprintf)
1148 SNPRINTFOBJS="snprintf.o"
1149 LTSNPRINTFOBJS="snprintf.lo"
1150 fi
1151 AC_SUBST(SNPRINTFOBJS)
1152 AC_SUBST(LTSNPRINTFOBJS)
1153
1154 dnl do we need to link in -lresolv?
1155 AC_CHECK_LIB(resolv, inet_aton)
1156
1157 dnl Check for getaddrinfo
1158 GETADDRINFOOBJS=""
1159 sasl_cv_getaddrinfo=yes
1160 IPv6_CHECK_FUNC(getaddrinfo, [IPv6_CHECK_FUNC(gai_strerror,
1161 [AC_DEFINE(HAVE_GETADDRINFO,[],[Do we have a getaddrinfo() function?])
1162 sasl_cv_getaddrinfo=no])])
1163 if test $sasl_cv_getaddrinfo = yes; then
1164 AC_LIBOBJ(getaddrinfo)
1165 GETADDRINFOOBJS="getaddrinfo.o"
1166 LTGETADDRINFOOBJS="getaddrinfo.lo"
1167 fi
1168 AC_SUBST(GETADDRINFOOBJS)
1169 AC_SUBST(LTGETADDRINFOOBJS)
1170
1171 dnl Check for getnameinfo
1172 GETNAMEINFOOBJS=""
1173 sasl_cv_getnameinfo=no
1174 IPv6_CHECK_FUNC(getnameinfo,
1175 [AC_DEFINE(HAVE_GETNAMEINFO,[],[Do we have a getnameinfo() function?])], [sasl_cv_getnameinfo=yes])
1176 if test $sasl_cv_getnameinfo = yes; then
1177 AC_LIBOBJ(getnameinfo)
1178 GETNAMEINFOOBJS="getnameinfo.o"
1179 LTGETNAMEINFOOBJS="getnameinfo.lo"
1180 fi
1181 AC_SUBST(GETNAMEINFOOBJS)
1182 AC_SUBST(LTGETNAMEINFOOBJS)
1183
1184 LTLIBOBJS=`echo "$LIB@&t@OBJS" | sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
1185 AC_SUBST(LTLIBOBJS)
1186
1187 AC_C_CONST
1188 AC_C_INLINE
1189 AC_TYPE_MODE_T
1190 AC_TYPE_PID_T
1191 AC_TYPE_SIGNAL
1192
1193 AC_HEADER_TIME
1194 AC_HEADER_STDC
1195 AC_HEADER_DIRENT
1196 AC_HEADER_SYS_WAIT
1197 AC_CHECK_HEADERS(des.h 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)
1198
1199 IPv6_CHECK_SS_FAMILY()
1200 IPv6_CHECK_SA_LEN()
1201 IPv6_CHECK_SOCKLEN_T()
1202
1203 #AC_FUNC_MEMCMP
1204 #AC_FUNC_VPRINTF
1205 AC_CHECK_FUNCS(gethostname getdomainname getpwnam getspnam gettimeofday inet_aton memcpy mkdir select socket strchr strdup strerror strspn strstr strtol jrand48 getpassphrase)
1206
1207 if test $enable_cmulocal = yes; then
1208 AC_WARN([enabling CMU local kludges])
1209 AC_DEFINE(KRB4_IGNORE_IP_ADDRESS,[],[Ignore IP Address in Kerberos 4 tickets?])
1210 AC_DEFINE_UNQUOTED(PREFER_MECH, "KERBEROS_V4", [Force a preferred mechanism])
1211 fi
1212
1213 AC_EGREP_HEADER(sockaddr_storage, sys/socket.h, [
1214 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE,[],[Do we have struct sockaddr_stroage?])])
1215
1216 AC_SUBST(DIRS)
1217
1218 AC_CONFIG_SUBDIRS(saslauthd)
1219
1220 AH_TOP([
1221 /* acconfig.h - autoheader configuration input */
1222 /*
1223 * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
1224 *
1225 * Redistribution and use in source and binary forms, with or without
1226 * modification, are permitted provided that the following conditions
1227 * are met:
1228 *
1229 * 1. Redistributions of source code must retain the above copyright
1230 * notice, this list of conditions and the following disclaimer.
1231 *
1232 * 2. Redistributions in binary form must reproduce the above copyright
1233 * notice, this list of conditions and the following disclaimer in
1234 * the documentation and/or other materials provided with the
1235 * distribution.
1236 *
1237 * 3. The name "Carnegie Mellon University" must not be used to
1238 * endorse or promote products derived from this software without
1239 * prior written permission. For permission or any other legal
1240 * details, please contact
1241 * Office of Technology Transfer
1242 * Carnegie Mellon University
1243 * 5000 Forbes Avenue
1244 * Pittsburgh, PA 15213-3890
1245 * (412) 268-4387, fax: (412) 268-7395
1246 * tech-transfer@andrew.cmu.edu
1247 *
1248 * 4. Redistributions of any form whatsoever must retain the following
1249 * acknowledgment:
1250 * "This product includes software developed by Computing Services
1251 * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
1252 *
1253 * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
1254 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1255 * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
1256 * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1257 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
1258 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
1259 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1260 */
1261
1262 #ifndef CONFIG_H
1263 #define CONFIG_H
1264 ])
1265
1266 AH_BOTTOM([
1267
1268
1269 /* Create a struct iovec if we need one */
1270 #if !defined(_WIN32)
1271 #if !defined(HAVE_SYS_UIO_H)
1272 /* (win32 is handled in sasl.h) */
1273 struct iovec {
1274 char *iov_base;
1275 long iov_len;
1276 };
1277 #else
1278 #include <sys/types.h>
1279 #include <sys/uio.h>
1280 #endif
1281 #endif
1282
1283 /* location of the random number generator */
1284 #ifdef DEV_RANDOM
1285 #undef DEV_RANDOM
1286 #endif
1287 #define DEV_RANDOM SASL_DEV_RANDOM
1288
1289 /* if we've got krb_get_err_txt, we might as well use it;
1290 especially since krb_err_txt isn't in some newer distributions
1291 (MIT Kerb for Mac 4 being a notable example). If we don't have
1292 it, we fall back to the krb_err_txt array */
1293 #ifdef HAVE_KRB_GET_ERR_TEXT
1294 #define get_krb_err_txt krb_get_err_text
1295 #else
1296 #define get_krb_err_txt(X) (krb_err_txt[(X)])
1297 #endif
1298
1299 /* Make Solaris happy... */
1300 #ifndef __EXTENSIONS__
1301 #define __EXTENSIONS__
1302 #endif
1303
1304 /* Make Linux happy... */
1305 #ifndef _GNU_SOURCE
1306 #define _GNU_SOURCE
1307 #endif
1308
1309 #ifndef HAVE___ATTRIBUTE__
1310 /* Can't use attributes... */
1311 #define __attribute__(foo)
1312 #endif
1313
1314 #define SASL_PATH_ENV_VAR "SASL_PATH"
1315 #define SASL_CONF_PATH_ENV_VAR "SASL_CONF_PATH"
1316
1317 #include <stdlib.h>
1318 #include <sys/types.h>
1319 #ifndef WIN32
1320 # include <sys/socket.h>
1321 # include <netdb.h>
1322 # include <netinet/in.h>
1323 # ifdef HAVE_SYS_PARAM_H
1324 # include <sys/param.h>
1325 # endif
1326 #else /* WIN32 */
1327 # include <winsock2.h>
1328 #endif /* WIN32 */
1329 #include <string.h>
1330
1331 #ifndef HAVE_SOCKLEN_T
1332 typedef unsigned int socklen_t;
1333 #endif /* HAVE_SOCKLEN_T */
1334
1335 #if !defined(HAVE_STRUCT_SOCKADDR_STORAGE) && !defined(WIN32)
1336 #define _SS_MAXSIZE 128 /* Implementation specific max size */
1337 #define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
1338
1339 struct sockaddr_storage {
1340 struct sockaddr ss_sa;
1341 char __ss_pad2[_SS_PADSIZE];
1342 };
1343 # define ss_family ss_sa.sa_family
1344 #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
1345
1346 #ifndef AF_INET6
1347 /* Define it to something that should never appear */
1348 #define AF_INET6 AF_MAX
1349 #endif
1350
1351 #ifndef HAVE_GETADDRINFO
1352 #define getaddrinfo sasl_getaddrinfo
1353 #define freeaddrinfo sasl_freeaddrinfo
1354 #define gai_strerror sasl_gai_strerror
1355 #endif
1356
1357 #ifndef HAVE_GETNAMEINFO
1358 #define getnameinfo sasl_getnameinfo
1359 #endif
1360
1361 #if !defined(HAVE_GETNAMEINFO) || !defined(HAVE_GETADDRINFO)
1362 #include "gai.h"
1363 #endif
1364
1365 #ifndef AI_NUMERICHOST /* support glibc 2.0.x */
1366 #define AI_NUMERICHOST 4
1367 #define NI_NUMERICHOST 2
1368 #define NI_NAMEREQD 4
1369 #define NI_NUMERICSERV 8
1370 #endif
1371
1372 /* Defined in RFC 1035. max strlen is only 253 due to length bytes. */
1373 #ifndef MAXHOSTNAMELEN
1374 #define MAXHOSTNAMELEN 255
1375 #endif
1376
1377 #ifndef HAVE_SYSEXITS_H
1378 #include "exits.h"
1379 #else
1380 #include "sysexits.h"
1381 #endif
1382
1383 /* Get the correct time.h */
1384 #if TIME_WITH_SYS_TIME
1385 # include <sys/time.h>
1386 # include <time.h>
1387 #else
1388 # if HAVE_SYS_TIME_H
1389 # include <sys/time.h>
1390 # else
1391 # include <time.h>
1392 # endif
1393 #endif
1394
1395 #ifndef HIER_DELIMITER
1396 #define HIER_DELIMITER '/'
1397 #endif
1398
1399 #ifdef WIN32
1400 #define SASL_ROOT_KEY "SOFTWARE\\Carnegie Mellon\\Project Cyrus\\SASL Library"
1401 #define SASL_PLUGIN_PATH_ATTR "SearchPath"
1402 #define SASL_CONF_PATH_ATTR "ConfFile"
1403
1404 #include <windows.h>
1405 inline static unsigned int sleep(unsigned int seconds) {
1406 Sleep(seconds * 1000);
1407 return 0;
1408 }
1409 #endif
1410
1411 #endif /* CONFIG_H */
1412 ])
1413
1414 AM_CONFIG_HEADER(config.h)
1415
1416 AC_OUTPUT(Makefile
1417 libsasl2.pc
1418 include/Makefile
1419 sasldb/Makefile
1420 plugins/Makefile
1421 lib/Makefile
1422 utils/Makefile
1423 doc/Makefile
1424 sample/Makefile
1425 java/Makefile
1426 java/CyrusSasl/Makefile
1427 java/Test/Makefile
1428 java/javax/Makefile
1429 java/javax/security/Makefile
1430 java/javax/security/auth/Makefile
1431 java/javax/security/auth/callback/Makefile
1432 pwcheck/Makefile
1433 man/Makefile)
1434
1435 echo Configuration Complete. Type \'make\' to build.
0 The contents of this directory are unsupported patches to the
1 Cyrus SASL library that may or may not be useful to the end user.
2
3 They are completely unsupported, and any questions should be directed
4 to the authors.
0 #!/usr/bin/env python
1 #
2 # This script changes a SASLDB2 realm to another one.
3 #
4 # Written by Sander Steffann <sander@steffann.nl>
5 # No rights reserved: do with this script as you please.
6 #
7 # Usage: change-sasldb2-realm.py <orig-realm> <new-realm>
8 # where <orig-realm> and <new-realm> are case-sensitive.
9 #
10 # !WARNING! This script opens /etc/sasldb2 directly, without going through
11 # the official API. If the file format changes this script breaks.
12 #
13 # The following file-format for sasldb2 is assumed: a BSD-DB hash-file with a
14 # key in the format "<data> \x00 <realm> \x00 <data>". The <data> parts are
15 # copied without modification. The values corresponding to the keys are copied
16 # without modification too.
17 #
18 # To be safe, this script opens /etc/sasldb2 read-only and writes the result
19 # to a new file: /etc/sasldb2.new. If this file exists this script will
20 # overwrite it. Don't overwrite your /etc/sasldb2 file until you are sure the
21 # results in /etc/sasldb2.new are what you want.
22 #
23 # This script uses the bsddb module provided with python. It is assumed that
24 # the DB library used by python is the same as the one used by SASL2. If this
25 # is not the case the script will abort with an error when opening sasldb2.
26 #
27
28 import bsddb
29 import sys
30
31 # Check command-line arguments
32 if len(sys.argv) != 3:
33 print "Usage: %s <orig-realm> <new-realm>" % (sys.argv[0],)
34 sys.exit(1)
35
36 # Extract the command-line arguments into properly named variables
37 orig_realm = sys.argv[1]
38 new_realm = sys.argv[2]
39
40 # Open the BSD-DB files
41 orig_db = bsddb.hashopen('/etc/sasldb2', 'r')
42 new_db = bsddb.hashopen('/etc/sasldb2.new', 'n')
43
44 # Loop over all the keys in the original sasldb2
45 for orig_key in orig_db.keys():
46 # Split the key into the three components
47 elements = orig_key.split('\x00')
48 if len(elements) != 3:
49 raise ValueError, "The structure of /etc/sasldb2 is not as expected!"
50
51 # Compare the current realm with the realm we want to replace
52 if elements[1] == orig_realm:
53 # Replace the current realm with the new one
54 new_key = '\x00'.join([elements[0], new_realm, elements[2]])
55 else:
56 # Wrong realm: Don't touch the key
57 new_key = orig_key
58
59 # Write the key with the corresponding value in the new DB
60 new_db[new_key] = orig_db[orig_key]
61
62 # Close the DB files
63 orig_db.close()
64 new_db.close()
0 diff -x ltcf-c.sh -x ltconfig -x ltmain.sh -x libltdl -x config.guess -x config.sub -x configure -x aclocal.m4 -x Makefile.in -uNr cyrus-sasl-1.5.24.orig/Makefile.am cyrus-sasl-1.5.24.new/Makefile.am
1 --- cyrus-sasl-1.5.24.orig/Makefile.am Fri Apr 28 19:16:11 2000
2 +++ cyrus-sasl-1.5.24.new/Makefile.am Tue Jul 17 12:41:06 2001
3 @@ -58,7 +58,7 @@
4 JAV =
5 endif
6
7 -SUBDIRS=include lib plugins utils doc man $(PWC) $(SAM) $(JAV)
8 +SUBDIRS=include libltdl lib plugins utils doc man $(PWC) $(SAM) $(JAV)
9 EXTRA_DIST=config cmulocal win32 testing.txt
10
11 dist-hook:
12 diff -x ltcf-c.sh -x ltconfig -x ltmain.sh -x libltdl -x config.guess -x config.sub -x configure -x aclocal.m4 -x Makefile.in -uNr cyrus-sasl-1.5.24.orig/configure.in cyrus-sasl-1.5.24.new/configure.in
13 --- cyrus-sasl-1.5.24.orig/configure.in Fri Jul 21 04:35:01 2000
14 +++ cyrus-sasl-1.5.24.new/configure.in Tue Jul 17 13:20:18 2001
15 @@ -71,8 +71,14 @@
16
17 AM_DISABLE_STATIC
18
19 +AC_LIBLTDL_INSTALLABLE
20 +AC_SUBST(INCLTDL)
21 +AC_SUBST(LIBLTDL)
22 +AC_LIBTOOL_DLOPEN
23 +
24 CMU_PROG_LIBTOOL
25
26 +
27 if test "$ac_cv_prog_gcc" = yes; then
28 CFLAGS="-Wall -W ${CFLAGS}"
29 fi
30 @@ -374,11 +380,11 @@
31 fi
32 fi
33
34 -
35 -
36 if test "$with_des" != no; then
37 AC_DEFINE(WITH_DES)
38 - LIB_DES="-ldes"
39 + if test "x$LIB_DES" = x; then
40 + LIB_DES="-ldes"
41 + fi
42 fi
43
44 AC_SUBST(LIB_DES)
45 @@ -716,5 +722,7 @@
46 fi
47
48 AC_SUBST(DIRS)
49 +
50 +AC_CONFIG_SUBDIRS(libltdl)
51
52 AC_OUTPUT(Makefile include/Makefile lib/Makefile plugins/Makefile utils/Makefile doc/Makefile sample/Makefile java/Makefile java/CyrusSasl/Makefile pwcheck/Makefile man/Makefile)
53 diff -x ltcf-c.sh -x ltconfig -x ltmain.sh -x libltdl -x config.guess -x config.sub -x configure -x aclocal.m4 -x Makefile.in -uNr cyrus-sasl-1.5.24.orig/lib/Makefile.am cyrus-sasl-1.5.24.new/lib/Makefile.am
54 --- cyrus-sasl-1.5.24.orig/lib/Makefile.am Fri Jul 21 04:35:02 2000
55 +++ cyrus-sasl-1.5.24.new/lib/Makefile.am Tue Jul 17 12:41:08 2001
56 @@ -43,7 +43,10 @@
57 # Library version info - here at the top, for sanity
58 sasl_version = 8:8:1
59
60 -INCLUDES=-I$(top_srcdir)/include
61 +INCLTDL= @INCLTDL@
62 +LIBLTDL= @LIBLTDL@
63 +
64 +INCLUDES=-I$(top_srcdir)/include $(INCLTDL)
65
66 EXTRA_DIST = saslint.h windlopen.c
67
68 @@ -53,5 +56,5 @@
69 EXTRA_libsasl_la_SOURCES = db_none.c db_ndbm.c db_gdbm.c db_berkeley.c db_testw32.c
70 libsasl_la_LDFLAGS = -version-info $(sasl_version)
71 libsasl_la_DEPENDENCIES = $(SASL_DB_BACKEND) @LTLIBOBJS@
72 -libsasl_la_LIBADD = @LTLIBOBJS@ $(SASL_DB_BACKEND) $(SASL_DB_LIB) $(SASL_DL_LIB) $(PLAIN_LIBS)
73 +libsasl_la_LIBADD = @LTLIBOBJS@ $(LIBLTDL) $(SASL_DB_BACKEND) $(SASL_DB_LIB) $(SASL_DL_LIB) $(PLAIN_LIBS)
74 # PLAIN_LIBS are linked in for sasl_checkpass
75 diff -x ltcf-c.sh -x ltconfig -x ltmain.sh -x libltdl -x config.guess -x config.sub -x configure -x aclocal.m4 -x Makefile.in -uNr cyrus-sasl-1.5.24.orig/lib/client.c cyrus-sasl-1.5.24.new/lib/client.c
76 --- cyrus-sasl-1.5.24.orig/lib/client.c Thu Apr 6 16:50:22 2000
77 +++ cyrus-sasl-1.5.24.new/lib/client.c Tue Jul 17 12:41:08 2001
78 @@ -49,6 +49,7 @@
79 #include <string.h>
80 #include <sasl.h>
81 #include <saslutil.h>
82 +#include <ltdl.h>
83 #include "saslint.h"
84
85 static int
86 @@ -218,7 +219,7 @@
87 {
88 int version;
89 const sasl_client_plug_t *plug;
90 - void *library;
91 + lt_dlhandle library;
92
93 struct cmechanism *next;
94 } cmechanism_t;
95 @@ -370,6 +371,10 @@
96
97 cmechlist->mech_list=NULL;
98 cmechlist->mech_length=0;
99 +
100 + /* init libltdl */
101 + if (lt_dlinit() != 0)
102 + return SASL_FAIL;
103
104 add_plugin((void *) &external_client_init, NULL);
105
106 diff -x ltcf-c.sh -x ltconfig -x ltmain.sh -x libltdl -x config.guess -x config.sub -x configure -x aclocal.m4 -x Makefile.in -uNr cyrus-sasl-1.5.24.orig/lib/common.c cyrus-sasl-1.5.24.new/lib/common.c
107 --- cyrus-sasl-1.5.24.orig/lib/common.c Mon Jul 17 19:21:02 2000
108 +++ cyrus-sasl-1.5.24.new/lib/common.c Tue Jul 17 16:26:01 2001
109 @@ -117,6 +117,11 @@
110 _sasl_mutex_utils.lock=l;
111 _sasl_mutex_utils.unlock=u;
112 _sasl_mutex_utils.dispose=d;
113 + /* XXX seb FIXME: add a call to lt_dlmutex_register() for libltdl.
114 + sasl_set_mutex args must surely be modified to add func ptr
115 + for libtool's callbacks SETERROR and GETERROR; n/l/u can
116 + certainly be reused for libtool's callbacks LOCK and UNLOCK.
117 + see (libtool.info) Thread Saftey in libltdl */
118 }
119
120
121 diff -x ltcf-c.sh -x ltconfig -x ltmain.sh -x libltdl -x config.guess -x config.sub -x configure -x aclocal.m4 -x Makefile.in -uNr cyrus-sasl-1.5.24.orig/lib/dlopen.c cyrus-sasl-1.5.24.new/lib/dlopen.c
122 --- cyrus-sasl-1.5.24.orig/lib/dlopen.c Thu Mar 9 21:53:47 2000
123 +++ cyrus-sasl-1.5.24.new/lib/dlopen.c Tue Jul 17 12:45:35 2001
124 @@ -50,6 +50,7 @@
125 #include <limits.h>
126 #include <sys/param.h>
127 #include <sasl.h>
128 +#include <ltdl.h>
129 #include "saslint.h"
130
131 #if HAVE_DIRENT_H
132 @@ -91,61 +92,7 @@
133 # define NAME_MAX 8
134 #endif
135
136 -#ifdef __hpux
137 -#include <dl.h>
138 -
139 -typedef shl_t dll_handle;
140 -typedef void * dll_func;
141 -
142 -dll_handle
143 -dlopen(char *fname, int mode)
144 -{
145 - shl_t h = shl_load(fname, BIND_DEFERRED, 0L);
146 - shl_t *hp = NULL;
147 -
148 - if (h) {
149 - hp = (shl_t *)malloc(sizeof (shl_t));
150 - if (!hp) {
151 - shl_unload(h);
152 - } else {
153 - *hp = h;
154 - }
155 - }
156 -
157 - return (dll_handle)hp;
158 -}
159 -
160 -int
161 -dlclose(dll_handle h)
162 -{
163 - shl_t hp = *((shl_t *)h);
164 - if (hp != NULL) free(hp);
165 - return shl_unload(h);
166 -}
167 -
168 -dll_func
169 -dlsym(dll_handle h, char *n)
170 -{
171 - dll_func handle;
172 -
173 - if (shl_findsym ((shl_t *)h, n, TYPE_PROCEDURE, &handle))
174 - return NULL;
175 -
176 - return (dll_func)handle;
177 -}
178 -
179 -char *dlerror()
180 -{
181 - if (errno != 0) {
182 - return strerror(errno);
183 - }
184 - return "Generic shared library error";
185 -}
186 -
187 -#define SO_SUFFIX ".sl"
188 -#else /* __hpux */
189 -#define SO_SUFFIX ".so"
190 -#endif /* __hpux */
191 +#define LA_SUFFIX ".la"
192
193
194 /* gets the list of mechanisms */
195 @@ -159,11 +106,6 @@
196 * checks appropriately. */
197 int result;
198 char str[PATH_MAX], tmp[PATH_MAX+2], c, prefix[PATH_MAX+2]; /* 1 for '/' 1 for trailing '\0' */
199 -#if __OpenBSD__
200 - char adj_entryname[1024];
201 -#else
202 -#define adj_entryname entryname
203 -#endif
204 int pos;
205 char *path=NULL;
206 int position;
207 @@ -180,10 +122,6 @@
208 || ! add_plugin)
209 return SASL_BADPARAM;
210
211 -#if __OpenBSD__
212 - snprintf(adj_entryname, sizeof adj_entryname, "_%s", entryname);
213 -#endif
214 -
215 /* get the path to the plugins */
216 result = ((sasl_getpath_t *)(getpath_cb->proc))(getpath_cb->context,
217 &path);
218 @@ -214,10 +152,9 @@
219 while ((dir=readdir(dp)) != NULL)
220 {
221 size_t length;
222 - void *library;
223 - void *entry_point;
224 + lt_dlhandle library;
225 + lt_ptr entry_point;
226 char name[PATH_MAX];
227 - int flag;
228
229
230 length = NAMLEN(dir);
231 @@ -225,7 +162,7 @@
232
233 if (length + pos>=PATH_MAX) continue; /* too big */
234
235 - if (strcmp(dir->d_name + (length - 3), SO_SUFFIX)) continue;
236 + if (strcmp(dir->d_name + (length - 3), LA_SUFFIX)) continue;
237
238 memcpy(name,dir->d_name,length);
239 name[length]='\0';
240 @@ -243,28 +180,23 @@
241
242 if (result != SASL_OK) return result;
243
244 -#ifdef RTLD_NOW
245 - flag = RTLD_NOW;
246 -#else
247 - flag = 0;
248 -#endif
249 - if (!(library = dlopen(tmp, flag))) {
250 + if (!(library = lt_dlopen(tmp))) {
251 _sasl_log(NULL, SASL_LOG_ERR, NULL, 0, 0,
252 - "unable to dlopen %s: %s", tmp, dlerror());
253 + "unable to lt_dlopen %s: %s", tmp, lt_dlerror());
254 continue;
255 }
256 entry_point = NULL;
257 - entry_point = dlsym(library, adj_entryname);
258 + entry_point = lt_dlsym(library, entryname);
259
260 if (entry_point == NULL) {
261 VL(("can't get an entry point\n"));
262 - dlclose(library);
263 + lt_dlclose(library);
264 continue;
265 }
266
267 if ((*add_plugin)(entry_point, library) != SASL_OK) {
268 VL(("add_plugin to list failed\n"));
269 - dlclose(library);
270 + lt_dlclose(library);
271 continue;
272 }
273 VL(("added [%s] successfully\n",dir->d_name));
274 @@ -281,12 +213,12 @@
275 }
276
277 int
278 -_sasl_done_with_plugin(void *plugin)
279 +_sasl_done_with_plugin(lt_dlhandle plugin)
280 {
281 if (! plugin)
282 return SASL_BADPARAM;
283
284 - dlclose(plugin);
285 + lt_dlclose(plugin);
286
287 return SASL_OK;
288 }
289 diff -x ltcf-c.sh -x ltconfig -x ltmain.sh -x libltdl -x config.guess -x config.sub -x configure -x aclocal.m4 -x Makefile.in -uNr cyrus-sasl-1.5.24.orig/lib/saslint.h cyrus-sasl-1.5.24.new/lib/saslint.h
290 --- cyrus-sasl-1.5.24.orig/lib/saslint.h Thu Apr 6 16:50:22 2000
291 +++ cyrus-sasl-1.5.24.new/lib/saslint.h Tue Jul 17 12:43:27 2001
292 @@ -45,6 +45,7 @@
293 #define SASLINT_H
294
295 #include <config.h>
296 +#include <ltdl.h>
297 #include "sasl.h"
298 #include "saslplug.h"
299
300 @@ -61,7 +62,7 @@
301 extern const sasl_callback_t *
302 _sasl_find_verifyfile_callback(const sasl_callback_t *callbacks);
303
304 -extern int _sasl_done_with_plugin(void *plugin);
305 +extern int _sasl_done_with_plugin(lt_dlhandle plugin);
306
307 extern void (*_sasl_client_cleanup_hook)(void);
308 extern void (*_sasl_server_cleanup_hook)(void);
309 diff -x ltcf-c.sh -x ltconfig -x ltmain.sh -x libltdl -x config.guess -x config.sub -x configure -x aclocal.m4 -x Makefile.in -uNr cyrus-sasl-1.5.24.orig/lib/server.c cyrus-sasl-1.5.24.new/lib/server.c
310 --- cyrus-sasl-1.5.24.orig/lib/server.c Mon Aug 14 04:04:42 2000
311 +++ cyrus-sasl-1.5.24.new/lib/server.c Tue Jul 17 12:56:40 2001
312 @@ -54,6 +54,7 @@
313 #include <sys/stat.h>
314 #include <fcntl.h>
315 #include <string.h>
316 +#include <ltdl.h>
317
318 #define DEFAULT_PLAIN_MECHANISM "sasldb"
319
320 @@ -238,7 +239,7 @@
321 int condition; /* set to SASL_NOUSER if no available users */
322 const sasl_server_plug_t *plug;
323 struct mechanism *next;
324 - void *library; /* this a pointer to shared library returned by dlopen
325 + lt_dlhandle library; /* this a pointer to shared library returned by dlopen
326 or some similar function on other platforms */
327 } mechanism_t;
328
329 @@ -668,6 +669,10 @@
330
331 /* check db */
332 ret = _sasl_server_check_db(vf);
333 +
334 + /* init libltdl */
335 + if (lt_dlinit() != 0)
336 + return SASL_FAIL;
337
338 /* load plugins */
339 add_plugin((void *)&external_server_init, NULL);
0 /*
1 (C) 2002 Sebastian Hetze <s.hetze@linux-ag.de>
2 Redistribution and use in source and binary forms, with or without
3 modification, are permitted under terms and conditions of BSD copyright.
4
5 This gives you an overview of the major api changes from cyrus-sasl version 1.5 to 2.1.
6 Certainly not complete, but hopefully a point to start with when you want to upgrade
7 your apps.
8 Prototypes at the end of this file might be handy.
9
10 sasl_callbacks CNONCE, GETSECRET and PUTSECRET are gone,
11 USERDB_CHECKPASS, USERDB_SETPASS and CANON_USER are new
12 sasl_authorize_t (for CB_PROXY_POLICY) has changed completely
13 sasl_checkpass has lost one argument (errstr)
14 sasl_client_new has got two new arguments (iplocalport, ipremoteport)
15 flags type has changed from int to unsigned
16 sasl_client_start has lost one argument (secret)
17 clientout now const
18 sasl_client_step clientout now const
19 sasl_decode output now const
20 sasl_encode output now const
21 sasl_getprop pvalue now const
22 sasl_listmech pcount has changed from unsigned to int
23 sasl_server_new has got two new arguments (iplocalport, ipremoteport)
24 flags type has changed from int to unsigned
25 sasl_server_start has lost one argument (errstr)
26 serverout now const
27 sasl_server_step has lost one argument (errstr)
28 serverout now const
29 sasl_user_exists has got new arg conn
30 sasl_setpass has got new arguments oldpass, oldpasslen
31 lost argument errstr
32 flags changed from int to unsigned
33 sasl_set_mutex 4arg sasl_mutex_dispose_t changed to sasl_mutex_free_t
34
35 sasl_usererr is gone
36 sasl_client_auth is gone
37 sasl_free_secret is gone
38 sasl_cred_install is gone
39 sasl_cred_uninstall is gone
40
41 sasl_client_init interface not changed
42 sasl_done interface not changed
43 sasl_errstring interface not changed
44 sasl_server_init interface not changed
45 sasl_setprop interface not changed
46 sasl_set_alloc interface not changed
47 sasl_dispose interface not changed
48 sasl_errstring interface not changed
49 sasl_idle interface not changed
50 */
51
52
53 static sasl_callback_t callbacks[] = {
54 {SASL_CB_GETOPT, (sasl_getopt_t)&getopt_func, NULL },
55 {SASL_CB_LOG, (sasl_log_t)&log_func, NULL },
56 {SASL_CB_GETPATH, (sasl_getpath_t)&getpath_func , NULL },
57 {SASL_CB_VERIFYFILE, (sasl_verifyfile_t)&verifyfile_func , NULL },
58 {SASL_CB_USER, (sasl_getsimple_t)&uname_func , NULL },
59 {SASL_CB_AUTHNAME, (sasl_getsimple_t)&authname_func , NULL },
60 {SASL_CB_LANGUAGE, (sasl_getsimple_t)&language_func , NULL },
61 #if SASL_VERSION_MAJOR < 2
62 {SASL_CB_CNONCE, (sasl_getsimple_t)&cnonce_func , NULL },
63 #endif
64 {SASL_CB_PASS, (sasl_getsecret_t)&getsecret_func , NULL },
65 {SASL_CB_ECHOPROMPT, (sasl_chalprompt_t)&challenge_func , NULL },
66 {SASL_CB_NOECHOPROMPT, (sasl_chalprompt_t)&challenge_func , NULL },
67 {SASL_CB_GETREALM, (sasl_getrealm_t)&getrealm_func , NULL },
68 #if SASL_VERSION_MAJOR < 2
69 /* sasl_authorize_t version 1 has almost nothing in common with v2 */
70 {SASL_CB_PROXY_POLICY, (sasl_authorize_t)&authorize1_func, NULL },
71 {SASL_CB_SERVER_GETSECRET, (sasl_server_getsecret_t)&srvgetsecret_func , NULL },
72 {SASL_CB_SERVER_PUTSECRET, (sasl_server_putsecret_t)&srvputsecret_func, NULL },
73 #else
74 {SASL_CB_PROXY_POLICY, (sasl_authorize_t)&authorize2_func, NULL },
75 {SASL_CB_SERVER_USERDB_CHECKPASS, (sasl_server_userdb_checkpass_t)&sudbcp_func, NULL },
76 {SASL_CB_SERVER_USERDB_SETPASS, (sasl_server_userdb_setpass_t)&sudbsp_func, NULL },
77 {SASL_CB_CANON_USER, (sasl_canon_user_t)&canon_func , NULL },
78 #endif
79 {SASL_CB_LIST_END, NULL, NULL },
80 };
81
82
83 int sasl_checkpass(sasl_conn_t *conn,
84 const char *user,
85 unsigned userlen,
86 const char *pass,
87 unsigned passlen
88 #if SASL_VERSION_MAJOR < 2
89 , const char **errstr
90 #endif
91 );
92
93 int sasl_client_new(const char *service,
94 const char *serverFQDN,
95 #if SASL_VERSION_MAJOR > 1
96 const char *iplocalport,
97 const char *ipremoteport,
98 #endif
99 const sasl_callback_t *prompt_supp,
100 #if SASL_VERSION_MAJOR < 2
101 int secflags,
102 #else
103 unsigned secflags,
104 #endif
105 sasl_conn_t ** pconn);
106
107 int sasl_client_start(sasl_conn_t *conn,
108 const char *mechlist,
109 #if SASL_VERSION_MAJOR < 2
110 sasl_secret_t *secret,
111 #endif
112 sasl_interact_t **prompt_need,
113 #if SASL_VERSION_MAJOR < 2
114 char **clientout,
115 #else
116 const char **clientout,
117 #endif
118 unsigned *clientoutlen,
119 const char **mech);
120
121 int sasl_client_step(sasl_conn_t *conn,
122 const char *serverin,
123 unsigned serverinlen,
124 sasl_interact_t **prompt_need,
125 #if SASL_VERSION_MAJOR < 2
126 char **clientout,
127 #else
128 const char **clientout,
129 #endif
130 unsigned *clientoutlen);
131
132 int sasl_decode(sasl_conn_t *conn,
133 const char *input,
134 unsigned inputlen,
135 #if SASL_VERSION_MAJOR < 2
136 char **output,
137 #else
138 const char **output,
139 #endif
140 unsigned *outputlen);
141
142 int sasl_encode(sasl_conn_t *conn,
143 const char *input,
144 unsigned inputlen,
145 #if SASL_VERSION_MAJOR < 2
146 char **output,
147 #else
148 const char **output,
149 #endif
150 unsigned *outputlen);
151
152 sasl_getprop(sasl_conn_t *conn, int propnum,
153 #if SASL_VERSION_MAJOR < 2
154 void **pvalue);
155 #else
156 const void **pvalue);
157 #endif
158
159 int sasl_listmech(sasl_conn_t *conn,
160 const char *user,
161 const char *prefix,
162 const char *sep,
163 const char *suffix,
164 const char **result,
165 unsigned *plen,
166 #if SASL_VERSION_MAJOR < 2
167 unsigned *pcount);
168 #else
169 int *pcount);
170 #endif
171
172 int sasl_server_new(const char *service,
173 const char *serverFQDN,
174 const char *user_realm,
175 #if SASL_VERSION_MAJOR > 1
176 const char *iplocalport,
177 const char *ipremoteport,
178 #endif
179 const sasl_callback_t *callbacks,
180 #if SASL_VERSION_MAJOR < 2
181 int secflags,
182 #else
183 unsigned flags,
184 #endif
185 sasl_conn_t **pconn);
186
187
188 int sasl_server_start(sasl_conn_t *conn,
189 const char *mech,
190 const char *clientin,
191 unsigned clientinlen,
192 #if SASL_VERSION_MAJOR < 2
193 char **serverout,
194 #else
195 const char **serverout,
196 #endif
197 unsigned *serveroutlen
198 #if SASL_VERSION_MAJOR < 2
199 ,const char **errstr
200 #endif
201 );
202
203 int sasl_server_step(sasl_conn_t *conn,
204 const char *clientin,
205 unsigned clientinlen,
206 #if SASL_VERSION_MAJOR < 2
207 char **serverout,
208 #else
209 const char **serverout,
210 #endif
211 unsigned *serveroutlen
212 #if SASL_VERSION_MAJOR < 2
213 ,const char **errstr
214 #endif
215 );
216
217
218 int sasl_user_exists(
219 #if SASL_VERSION_MAJOR > 1
220 sasl_conn_t *conn,
221 #endif
222 const char *service,
223 const char *user_realm,
224 const char *user);
225
226 int sasl_setpass(sasl_conn_t *conn,
227 const char *user,
228 const char *pass,
229 unsigned passlen,
230 #if SASL_VERSION_MAJOR > 1
231 const char *oldpass,
232 unsigned oldpasslen,
233 unsigned flags);
234 #else
235 int flags,
236 const char **errstr);
237 #endif
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
0 From Stoned.Elipot@script.jussieu.fr Thu Jul 19 12:42:33 2001
1 Date: Wed, 18 Jul 2001 00:30:00 +0200
2 From: Stoned Elipot <Stoned.Elipot@script.jussieu.fr>
3 To: cyrus-bugs@andrew.cmu.edu
4 Subject: Re: question/suggestion regarding libtool usage in cyrus-sasl lib
5
6 On Mon, 16 Jul 2001 12:33:17 -0400 (EDT) Rob Siemborski wrote:
7 > On Mon, 16 Jul 2001, Stoned Elipot wrote:
8 >
9 > > handling of `_' in symbol names. I had made crude patches on cyrus-sasl-1.5
10 .24
11 > > which use the libtool installed .la files to get the right shared object to
12 > > dlopen() and I'm considering using LTDL API to get extra portability withou
13 t
14 > > too much trouble. Would you be interested in theses ?
15 >
16 > I would be interested in seeing them, and possibly include (similar)
17 > patches in/with SASLv2.
18
19 Hi,
20 I had made a couple of patches to implement the usage of GNU libltdl in
21 cyrus-sasl-1.5.24. They can be found at :
22 ftp://ftp.pbox.org/pub/cyrus-sasl-1.5.24-ltdl.patches.gz
23
24 These patches bring :
25
26 - libtool linking of libsasl.* with libtldl
27
28 - Enabling or not the use of the included libtldl with --enable-ltdl-install
29 argument to configure (that's standard libtool integration, see libtool's
30 manual)
31
32 - lib/dlopen.c simplification and portability improvement (IMHO) by using
33 ltdl API (no more hack for `_' symbols prefixing, let libtool figure out
34 the shared lib naming convention)
35
36 *Not* included in these patches :
37
38 - (new) subdirectory 'libltdl' which should contains the GNU libltdl in
39 case the target system does not already have libtool installed. This
40 directory can be created by libtoolize --ltdl and then the
41 required and missing files for autoconf in there should be added (install-sh
42 and all; I didn't find a way to use those in ../config :( ).
43 See 'Distributing libltdl' in libtool's manual.
44
45 - config/<libtool scripts,support files> : I found myself updating libtool
46 scripts in config/ and so new files add to be added there for supporting latest
47 version of it.
48
49 - update of config/config.{guess,sub} : during testing on old netbsd systems I
50 came across the need to use more uptodate (how strange) version of these files.
51 I grabbed those available at ftp.gnu.org/pub/gnu/config
52
53 - Makefile.in, aclocal.m4 and configure which of course have to be rebuild
54 as my patches touch some of their sources files
55
56 (So theses previous point regards files that can be generated/added/updated by
57 auto* tools so I didn't put them in the above mentionned patches)
58
59 - the thread-safe issue is not resolved: I'm not a thread expert, please see
60 the comments I added in the patched lib/common.c:sasl_set_mutex()
61
62 Anyway, this allowed me to compile and test (just by cheking that saslpasswd
63 is picking the plugins shared libs and produce good result as far as I can see)
64 the whole thing on Solaris8/sparc, HPUX11, HPUX10.20 and NetBSD/sparc 1.2.1
65 (a.out) and 1.5.1 (elf). So I guess
66 I had the opportunity to test various shared libs handling/convention/...
67
68 Hoping this can help. Best regards, Stoned.
0 X-Added: With Flames (bblib $Revision: 1.1 $)
1 Return-path: <m.taylor@rbgkew.org.uk>
2 X-Andrew-Authenticated-as: 0;andrew.cmu.edu;Network-Mail
3 Received: from po5.andrew.cmu.edu via trymail for cyrus-bugs+@andrew.cmu.edu (->acs+asg.project.mail.cyrus-bugs)
4 ID </afs/andrew.cmu.edu/data/spool/ams/acs/Mailbox/4thxRwO00Udd1huk40>;
5 Thu, 7 Sep 2000 13:59:24 -0400 (EDT)
6 Received: from lion.rbgkew.org.uk (lion.rbgkew.org.uk [193.128.240.22])
7 by po5.andrew.cmu.edu (8.9.3/8.9.3) with ESMTP id NAA28106
8 for <cyrus-bugs+@andrew.cmu.edu>; Thu, 7 Sep 2000 13:59:08 -0400 (EDT)
9 Received: from ns.rbgkew.org.uk
10 ([193.128.240.7] helo=unicorn.rbgkew.org.uk ident=mta)
11 by lion.rbgkew.org.uk with esmtp (Exim 3.16 #1)
12 id 13X5wt-0006Mp-00
13 for cyrus-bugs+@andrew.cmu.edu; Thu, 07 Sep 2000 18:58:55 +0100
14 Received: from matts-pc.rbgkew.org.uk
15 ([193.128.240.137] helo=rbgkew.org.uk ident=mt00kg)
16 by unicorn.rbgkew.org.uk with esmtp (Exim 3.16 #1)
17 id 13X5c6-000226-00
18 for cyrus-bugs+@andrew.cmu.edu; Thu, 07 Sep 2000 18:37:26 +0100
19 Sender: M.Taylor@rbgkew.org.uk
20 Message-ID: <39B7D254.767CD1DC@rbgkew.org.uk>
21 Date: Thu, 07 Sep 2000 18:37:24 +0100
22 From: Matthew Taylor <m.taylor@rbgkew.org.uk>
23 Organization: Royal Botanic Gardens,Kew
24 X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i686)
25 X-Accept-Language: en
26 MIME-Version: 1.0
27 To: cyrus-bugs+@andrew.cmu.edu
28 Subject: patch to add pam support to pwcheck
29 Content-Type: multipart/mixed;
30 boundary="------------5D5A22F6F4E5731441F886DF"
31
32 This is a multi-part message in MIME format.
33 --------------5D5A22F6F4E5731441F886DF
34 Content-Type: text/plain; charset=us-ascii
35 Content-Transfer-Encoding: 7bit
36
37 Here is a patch to add pam support to pwcheck. This was to over come a
38 problems we had with some pam modules not working correctly when not run
39 as root. It also makes pwcheck fork for each connection as some pam
40 modules take a while to return.
41
42 --
43 *Matthew Taylor:Computer section email: M.Taylor@rbgkew.org.uk *
44 * The Royal Botanic Gardens, Kew, Tel : +44 (0)181 332 5714 *
45 * Richmond, Surrey, TW9 3AB, UK Fax : +44 (0)181 332 5736 *
46
47
48
49 --------------5D5A22F6F4E5731441F886DF
50 Content-Type: text/plain; charset=us-ascii;
51 name="pwcheck_pam.patch"
52 Content-Transfer-Encoding: 7bit
53 Content-Disposition: inline;
54 filename="pwcheck_pam.patch"
55
56 diff --new-file -r -u cyrus-sasl-1.5.24/configure.in cyrus-sasl-1.5.24.new/configure.in
57 --- cyrus-sasl-1.5.24/configure.in Fri Jul 21 03:35:01 2000
58 +++ cyrus-sasl-1.5.24.new/configure.in Thu Sep 7 17:45:53 2000
59 @@ -306,6 +306,10 @@
60 AC_DEFINE(HAVE_PWCHECK)
61 AC_DEFINE_UNQUOTED(PWCHECKDIR, "$with_pwcheck")
62 AC_CHECK_FUNC(getspnam,PWCHECKMETH="getspnam",PWCHECKMETH="getpwnam")
63 +
64 + if test "$with_pam" != no; then
65 + PWCHECKMETH="pam"
66 + fi
67 AC_SUBST(PWCHECKMETH)
68 fi
69 AM_CONDITIONAL(PWCHECK, test "$with_pwcheck" != no)
70
71 diff --new-file -r -u cyrus-sasl-1.5.24/pwcheck/Makefile.in cyrus-sasl-1.5.24.new/pwcheck/Makefile.in
72 --- cyrus-sasl-1.5.24/pwcheck/Makefile.in Fri Jul 21 03:36:07 2000
73 +++ cyrus-sasl-1.5.24.new/pwcheck/Makefile.in Thu Sep 7 17:45:53 2000
74 @@ -129,9 +129,9 @@
75 sbin_PROGRAMS = pwcheck
76
77 pwcheck_SOURCES = pwcheck.c
78 -EXTRA_pwcheck_SOURCES = pwcheck_getpwnam.c pwcheck_getspnam.c
79 +EXTRA_pwcheck_SOURCES = pwcheck_getpwnam.c pwcheck_getspnam.c pwcheck_pam.c
80 pwcheck_DEPENDECIES = pwcheck_@PWCHECKMETH@.lo
81 -pwcheck_LDADD = pwcheck_@PWCHECKMETH@.lo @LIB_CRYPT@ @LIB_SOCKET@
82 +pwcheck_LDADD = pwcheck_@PWCHECKMETH@.lo @LIB_CRYPT@ @LIB_SOCKET@ @LIB_PAM@
83 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
84 CONFIG_HEADER = ../config.h
85 CONFIG_CLEAN_FILES =
86 diff --new-file -r -u cyrus-sasl-1.5.24/pwcheck/pwcheck.c cyrus-sasl-1.5.24.new/pwcheck/pwcheck.c
87 --- cyrus-sasl-1.5.24/pwcheck/pwcheck.c Tue Jul 18 02:05:37 2000
88 +++ cyrus-sasl-1.5.24.new/pwcheck/pwcheck.c Thu Sep 7 17:45:53 2000
89 @@ -52,6 +52,28 @@
90 void newclient(int);
91 int retry_write(int, const char *, unsigned int);
92
93 +#ifdef HAVE_PAM
94 +#include <sys/wait.h>
95 +#include <signal.h>
96 +
97 +static void sigchld_handler(int sig)
98 +{
99 + int status;
100 + signal(SIGCHLD,sigchld_handler);
101 + sig = sig; /* Keep picky compilers happy */
102 + wait(&status);
103 + waitpid(-1,&status,WNOHANG);
104 +}
105 +
106 +
107 +
108 +
109 +
110 +#endif
111 +
112 +
113 +
114 +
115 /*
116 * Unix pwcheck daemon-authenticated login (shadow password)
117 */
118 @@ -68,6 +90,9 @@
119 struct sockaddr_un clientaddr;
120 int r;
121 int len;
122 +#ifdef HAVE_PAM
123 + pid_t cpid;
124 +#endif
125 mode_t oldumask;
126 char *pid_file = _PATH_PWCHECKPID;
127 FILE *fp = NULL;
128 @@ -177,6 +202,11 @@
129 exit(1);
130 }
131
132 +#ifdef HAVE_PAM
133 + signal(SIGCHLD,sigchld_handler);
134 +#endif
135 +
136 +
137 for (;;) {
138 len = sizeof(clientaddr);
139 c = accept(s, (struct sockaddr *)&clientaddr, &len);
140 @@ -184,8 +214,20 @@
141 syslog(LOG_WARNING, "accept: %m");
142 continue;
143 }
144 +#ifdef HAVE_PAM
145 + if((cpid=fork())==0) {
146 + newclient(c);
147 + exit(0);
148 + }
149 + if(cpid == -1) {
150 + perror("fork");
151 + }
152 + close(c);
153 +
154 +#else
155
156 newclient(c);
157 +#endif
158 }
159 }
160
161
162 diff --new-file -r -u cyrus-sasl-1.5.24/pwcheck/pwcheck_pam.c cyrus-sasl-1.5.24.new/pwcheck/pwcheck_pam.c
163 --- cyrus-sasl-1.5.24/pwcheck/pwcheck_pam.c Thu Jan 1 01:00:00 1970
164 +++ cyrus-sasl-1.5.24.new/pwcheck/pwcheck_pam.c Thu Sep 7 17:48:26 2000
165 @@ -0,0 +1,148 @@
166 +/* pwcheck_pam.c -- check passwords using getpwname()
167 + $Id: pwcheck-pam.patch,v 1.1 2000/09/07 18:48:55 leg Exp $
168 +
169 +Copyright 1998, 1999 Carnegie Mellon University
170 +
171 + All Rights Reserved
172 +
173 +Permission to use, copy, modify, and distribute this software and its
174 +documentation for any purpose and without fee is hereby granted,
175 +provided that the above copyright notice appear in all copies and that
176 +both that copyright notice and this permission notice appear in
177 +supporting documentation, and that the name of Carnegie Mellon
178 +University not be used in advertising or publicity pertaining to
179 +distribution of the software without specific, written prior
180 +permission.
181 +
182 +CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
183 +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
184 +FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR
185 +ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
186 +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
187 +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
188 +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
189 +******************************************************************/
190 +
191 +
192 +#include <stdlib.h>
193 +
194 +#include <security/pam_appl.h>
195 +#define SASL_OK 1
196 +#define SASL_NOMEM 0
197 +
198 +
199 +
200 +int _sasl_strdup(const char *in, char **out, int *outlen);
201 +
202 +struct sasl_pam_data {
203 + const char *userid;
204 + const char *password;
205 + int pam_error;
206 +};
207 +
208 +static int sasl_pam_conv(int num_msg, const struct pam_message **msg,
209 + struct pam_response **resp, void *appdata_ptr)
210 +{
211 + struct pam_response *reply = NULL;
212 + struct sasl_pam_data *pd = (struct sasl_pam_data *) appdata_ptr;
213 + int i;
214 + int ret;
215 +
216 + if (pd == NULL) {
217 + /* solaris bug? */
218 + return PAM_CONV_ERR;
219 + }
220 +
221 + reply = (struct pam_response *) malloc(sizeof(struct pam_response) *
222 + num_msg);
223 +
224 +
225 +
226 +
227 +
228 + if (reply == NULL)
229 + return PAM_CONV_ERR;
230 +
231 + for (i = 0; i < num_msg; i++) {
232 + switch (msg[i]->msg_style) {
233 + /* making the blatant assumption that echo on means user,
234 + echo off means password */
235 + case PAM_PROMPT_ECHO_ON:
236 + reply[i].resp_retcode = PAM_SUCCESS;
237 + ret = _sasl_strdup(pd->userid, &reply[i].resp, NULL);
238 + if (ret != SASL_OK)
239 + return PAM_CONV_ERR;
240 + break;
241 + case PAM_PROMPT_ECHO_OFF:
242 + reply[i].resp_retcode = PAM_SUCCESS;
243 + ret = _sasl_strdup(pd->password, &reply[i].resp, NULL);
244 + if (ret != SASL_OK)
245 + return PAM_CONV_ERR;
246 + break;
247 + case PAM_TEXT_INFO:
248 + case PAM_ERROR_MSG:
249 + /* ignore it, but pam still wants a NULL response... */
250 + reply[i].resp_retcode = PAM_SUCCESS;
251 + reply[i].resp = NULL;
252 + break;
253 + default: /* error! */
254 + free(reply);
255 + pd->pam_error = 1;
256 + return PAM_CONV_ERR;
257 + }
258 + }
259 + *resp = reply;
260 + return PAM_SUCCESS;
261 +}
262 +
263 +static struct pam_conv my_conv = {
264 + &sasl_pam_conv, /* int (*conv) */
265 + NULL /* appdata_ptr */
266 +};
267 +
268 +
269 +char *pwcheck(userid, password)
270 + char *userid;
271 + char *password;
272 +{
273 + pam_handle_t *pamh;
274 + struct sasl_pam_data pd;
275 + int pam_error;
276 +
277 +
278 +
279 +
280 + my_conv.appdata_ptr = &pd;
281 +
282 + pd.userid = userid;
283 + pd.password = password;
284 + pd.pam_error = 0;
285 +
286 + pam_error = pam_start("pwcheck", userid, &my_conv, &pamh);
287 + if (pam_error != PAM_SUCCESS) {
288 + return (char*)pam_strerror(pamh,pam_error);
289 +
290 + }
291 + pam_error = pam_authenticate(pamh, PAM_SILENT);
292 + if (pam_error != PAM_SUCCESS) {
293 + return (char*)pam_strerror(pamh,pam_error);
294 +
295 + }
296 + pam_end(pamh, PAM_SUCCESS);
297 +
298 + return "OK";
299 +
300 +
301 +
302 +}
303 +
304 +/* copy a string to malloced memory */
305 +int _sasl_strdup(const char *in, char **out, int *outlen)
306 +{
307 + size_t len = strlen(in);
308 + if (outlen) *outlen = len;
309 + *out=malloc(len + 1);
310 + if (! *out) return SASL_NOMEM;
311 + strcpy((char *) *out, in);
312 + return SASL_OK;
313 +}
314
315 --------------5D5A22F6F4E5731441F886DF--
316
0 #!/usr/local/bin/perl
1
2 # $Id: saslauthd-unix.pl,v 1.2 2003/04/28 20:15:10 rjs3 Exp $
3
4 # This is a sample perl script for communicating with saslauthd running
5 # on a unix socket. Simply call the function with 4 parameters and you're
6 # set (userid, password, service, realm or undef)
7
8 use Socket;
9 use strict;
10
11 sub saslauthd_verify_password {
12 my $SASLAUTHD_PATH = "/var/run/saslauthd/mux";
13
14 my $userid = shift || die "no userid";
15 my $passwd = shift || die "no password";
16 my $service = shift || die "no service";
17 my $realm = shift;
18
19 my $u_len = length $userid;
20 my $p_len = length $passwd;
21 my $s_len = length $service;
22 my $r_len = (defined($realm) ? length $realm : 0);
23
24 if($u_len + $p_len + $s_len + $r_len + 30 > 8192) {
25 warn "request too long in saslauthd_verify_password";
26 return undef;
27 }
28
29 my $request = pack "na".$u_len."na".$p_len."na".$s_len."na".$r_len,
30 $u_len, $userid, $p_len, $passwd, $s_len, $service,
31 $r_len, (defined($realm) ? $realm : "");
32
33 socket(SOCK, PF_UNIX, SOCK_STREAM, 0) || die "socket: $!";
34 connect(SOCK, sockaddr_un($SASLAUTHD_PATH)) || die "connect: $!";
35
36 my $len = length $request;
37 my $offset = 0;
38 while($len) {
39 my $written = syswrite SOCK, $request, $len, $offset;
40 die "System write error: $!\n" unless defined $written;
41 $len -= $written;
42 $offset += $written;
43 }
44
45 # Read back reply
46 my $buf;
47 $len = sysread SOCK, $buf, 8192;
48 die "System read error: $!\n" unless defined $len;
49
50 my $response;
51 my $size = unpack("n", $buf);
52
53 die "Bad saslauthd response" unless defined $size;
54 ($size, $response) = unpack("na".$size, $buf);
55
56 if($response =~ /^OK/) {
57 return 1;
58 } else {
59 return 0;
60 }
61 }
62
0 Index: configure.in
1 ===================================================================
2 RCS file: /afs/andrew/system/cvs/src/sasl/configure.in,v
3 retrieving revision 1.125
4 diff -c -r1.125 configure.in
5 *** configure.in 2002/02/11 15:43:34 1.125
6 --- configure.in 2002/03/07 14:38:31
7 ***************
8 *** 449,454 ****
9 --- 449,504 ----
10 AC_MSG_RESULT(disabled)
11 fi
12
13 + dnl
14 + dnl SECURID
15 + dnl
16 +
17 + dnl Test for ACE (required for SecurID)
18 + AC_ARG_WITH(with-ace,[ --with-ace=PATH use ACE from PATH],
19 + with_ace="${withval}")
20 +
21 + case "$with_ace" in
22 + ""|yes)
23 + AC_CHECK_LIB(sdiclient, sd_init,
24 + AC_CHECK_HEADER(sdi_defs.h, with_ace="yes",
25 + with_ace="no"),
26 + with_ace="no")
27 + ;;
28 + *)
29 + if test -d $with_ace; then
30 + CPPFLAGS="${CPPFLAGS} -I${with_ace}"
31 + LDFLAGS="${LDFLAGS} -L${with_ace}"
32 + else
33 + with_ace="no"
34 + fi
35 + ;;
36 + esac
37 +
38 + AC_MSG_CHECKING(for ACE)
39 + AC_MSG_RESULT($with_ace)
40 +
41 + AC_ARG_ENABLE(securid, [ --enable-securid enable SECURID authentication [no] ],
42 + securid=$enableval,
43 + securid=no)
44 +
45 + if test "$with_ace" = no; then
46 + AC_WARN([ACE not found -- SecurID will be disabled])
47 + securid=no
48 + fi
49 +
50 + AC_MSG_CHECKING(SECURID)
51 + if test "$securid" != no; then
52 + AC_MSG_RESULT(enabled)
53 + SECURID_LIBS="-lsdiclient"
54 +
55 + SASL_MECHS="$SASL_MECHS libsecurid.la"
56 + SASL_STATIC_OBJS="$SASL_STATIC_OBJS ../plugins/securid.o"
57 + AC_DEFINE(STATIC_SECURID)
58 + AC_SUBST(SECURID_LIBS)
59 + else
60 + AC_MSG_RESULT(disabled)
61 + fi
62 +
63 SASL_KERBEROS_V4_CHK
64 SASL_GSSAPI_CHK
65 SASL_PLAIN_CHK
66 Index: plugins/Makefile.am
67 ===================================================================
68 RCS file: /afs/andrew/system/cvs/src/sasl/plugins/Makefile.am,v
69 retrieving revision 1.45
70 diff -c -r1.45 Makefile.am
71 *** Makefile.am 2002/02/05 00:25:53 1.45
72 --- Makefile.am 2002/03/07 14:38:37
73 ***************
74 *** 56,61 ****
75 --- 56,62 ----
76 sasldb_version = 2:1:0
77 srp_version = 2:1:0
78 otp_version = 2:1:0
79 + securid_version = 2:1:0
80
81 INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/lib
82 LDFLAGS = @LDFLAGS@ -module -export-dynamic -rpath $(plugindir)
83 ***************
84 *** 73,79 ****
85 sasl_LTLIBRARIES = @SASL_MECHS@
86 EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
87 libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \
88 ! libsasldb.la
89
90 libplain_la_SOURCES = plain.c plain_init.c $(common_sources)
91 libplain_la_LDFLAGS = -version-info $(plain_version)
92 --- 74,80 ----
93 sasl_LTLIBRARIES = @SASL_MECHS@
94 EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
95 libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \
96 ! libsecurid.la libsasldb.la
97
98 libplain_la_SOURCES = plain.c plain_init.c $(common_sources)
99 libplain_la_LDFLAGS = -version-info $(plain_version)
100 ***************
101 *** 120,125 ****
102 --- 121,131 ----
103 libotp_la_DEPENDENCIES = $(COMPAT_OBJS)
104 libotp_la_LIBADD = $(OTP_LIBS) $(COMPAT_OBJS)
105
106 + libsecurid_la_SOURCES = securid.c securid_init.c securid.h $(common_sources)
107 + libsecurid_la_LDFLAGS = -version-info $(securid_version)
108 + libsecurid_la_DEPENDENCIES = $(COMPAT_OBJS)
109 + libsecurid_la_LIBADD = $(SECURID_LIBS) $(COMPAT_OBJS)
110 +
111 # Auxprop Plugins
112 libsasldb_la_SOURCES = sasldb.c sasldb_init.c $(common_sources)
113 libsasldb_la_LDFLAGS = -version-info $(sasldb_version)
114 ***************
115 *** 129,135 ****
116 # Instructions for making the _init files
117
118 init_src=anonymous_init.c crammd5_init.c digestmd5_init.c gssapiv2_init.c \
119 ! kerberos4_init.c login_init.c plain_init.c srp_init.c otp_init.c sasldb_init.c
120
121 CLEANFILES=$(init_src)
122
123 --- 135,142 ----
124 # Instructions for making the _init files
125
126 init_src=anonymous_init.c crammd5_init.c digestmd5_init.c gssapiv2_init.c \
127 ! kerberos4_init.c login_init.c plain_init.c srp_init.c srp_otp.c \
128 ! securid_init.c sasldb_init.c
129
130 CLEANFILES=$(init_src)
131
132 Index: plugins/makeinit.sh
133 ===================================================================
134 RCS file: /afs/andrew/system/cvs/src/sasl/plugins/makeinit.sh,v
135 retrieving revision 1.2
136 diff -c -r1.2 makeinit.sh
137 *** makeinit.sh 2001/12/04 02:06:48 1.2
138 --- makeinit.sh 2002/03/07 14:38:37
139 ***************
140 *** 1,4 ****
141 ! for mech in anonymous crammd5 digestmd5 gssapiv2 kerberos4 login plain srp otp; do
142
143 echo "
144 #include <string.h>
145 --- 1,5 ----
146 ! for mech in anonymous crammd5 digestmd5 gssapiv2 kerberos4 login plain \
147 ! srp otp securid; do
148
149 echo "
150 #include <string.h>
0 Index: configure.in
1 ===================================================================
2 RCS file: /afs/andrew/system/cvs/src/sasl/configure.in,v
3 retrieving revision 1.192
4 diff -u -r1.192 configure.in
5 --- configure.in 16 Mar 2004 21:52:01 -0000 1.192
6 +++ configure.in 7 May 2004 17:17:03 -0000
7 @@ -713,6 +713,23 @@
8 AC_DEFINE(DO_DLOPEN,[],[Should we build a shared plugin (via dlopen) library?])
9 fi
10
11 +dnl STRIPPLUS
12 +AC_ARG_ENABLE(stripplus, [ --enable-stripplus enable STRIPPLUS user canonification [[no]] ],
13 + stripplus=$enableval,
14 + stripplus=no)
15 +
16 +AC_MSG_CHECKING(STRIPPLUS)
17 +if test "$stripplus" != no; then
18 + AC_MSG_RESULT(enabled)
19 + SASL_MECHS="$SASL_MECHS libstripplus.la"
20 + if test "$enable_static" = yes; then
21 + SASL_STATIC_OBJS="$SASL_STATIC_OBJS ../plugins/stripplus.o"
22 + AC_DEFINE(STATIC_STRIPPLUS, [], [Link STRIPPLUS Staticly])
23 + fi
24 +else
25 + AC_MSG_RESULT(disabled)
26 +fi
27 +
28 AC_SUBST(SASL_MECHS)
29 AC_SUBST(SASL_STATIC_OBJS)
30 AC_SUBST(SASL_STATIC_LIBS)
31 Index: plugins/Makefile.am
32 ===================================================================
33 RCS file: /afs/andrew/system/cvs/src/sasl/plugins/Makefile.am,v
34 retrieving revision 1.70
35 diff -u -r1.70 Makefile.am
36 --- plugins/Makefile.am 9 Mar 2004 16:54:18 -0000 1.70
37 +++ plugins/Makefile.am 7 May 2004 17:17:10 -0000
38 @@ -58,6 +58,7 @@
39 otp_version = 2:18:0
40 sql_version = 2:18:0
41 srp_version = 2:18:0
42 +stripplus_version = 2:18:0
43
44 INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include
45 AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir)
46 @@ -77,7 +78,7 @@
47 sasl_LTLIBRARIES = @SASL_MECHS@
48 EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
49 libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \
50 - libntlm.la libsasldb.la libsql.la
51 + libntlm.la libsasldb.la libsql.la libstripplus.la
52
53 libplain_la_SOURCES = plain.c plain_init.c $(common_sources)
54 libplain_la_LDFLAGS = -version-info $(plain_version)
55 @@ -140,12 +141,18 @@
56 libsql_la_DEPENDENCIES = $(COMPAT_OBJS)
57 libsql_la_LIBADD = $(COMPAT_OBJS)
58
59 +# Canonuser Plugins
60 +libstripplus_la_SOURCES = stripplus.c stripplus_init.c $(common_sources)
61 +libstripplus_la_LDFLAGS = -version-info $(stripplus_version)
62 +libstripplus_la_DEPENDENCIES = $(COMPAT_OBJS)
63 +libstripplus_la_LIBADD = $(COMPAT_OBJS)
64 +
65
66 # Instructions for making the _init files
67
68 init_src=anonymous_init.c crammd5_init.c digestmd5_init.c gssapiv2_init.c \
69 kerberos4_init.c login_init.c plain_init.c srp_init.c otp_init.c ntlm_init.c \
70 -sasldb_init.c sql_init.c
71 +sasldb_init.c sql_init.c stripplus_init.c
72
73
74 CLEANFILES=$(init_src)
75 Index: plugins/makeinit.sh
76 ===================================================================
77 RCS file: /afs/andrew/system/cvs/src/sasl/plugins/makeinit.sh,v
78 retrieving revision 1.8
79 diff -u -r1.8 makeinit.sh
80 --- plugins/makeinit.sh 15 Jul 2003 17:38:59 -0000 1.8
81 +++ plugins/makeinit.sh 7 May 2004 17:17:10 -0000
82 @@ -87,3 +87,46 @@
83 " > ${mech}_init.c
84 done
85
86 +
87 +for mech in stripplus ; do
88 +
89 +echo "
90 +#include <config.h>
91 +
92 +#include <string.h>
93 +#include <stdlib.h>
94 +#include <stdio.h>
95 +#ifndef macintosh
96 +#include <sys/stat.h>
97 +#endif
98 +#include <fcntl.h>
99 +#include <assert.h>
100 +
101 +#include <sasl.h>
102 +#include <saslplug.h>
103 +#include <saslutil.h>
104 +
105 +#include \"plugin_common.h\"
106 +
107 +#ifdef WIN32
108 +BOOL APIENTRY DllMain( HANDLE hModule,
109 + DWORD ul_reason_for_call,
110 + LPVOID lpReserved
111 + )
112 +{
113 + switch (ul_reason_for_call)
114 + {
115 + case DLL_PROCESS_ATTACH:
116 + case DLL_THREAD_ATTACH:
117 + case DLL_THREAD_DETACH:
118 + case DLL_PROCESS_DETACH:
119 + break;
120 + }
121 + return TRUE;
122 +}
123 +#endif
124 +
125 +SASL_CANONUSER_PLUG_INIT( $mech )
126 +" > ${mech}_init.c
127 +done
128 +
129 Index: plugins/stripplus.c
130 ===================================================================
131 RCS file: plugins/stripplus.c
132 diff -N plugins/stripplus.c
133 --- /dev/null 1 Jan 1970 00:00:00 -0000
134 +++ plugins/stripplus.c 7 May 2004 17:17:10 -0000
135 @@ -0,0 +1,179 @@
136 +/* stripplus.c - user canonicalization plugin which strips any plus content
137 + * Ken Murchison
138 + * $Id: stripplus_canonuser.patch,v 1.1 2004/05/07 17:26:57 ken3 Exp $
139 + */
140 +/*
141 + * Copyright (c) 1998-2004 Carnegie Mellon University. All rights reserved.
142 + *
143 + * Redistribution and use in source and binary forms, with or without
144 + * modification, are permitted provided that the following conditions
145 + * are met:
146 + *
147 + * 1. Redistributions of source code must retain the above copyright
148 + * notice, this list of conditions and the following disclaimer.
149 + *
150 + * 2. Redistributions in binary form must reproduce the above copyright
151 + * notice, this list of conditions and the following disclaimer in
152 + * the documentation and/or other materials provided with the
153 + * distribution.
154 + *
155 + * 3. The name "Carnegie Mellon University" must not be used to
156 + * endorse or promote products derived from this software without
157 + * prior written permission. For permission or any other legal
158 + * details, please contact
159 + * Office of Technology Transfer
160 + * Carnegie Mellon University
161 + * 5000 Forbes Avenue
162 + * Pittsburgh, PA 15213-3890
163 + * (412) 268-4387, fax: (412) 268-7395
164 + * tech-transfer@andrew.cmu.edu
165 + *
166 + * 4. Redistributions of any form whatsoever must retain the following
167 + * acknowledgment:
168 + * "This product includes software developed by Computing Services
169 + * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
170 + *
171 + * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
172 + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
173 + * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
174 + * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
175 + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
176 + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
177 + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
178 + */
179 +
180 +#include <config.h>
181 +#include <string.h>
182 +#include <ctype.h>
183 +#include <stdio.h>
184 +
185 +#include <sasl.h>
186 +#include <saslplug.h>
187 +
188 +#ifdef MIN
189 +#undef MIN
190 +#endif
191 +#define MIN(a,b) (((a) < (b))? (a):(b))
192 +
193 +/*
194 + * This plugin is a straight port of the INTERNAL canonuser plugin.
195 + * It functions identical to to INTERNAL, but also strips any +detail
196 + * in the auth[z]id.
197 + */
198 +static int _canonuser_stripplus(const sasl_utils_t *utils,
199 + const char *user, unsigned ulen,
200 + const char *user_realm,
201 + unsigned flags __attribute__((unused)),
202 + char *out_user,
203 + unsigned out_umax, unsigned *out_ulen)
204 +{
205 + unsigned i;
206 + char *in_buf, *userin, *p;
207 + const char *begin_u;
208 + size_t u_apprealm = 0;
209 +
210 + if(!utils || !user) return SASL_BADPARAM;
211 +
212 + in_buf = utils->malloc((ulen + 2) * sizeof(char));
213 + if(!in_buf) return SASL_NOMEM;
214 +
215 + userin = in_buf;
216 +
217 + memcpy(userin, user, ulen);
218 + userin[ulen] = '\0';
219 +
220 + /* Strip User ID */
221 + for(i=0;isspace((int)userin[i]) && i<ulen;i++);
222 + begin_u = &(userin[i]);
223 + if(i>0) ulen -= i;
224 +
225 + for(;ulen > 0 && isspace((int)begin_u[ulen-1]); ulen--);
226 + if(begin_u == &(userin[ulen])) {
227 + utils->free(in_buf);
228 + utils->seterror(utils->conn, 0, "All-whitespace username.");
229 + return SASL_FAIL;
230 + }
231 +
232 + /* Need to append realm if necessary (see sasl.h) */
233 + if(user_realm && !strchr(user, '@')) {
234 + u_apprealm = strlen(user_realm) + 1;
235 + }
236 +
237 + /* Now Copy */
238 + memcpy(out_user, begin_u, MIN(ulen, out_umax));
239 + if(u_apprealm) {
240 + if(ulen >= out_umax) return SASL_BUFOVER;
241 + out_user[ulen] = '@';
242 + memcpy(&(out_user[ulen+1]), user_realm,
243 + MIN(u_apprealm-1, out_umax-ulen-1));
244 + }
245 + out_user[MIN(ulen + u_apprealm,out_umax)] = '\0';
246 +
247 + /* Strip any plus content */
248 + if ((p = strchr(out_user, '+'))) {
249 + size_t n = strcspn(p, "@");
250 + memmove(p, p+n, strlen(p+n)+1);
251 + ulen -= n;
252 + }
253 +
254 + if(ulen + u_apprealm > out_umax) return SASL_BUFOVER;
255 +
256 + if(out_ulen) *out_ulen = MIN(ulen + u_apprealm,out_umax);
257 +
258 + utils->free(in_buf);
259 + return SASL_OK;
260 +}
261 +
262 +static int _cu_stripplus_server(void *glob_context __attribute__((unused)),
263 + sasl_server_params_t *sparams,
264 + const char *user, unsigned ulen,
265 + unsigned flags,
266 + char *out_user,
267 + unsigned out_umax, unsigned *out_ulen)
268 +{
269 + return _canonuser_stripplus(sparams->utils,
270 + user, ulen, sparams->user_realm,
271 + flags, out_user, out_umax, out_ulen);
272 +}
273 +
274 +static int _cu_stripplus_client(void *glob_context __attribute__((unused)),
275 + sasl_client_params_t *cparams,
276 + const char *user, unsigned ulen,
277 + unsigned flags,
278 + char *out_user,
279 + unsigned out_umax, unsigned *out_ulen)
280 +{
281 + return _canonuser_stripplus(cparams->utils,
282 + user, ulen, NULL,
283 + flags, out_user, out_umax, out_ulen);
284 +}
285 +
286 +static sasl_canonuser_plug_t canonuser_stripplus_plugin = {
287 + 0, /* features */
288 + 0, /* spare */
289 + NULL, /* glob_context */
290 + "STRIPPLUS", /* name */
291 + NULL, /* canon_user_free */
292 + _cu_stripplus_server,
293 + _cu_stripplus_client,
294 + NULL,
295 + NULL,
296 + NULL
297 +};
298 +
299 +int stripplus_canonuser_plug_init(const sasl_utils_t *utils __attribute__((unused)),
300 + int max_version,
301 + int *out_version,
302 + sasl_canonuser_plug_t **plug,
303 + const char *plugname __attribute__((unused)))
304 +{
305 + if(!out_version || !plug) return SASL_BADPARAM;
306 +
307 + if(max_version < SASL_CANONUSER_PLUG_VERSION) return SASL_BADVERS;
308 +
309 + *out_version = SASL_CANONUSER_PLUG_VERSION;
310 +
311 + *plug = &canonuser_stripplus_plugin;
312 +
313 + return SASL_OK;
314 +}
0 This is the TCL SASL extentions, contributed by Marshall Rose
1 <mrose@dbc.mtview.ca.us>
2
3 For the most up to date version please see:
4
5 http://beepcore-tcl.sourceforge.net/tclsasl.html
6
0 <html><head><title>Tcl SASL</title>
1 <meta http-equiv="Expires" content="Sun, 20 Jan 2002 23:35:28 +0000">
2 <STYLE type='text/css'>
3 .title { color: #990000; font-size: 22px; line-height: 22px; font-weight: bold; text-align: right;
4 font-family: helvetica, arial, sans-serif }
5 .filename { color: #666666; font-size: 18px; line-height: 28px; font-weight: bold; text-align: right;
6 font-family: helvetica, arial, sans-serif }
7 p.copyright { color: #000000; font-size: 10px;
8 font-family: verdana, charcoal, helvetica, arial, sans-serif }
9 p { margin-left: 2em; margin-right: 2em; }
10 li { margin-left: 3em; }
11 ol { margin-left: 2em; margin-right: 2em; }
12 ul.text { margin-left: 2em; margin-right: 2em; }
13 pre { margin-left: 3em; color: #333333 }
14 ul.toc { color: #000000; line-height: 16px;
15 font-family: verdana, charcoal, helvetica, arial, sans-serif }
16 H3 { color: #333333; font-size: 16px; line-height: 16px; font-family: helvetica, arial, sans-serif }
17 H4 { color: #000000; font-size: 14px; font-family: helvetica, arial, sans-serif }
18 TD.header { color: #ffffff; font-size: 10px; font-family: arial, helvetica, san-serif; valign: top }
19 TD.author-text { color: #000000; font-size: 10px;
20 font-family: verdana, charcoal, helvetica, arial, sans-serif }
21 TD.author { color: #000000; font-weight: bold; margin-left: 4em; font-size: 10px; font-family: verdana, charcoal, helvetica, arial, sans-serif }
22 A:link { color: #990000; font-size: 10px; text-transform: uppercase; font-weight: bold;
23 font-family: MS Sans Serif, verdana, charcoal, helvetica, arial, sans-serif }
24 A:visited { color: #333333; font-weight: bold; font-size: 10px; text-transform: uppercase;
25 font-family: MS Sans Serif, verdana, charcoal, helvetica, arial, sans-serif }
26 A:name { color: #333333; font-weight: bold; font-size: 10px; text-transform: uppercase;
27 font-family: MS Sans Serif, verdana, charcoal, helvetica, arial, sans-serif }
28 .link2 { color:#ffffff; font-weight: bold; text-decoration: none;
29 font-family: monaco, charcoal, geneva, MS Sans Serif, helvetica, monotype, verdana, sans-serif;
30 font-size: 9px }
31 .RFC { color:#666666; font-weight: bold; text-decoration: none;
32 font-family: monaco, charcoal, geneva, MS Sans Serif, helvetica, monotype, verdana, sans-serif;
33 font-size: 9px }
34 .hotText { color:#ffffff; font-weight: normal; text-decoration: none;
35 font-family: charcoal, monaco, geneva, MS Sans Serif, helvetica, monotype, verdana, sans-serif;
36 font-size: 9px }
37 </style>
38 </head>
39 <body bgcolor="#ffffff" text="#000000" alink="#000000" vlink="#666666" link="#990000">
40 <table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b>&nbsp;TOC&nbsp;</b></font></a><br></td></tr></table>
41 <table width="66%" border="0" cellpadding="0" cellspacing="0"><tr><td><table width="100%" border="0" cellpadding="2" cellspacing="1">
42 <tr valign="top"><td width="33%" bgcolor="#666666" class="header"> </td><td width="33%" bgcolor="#666666" class="header">M. Rose</td></tr>
43 <tr valign="top"><td width="33%" bgcolor="#666666" class="header">&nbsp;</td><td width="33%" bgcolor="#666666" class="header">Dover Beach Consulting, Inc.</td></tr>
44 <tr valign="top"><td width="33%" bgcolor="#666666" class="header">&nbsp;</td><td width="33%" bgcolor="#666666" class="header">January 20, 2002</td></tr>
45 </table></td></tr></table>
46 <div align="right"><font face="monaco, MS Sans Serif" color="#990000" size="+3"><b><br><span class="title">Tcl SASL</span></b></font></div>
47 <font face="verdana, helvetica, arial, sans-serif" size="2">
48
49 <h3>Abstract</h3>
50
51 <p>
52 Tcl SASL provides a Tcl interface to the Cyrus SASLv2
53 library.
54 </p>
55 <a name="toc"><br><hr size="1" shade="0"></a>
56 <table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b>&nbsp;TOC&nbsp;</b></font></a><br></td></tr></table>
57 <h3>Table of Contents</h3>
58 <ul compact class="toc">
59 <b><a href="#anchor1">1.</a>&nbsp;
60 SYNOPSIS<br></b>
61 <b><a href="#anchor2">1.1</a>&nbsp;
62 Installation<br></b>
63 <b><a href="#anchor3">2.</a>&nbsp;
64 CONVENTIONS<br></b>
65 <b><a href="#anchor4">2.1</a>&nbsp;
66 Return Codes<br></b>
67 <b><a href="#anchor5">2.2</a>&nbsp;
68 Data Types<br></b>
69 <b><a href="#anchor6">2.3</a>&nbsp;
70 Interactions<br></b>
71 <b><a href="#anchor7">2.4</a>&nbsp;
72 Callbacks<br></b>
73 <b><a href="#anchor8">2.4.1</a>&nbsp;
74 Client/Server callbacks<br></b>
75 <b><a href="#anchor9">2.4.2</a>&nbsp;
76 Client-only callbacks<br></b>
77 <b><a href="#anchor10">2.4.3</a>&nbsp;
78 Server-only callbacks<br></b>
79 <b><a href="#anchor11">3.</a>&nbsp;
80 PROCEDURES<br></b>
81 <b><a href="#anchor12">3.1</a>&nbsp;
82 Server-only calls<br></b>
83 <b><a href="#anchor13">3.2</a>&nbsp;
84 Client-only calls<br></b>
85 <b><a href="#anchor14">3.3</a>&nbsp;
86 Client/Server calls<br></b>
87 <b><a href="#anchor15">3.4</a>&nbsp;
88 Miscellaneous calls<br></b>
89 <b><a href="#anchor16">4.</a>&nbsp;
90 EXAMPLES<br></b>
91 <b><a href="#anchor17">4.1</a>&nbsp;
92 Server<br></b>
93 <b><a href="#anchor18">4.2</a>&nbsp;
94 Client<br></b>
95 <b><a href="#rfc.references1">&#167;</a>&nbsp;
96 References<br></b>
97 <b><a href="#rfc.authors">&#167;</a>&nbsp;
98 Author's Address<br></b>
99 <b><a href="#anchor19">A.</a>&nbsp;
100 TODO List<br></b>
101 <b><a href="#anchor20">B.</a>&nbsp;
102 Copyrights<br></b>
103 <b><a href="#rfc.index">&#167;</a>&nbsp;
104 Index<br></b>
105 </ul>
106 <br clear="all">
107
108 <a name="anchor1"><br><hr size="1" shade="0"></a>
109 <table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b>&nbsp;TOC&nbsp;</b></font></a><br></td></tr></table>
110 <h3>1.&nbsp;SYNOPSIS</h3>
111 </font><pre>
112 package provide sasl 2.0
113 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
114
115 <p>
116 Tcl SASL provides a Tcl interface to the
117 <a href="http://asg.web.cmu.edu/sasl/">Cyrus SASLv2 library</a>.
118 </p>
119
120 <p>
121 This document won't tell you what
122 <a href="#RFC2222">SASL</a>[1] is.
123 What it will tell you,
124 the Tcl programmer,
125 is how you can access the Cyrus SASLv2 library from your Tcl script.
126 </p>
127
128 <h4><a name="anchor2">1.1</a>&nbsp;Installation</h4>
129
130 <p>
131 First,
132 you'll need to have
133 <a href="http://www.scriptics.com/software/tcltk/downloadnow83.tml">Tcl 8.3</a>
134 (or later) already installed.
135 </p>
136 </font><pre>
137 ./configure ... --with-tcl=...
138 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
139
140 <a name="anchor3"><br><hr size="1" shade="0"></a>
141 <table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b>&nbsp;TOC&nbsp;</b></font></a><br></td></tr></table>
142 <h3>2.&nbsp;CONVENTIONS</h3>
143
144 <h4><a name="anchor4">2.1</a>&nbsp;Return Codes</h4>
145
146 <p>
147 If an exception occurs in a Cyrus SASL library function,
148 an error is thrown and the <b>errorCode</b> global is set to a list
149 containing four elements:
150
151 <ul class="text">
152
153 <li>
154 the literal string <b>"SASL"</b>;
155 </li>
156
157 <li>
158 a string naming the Cyrus SASL library function that failed;
159 </li>
160
161 <li>
162 an integer identifying the Cyrus SASL result code that was returned;
163 and,
164 </li>
165
166 <li>
167 a string containing the associated diagnostic.
168 </li>
169
170 </ul>
171 <p>
172
173 </p>
174
175 <p>
176 In addition to the usual "normal" return,
177 four routines
178 (<a href="#server_start">sasl::server_start</a>,
179 <a href="#server_step">sasl::server_step</a>,
180 <a href="#client_start">sasl::client_start</a>, and
181 <a href="#client_step">sasl::client_step</a>)
182 may also use the "continue" return.
183 This occurs when the corresponding Cyrus SASL library function returns
184 <b>SASL_CONTINUE</b>.
185 </p>
186
187 <h4><a name="anchor5">2.2</a>&nbsp;Data Types</h4>
188
189 <p>
190 A serialized array is a list that contains an series of keywords
191 and values.
192 </p>
193
194 <p>
195 A serialized array can be traversed using <b>foreach</b>,
196 e.g.,
197 </p>
198 </font><pre>
199 foreach {k v} $aList {
200 puts stdout "$k has value $v"
201 }
202 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
203
204 <p>
205 Alternatively,
206 an array can be initialized and accessed,
207 e.g.,
208 </p>
209 </font><pre>
210 array set data $aList
211 if {[info exists data(plugin)]} {
212 puts stdout "plugin entry is present"
213 }
214 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
215
216 <p>
217 Several routines accept serialized arrays as arguments.
218 In particular,
219 the Cyrus SASL security properties is expressed as a serialized array
220 with these elements:
221
222 <ul class="text">
223
224 <li>
225 min_ssf
226 </li>
227
228 <li>
229 max_ssf
230 </li>
231
232 <li>
233 max_bufsize
234 </li>
235
236 <li>
237 flags
238 </li>
239
240 </ul>
241 <p>
242
243 With the exception of <b>flags</b>,
244 each of these takes an integer value.
245 The <b>flags</b> entry takes a list value.
246 To find out what flags are known,
247 try <b>sasl::info sec_flags</b>.
248 </p>
249
250 <h4><a name="anchor6">2.3</a>&nbsp;Interactions</h4>
251
252 <p>
253 Two routines
254 (<a href="#client_start">sasl::client_start</a> and
255 <a href="#client_step">sasl::client_step</a>)
256 have an optional <b>-interact</b> switch that takes a script argument.
257 </p>
258
259 <p>
260 When evaluated,
261 the script is given one argument,
262 a serialized array.
263 At a minimum,
264 the <b>id</b> element is present in the serialized array.
265 Optionally,
266 three other elements
267 (<b>challenge</b>, <b>prompt</b>, and <b>default</b>)
268 may also be present.
269 </p>
270
271 <p>
272 If the script makes a normal return,
273 the return value is supplied to the Cyrus SASL library.
274 </p>
275
276 <h4><a name="anchor7">2.4</a>&nbsp;Callbacks</h4>
277
278 <p>
279 Four routines
280 (<a href="#server_init">sasl::server_init</a>,
281 <a href="#server_new">sasl::server_new</a>,
282 <a href="#client_init">sasl::client_init</a>, and
283 <a href="#client_new">sasl::client_new</a>)
284 have a <b>-callbacks</b> switch that takes a list argument.
285 Each element of the list is either:
286
287 <ul class="text">
288
289 <li>
290 the name of a callback; or,
291 </li>
292
293 <li>
294 a list containing two elements,
295 the name of a callback and a script.
296 </li>
297
298 </ul>
299 <p>
300
301 The former case is used by clients to tell the Cyrus SASL library
302 what information may be determined using an interaction.
303 Otherwise,
304 the supplied script is evaluated to get the indicated information.
305 </p>
306
307 <p>
308 In this latter case,
309 the script is given one argument,
310 a serialized array containing callback-specific elements.
311 </p>
312
313 <h4><a name="anchor8">2.4.1</a>&nbsp;Client/Server callbacks</h4>
314
315 <p>
316
317 <blockquote class="text"><dl>
318
319 <dt>getopt:</dt>
320 <dd>
321 <a name="anchor21"></a>
322 Returns a string.
323 <br>
324
325 Elements:
326
327 <ul class="text">
328
329 <li>
330 ?plugin?
331 </li>
332
333 <li>
334 option
335 </li>
336
337 </ul>
338 <p>
339
340 </dd>
341
342 <dt>log:</dt>
343 <dd>
344 <a name="anchor22"></a>
345 Elements:
346
347 <ul class="text">
348
349 <li>
350 level
351 </li>
352
353 <li>
354 message
355 </li>
356
357 </ul>
358 <p>
359
360 </dd>
361
362 <dt>getpath:</dt>
363 <dd>
364 <a name="anchor23"></a>
365 Returns a string.
366 <br>
367
368 Elements: none.
369 <br>
370 <br>
371
372 </dd>
373
374 <dt>verifyfile:</dt>
375 <dd>
376 <a name="anchor24"></a>
377 Returns an integer (a SASL result code),
378 either 0 (<b>SASL_OK</b>), 1 (<b>SASL_CONTINUE</b>), or -1 (<b>SASL_FAIL</b>).
379 <br>
380
381 Elements:
382
383 <ul class="text">
384
385 <li>
386 file
387 </li>
388
389 <li>
390 type
391 </li>
392
393 </ul>
394 <p>
395
396 To find out what types are known,
397 try <b>sasl::info verify_types</b>.
398 </dd>
399
400 </dl></blockquote>
401 <p>
402
403 </p>
404
405 <h4><a name="anchor9">2.4.2</a>&nbsp;Client-only callbacks</h4>
406
407 <p>
408
409 <blockquote class="text"><dl>
410
411 <dt>user:</dt>
412 <dd>
413 <a name="anchor25"></a>
414 Returns a string.
415 <br>
416
417 Elements: id
418 <br>
419 <br>
420
421 </dd>
422
423 <dt>authname:</dt>
424 <dd>
425 <a name="anchor26"></a>
426 Returns a string.
427 <br>
428
429 Elements: id
430 <br>
431 <br>
432
433 </dd>
434
435 <dt>language:</dt>
436 <dd>
437 <a name="anchor27"></a>
438 Returns a string.
439 <br>
440
441 Elements: id
442 <br>
443 <br>
444
445 </dd>
446
447 <dt>cnonce:</dt>
448 <dd>
449 <a name="anchor28"></a>
450 Returns a string.
451 <br>
452
453 Elements: id
454 <br>
455 <br>
456
457 </dd>
458
459 <dt>pass:</dt>
460 <dd>
461 <a name="anchor29"></a>
462 Returns a string.
463 <br>
464
465 Elements:
466
467 <ul class="text">
468
469 <li>
470 token (a client token)
471 </li>
472
473 <li>
474 id
475 </li>
476
477 </ul>
478 <p>
479
480 </dd>
481
482 <dt>?no?echoprompt:</dt>
483 <dd>
484 <a name="anchor30"></a><a name="anchor31"></a>
485 Returns a string.
486 <br>
487
488 Elements:
489
490 <ul class="text">
491
492 <li>
493 id
494 </li>
495
496 <li>
497 challenge
498 </li>
499
500 <li>
501 prompt
502 </li>
503
504 <li>
505 default
506 </li>
507
508 </ul>
509 <p>
510
511 </dd>
512
513 <dt>getrealm:</dt>
514 <dd>
515 <a name="anchor32"></a>
516 Returns a string.
517 <br>
518
519 Elements:
520
521 <ul class="text">
522
523 <li>
524 id
525 </li>
526
527 <li>
528 ?available? (a list of possible choices)
529 </li>
530
531 </ul>
532 <p>
533
534 </dd>
535
536 </dl></blockquote>
537 <p>
538
539 </p>
540
541 <h4><a name="anchor10">2.4.3</a>&nbsp;Server-only callbacks</h4>
542
543 <p>
544
545 <blockquote class="text"><dl>
546
547 <dt>proxy:</dt>
548 <dd>
549 <a name="anchor33"></a>
550 Returns an integer (a SASL result code),
551 usually either 0 (<b>SASL_OK</b>), or -14 (<b>SASL_NOAUTHZ</b>).
552 <br>
553
554 Elements:
555
556 <ul class="text">
557
558 <li>
559 token (a server token)
560 </li>
561
562 <li>
563 target
564 </li>
565
566 <li>
567 user
568 </li>
569
570 <li>
571 ?realm?
572 </li>
573
574 <li>
575 ?propctx? (a propctx token)
576 </li>
577
578 </ul>
579 <p>
580
581 </dd>
582
583 <dt>checkpass:</dt>
584 <dd>
585 <a name="anchor34"></a>
586 Returns an integer (a SASL result code).
587 <br>
588
589 Elements:
590
591 <ul class="text">
592
593 <li>
594 token (a server token)
595 </li>
596
597 <li>
598 user
599 </li>
600
601 <li>
602 pass
603 </li>
604
605 <li>
606 ?propctx? (a propctx token)
607 </li>
608
609 </ul>
610 <p>
611
612 </dd>
613
614 <dt>setpass:</dt>
615 <dd>
616 <a name="anchor35"></a>
617 Returns an integer (a SASL result code).
618 <br>
619
620 Elements:
621
622 <ul class="text">
623
624 <li>
625 token (a server token)
626 </li>
627
628 <li>
629 user
630 </li>
631
632 <li>
633 pass
634 </li>
635
636 <li>
637 flags
638 </li>
639
640 <li>
641 ?propctx? (a propctx token)
642 </li>
643
644 </ul>
645 <p>
646
647 To find out what flags are known,
648 try <b>sasl::info setpass_flags</b>.
649 <br>
650 <br>
651
652 </dd>
653
654 <dt>canonuser:</dt>
655 <dd>
656 <a name="anchor36"></a>
657 Returns a string.
658 <br>
659
660 Elements:
661
662 <ul class="text">
663
664 <li>
665 token (a server token)
666 </li>
667
668 <li>
669 in
670 </li>
671
672 <li>
673 ?realm?
674 </li>
675
676 <li>
677 outmax
678 </li>
679
680 <li>
681 flags
682 </li>
683
684 </ul>
685 <p>
686
687 To find out what flags are known,
688 try <b>sasl::info canon_flags</b>.
689 </dd>
690
691 </dl></blockquote>
692 <p>
693
694 </p>
695
696 <a name="anchor11"><br><hr size="1" shade="0"></a>
697 <table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b>&nbsp;TOC&nbsp;</b></font></a><br></td></tr></table>
698 <h3>3.&nbsp;PROCEDURES</h3>
699
700 <h4><a name="anchor12">3.1</a>&nbsp;Server-only calls</h4>
701
702 <p>
703 The calling sequence is:
704
705 <ol class="text">
706
707 <li>
708 Invoke <a href="#server_init">sasl::server_init</a> to load
709 plugins.
710 </li>
711
712 <li>
713 On each incoming connection,
714 invoke <a href="#server_new">sasl::server_new</a> to get a
715 server token.
716 </li>
717
718 <li>
719 Invoke <a href="#setprop">$token -operation setprop</a> to
720 set the security properties for the connection.
721 </li>
722
723 <li>
724 Invoke <a href="#server_list">$token -operation list</a> to
725 get the list of mechanisms to send to the client.
726 </li>
727
728 <li>
729 When client selects a mechanism,
730 invoke <a href="#server_start">$token -operation start</a>,
731 and go to Step 7.
732 </li>
733
734 <li>
735 Invoke <a href="#server_step">$token -operation step</a>.
736 </li>
737
738 <li>
739 Look at the result:
740
741 <blockquote class="text"><dl>
742
743 <dt>normal return:</dt>
744 <dd>
745 Tell the client it's successful and goto
746 Step 8.
747 </dd>
748
749 <dt>continue return:</dt>
750 <dd>
751 Send the result to the client,
752 wait for more input,
753 and goto Step 6.
754 </dd>
755
756 <dt>error return:</dt>
757 <dd>
758 Tell the client it loses and abort.
759 </dd>
760
761 </dl></blockquote>
762 <p>
763
764 </li>
765
766 <li>
767 Invoke <a href="#getprop">$token -operation getprop</a> to
768 get the new security properties for the connection.
769 </li>
770
771 </ol>
772 <p>
773
774 Now, let's look at the actual procedures.
775 </p>
776 <a name="server_init"></a>
777
778 <p>
779 <a name="anchor37"></a>
780 </p>
781 </font><pre>sasl::server_init \
782 -callbacks list \
783 ?-appname string?
784 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
785
786 <p>
787 Initialize server-side code,
788 supplying default <b>-callbacks</b> and an <b>-appname</b> for logging.
789 </p>
790 <a name="server_new"></a>
791
792 <p>
793 <a name="anchor38"></a>
794 </p>
795 </font><pre>sasl::server_new \
796 -service string \
797 ?-serverFQDN string? \
798 ?-realm string? \
799 ?-iplocalport string? \
800 ?-ipremoteport string? \
801 ?-callbacks script? \
802 ?-flags list?
803 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
804
805 <p>
806 Return a "server token" for a single SASL connection,
807 supplying the registered name of the <b>-service</b>.
808 To find out what flags are known,
809 try <b>sasl::info servernew_flags</b>.
810
811 </p>
812 <a name="server_list"></a>
813
814 <p>
815 <a name="anchor39"></a>
816 </p>
817 </font><pre>$token -operation list \
818 ?-user string?
819 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
820
821 <p>
822 Return a list of mechanisms available to the server.
823 </p>
824 <a name="server_start"></a>
825
826 <p>
827 <a name="anchor40"></a>
828 </p>
829 </font><pre>$token -operation start \
830 -mechanism string \
831 ?-input string?
832 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
833
834 <p>
835 Start a <b>-mechanism</b>
836 (optionally, with an <b>-input</b> string from the client),
837 returning an output string for the client.
838 </p>
839 <a name="server_step"></a>
840
841 <p>
842 <a name="anchor41"></a>
843 </p>
844 </font><pre>$token -operation step \
845 -input string
846 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
847
848 <p>
849 Perform another exchange,
850 taking an <b>input</b> string from the client,
851 returning an output string for the client.
852 </p>
853
854 <p>
855 <a name="anchor42"></a>
856 </p>
857 </font><pre>$token -operation checkpass \
858 -user string \
859 -pass string
860 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
861
862 <p>
863 Determine if a plaintext password is valid;
864 if not, throw an error.
865 </p>
866
867 <p>
868 <a name="anchor43"></a>
869 </p>
870 </font><pre>$token -operation userexists \
871 -server string \
872 ?-realm string? \
873 -user string
874 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
875
876 <p>
877 Determine if a user exists;
878 it not, throw an error.
879 </p>
880
881 <p>
882 <a name="anchor44"></a>
883 </p>
884 </font><pre>$token -operation setpass \
885 -user string \
886 ?-newpass string? \
887 ?-oldpass string? \
888 ?-flags list?
889 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
890
891 <p>
892 Set the password for a user;
893 on failure, throw an error.
894 To find out what flags are known,
895 try <b>sasl::info setpass_flags</b>.
896 </p>
897
898 <p>
899 <a name="anchor45"></a>
900 </p>
901 </font><pre>$token -operation auxprop_request \
902 ?-properties list?
903 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
904
905 <p>
906 Request a set of auxiliary <b>-properties</b>
907 (or reset the list if this switch is absent);
908 on failure,
909 throw an error.
910 </p>
911
912 <p>
913 <a name="anchor46"></a>
914 </p>
915 </font><pre>$token -operation auxprop_getctx
916 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
917
918 <p>
919 Return a "propctx token" containing the current auxiliary
920 properties.
921 </p>
922
923 <h4><a name="anchor13">3.2</a>&nbsp;Client-only calls</h4>
924
925 <p>
926 The calling sequence is:
927
928 <ol class="text">
929
930 <li>
931 Invoke <a href="#client_init">sasl::client_init</a> to load
932 plugins.
933 </li>
934
935 <li>
936 On each outgoing connection,
937 invoke <a href="#client_new">sasl::client_new</a> to get a
938 client token.
939 </li>
940
941 <li>
942 Invoke <a href="#setprop">$token -operation setprop</a> to
943 set the security properties for the connection.
944 </li>
945
946 <li>
947 When the server indicates which mechanisms are available
948 invoke <a href="#client_start">$token -operation start</a>,
949 and go to Step 6.
950 </li>
951
952 <li>
953 Invoke <a href="#client_step">$token -operation step</a>.
954 </li>
955
956 <li>
957 Look at the result:
958
959 <blockquote class="text"><dl>
960
961 <dt>normal return:</dt>
962 <dd>
963 If the result is empty, goto Step 8;
964 otherwise, send the result to the server and goto Step 7
965 </dd>
966
967 <dt>continue return:</dt>
968 <dd>
969 Send the result to the server,
970 wait for more input,
971 and goto Step 5.
972 </dd>
973
974 <dt>error return:</dt>
975 <dd>
976 You lose, abort.
977 </dd>
978
979 </dl></blockquote>
980 <p>
981
982 (If you're familiar with the Cyrus SASL library API,
983 you'll notice there is no "interaction" return &#151;
984 Tcl SASL handles this through a callback for you.)
985 </li>
986
987 <li>
988 Wait for the server's confirmation.
989 </li>
990
991 <li>
992 Invoke <a href="#getprop">$token -operation getprop</a> to
993 get the new security properties for the connection.
994 </li>
995
996 </ol>
997 <p>
998
999 Now, let's look at the actual procedures.
1000 </p>
1001 <a name="client_init"></a>
1002
1003 <p>
1004 <a name="anchor47"></a>
1005 </p>
1006 </font><pre>sasl::client_init \
1007 -callbacks list
1008 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1009
1010 <p>
1011 Initialize client-side code,
1012 supplying default <b>-callbacks</b>.
1013 </p>
1014 <a name="client_new"></a>
1015
1016 <p>
1017 <a name="anchor48"></a>
1018 </p>
1019 </font><pre>sasl::client_new \
1020 -service string \
1021 -serverFQDN string \
1022 ?-iplocalport string? \
1023 ?-ipremoteport string? \
1024 ?-callbacks script? \
1025 ?-flags list?
1026 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1027
1028 <p>
1029 Return a "client token" for a single SASL connection,
1030 supplying the registered name of the <b>-service</b>,
1031 and the <b>-serverFQDN</b> of the server.
1032 To find out what flags are known,
1033 try <b>sasl::info clientnew_flags</b>.
1034 </p>
1035 <a name="client_start"></a>
1036
1037 <p>
1038 <a name="anchor49"></a>
1039 </p>
1040 </font><pre>$token -operation start \
1041 -mechanisms list \
1042 ?-interact script?
1043 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1044
1045 <p>
1046 Select one of the given <b>-mechanisms</b>,
1047 and return a serialized array containing two elements:
1048 the <b>mechanism</b> to use,
1049 and,
1050 an <b>output</b> string for the server.
1051 </p>
1052 <a name="client_step"></a>
1053
1054 <p>
1055 <a name="anchor50"></a>
1056 </p>
1057 </font><pre>$token -operation step \
1058 -input string \
1059 ?-interact script?
1060 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1061
1062 <p>
1063
1064 <p>
1065 Perform another exchange,
1066 taking an <b>input</b> string from the server,
1067 returning an output string for the server.
1068 </p>
1069
1070 </p>
1071
1072 <h4><a name="anchor14">3.3</a>&nbsp;Client/Server calls</h4>
1073
1074 <p>
1075 <a name="anchor51"></a>
1076 </p>
1077 </font><pre>$token -operation info
1078 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1079
1080 <p>
1081 Return a list of known operations for the token.
1082 </p>
1083 <a name="getprop"></a>
1084
1085 <p>
1086 <a name="anchor52"></a>
1087 </p>
1088 </font><pre>$token -operation getprop \
1089 -property string
1090 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1091
1092 <p>
1093 Return a string corresponding to the value of the
1094 given <b>-property</b>.
1095 To find out what properties are known,
1096 try <b>sasl::info getprops</b>.
1097 </p>
1098 <a name="setprop"></a>
1099
1100 <p>
1101 <a name="anchor53"></a>
1102 </p>
1103 </font><pre>$token -operation setprop \
1104 -property string \
1105 -value string
1106 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1107
1108 <p>
1109 Set the <b>-value</b> of the given <b>-property</b>.
1110 To find out what properties are known,
1111 try <b>sasl::info setprops</b>.
1112 </p>
1113
1114 <p>
1115 <a name="anchor54"></a>
1116 </p>
1117 </font><pre>$token -operation errdetail
1118 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1119
1120 <p>
1121
1122 Return the detail for the last error encountered for the token.
1123 </p>
1124
1125 <p>
1126 <a name="anchor55"></a>
1127 </p>
1128 </font><pre>$token -operation decode \
1129 -input string
1130 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1131
1132 <p>
1133
1134 Take an <b>-input</b> string and decipher/verify it
1135 (using the previously-negotiated security layer),
1136 and return a plaintext string.
1137 </p>
1138
1139 <p>
1140 <a name="anchor56"></a>
1141 </p>
1142 </font><pre>$token -operation encode \
1143 -input string
1144 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1145
1146 <p>
1147 Take an <b>-output</b> string and encipher/sign it
1148 (using the previously-negotiated security layer),
1149 and return a string to be sent over the network.
1150 </p>
1151
1152 <h4><a name="anchor15">3.4</a>&nbsp;Miscellaneous calls</h4>
1153
1154 <p>
1155 <a name="anchor57"></a>
1156 </p>
1157 </font><pre>sasl::decode64 string
1158 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1159
1160 <p>
1161 Return a string decoded from base64.
1162 </p>
1163
1164 <p>
1165 <a name="anchor58"></a>
1166 </p>
1167 </font><pre>sasl::done
1168 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1169
1170 <p>
1171 Release all resources associated with this package.
1172 </p>
1173
1174 <p>
1175 <a name="anchor59"></a>
1176 </p>
1177 </font><pre>sasl::encode64 string
1178 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1179
1180 <p>
1181 Return a string encoded to base64.
1182 </p>
1183
1184 <p>
1185 <a name="anchor60"></a>
1186 </p>
1187 </font><pre>sasl::errstring
1188 -code number \
1189 ?-languages string?
1190 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1191
1192 <p>
1193 Take a SASL result <b>-code</b> and
1194 a list of <b>-languages</b> (e.g., "en-US"),
1195 and return a serialized array containing two elements:
1196 the corresponding <b>diagnostic</b> string,
1197 and,
1198 optionally,
1199 the <b>language</b> used to localize the diagnostic.
1200 </p>
1201
1202 <p>
1203 <a name="anchor61"></a>
1204 </p>
1205 </font><pre>sasl::info ?option?
1206 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1207
1208 <p>
1209 Return a list of known options,
1210 or a list of known choices for a given <b>option</b>.
1211 </p>
1212
1213 <p>
1214 <a name="anchor62"></a>
1215 </p>
1216 </font><pre>sasl::mechanisms
1217 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1218
1219 <p>
1220 Return a list of all known mechanisms.
1221 </p>
1222
1223 <a name="anchor16"><br><hr size="1" shade="0"></a>
1224 <table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b>&nbsp;TOC&nbsp;</b></font></a><br></td></tr></table>
1225 <h3>4.&nbsp;EXAMPLES</h3>
1226
1227 <h4><a name="anchor17">4.1</a>&nbsp;Server</h4>
1228 </font><pre>
1229 proc sasl_log {data} {
1230 array set params $data
1231
1232 # look at data(level) and data(message)
1233 }
1234
1235
1236 proc server_callback {id data} {
1237 array set params $data
1238
1239 # look at data(level) and data(message)
1240 global server
1241
1242 array set params $data
1243
1244 switch -- $id {
1245 getopt {
1246 if {![info exists params(plugin)]} {
1247 set params(plugin) ""
1248 }
1249 switch -- $params(plugin)/$params(option) {
1250 /auto_transition
1251 -
1252 /canon_user_plugin
1253 -
1254 /mech_list
1255 -
1256 /sasldb_path
1257 -
1258 OTP/opiekeys
1259 -
1260 default {
1261 # if value isn't set, an error is thrown below
1262 # that's okay, the Cyrus SASL library will use a default value
1263 }
1264 }
1265 }
1266
1267 verifyfile {
1268 # set value...
1269 }
1270
1271 proxy {
1272 # set value...
1273 }
1274
1275 checkpass {
1276 # set value...
1277 }
1278 }
1279
1280 return $value
1281 }
1282
1283
1284 sasl::server_init -callbacks [list [list log sasl_log]]
1285
1286
1287 set callbacks {}
1288 foreach id [list getopt verifyfile proxy checkpass] {
1289 lappend callbacks [list $id "server_callback $id"]
1290 }
1291
1292 set token [sasl::server_new -service $service \
1293 -callbacks $callbacks \
1294 -flags [list success_data]]
1295
1296
1297 if {$ssf > 0} {
1298 $token -operation setprop ssf_external $ssf
1299 }
1300
1301 if {[string length $clientID] > 0} {
1302 $token -operation setprop auth_external $clientID
1303 }
1304
1305 $token -operation setprop sec_props \
1306 [list min_ssf $min \
1307 max_ssf $max \
1308 max_bufsize $bufsiz \
1309 flags $flags]
1310
1311 set mechlist [$token -operation list]
1312
1313
1314 # send $mechlist to client
1315 # recv mechanism and input from client
1316
1317 set code 4
1318 for {set operation start} {$code == 4} {set operation step} {
1319 set cmd [list $token -operation $operation \
1320 -input $input]
1321 if {![string compare $operation start]} {
1322 lappend cmd -mechanism $mechanism
1323 }
1324
1325 switch -- [set code [catch { eval $cmd } output]] {
1326 0 {
1327 # send success to client
1328
1329 set ssf [$token -operation getprop ssf]
1330 }
1331
1332 4 {
1333 # send continue to client with output
1334 # recv input from client
1335 }
1336
1337 default {
1338 # send error to client
1339 }
1340 }
1341 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1342
1343 <h4><a name="anchor18">4.2</a>&nbsp;Client</h4>
1344 </font><pre>
1345 proc client_callback {data} {
1346 global client
1347
1348 array set params $data
1349
1350 switch -- $params(id) {
1351 pass
1352 -
1353 echoprompt
1354 -
1355 noechoprompt {
1356 # ask the user...
1357 }
1358
1359 getrealm {
1360 if {[info exists params(available)]} {
1361 # ask the user to pick one from the list...
1362 } else {
1363 # ask the user to supply one...
1364 }
1365 }
1366 }
1367
1368 return $value
1369 }
1370
1371 proc client_interact {data} {
1372 global client
1373
1374 array set params $data
1375 set id $params(id)
1376
1377 catch { set value $params(default) }
1378
1379 # ask the user to enter the $id using $params(prompt)...
1380
1381 return $value
1382 }
1383
1384
1385 sasl::client_init -callbacks [list [list log sasl_log]]
1386
1387
1388 # interact script will supply these
1389 set callbacks [list authname cnonce language user]
1390
1391 # callback script will supply these
1392 foreach id [list pass echoprompt noechoprompt] {
1393 lappend callbacks [list $id client_callback]
1394 }
1395
1396 set token [sasl::client_new -service $service \
1397 -serverFQDN $fqdn \
1398 -callbacks $callbacks \
1399 -flags [list success_data]]
1400
1401
1402 if {$ssf > 0} {
1403 $token -operation setprop ssf_external $ssf
1404 }
1405
1406 if {[string length $serverID] > 0} {
1407 $token -operation setprop auth_external $serverID
1408 }
1409
1410 $token -operation setprop sec_props \
1411 [list min_ssf $min \
1412 max_ssf $max \
1413 max_bufsize $bufsiz \
1414 flags $flags]
1415
1416
1417 # recv mechlist from server
1418
1419 switch -- [set code [catch { $token -operation start \
1420 -mechanisms $mechlist \
1421 -interact client_interact } result]] {
1422 0 - 4 {
1423 array set data $result
1424 # send data(mechanism) and optionally data(output) to server
1425 # recv input from server
1426 set code 4
1427 }
1428
1429 default {
1430 # error!
1431 }
1432 }
1433
1434 while {$code == 4} {
1435 switch -- [set code [catch { $token -operation step \
1436 -input $input \
1437 -interact client_interact
1438 } output]] {
1439 0 {
1440 if {![string compare $output ""]} {
1441 break
1442 }
1443 }
1444
1445 4 {
1446 }
1447
1448 default {
1449 # error!
1450 }
1451
1452 # make sure that server response says to continue...
1453
1454 # send output to server
1455 # recv input from server
1456 }
1457
1458 # make sure that server's last response says complete...
1459 }
1460 </pre><font face="verdana, helvetica, arial, sans-serif" size="2">
1461
1462 <a name="rfc.references1"><br><hr size="1" shade="0"></a>
1463 <table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b>&nbsp;TOC&nbsp;</b></font></a><br></td></tr></table>
1464 <h3>References</h3>
1465 <table width="99%" border="0">
1466 <tr><td class="author-text" valign="top"><b><a name="RFC2222">[1]</a></b></td>
1467 <td class="author-text"><a href="mailto:jgmyers@netscape.com">Myers, J.</a>, "<a href="ftp://ftp.isi.edu/in-notes/rfc2222.txt">Simple Authentication and Security Layer (SASL)</a>", RFC 2222, October 1997.</td></tr>
1468 </table>
1469
1470 <a name="rfc.authors"><br><hr size="1" shade="0"></a>
1471 <table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b>&nbsp;TOC&nbsp;</b></font></a><br></td></tr></table>
1472 <h3>Author's Address</h3>
1473 <table width="99%" border="0" cellpadding="0" cellspacing="0">
1474 <tr><td class="author-text">&nbsp;</td>
1475 <td class="author-text">Marshall T. Rose</td></tr>
1476 <tr><td class="author-text">&nbsp;</td>
1477 <td class="author-text">Dover Beach Consulting, Inc.</td></tr>
1478 <tr><td class="author-text">&nbsp;</td>
1479 <td class="author-text">POB 255268</td></tr>
1480 <tr><td class="author-text">&nbsp;</td>
1481 <td class="author-text">Sacramento, CA 95865-5268</td></tr>
1482 <tr><td class="author-text">&nbsp;</td>
1483 <td class="author-text">US</td></tr>
1484 <tr><td class="author" align="right">Phone:&nbsp;</td>
1485 <td class="author-text">+1 916 483 8878</td></tr>
1486 <tr><td class="author" align="right">Fax:&nbsp;</td>
1487 <td class="author-text">+1 916 483 8848</td></tr>
1488 <tr><td class="author" align="right">EMail:&nbsp;</td>
1489 <td class="author-text"><a href="mailto:mrose@dbc.mtview.ca.us">mrose@dbc.mtview.ca.us</a></td></tr>
1490 </table>
1491
1492 <a name="anchor19"><br><hr size="1" shade="0"></a>
1493 <table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b>&nbsp;TOC&nbsp;</b></font></a><br></td></tr></table>
1494 <h3>Appendix A.&nbsp;TODO List</h3>
1495
1496 <p>
1497
1498 <ul class="text">
1499
1500 <li>
1501 Add routines for propctx tokens.
1502 </li>
1503
1504 <li>
1505 Handle <b>property_names</b> and <b>property_values</b> in security properties.
1506 </li>
1507
1508 </ul>
1509 <p>
1510
1511 </p>
1512
1513 <a name="anchor20"><br><hr size="1" shade="0"></a>
1514 <table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b>&nbsp;TOC&nbsp;</b></font></a><br></td></tr></table>
1515 <h3>Appendix B.&nbsp;Copyrights</h3>
1516
1517 <p>
1518 (c) 2002 Marshall T. Rose
1519 </p>
1520
1521 <p>
1522 Hold harmless the author, and any lawful use is allowed.
1523 </p>
1524 <a name="rfc.index"><br><hr size="1" shade="0"></a>
1525 <table border="0" cellpadding="0" cellspacing="2" width="30" height="15" align="right"><tr><td bgcolor="#990000" align="center" width="30" height="15"><a href="#toc" CLASS="link2"><font face="monaco, MS Sans Serif" color="#ffffff" size="1"><b>&nbsp;TOC&nbsp;</b></font></a><br></td></tr></table>
1526 <h3>Index</h3>
1527 <table>
1528 <tr><td><b>C</b></td><td>&nbsp;</td></tr>
1529 <tr><td>&nbsp;</td><td>callbacks</td></tr>
1530 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor26">authname</a></td></tr>
1531 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor36">canonuser</a></td></tr>
1532 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor34">checkpass</a></td></tr>
1533 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor28">cnonce</a></td></tr>
1534 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor30">echoprompt</a></td></tr>
1535 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor21">getopt</a></td></tr>
1536 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor23">getpath</a></td></tr>
1537 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor32">getrealm</a></td></tr>
1538 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor27">language</a></td></tr>
1539 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor22">log</a></td></tr>
1540 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor31">noechoprompt</a></td></tr>
1541 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor29">pass</a></td></tr>
1542 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor33">proxy</a></td></tr>
1543 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor35">setpass</a></td></tr>
1544 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor25">user</a></td></tr>
1545 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor24">verifyfile</a></td></tr>
1546 <tr><td><b>P</b></td><td>&nbsp;</td></tr>
1547 <tr><td>&nbsp;</td><td>procedures</td></tr>
1548 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor49">client -operation start</a></td></tr>
1549 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor50">client -operation step</a></td></tr>
1550 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor47">sasl::client_init</a></td></tr>
1551 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor48">sasl::client_new</a></td></tr>
1552 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor57">sasl::decode64</a></td></tr>
1553 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor58">sasl::done</a></td></tr>
1554 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor59">sasl::encode64</a></td></tr>
1555 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor60">sasl::errstring</a></td></tr>
1556 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor61">sasl::info</a></td></tr>
1557 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor62">sasl::mechanisms</a></td></tr>
1558 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor37">sasl::server_init</a></td></tr>
1559 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor38">sasl::server_new</a></td></tr>
1560 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor46">server -operation auxprop_getctx</a></td></tr>
1561 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor45">server -operation auxprop_request</a></td></tr>
1562 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor42">server -operation checkpass</a></td></tr>
1563 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor39">server -operation list</a></td></tr>
1564 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor44">server -operation setpass</a></td></tr>
1565 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor40">server -operation start</a></td></tr>
1566 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor41">server -operation step</a></td></tr>
1567 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor43">server -operation userexists</a></td></tr>
1568 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor55">token -operation decode</a></td></tr>
1569 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor56">token -operation encode</a></td></tr>
1570 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor54">token -operation errdetail</a></td></tr>
1571 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor52">token -operation getprop</a></td></tr>
1572 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor51">token -operation info</a></td></tr>
1573 <tr><td>&nbsp;</td><td>&nbsp;&nbsp;<a href="#anchor53">token -operation setprop</a></td></tr>
1574 </table>
1575 </font></body></html>
0 <?xml version='1.0'?>
1 <!DOCTYPE rfc SYSTEM 'rfc2629.dtd'>
2
3 <?rfc compact='no'?>
4 <?rfc emoticonic='yes'?>
5 <?rfc toc='yes'?>
6 <?rfc private=' '?>
7
8 <rfc>
9 <front>
10 <title>Tcl SASL</title>
11
12 <author initials='M.T.' surname='Rose' fullname='Marshall T. Rose'>
13 <organization>Dover Beach Consulting, Inc.</organization>
14 <address>
15 <postal>
16 <street>POB 255268</street>
17 <city>Sacramento</city> <region>CA</region> <code>95865-5268</code>
18 <country>US</country>
19 </postal>
20 <phone>+1 916 483 8878</phone>
21 <facsimile>+1 916 483 8848</facsimile>
22 <email>mrose@dbc.mtview.ca.us</email>
23 </address>
24 </author>
25
26 <date month='January' year='2002' />
27
28 <abstract><t>Tcl SASL provides a Tcl interface to the Cyrus SASLv2
29 library.</t></abstract>
30 </front>
31
32 <middle>
33
34 <section title='SYNOPSIS'>
35 <figure><artwork><![CDATA[
36 package provide sasl 2.0
37 ]]></artwork></figure>
38
39 <t>Tcl SASL provides a Tcl interface to the
40 <eref target='http://asg.web.cmu.edu/sasl/'>Cyrus SASLv2 library</eref>.</t>
41
42 <t>This document won't tell you what
43 <xref target='RFC2222'>SASL</xref> is.
44 What it will tell you,
45 the Tcl programmer,
46 is how you can access the Cyrus SASLv2 library from your Tcl script.</t>
47
48 <vspace blankLines='1000' />
49
50 <section title='Installation'>
51 <t>First,
52 you'll need to have
53 <eref target='http://www.scriptics.com/software/tcltk/downloadnow83.tml'>Tcl 8.3</eref>
54 (or later) already installed.</t>
55
56 <figure>
57 <preface>Then, when configuring the Cyrus SASLv2 library,
58 use the |"--with-tcl| switch, e.g.,</preface>
59 <artwork><![CDATA[
60 ./configure ... --with-tcl=...
61 ]]></artwork>
62 </figure>
63 </section>
64 </section>
65
66
67 <section title='CONVENTIONS'>
68 <section title='Return Codes'>
69 <t>If an exception occurs in a Cyrus SASL library function,
70 an error is thrown and the |"errorCode| global is set to a list
71 containing four elements:
72 <list style='symbols'>
73 <t>the literal string |""SASL"|;</t>
74
75 <t>a string naming the Cyrus SASL library function that failed;</t>
76
77 <t>an integer identifying the Cyrus SASL result code that was returned;
78 and,</t>
79
80 <t>a string containing the associated diagnostic.</t>
81 </list></t>
82
83 <t>In addition to the usual "normal" return,
84 four routines
85 (<xref target='server_start'>sasl::server_start</xref>,
86 <xref target='server_step'>sasl::server_step</xref>,
87 <xref target='client_start'>sasl::client_start</xref>, and
88 <xref target='client_step'>sasl::client_step</xref>)
89 may also use the "continue" return.
90 This occurs when the corresponding Cyrus SASL library function returns
91 |"SASL_CONTINUE|.</t>
92 </section>
93
94 <section title='Data Types'>
95 <t>A serialized array is a list that contains an series of keywords
96 and values.</t>
97
98 <figure>
99 <preamble>A serialized array can be traversed using |"foreach|,
100 e.g.,</preamble>
101 <artwork><![CDATA[
102 foreach {k v} $aList {
103 puts stdout "$k has value $v"
104 }
105 ]]></artwork>
106 </figure>
107
108 <figure>
109 <preamble>Alternatively,
110 an array can be initialized and accessed,
111 e.g.,</preamble>
112 <artwork><![CDATA[
113 array set data $aList
114 if {[info exists data(plugin)]} {
115 puts stdout "plugin entry is present"
116 }
117 ]]></artwork>
118 </figure>
119
120 <t>Several routines accept serialized arrays as arguments.
121 In particular,
122 the Cyrus SASL security properties is expressed as a serialized array
123 with these elements:
124 <list style='symbols'>
125 <t>min_ssf</t>
126
127 <t>max_ssf</t>
128
129 <t>max_bufsize</t>
130
131 <t>flags</t>
132 </list>
133 With the exception of |"flags|,
134 each of these takes an integer value.
135 The |"flags| entry takes a list value.
136 To find out what flags are known,
137 try |"sasl::info sec_flags|.</t>
138 </section>
139
140 <section title='Interactions'>
141 <t>Two routines
142 (<xref target='client_start'>sasl::client_start</xref> and
143 <xref target='client_step'>sasl::client_step</xref>)
144 have an optional |"-interact| switch that takes a script argument.</t>
145
146 <t>When evaluated,
147 the script is given one argument,
148 a serialized array.
149 At a minimum,
150 the |"id| element is present in the serialized array.
151 Optionally,
152 three other elements
153 (|"challenge|, |"prompt|, and |"default|)
154 may also be present.</t>
155
156 <t>If the script makes a normal return,
157 the return value is supplied to the Cyrus SASL library.</t>
158 </section>
159
160 <section title='Callbacks'>
161 <t>Four routines
162 (<xref target='server_init'>sasl::server_init</xref>,
163 <xref target='server_new'>sasl::server_new</xref>,
164 <xref target='client_init'>sasl::client_init</xref>, and
165 <xref target='client_new'>sasl::client_new</xref>)
166 have a |"-callbacks| switch that takes a list argument.
167 Each element of the list is either:
168 <list style='symbols'>
169 <t>the name of a callback; or,</t>
170
171 <t>a list containing two elements,
172 the name of a callback and a script.</t>
173 </list>
174 The former case is used by clients to tell the Cyrus SASL library
175 what information may be determined using an interaction.
176 Otherwise,
177 the supplied script is evaluated to get the indicated information.</t>
178
179 <t>In this latter case,
180 the script is given one argument,
181 a serialized array containing callback-specific elements.</t>
182
183 <section title='Client/Server callbacks'>
184 <t><list style='hanging'>
185 <t hangText='getopt:'><iref item='callbacks' subitem='getopt' />
186 Returns a string.
187 <vspace blankLines='1' />
188 Elements:
189 <list style='symbols'>
190 <t>?plugin?</t>
191 <t>option</t>
192 </list></t>
193
194 <t hangText='log:'><iref item='callbacks' subitem='log' />
195 Elements:
196 <list style='symbols'>
197 <t>level</t>
198 <t>message</t>
199 </list></t>
200
201 <t hangText='getpath:'><iref item='callbacks' subitem='getpath' />
202 Returns a string.
203 <vspace blankLines='1' />
204 Elements: none.
205 <vspace blankLines='1' /></t>
206
207 <t hangText='verifyfile:'><iref item='callbacks' subitem='verifyfile' />
208 Returns an integer (a SASL result code),
209 either 0 (|"SASL_OK|), 1 (|"SASL_CONTINUE|), or -1 (|"SASL_FAIL|).
210 <vspace blankLines='1' />
211 Elements:
212 <list style='symbols'>
213 <t>file</t>
214 <t>type</t>
215 </list>
216 To find out what types are known,
217 try |"sasl::info verify_types|.</t>
218 </list></t>
219 </section>
220
221 <section title='Client-only callbacks'>
222 <t><list style='hanging'>
223 <t hangText='user:'><iref item='callbacks' subitem='user' />
224 Returns a string.
225 <vspace blankLines='1' />
226 Elements: id
227 <vspace blankLines='1' /></t>
228
229 <t hangText='authname:'><iref item='callbacks' subitem='authname' />
230 Returns a string.
231 <vspace blankLines='1' />
232 Elements: id
233 <vspace blankLines='1' /></t>
234
235 <t hangText='language:'><iref item='callbacks' subitem='language' />
236 Returns a string.
237 <vspace blankLines='1' />
238 Elements: id
239 <vspace blankLines='1' /></t>
240
241 <t hangText='cnonce:'><iref item='callbacks' subitem='cnonce' />
242 Returns a string.
243 <vspace blankLines='1' />
244 Elements: id
245 <vspace blankLines='1' /></t>
246
247 <t hangText='pass:'><iref item='callbacks' subitem='pass' />
248 Returns a string.
249 <vspace blankLines='1' />
250 Elements:
251 <list style='symbols'>
252 <t>token (a client token)</t>
253 <t>id</t>
254 </list></t>
255
256 <t hangText='?no?echoprompt:'><iref item='callbacks' subitem='echoprompt' />
257 <iref item='callbacks' subitem='noechoprompt' />
258 Returns a string.
259 <vspace blankLines='1' />
260 Elements:
261 <list style='symbols'>
262 <t>id</t>
263 <t>challenge</t>
264 <t>prompt</t>
265 <t>default</t>
266 </list></t>
267
268 <t hangText='getrealm:'><iref item='callbacks' subitem='getrealm' />
269 Returns a string.
270 <vspace blankLines='1' />
271 Elements:
272 <list style='symbols'>
273 <t>id</t>
274 <t>?available? (a list of possible choices)</t>
275 </list></t>
276 </list></t>
277 </section>
278
279 <section title='Server-only callbacks'>
280 <t><list style='hanging'>
281 <t hangText='proxy:'><iref item='callbacks' subitem='proxy' />
282 Returns an integer (a SASL result code),
283 usually either 0 (|"SASL_OK|), or -14 (|"SASL_NOAUTHZ|).
284 <vspace blankLines='1' />
285 Elements:
286 <list style='symbols'>
287 <t>token (a server token)</t>
288 <t>target</t>
289 <t>user</t>
290 <t>?realm?</t>
291 <t>?propctx? (a propctx token)</t>
292 </list></t>
293
294 <t hangText='checkpass:'><iref item='callbacks' subitem='checkpass' />
295 Returns an integer (a SASL result code).
296 <vspace blankLines='1' />
297 Elements:
298 <list style='symbols'>
299 <t>token (a server token)</t>
300 <t>user</t>
301 <t>pass</t>
302 <t>?propctx? (a propctx token)</t>
303 </list></t>
304
305 <t hangText='setpass:'><iref item='callbacks' subitem='setpass' />
306 Returns an integer (a SASL result code).
307 <vspace blankLines='1' />
308 Elements:
309 <list style='symbols'>
310 <t>token (a server token)</t>
311 <t>user</t>
312 <t>pass</t>
313 <t>flags</t>
314 <t>?propctx? (a propctx token)</t>
315 </list>
316 To find out what flags are known,
317 try |"sasl::info setpass_flags|.
318 <vspace blankLines='1' /></t>
319
320 <t hangText='canonuser:'><iref item='callbacks' subitem='canonuser' />
321 Returns a string.
322 <vspace blankLines='1' />
323 Elements:
324 <list style='symbols'>
325 <t>token (a server token)</t>
326 <t>in</t>
327 <t>?realm?</t>
328 <t>outmax</t>
329 <t>flags</t>
330 </list>
331 To find out what flags are known,
332 try |"sasl::info canon_flags|.</t>
333 </list></t>
334 </section>
335 </section>
336 </section>
337
338 <section title='PROCEDURES'>
339 <section title='Server-only calls'>
340 <t>The calling sequence is:
341 <list style='numbers'>
342 <t>Invoke <xref target='server_init'>sasl::server_init</xref> to load
343 plugins.</t>
344
345 <t>On each incoming connection,
346 invoke <xref target='server_new'>sasl::server_new</xref> to get a
347 server token.</t>
348
349 <t>Invoke <xref target='setprop'>$token -operation setprop</xref> to
350 set the security properties for the connection.</t>
351
352 <t>Invoke <xref target='server_list'>$token -operation list</xref> to
353 get the list of mechanisms to send to the client.</t>
354
355 <t>When client selects a mechanism,
356 invoke <xref target='server_start'>$token -operation start</xref>,
357 and go to Step 7.</t>
358
359 <t>Invoke <xref target='server_step'>$token -operation step</xref>.</t>
360
361 <t>Look at the result:
362 <list style='hanging'>
363 <t hangText='normal return:'>Tell the client it's successful and goto
364 Step 8.</t>
365
366 <t hangText='continue return:'>Send the result to the client,
367 wait for more input,
368 and goto Step 6.</t>
369
370 <t hangText='error return:'>Tell the client it loses and abort.</t>
371 </list></t>
372
373 <t>Invoke <xref target='getprop'>$token -operation getprop</xref> to
374 get the new security properties for the connection.</t>
375 </list>
376 Now, let's look at the actual procedures.</t>
377
378
379 <figure anchor='server_init'>
380 <preamble><iref item='procedures' subitem='sasl::server_init' /></preamble>
381 <artwork><![CDATA[sasl::server_init \
382 -callbacks list \
383 ?-appname string?
384 ]]></artwork>
385 <postamble>Initialize server-side code,
386 supplying default |"-callbacks| and an |"-appname| for logging.</postamble>
387 </figure>
388
389 <figure anchor='server_new'>
390 <preamble><iref item='procedures' subitem='sasl::server_new' /></preamble>
391 <artwork><![CDATA[sasl::server_new \
392 -service string \
393 ?-serverFQDN string? \
394 ?-realm string? \
395 ?-iplocalport string? \
396 ?-ipremoteport string? \
397 ?-callbacks script? \
398 ?-flags list?
399 ]]></artwork>
400 <postamble>Return a "server token" for a single SASL connection,
401 supplying the registered name of the |"-service|.
402 To find out what flags are known,
403 try |"sasl::info servernew_flags|.
404 </postamble>
405 </figure>
406
407 <figure anchor='server_list'>
408 <preamble><iref item='procedures' subitem='server -operation list' /></preamble>
409 <artwork><![CDATA[$token -operation list \
410 ?-user string?
411 ]]></artwork>
412 <postamble>Return a list of mechanisms available to the server.</postamble>
413 </figure>
414
415
416 <figure anchor='server_start'>
417 <preamble><iref item='procedures' subitem='server -operation start' /></preamble>
418 <artwork><![CDATA[$token -operation start \
419 -mechanism string \
420 ?-input string?
421 ]]></artwork>
422 <postamble>Start a |"-mechanism|
423 (optionally, with an |"-input| string from the client),
424 returning an output string for the client.</postamble>
425 </figure>
426
427
428 <figure anchor='server_step'>
429 <preamble><iref item='procedures' subitem='server -operation step' /></preamble>
430 <artwork><![CDATA[$token -operation step \
431 -input string
432 ]]></artwork>
433 <postamble>Perform another exchange,
434 taking an |"input| string from the client,
435 returning an output string for the client.</postamble>
436 </figure>
437
438
439 <figure>
440 <preamble><iref item='procedures' subitem='server -operation checkpass' /></preamble>
441 <artwork><![CDATA[$token -operation checkpass \
442 -user string \
443 -pass string
444 ]]></artwork>
445 <postamble>Determine if a plaintext password is valid;
446 if not, throw an error.</postamble>
447 </figure>
448
449
450 <figure>
451 <preamble><iref item='procedures' subitem='server -operation userexists' /></preamble>
452 <artwork><![CDATA[$token -operation userexists \
453 -server string \
454 ?-realm string? \
455 -user string
456 ]]></artwork>
457 <postamble>Determine if a user exists;
458 it not, throw an error.</postamble>
459 </figure>
460
461
462 <figure>
463 <preamble><iref item='procedures' subitem='server -operation setpass' /></preamble>
464 <artwork><![CDATA[$token -operation setpass \
465 -user string \
466 ?-newpass string? \
467 ?-oldpass string? \
468 ?-flags list?
469 ]]></artwork>
470 <postamble>Set the password for a user;
471 on failure, throw an error.
472 To find out what flags are known,
473 try |"sasl::info setpass_flags|.</postamble>
474 </figure>
475
476
477 <figure>
478 <preamble><iref item='procedures' subitem='server -operation auxprop_request' /></preamble>
479 <artwork><![CDATA[$token -operation auxprop_request \
480 ?-properties list?
481 ]]></artwork>
482 <postamble>Request a set of auxiliary |"-properties|
483 (or reset the list if this switch is absent);
484 on failure,
485 throw an error.</postamble>
486 </figure>
487
488
489 <figure>
490 <preamble><iref item='procedures' subitem='server -operation auxprop_getctx' /></preamble>
491 <artwork><![CDATA[$token -operation auxprop_getctx
492 ]]></artwork>
493 <postamble>Return a "propctx token" containing the current auxiliary
494 properties.</postamble>
495 </figure>
496 </section>
497
498 <section title='Client-only calls'>
499 <t>The calling sequence is:
500 <list style='numbers'>
501 <t>Invoke <xref target='client_init'>sasl::client_init</xref> to load
502 plugins.</t>
503
504 <t>On each outgoing connection,
505 invoke <xref target='client_new'>sasl::client_new</xref> to get a
506 client token.</t>
507
508 <t>Invoke <xref target='setprop'>$token -operation setprop</xref> to
509 set the security properties for the connection.</t>
510
511 <t>When the server indicates which mechanisms are available
512 invoke <xref target='client_start'>$token -operation start</xref>,
513 and go to Step 6.</t>
514
515 <t>Invoke <xref target='client_step'>$token -operation step</xref>.</t>
516
517 <t>Look at the result:
518 <list style='hanging'>
519 <t hangText='normal return:'>If the result is empty, goto Step 8;
520 otherwise, send the result to the server and goto Step 7</t>
521
522 <t hangText='continue return:'>Send the result to the server,
523 wait for more input,
524 and goto Step 5.</t>
525
526 <t hangText='error return:'>You lose, abort.</t>
527 </list>
528 (If you're familiar with the Cyrus SASL library API,
529 you'll notice there is no "interaction" return &#151;
530 Tcl SASL handles this through a callback for you.)</t>
531
532 <t>Wait for the server's confirmation.</t>
533
534 <t>Invoke <xref target='getprop'>$token -operation getprop</xref> to
535 get the new security properties for the connection.</t>
536 </list>
537 Now, let's look at the actual procedures.</t>
538
539 <figure anchor='client_init'>
540 <preamble><iref item='procedures' subitem='sasl::client_init' /></preamble>
541 <artwork><![CDATA[sasl::client_init \
542 -callbacks list
543 ]]></artwork>
544 <postamble>Initialize client-side code,
545 supplying default |"-callbacks|.</postamble>
546 </figure>
547
548 <figure anchor='client_new'>
549 <preamble><iref item='procedures' subitem='sasl::client_new' /></preamble>
550 <artwork><![CDATA[sasl::client_new \
551 -service string \
552 -serverFQDN string \
553 ?-iplocalport string? \
554 ?-ipremoteport string? \
555 ?-callbacks script? \
556 ?-flags list?
557 ]]></artwork>
558 <postamble>Return a "client token" for a single SASL connection,
559 supplying the registered name of the |"-service|,
560 and the |"-serverFQDN| of the server.
561 To find out what flags are known,
562 try |"sasl::info clientnew_flags|.</postamble>
563 </figure>
564
565 <figure anchor='client_start'>
566 <preamble><iref item='procedures' subitem='client -operation start' /></preamble>
567 <artwork><![CDATA[$token -operation start \
568 -mechanisms list \
569 ?-interact script?
570 ]]></artwork>
571 <postamble>Select one of the given |"-mechanisms|,
572 and return a serialized array containing two elements:
573 the |"mechanism| to use,
574 and,
575 an |"output| string for the server.</postamble>
576 </figure>
577
578
579 <figure anchor='client_step'>
580 <preamble><iref item='procedures' subitem='client -operation step' /></preamble>
581 <artwork><![CDATA[$token -operation step \
582 -input string \
583 ?-interact script?
584 ]]></artwork>
585 <postamble>
586 <postamble>Perform another exchange,
587 taking an |"input| string from the server,
588 returning an output string for the server.</postamble>
589 </postamble>
590 </figure>
591 </section>
592
593 <section title='Client/Server calls'>
594 <figure>
595 <preamble><iref item='procedures' subitem='token -operation info' /></preamble>
596 <artwork><![CDATA[$token -operation info
597 ]]></artwork>
598 <postamble>Return a list of known operations for the token.</postamble>
599 </figure>
600
601
602 <figure anchor='getprop'>
603 <preamble><iref item='procedures' subitem='token -operation getprop' /></preamble>
604 <artwork><![CDATA[$token -operation getprop \
605 -property string
606 ]]></artwork>
607 <postamble>Return a string corresponding to the value of the
608 given |"-property|.
609 To find out what properties are known,
610 try |"sasl::info getprops|.</postamble>
611 </figure>
612
613
614 <figure anchor='setprop'>
615 <preamble><iref item='procedures' subitem='token -operation setprop' /></preamble>
616 <artwork><![CDATA[$token -operation setprop \
617 -property string \
618 -value string
619 ]]></artwork>
620 <postamble>Set the |"-value| of the given |"-property|.
621 To find out what properties are known,
622 try |"sasl::info setprops|.</postamble>
623 </figure>
624
625
626 <figure>
627 <preamble><iref item='procedures' subitem='token -operation errdetail' /></preamble>
628 <artwork><![CDATA[$token -operation errdetail
629 ]]></artwork>
630 <postamble>
631 Return the detail for the last error encountered for the token.</postamble>
632 </figure>
633
634
635 <figure>
636 <preamble><iref item='procedures' subitem='token -operation decode' /></preamble>
637 <artwork><![CDATA[$token -operation decode \
638 -input string
639 ]]></artwork>
640 <postamble>
641 Take an |"-input| string and decipher/verify it
642 (using the previously-negotiated security layer),
643 and return a plaintext string.</postamble>
644 </figure>
645
646
647 <figure>
648 <preamble><iref item='procedures' subitem='token -operation encode' /></preamble>
649 <artwork><![CDATA[$token -operation encode \
650 -input string
651 ]]></artwork>
652 <postamble>Take an |"-output| string and encipher/sign it
653 (using the previously-negotiated security layer),
654 and return a string to be sent over the network.</postamble>
655 </figure>
656 </section>
657
658 <section title='Miscellaneous calls'>
659 <figure>
660 <preamble><iref item='procedures' subitem='sasl::decode64' /></preamble>
661 <artwork><![CDATA[sasl::decode64 string
662 ]]></artwork>
663 <postamble>Return a string decoded from base64.</postamble>
664 </figure>
665
666
667 <figure>
668 <preamble><iref item='procedures' subitem='sasl::done' /></preamble>
669 <artwork><![CDATA[sasl::done
670 ]]></artwork>
671 <postamble>Release all resources associated with this package.</postamble>
672 </figure>
673
674
675 <figure>
676 <preamble><iref item='procedures' subitem='sasl::encode64' /></preamble>
677 <artwork><![CDATA[sasl::encode64 string
678 ]]></artwork>
679 <postamble>Return a string encoded to base64.</postamble>
680 </figure>
681
682
683 <figure>
684 <preamble><iref item='procedures' subitem='sasl::errstring' /></preamble>
685 <artwork><![CDATA[sasl::errstring
686 -code number \
687 ?-languages string?
688 ]]></artwork>
689 <postamble>Take a SASL result |"-code| and
690 a list of |"-languages| (e.g., "en-US"),
691 and return a serialized array containing two elements:
692 the corresponding |"diagnostic| string,
693 and,
694 optionally,
695 the |"language| used to localize the diagnostic.</postamble>
696 </figure>
697
698
699 <figure>
700 <preamble><iref item='procedures' subitem='sasl::info' /></preamble>
701 <artwork><![CDATA[sasl::info ?option?
702 ]]></artwork>
703 <postamble>Return a list of known options,
704 or a list of known choices for a given |"option|.</postamble>
705 </figure>
706
707
708 <figure>
709 <preamble><iref item='procedures' subitem='sasl::mechanisms' /></preamble>
710 <artwork><![CDATA[sasl::mechanisms
711 ]]></artwork>
712 <postamble>Return a list of all known mechanisms.</postamble>
713 </figure>
714 </section>
715 </section>
716
717
718 <section title='EXAMPLES'>
719 <section title='Server'>
720 <figure>
721 <artwork><![CDATA[
722 proc sasl_log {data} {
723 array set params $data
724
725 # look at data(level) and data(message)
726 }
727
728
729 proc server_callback {id data} {
730 array set params $data
731
732 # look at data(level) and data(message)
733 global server
734
735 array set params $data
736
737 switch -- $id {
738 getopt {
739 if {![info exists params(plugin)]} {
740 set params(plugin) ""
741 }
742 switch -- $params(plugin)/$params(option) {
743 /auto_transition
744 -
745 /canon_user_plugin
746 -
747 /mech_list
748 -
749 /sasldb_path
750 -
751 OTP/opiekeys
752 -
753 default {
754 # if value isn't set, an error is thrown below
755 # that's okay, the Cyrus SASL library will use a default value
756 }
757 }
758 }
759
760 verifyfile {
761 # set value...
762 }
763
764 proxy {
765 # set value...
766 }
767
768 checkpass {
769 # set value...
770 }
771 }
772
773 return $value
774 }
775
776
777 sasl::server_init -callbacks [list [list log sasl_log]]
778
779
780 set callbacks {}
781 foreach id [list getopt verifyfile proxy checkpass] {
782 lappend callbacks [list $id "server_callback $id"]
783 }
784
785 set token [sasl::server_new -service $service \
786 -callbacks $callbacks \
787 -flags [list success_data]]
788
789
790 if {$ssf > 0} {
791 $token -operation setprop ssf_external $ssf
792 }
793
794 if {[string length $clientID] > 0} {
795 $token -operation setprop auth_external $clientID
796 }
797
798 $token -operation setprop sec_props \
799 [list min_ssf $min \
800 max_ssf $max \
801 max_bufsize $bufsiz \
802 flags $flags]
803
804 set mechlist [$token -operation list]
805
806
807 # send $mechlist to client
808 # recv mechanism and input from client
809
810 set code 4
811 for {set operation start} {$code == 4} {set operation step} {
812 set cmd [list $token -operation $operation \
813 -input $input]
814 if {![string compare $operation start]} {
815 lappend cmd -mechanism $mechanism
816 }
817
818 switch -- [set code [catch { eval $cmd } output]] {
819 0 {
820 # send success to client
821
822 set ssf [$token -operation getprop ssf]
823 }
824
825 4 {
826 # send continue to client with output
827 # recv input from client
828 }
829
830 default {
831 # send error to client
832 }
833 }
834 ]]></artwork>
835 </figure>
836 </section>
837
838 <section title='Client'>
839 <figure>
840 <artwork><![CDATA[
841 proc client_callback {data} {
842 global client
843
844 array set params $data
845
846 switch -- $params(id) {
847 pass
848 -
849 echoprompt
850 -
851 noechoprompt {
852 # ask the user...
853 }
854
855 getrealm {
856 if {[info exists params(available)]} {
857 # ask the user to pick one from the list...
858 } else {
859 # ask the user to supply one...
860 }
861 }
862 }
863
864 return $value
865 }
866
867 proc client_interact {data} {
868 global client
869
870 array set params $data
871 set id $params(id)
872
873 catch { set value $params(default) }
874
875 # ask the user to enter the $id using $params(prompt)...
876
877 return $value
878 }
879
880
881 sasl::client_init -callbacks [list [list log sasl_log]]
882
883
884 # interact script will supply these
885 set callbacks [list authname cnonce language user]
886
887 # callback script will supply these
888 foreach id [list pass echoprompt noechoprompt] {
889 lappend callbacks [list $id client_callback]
890 }
891
892 set token [sasl::client_new -service $service \
893 -serverFQDN $fqdn \
894 -callbacks $callbacks \
895 -flags [list success_data]]
896
897
898 if {$ssf > 0} {
899 $token -operation setprop ssf_external $ssf
900 }
901
902 if {[string length $serverID] > 0} {
903 $token -operation setprop auth_external $serverID
904 }
905
906 $token -operation setprop sec_props \
907 [list min_ssf $min \
908 max_ssf $max \
909 max_bufsize $bufsiz \
910 flags $flags]
911
912
913 # recv mechlist from server
914
915 switch -- [set code [catch { $token -operation start \
916 -mechanisms $mechlist \
917 -interact client_interact } result]] {
918 0 - 4 {
919 array set data $result
920 # send data(mechanism) and optionally data(output) to server
921 # recv input from server
922 set code 4
923 }
924
925 default {
926 # error!
927 }
928 }
929
930 while {$code == 4} {
931 switch -- [set code [catch { $token -operation step \
932 -input $input \
933 -interact client_interact
934 } output]] {
935 0 {
936 if {![string compare $output ""]} {
937 break
938 }
939 }
940
941 4 {
942 }
943
944 default {
945 # error!
946 }
947
948 # make sure that server response says to continue...
949
950 # send output to server
951 # recv input from server
952 }
953
954 # make sure that server's last response says complete...
955 }
956 ]]></artwork>
957 </figure>
958 </section>
959 </section>
960
961 </middle>
962
963 <back>
964 <references>
965
966 <reference anchor='RFC2222'>
967 <front>
968 <title abbrev='SASL'>Simple Authentication and Security Layer (SASL)</title>
969 <author initials='J.G.' surname='Myers' fullname='John G. Myers'>
970 <organization>Netscape Communications</organization>
971 <address>
972 <postal>
973 <street>501 E. Middlefield Road</street>
974 <street>Mail Stop MV-029</street>
975 <street>Mountain View</street>
976 <street>CA 94043-4042</street></postal>
977 <email>jgmyers@netscape.com</email></address></author>
978 <date month='October' year='1997'></date>
979 <area>Security</area>
980 <keyword>authentication</keyword>
981 <keyword>security</keyword></front>
982 <seriesInfo name='RFC' value='2222' />
983 </reference>
984
985 </references>
986
987 <section title='TODO List'>
988 <t><list style='symbols'>
989 <t>Add routines for propctx tokens.</t>
990
991 <t>Handle |"property_names| and |"property_values| in security properties.</t>
992 </list></t>
993 </section>
994
995
996 <section title='Copyrights'>
997 <t>(c) 2002 Marshall T. Rose</t>
998
999 <t>Hold harmless the author, and any lawful use is allowed.</t>
1000 </section>
1001 </back>
1002 </rfc>
0 # Makefile.am for the Tcl SASL library
1 #
2 # $Id: Makefile.am,v 1.1 2002/02/05 23:28:26 rjs3 Exp $
3 # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
4 #
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions
7 # are met:
8 #
9 # 1. Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 #
12 # 2. Redistributions in binary form must reproduce the above copyright
13 # notice, this list of conditions and the following disclaimer in
14 # the documentation and/or other materials provided with the
15 # distribution.
16 #
17 # 3. The name "Carnegie Mellon University" must not be used to
18 # endorse or promote products derived from this software without
19 # prior written permission. For permission or any other legal
20 # details, please contact
21 # Office of Technology Transfer
22 # Carnegie Mellon University
23 # 5000 Forbes Avenue
24 # Pittsburgh, PA 15213-3890
25 # (412) 268-4387, fax: (412) 268-7395
26 # tech-transfer@andrew.cmu.edu
27 #
28 # 4. Redistributions of any form whatsoever must retain the following
29 # acknowledgment:
30 # "This product includes software developed by Computing Services
31 # at Carnegie Mellon University (http://www.cmu.edu/computing/)."
32 #
33 # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
34 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
35 # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
36 # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
37 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
38 # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
39 # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
40 #
41
42 # Library version info - here at the top, for sanity
43 tclsasl_version = 2:0:0
44
45 INCLUDES=-I$(top_srcdir)/include
46
47 common_sources = tclsasl.c
48
49 lib_LTLIBRARIES = libtclsasl.la
50
51 libtclsasl_la_SOURCES = $(common_sources)
52 libtclsasl_la_LDFLAGS = -version-info $(tclsasl_version)
53 libtclsasl_la_DEPENDENCIES = @LTLIBOBJS@
54 libtclsasl_la_LIBADD = $(LIB_TCL) ../lib/libsasl2.la $(LIB_SOCKET)
55
56 install-exec-hook: @INSTALL_TCLSASL@
57
58 install-tclsasl:
59 $(mkinstalldirs) @PKG_TCL@
60 echo "package ifneeded sasl" \
61 `echo $(VERSION) | awk -F. '{ printf "%s.%s", $$1, $$2 }'` \
62 "[list load $(DESTDIR)$(libdir)/libtclsasl.so]" \
63 > @PKG_TCL@/pkgIndex.tcl
64 sed -e 's%load .libs/libtclsasl.so%package require sasl%' \
65 < test.tcl \
66 > @PKG_TCL@/test.tcl
0 /* tclsasl.c - tcl interface to Cyrus SASLv2 */
1
2 /*
3 * TBD:
4 *
5 * - add propctx calls from "sasl/prop.h"
6 *
7 * - handle property_{names,values} in security properties
8 *
9 */
10
11 #include <config.h>
12
13 #ifdef TCLSASL
14
15 #define unused dummy __attribute__ ((unused))
16
17 #include <tcl.h>
18 #include <stdio.h>
19 #include <stdlib.h>
20 #include "sasl.h"
21 #include "saslutil.h"
22
23
24 /* common datastructures */
25
26
27 struct kv_pair {
28 char *p_key;
29 unsigned p_value;
30 };
31
32 typedef struct kv_pair kv_pair_t;
33
34
35 struct oc_pair {
36 char *p_key;
37 Tcl_ObjCmdProc *p_proc;
38 };
39
40 typedef struct oc_pair oc_pair_t;
41
42
43 struct sasl_data {
44 Tcl_Interp *sd_interp;
45 Tcl_Command sd_token;
46
47 oc_pair_t *sd_dispatch;
48 sasl_conn_t *sd_conn;
49 sasl_callback_t *sd_cb;
50 };
51
52 typedef struct sasl_data sasl_data_t;
53
54
55 /* static variables */
56
57 static
58 Tcl_HashTable allocTable; /* char* -> refcnt */
59
60 static
61 Tcl_HashTable connTable; /* sasl_conn_t* -> sasl_data_t* */
62
63 static
64 Tcl_HashTable p2tTable; /* propctx_t* -> Tcl_Obj* */
65 static
66 Tcl_HashTable t2pTable; /* Tcl_Obj* -> propctx_t* */
67
68
69 /* args management */
70
71 #define Tcl_Obj2String(o) (((o) != NULL) ? Tcl_GetString (o) : NULL)
72
73
74 /* avoid a bug in Tcl's index caching code... */
75
76 static int
77 tcl_GetIndexFromObjStruct (Tcl_Interp *interp,
78 Tcl_Obj *objPtr,
79 char **tablePtr,
80 int offset,
81 char *msg,
82 int flags,
83 int *indexPtr) {
84 Tcl_GetCharLength (objPtr);
85
86 return Tcl_GetIndexFromObjStruct (interp, objPtr, tablePtr, offset, msg,
87 flags, indexPtr);
88 }
89
90
91 static int
92 crack_args (Tcl_Interp *interp,
93 int objc,
94 Tcl_Obj *CONST objv[],
95 kv_pair_t *switches,
96 int optional,
97 Tcl_Obj *args[]) {
98 int i,
99 result;
100
101 Tcl_ResetResult (interp);
102 for (objc--, objv++; objc > 0; objc -= 2, objv += 2) {
103 int offset;
104 kv_pair_t *p;
105
106 if ((result = tcl_GetIndexFromObjStruct (interp, objv[0],
107 (char **) switches,
108 sizeof *switches, "switch",
109 0, &offset)) != TCL_OK)
110 return result;
111 p = switches + offset;
112
113 if (objc < 2) {
114 Tcl_AppendResult (interp, "missing argument to \"",
115 Tcl_GetString (objv[0]), "\"", NULL);
116 return TCL_ERROR;
117 }
118 args[p -> p_value] = objv[1];
119 }
120
121 for (i = 0; i < optional; i++)
122 if (!args[i]) {
123 Tcl_AppendResult (interp, switches[i].p_key,
124 " switch must be provided", NULL);
125 return TCL_ERROR;
126 }
127
128 return TCL_OK;
129 }
130
131 static int
132 t2c_usage (Tcl_Interp *interp,
133 Tcl_Obj *objPtr,
134 kv_pair_t pairs[],
135 unsigned optional,
136 char *operation,
137 kv_pair_t flags[]) {
138 kv_pair_t *p;
139
140 Tcl_ResetResult (interp);
141 Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objPtr), NULL);
142 for (p = pairs; p -> p_key; p++) {
143 char buffer[BUFSIZ],
144 *cp,
145 *v;
146 kv_pair_t *f;
147
148 if (((v = operation) != NULL)
149 && Tcl_StringCaseMatch ("-operation", p -> p_key, 0)) {}
150 else if ((flags != NULL)
151 && Tcl_StringCaseMatch ("-flags", p -> p_key, 0)) {
152 cp = buffer;
153 for (f = flags, v = "{"; f -> p_key; f++, v = " ") {
154 sprintf (cp, "%s%s", v, f -> p_key);
155 cp += strlen (cp);
156 }
157 strcpy (cp, "}");
158 v = buffer;
159 } else
160 v = "...";
161
162 Tcl_AppendResult (interp, p -> p_value >= optional ? " ?" : " ",
163 p -> p_key, " ", v,
164 p -> p_value >= optional ? "?" : "", NULL);
165 }
166
167 return TCL_ERROR;
168 }
169
170
171 static int
172 t2c_flags (Tcl_Interp *interp,
173 Tcl_Obj *objPtr,
174 kv_pair_t pairs[],
175 unsigned *flags) {
176 int i,
177 nelem,
178 result;
179
180 *flags = 0;
181 if (!objPtr)
182 return TCL_OK;
183
184 if ((result = Tcl_ListObjLength (interp, objPtr, &nelem)) != TCL_OK)
185 return result;
186
187 for (i = 0; i < nelem; i++) {
188 int offset;
189 kv_pair_t *p;
190 Tcl_Obj *elemPtr;
191
192 if ((result = Tcl_ListObjIndex (interp, objPtr, i, &elemPtr))
193 != TCL_OK)
194 return result;
195
196 if ((result = tcl_GetIndexFromObjStruct (interp, elemPtr,
197 (char **) pairs,
198 sizeof *pairs,
199 "flag", 0, &offset))
200 != TCL_OK)
201 return result;
202 p = pairs + offset;
203
204 *flags |= p -> p_value;
205 }
206
207 return TCL_OK;
208 }
209
210
211 /* result management */
212
213 static int
214 c2t_result (Tcl_Interp *interp,
215 char *fnx,
216 int result) {
217 char *cp,
218 buffer[BUFSIZ];
219
220 Tcl_ResetResult (interp);
221 if (result == SASL_OK)
222 return TCL_OK;
223
224 Tcl_SetResult (interp, cp = (char *) sasl_errstring (result, NULL, NULL),
225 TCL_VOLATILE);
226
227 sprintf (buffer, "%d", result);
228 Tcl_SetErrorCode (interp, "SASL", fnx, buffer, cp, NULL);
229
230 return TCL_ERROR;
231 }
232
233
234 /* propctx management */
235
236 typedef struct propctx propctx_t;
237
238 static Tcl_Obj *
239 c2t_propctx (propctx_t *propctx) {
240 int result;
241 char buffer[BUFSIZ];
242 Tcl_HashEntry *entryPtr;
243 Tcl_Obj *resultPtr;
244 static int nprop = 0;
245
246 if ((entryPtr = Tcl_FindHashEntry (&p2tTable, (char *) propctx)) != NULL)
247 return ((Tcl_Obj *) Tcl_GetHashValue (entryPtr));
248
249 sprintf (buffer, "::sasl::propctx_%d", nprop++);
250 resultPtr = Tcl_NewStringObj (buffer, -1);
251
252 entryPtr = Tcl_CreateHashEntry (&p2tTable, (char *) propctx, &result);
253 Tcl_SetHashValue (entryPtr, (ClientData) resultPtr);
254 Tcl_IncrRefCount (resultPtr);
255
256 entryPtr = Tcl_CreateHashEntry (&t2pTable, (char *) resultPtr, &result);
257 Tcl_SetHashValue (entryPtr, (ClientData) propctx);
258
259 return resultPtr;
260 }
261
262 #if 0
263 static propctx_t *
264 t2c_propctx (Tcl_Interp *interp,
265 Tcl_Obj *propctx) {
266 Tcl_HashEntry *entryPtr;
267
268 if ((entryPtr = Tcl_FindHashEntry (&t2pTable, (char *) propctx)) != NULL)
269 return ((propctx_t *) Tcl_GetHashValue (entryPtr));
270
271 Tcl_ResetResult (interp);
272 Tcl_AppendResult (interp, "unknown propctx token: \"",
273 Tcl_GetString (propctx), "\"", NULL);
274
275 return NULL;
276 }
277 #endif
278
279
280 /* callback management */
281
282 struct cb_context {
283 Tcl_Interp *ctx_interp;
284 int ctx_id;
285 Tcl_Obj *ctx_cmdPtr;
286 };
287
288 typedef struct cb_context cb_context_t;
289
290
291 static kv_pair_t cb_pairs[] = {
292 { "authname", SASL_CB_AUTHNAME },
293 { "canonuser", SASL_CB_CANON_USER },
294 { "cnonce", SASL_CB_CNONCE },
295 { "echoprompt", SASL_CB_ECHOPROMPT },
296 { "getopt", SASL_CB_GETOPT },
297 { "getpath", SASL_CB_GETPATH },
298 { "getrealm", SASL_CB_GETREALM },
299 { "language", SASL_CB_LANGUAGE },
300 { "log", SASL_CB_LOG },
301 { "noechoprompt", SASL_CB_NOECHOPROMPT },
302 { "pass", SASL_CB_PASS },
303 { "proxy_policy", SASL_CB_PROXY_POLICY },
304 { "checkpass", SASL_CB_SERVER_USERDB_CHECKPASS },
305 { "setpass", SASL_CB_SERVER_USERDB_SETPASS },
306 { "user", SASL_CB_USER },
307 { "verifyfile", SASL_CB_VERIFYFILE },
308
309 { NULL, SASL_CB_LIST_END }
310 };
311
312
313 static char *
314 allocate (Tcl_Interp *interp,
315 int *intPtr) {
316 int len;
317 char *cp,
318 *dp;
319 Tcl_HashEntry *entryPtr;
320
321 cp = Tcl_GetByteArrayFromObj (Tcl_GetObjResult (interp), &len);
322 memcpy (dp = Tcl_Alloc (len + 1), cp, len);
323 dp[len] = '\0';
324 if (intPtr)
325 *intPtr = len;
326
327 entryPtr = Tcl_CreateHashEntry (&allocTable, dp, &len);
328 Tcl_SetHashValue (entryPtr, (ClientData) 0);
329
330 return dp;
331 }
332
333
334 static Tcl_Obj *
335 sd2Obj (sasl_data_t *sd) {
336 char *cp = Tcl_GetCommandName (sd -> sd_interp, sd -> sd_token);
337 Tcl_Obj *resultPtr = Tcl_NewObj ();
338
339 if (*cp != ':')
340 Tcl_AppendToObj (resultPtr, "::sasl::", -1);
341 Tcl_AppendToObj (resultPtr, cp, -1);
342
343 return resultPtr;
344 }
345
346
347 static int
348 cb_getopt (void *context,
349 char *CONST plugin_name,
350 char *CONST option,
351 char **CONST value,
352 unsigned *len) {
353 cb_context_t *cb = (cb_context_t *) context;
354 Tcl_Interp *interp = cb -> ctx_interp;
355 Tcl_Obj *argPtr,
356 *cmdPtr;
357
358 argPtr = Tcl_NewObj ();
359
360 if (plugin_name) {
361 Tcl_ListObjAppendElement (interp, argPtr,
362 Tcl_NewStringObj ("plugin", -1));
363 Tcl_ListObjAppendElement (interp, argPtr,
364 Tcl_NewStringObj (plugin_name, -1));
365 }
366
367 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("option", -1));
368 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj (option, -1));
369
370 cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
371 if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
372 || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK))
373 return SASL_FAIL;
374
375 *value = allocate (interp, len);
376
377 return SASL_OK;
378 }
379
380 static int
381 cb_log (void *context,
382 int level,
383 char *CONST message) {
384 cb_context_t *cb = (cb_context_t *) context;
385 Tcl_Interp *interp = cb -> ctx_interp;
386 Tcl_Obj *argPtr,
387 *cmdPtr;
388
389 argPtr = Tcl_NewObj ();
390
391 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("level", -1));
392 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewIntObj (level));
393
394 Tcl_ListObjAppendElement (interp, argPtr,
395 Tcl_NewStringObj ("message", -1));
396 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj (message, -1));
397
398 cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
399 if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
400 || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK))
401 return SASL_FAIL;
402
403 return SASL_OK;
404 }
405
406 static int
407 cb_getpath (void *context,
408 char **CONST value) {
409 cb_context_t *cb = (cb_context_t *) context;
410 Tcl_Interp *interp = cb -> ctx_interp;
411
412 if (Tcl_EvalObjEx (interp, cb -> ctx_cmdPtr, 0) != TCL_OK)
413 return SASL_FAIL;
414
415 *value = allocate (interp, NULL);
416
417 return SASL_OK;
418 }
419
420 static kv_pair_t vf_pairs[] = {
421 /* SASL_VRFY_OTHER must be first */
422 { "other", SASL_VRFY_OTHER },
423 { "conf", SASL_VRFY_CONF },
424 { "passwd", SASL_VRFY_PASSWD },
425 { "plugin", SASL_VRFY_PLUGIN },
426
427 { NULL, 0 }
428 };
429
430 static int
431 cb_verifyfile (void *context,
432 char *CONST file,
433 sasl_verify_type_t type) {
434 int intValue;
435 cb_context_t *cb = (cb_context_t *) context;
436 kv_pair_t *p;
437 Tcl_Interp *interp = cb -> ctx_interp;
438 Tcl_Obj *argPtr,
439 *cmdPtr;
440
441 for (p = vf_pairs; p -> p_key; p++)
442 if (p -> p_value == type)
443 break;
444 if (!p -> p_key)
445 p = vf_pairs;
446
447 argPtr = Tcl_NewObj ();
448
449 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("file", -1));
450 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj (file, -1));
451
452 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("type", -1));
453 Tcl_ListObjAppendElement (interp, argPtr,
454 Tcl_NewStringObj (p -> p_key, -1));
455
456 cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
457 if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
458 || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK)
459 || (Tcl_GetIntFromObj (interp, Tcl_GetObjResult (interp),
460 &intValue) != TCL_OK))
461 return SASL_FAIL;
462
463 return intValue;
464 }
465
466 static int
467 cb_getsimple (void *context,
468 unsigned id,
469 char **CONST value,
470 unsigned *len) {
471 cb_context_t *cb = (cb_context_t *) context;
472 kv_pair_t *p;
473 Tcl_Interp *interp = cb -> ctx_interp;
474 Tcl_Obj *argPtr,
475 *cmdPtr;
476
477 for (p = cb_pairs; p -> p_key; p++)
478 if (p -> p_value == id)
479 break;
480 if (!p -> p_key)
481 return SASL_BADPARAM;
482
483 argPtr = Tcl_NewObj ();
484
485 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("id", -1));
486 Tcl_ListObjAppendElement (interp, argPtr,
487 Tcl_NewStringObj (p -> p_key, -1));
488
489 cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
490 if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
491 || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK))
492 return SASL_FAIL;
493
494 *value = allocate (interp, len);
495
496 return SASL_OK;
497 }
498
499 static int
500 cb_getsecret (sasl_conn_t *conn,
501 void *context,
502 unsigned id,
503 sasl_secret_t **value) {
504 int len;
505 char *cp,
506 *dp;
507 cb_context_t *cb = (cb_context_t *) context;
508 kv_pair_t *p;
509 sasl_data_t *sd;
510 sasl_secret_t *ss;
511 Tcl_HashEntry *entryPtr;
512 Tcl_Interp *interp = cb -> ctx_interp;
513 Tcl_Obj *argPtr,
514 *cmdPtr;
515
516 if (!(entryPtr = Tcl_FindHashEntry (&connTable, (char *) conn)))
517 return SASL_BADPARAM;
518 sd = (sasl_data_t *) Tcl_GetHashValue (entryPtr);
519
520 for (p = cb_pairs; p -> p_key; p++)
521 if (p -> p_value == id)
522 break;
523 if (!p -> p_key)
524 return SASL_BADPARAM;
525
526 argPtr = Tcl_NewObj ();
527
528 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("token", -1));
529 Tcl_ListObjAppendElement (interp, argPtr, sd2Obj (sd));
530
531 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("id", -1));
532 Tcl_ListObjAppendElement (interp, argPtr,
533 Tcl_NewStringObj (p -> p_key, -1));
534
535 cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
536 if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
537 || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK)) {
538 *value = NULL;
539 return SASL_FAIL;
540 }
541
542 cp = Tcl_GetByteArrayFromObj (Tcl_GetObjResult (interp), &len);
543 dp = Tcl_Alloc (sizeof *ss + len);
544
545 ss = (sasl_secret_t *) dp;
546 ss -> len = len;
547 memcpy (ss -> data, cp, len);
548 ss -> data[len] = '\0';
549
550 #if 0 /* looks like the library frees this... */
551 entryPtr = Tcl_CreateHashEntry (&allocTable, dp, &len);
552 Tcl_SetHashValue (entryPtr, (ClientData) 1);
553 #endif
554
555 *value = ss;
556
557 return SASL_OK;
558 }
559
560 static int
561 cb_chalprompt (void *context,
562 unsigned id,
563 char *CONST challenge,
564 char *CONST prompt,
565 char *CONST defresult,
566 char **CONST value,
567 unsigned *len) {
568 cb_context_t *cb = (cb_context_t *) context;
569 kv_pair_t *p;
570 Tcl_Interp *interp = cb -> ctx_interp;
571 Tcl_Obj *argPtr,
572 *cmdPtr;
573
574 for (p = cb_pairs; p -> p_key; p++)
575 if (p -> p_value == id)
576 break;
577 if (!p -> p_key)
578 return SASL_BADPARAM;
579
580 argPtr = Tcl_NewObj ();
581
582 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("id", -1));
583 Tcl_ListObjAppendElement (interp, argPtr,
584 Tcl_NewStringObj (p -> p_key, -1));
585 Tcl_ListObjAppendElement (interp, argPtr,
586 Tcl_NewStringObj ("challenge", -1));
587 Tcl_ListObjAppendElement (interp, argPtr,
588 Tcl_NewStringObj (challenge, -1));
589
590 Tcl_ListObjAppendElement (interp, argPtr,
591 Tcl_NewStringObj ("prompt", -1));
592 Tcl_ListObjAppendElement (interp, argPtr,
593 Tcl_NewStringObj (prompt, -1));
594
595 Tcl_ListObjAppendElement (interp, argPtr,
596 Tcl_NewStringObj ("default", -1));
597 Tcl_ListObjAppendElement (interp, argPtr,
598 Tcl_NewStringObj (defresult, -1));
599
600 cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
601 if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
602 || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK))
603 return SASL_FAIL;
604
605 *value = allocate (interp, len);
606
607 return SASL_OK;
608 }
609
610 static int
611 cb_getrealm (void *context,
612 unsigned id,
613 char **CONST availrealms,
614 char **CONST value) {
615 cb_context_t *cb = (cb_context_t *) context;
616 kv_pair_t *p;
617 Tcl_Interp *interp = cb -> ctx_interp;
618 Tcl_Obj *argPtr,
619 *cmdPtr;
620
621 for (p = cb_pairs; p -> p_key; p++)
622 if (p -> p_value == id)
623 break;
624 if (!p -> p_key)
625 return SASL_BADPARAM;
626
627 argPtr = Tcl_NewObj ();
628
629 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("id", -1));
630 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj (p -> p_key,
631 -1));
632
633 if (availrealms) {
634 char **ap;
635 Tcl_Obj *elemPtr;
636
637 elemPtr = Tcl_NewObj ();
638 for (ap = availrealms; *ap; ap++) {
639 Tcl_ListObjAppendElement (interp, elemPtr,
640 Tcl_NewStringObj (*ap, -1));
641 }
642 Tcl_ListObjAppendElement (interp, argPtr,
643 Tcl_NewStringObj ("available", -1));
644 Tcl_ListObjAppendElement (interp, argPtr, elemPtr);
645 }
646
647 cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
648 if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
649 || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK))
650 return SASL_FAIL;
651
652 *value = allocate (interp, NULL);
653
654 return SASL_OK;
655 }
656
657 static int
658 cb_authorize (sasl_conn_t *conn,
659 void *context,
660 char *CONST requested_user,
661 int rlen,
662 char *CONST auth_identity,
663 int alen,
664 char *CONST def_realm,
665 int urlen,
666 propctx_t *propctx) {
667 int intValue;
668 cb_context_t *cb = (cb_context_t *) context;
669 sasl_data_t *sd;
670 Tcl_HashEntry *entryPtr;
671 Tcl_Interp *interp = cb -> ctx_interp;
672 Tcl_Obj *argPtr,
673 *cmdPtr;
674
675 if (!(entryPtr = Tcl_FindHashEntry (&connTable, (char *) conn)))
676 return SASL_BADPARAM;
677 sd = (sasl_data_t *) Tcl_GetHashValue (entryPtr);
678
679 argPtr = Tcl_NewObj ();
680
681 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("token", -1));
682 Tcl_ListObjAppendElement (interp, argPtr, sd2Obj (sd));
683
684 Tcl_ListObjAppendElement (interp, argPtr,
685 Tcl_NewStringObj ("target", -1));
686 Tcl_ListObjAppendElement (interp, argPtr,
687 Tcl_NewByteArrayObj (requested_user, rlen));
688
689 Tcl_ListObjAppendElement (interp, argPtr,
690 Tcl_NewStringObj ("user", -1));
691 Tcl_ListObjAppendElement (interp, argPtr,
692 Tcl_NewByteArrayObj (auth_identity, alen));
693
694 if (def_realm) {
695 Tcl_ListObjAppendElement (interp, argPtr,
696 Tcl_NewStringObj ("realm", -1));
697 Tcl_ListObjAppendElement (interp, argPtr,
698 Tcl_NewByteArrayObj (def_realm, urlen));
699 }
700
701 if (propctx) {
702 Tcl_ListObjAppendElement (interp, argPtr,
703 Tcl_NewStringObj ("propctx", -1));
704 Tcl_ListObjAppendElement (interp, argPtr, c2t_propctx (propctx));
705 }
706
707 cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
708 if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
709 || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK)
710 || (Tcl_GetIntFromObj (interp, Tcl_GetObjResult (interp),
711 &intValue) != TCL_OK))
712 return SASL_FAIL;
713
714 return intValue;
715 }
716
717 static int
718 cb_userdb_checkpass (sasl_conn_t *conn,
719 void *context,
720 char *CONST user,
721 char *CONST pass,
722 unsigned passlen,
723 propctx_t *propctx) {
724 int intValue;
725 cb_context_t *cb = (cb_context_t *) context;
726 sasl_data_t *sd;
727 Tcl_HashEntry *entryPtr;
728 Tcl_Interp *interp = cb -> ctx_interp;
729 Tcl_Obj *argPtr,
730 *cmdPtr;
731
732 if (!(entryPtr = Tcl_FindHashEntry (&connTable, (char *) conn)))
733 return SASL_BADPARAM;
734 sd = (sasl_data_t *) Tcl_GetHashValue (entryPtr);
735
736 argPtr = Tcl_NewObj ();
737
738 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("token", -1));
739 Tcl_ListObjAppendElement (interp, argPtr, sd2Obj (sd));
740
741 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("user", -1));
742 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj (user, -1));
743
744 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("pass", -1));
745 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewByteArrayObj (pass,
746 passlen));
747
748 if (propctx) {
749 Tcl_ListObjAppendElement (interp, argPtr,
750 Tcl_NewStringObj ("propctx", -1));
751 Tcl_ListObjAppendElement (interp, argPtr, c2t_propctx (propctx));
752 }
753
754 cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
755 if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
756 || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK)
757 || (Tcl_GetIntFromObj (interp, Tcl_GetObjResult (interp),
758 &intValue) != TCL_OK))
759 return SASL_FAIL;
760
761 return intValue;
762 }
763
764 static kv_pair_t setpass_flags[] = {
765 { "create", SASL_SET_CREATE },
766 { "disable", SASL_SET_DISABLE },
767
768 { NULL, 0 }
769 };
770
771 static int
772 cb_userdb_setpass (sasl_conn_t *conn,
773 void *context,
774 char *CONST user,
775 char *CONST pass,
776 unsigned passlen,
777 propctx_t *propctx,
778 unsigned flags) {
779 int intValue;
780 cb_context_t *cb = (cb_context_t *) context;
781 kv_pair_t *p;
782 sasl_data_t *sd;
783 Tcl_HashEntry *entryPtr;
784 Tcl_Interp *interp = cb -> ctx_interp;
785 Tcl_Obj *argPtr,
786 *cmdPtr,
787 *elemPtr;
788
789 if (!(entryPtr = Tcl_FindHashEntry (&connTable, (char *) conn)))
790 return SASL_BADPARAM;
791 sd = (sasl_data_t *) Tcl_GetHashValue (entryPtr);
792
793 argPtr = Tcl_NewObj ();
794
795 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("token", -1));
796 Tcl_ListObjAppendElement (interp, argPtr, sd2Obj (sd));
797
798 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("user", -1));
799 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj (user, -1));
800
801 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("pass", -1));
802 Tcl_ListObjAppendElement (interp, argPtr,
803 Tcl_NewByteArrayObj (pass, passlen));
804
805 Tcl_ListObjAppendElement (interp, argPtr,
806 Tcl_NewStringObj ("flags", -1));
807 elemPtr = Tcl_NewObj ();
808 for (p = setpass_flags; p -> p_key; p++)
809 if (flags & p -> p_value) {
810 Tcl_ListObjAppendElement (interp, elemPtr,
811 Tcl_NewStringObj (p -> p_key, -1));
812 flags &= ~p -> p_value;
813 }
814 if (flags) {
815 char buffer[BUFSIZ];
816
817 sprintf (buffer, "%u", flags);
818 Tcl_ListObjAppendElement (interp, elemPtr,
819 Tcl_NewStringObj (buffer, -1));
820 }
821 Tcl_ListObjAppendElement (interp, argPtr, elemPtr);
822
823 if (propctx) {
824 Tcl_ListObjAppendElement (interp, argPtr,
825 Tcl_NewStringObj ("propctx", -1));
826 Tcl_ListObjAppendElement (interp, argPtr, c2t_propctx (propctx));
827 }
828
829 cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
830 if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
831 || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK)
832 || (Tcl_GetIntFromObj (interp, Tcl_GetObjResult (interp),
833 &intValue) != TCL_OK))
834 return SASL_FAIL;
835
836 return intValue;
837 }
838
839 static kv_pair_t canon_flags[] = {
840 { "authid", SASL_CU_AUTHID },
841 { "authzid", SASL_CU_AUTHZID },
842
843 { NULL, 0 }
844 };
845
846 static int
847 cb_canonuser (sasl_conn_t *conn,
848 void *context,
849 char *CONST iptr,
850 unsigned ilen,
851 unsigned flags,
852 char *CONST realm,
853 char *optr,
854 unsigned omax,
855 unsigned *olen) {
856 int intValue;
857 char *cp;
858 cb_context_t *cb = (cb_context_t *) context;
859 kv_pair_t *p;
860 sasl_data_t *sd;
861 Tcl_HashEntry *entryPtr;
862 Tcl_Interp *interp = cb -> ctx_interp;
863 Tcl_Obj *argPtr,
864 *cmdPtr,
865 *elemPtr;
866
867 if (!(entryPtr = Tcl_FindHashEntry (&connTable, (char *) conn)))
868 return SASL_BADPARAM;
869 sd = (sasl_data_t *) Tcl_GetHashValue (entryPtr);
870
871 argPtr = Tcl_NewObj ();
872
873 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("token", -1));
874 Tcl_ListObjAppendElement (interp, argPtr, sd2Obj (sd));
875
876 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("in", -1));
877 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewByteArrayObj (iptr,
878 ilen));
879
880 if (realm) {
881 Tcl_ListObjAppendElement (interp, argPtr,
882 Tcl_NewStringObj ("realm", -1));
883 Tcl_ListObjAppendElement (interp, argPtr,
884 Tcl_NewStringObj (realm, -1));
885 }
886
887 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewStringObj ("outmax", -1));
888 Tcl_ListObjAppendElement (interp, argPtr, Tcl_NewIntObj (omax));
889
890 Tcl_ListObjAppendElement (interp, argPtr,
891 Tcl_NewStringObj ("flags", -1));
892 elemPtr = Tcl_NewObj ();
893 for (p = canon_flags; p -> p_key; p++)
894 if (flags & p -> p_value) {
895 Tcl_ListObjAppendElement (interp, elemPtr,
896 Tcl_NewStringObj (p -> p_key, -1));
897 flags &= ~p -> p_value;
898 }
899 if (flags) {
900 char buffer[BUFSIZ];
901
902 sprintf (buffer, "%u", flags);
903 Tcl_ListObjAppendElement (interp, elemPtr,
904 Tcl_NewStringObj (buffer, -1));
905 }
906 Tcl_ListObjAppendElement (interp, argPtr, elemPtr);
907
908 cmdPtr = Tcl_DuplicateObj (cb -> ctx_cmdPtr);
909 if ((Tcl_ListObjAppendElement (interp, cmdPtr, argPtr) != TCL_OK)
910 || (Tcl_EvalObjEx (interp, cmdPtr, TCL_EVAL_DIRECT) != TCL_OK))
911 return SASL_FAIL;
912
913 cp = Tcl_GetByteArrayFromObj (Tcl_GetObjResult (interp), &intValue);
914 if (intValue > ((int) omax))
915 intValue = omax;
916 memcpy (optr, cp, intValue);
917 *olen = (unsigned) intValue;
918
919 return SASL_OK;
920 }
921
922
923 static sasl_callback_t *
924 t2c_sasl_callback (Tcl_Interp *interp,
925 Tcl_Obj *objPtr) {
926 int i,
927 nctx,
928 nelem,
929 result,
930 size;
931 char *mp;
932 cb_context_t *cb;
933 sasl_callback_t *pp,
934 *qp;
935 Tcl_HashEntry *entryPtr;
936 Tcl_Obj *elemPtr,
937 *fieldPtr;
938
939 if ((result = Tcl_ListObjLength (interp, objPtr, &nelem)) != TCL_OK)
940 return NULL;
941
942 size = (nelem + 1) * sizeof *pp;
943
944 nctx = 0;
945 for (i = 0; i < nelem; i++) {
946 int nfield;
947
948 if (((result = Tcl_ListObjIndex (interp, objPtr, i, &elemPtr))
949 != TCL_OK)
950 || ((result = Tcl_ListObjLength (interp, elemPtr, &nfield))
951 != TCL_OK))
952 return NULL;
953 if ((nfield < 1) || (nfield > 2)) {
954 Tcl_SetResult (interp,
955 "each callback should be list with 1 or 2 elements",
956 TCL_STATIC);
957 return NULL;
958 }
959 if ((result = Tcl_ListObjIndex (interp, elemPtr, 1, &fieldPtr))
960 != TCL_OK)
961 return NULL;
962
963 if (fieldPtr != NULL)
964 size += sizeof *cb, nctx++;
965 }
966
967 mp = Tcl_Alloc (size);
968 memset (mp, 0, size);
969
970 pp = (sasl_callback_t *) mp, mp += (nelem + 1) * sizeof *pp;
971 cb = (cb_context_t *) mp, mp += nctx * sizeof *cb;
972
973 for (qp = pp, i = 0; i < nelem; qp++, i++) {
974 int offset;
975
976 if (((result = Tcl_ListObjIndex (interp, objPtr, i, &elemPtr))
977 != TCL_OK)
978 || ((result = Tcl_ListObjIndex (interp, elemPtr, 0, &fieldPtr))
979 != TCL_OK))
980 goto out;
981
982 if ((result = tcl_GetIndexFromObjStruct (interp, fieldPtr,
983 (char **) cb_pairs,
984 sizeof *cb_pairs, "callback",
985 0, &offset)) != TCL_OK)
986 goto out;
987 qp -> id = cb_pairs[offset]. p_value;
988
989 if ((result = Tcl_ListObjIndex (interp, elemPtr, 1, &fieldPtr))
990 != TCL_OK)
991 goto out;
992
993 if (fieldPtr != NULL) {
994 switch (qp -> id) {
995 case SASL_CB_GETOPT:
996 qp -> proc = cb_getopt;
997 break;
998
999 case SASL_CB_LOG:
1000 qp -> proc = cb_log;
1001 break;
1002
1003 case SASL_CB_GETPATH:
1004 qp -> proc = cb_getpath;
1005 break;
1006
1007 case SASL_CB_VERIFYFILE:
1008 qp -> proc = cb_verifyfile;
1009 break;
1010
1011 case SASL_CB_USER:
1012 case SASL_CB_AUTHNAME:
1013 case SASL_CB_LANGUAGE:
1014 case SASL_CB_CNONCE:
1015 qp -> proc = cb_getsimple;
1016 break;
1017
1018 case SASL_CB_PASS:
1019 qp -> proc = cb_getsecret;
1020 break;
1021
1022 case SASL_CB_ECHOPROMPT:
1023 case SASL_CB_NOECHOPROMPT:
1024 qp -> proc = cb_chalprompt;
1025 break;
1026
1027 case SASL_CB_GETREALM:
1028 qp -> proc = cb_getrealm;
1029 break;
1030
1031 case SASL_CB_PROXY_POLICY:
1032 qp -> proc = cb_authorize;
1033 break;
1034
1035 case SASL_CB_SERVER_USERDB_CHECKPASS:
1036 qp -> proc = cb_userdb_checkpass;
1037 break;
1038
1039 case SASL_CB_SERVER_USERDB_SETPASS:
1040 qp -> proc = cb_userdb_setpass;
1041 break;
1042
1043 case SASL_CB_CANON_USER:
1044 qp -> proc = cb_canonuser;
1045 break;
1046
1047 default:
1048 Tcl_SetResult (interp,
1049 "internal error, missing known case",
1050 TCL_STATIC);
1051 goto out;
1052 }
1053 qp -> context = cb;
1054
1055 cb -> ctx_interp = interp;
1056 cb -> ctx_id = qp -> id;
1057 cb -> ctx_cmdPtr = fieldPtr;
1058 Tcl_IncrRefCount (cb -> ctx_cmdPtr);
1059 cb++;
1060 }
1061 }
1062 qp -> id = SASL_CB_LIST_END;
1063
1064 entryPtr = Tcl_CreateHashEntry (&allocTable, (char *) pp, &result);
1065 Tcl_SetHashValue (entryPtr, (ClientData) 1);
1066
1067 return pp;
1068
1069 out: ;
1070 Tcl_Free ((char *) pp);
1071
1072 return NULL;
1073 }
1074
1075
1076 /* common routines */
1077
1078 static int
1079 sasl_aux_proc (ClientData data,
1080 Tcl_Interp *interp,
1081 int objc,
1082 Tcl_Obj *CONST objv[]) {
1083 int argc,
1084 offset,
1085 result;
1086 char *cp;
1087 oc_pair_t *pp;
1088 sasl_data_t *sd = (sasl_data_t *) data;
1089 Tcl_Obj *CONST *argv;
1090
1091 Tcl_ResetResult (interp);
1092 argc = objc, argv = objv;
1093 for (argc--, argv++; argc > 0; argc -= 2, argv += 2)
1094 if (Tcl_StringCaseMatch (Tcl_GetString (*argv), "-operation", 0))
1095 break;
1096 if (argc <= 0) {
1097 Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objv[0]),
1098 " -operation", NULL);
1099 for (pp = sd -> sd_dispatch, cp = " "; pp -> p_key; pp++, cp = "|")
1100 Tcl_AppendResult (interp, cp, pp -> p_key, NULL);
1101 Tcl_AppendResult (interp, " ?args...?", NULL);
1102 return TCL_ERROR;
1103 }
1104
1105 argc--, argv++;
1106 if (!*argv) {
1107 Tcl_AppendResult (interp, "missing argument to: \"-operation\"", NULL);
1108 return TCL_ERROR;
1109 }
1110 if ((result = tcl_GetIndexFromObjStruct (interp, *argv,
1111 (char **) sd -> sd_dispatch,
1112 sizeof *sd -> sd_dispatch,
1113 "operation", 0, &offset))
1114 != TCL_OK)
1115 return result;
1116 pp = sd -> sd_dispatch + offset;
1117
1118 return ((*(pp -> p_proc)) (data, interp, objc, objv));
1119 };
1120
1121
1122 static void
1123 sasl_aux_free (ClientData data) {
1124 sasl_data_t *sd = (sasl_data_t *) data;
1125 Tcl_HashEntry *entryPtr;
1126
1127 if (sd -> sd_cb) {
1128 if ((entryPtr = Tcl_FindHashEntry (&allocTable, (char *) sd -> sd_cb))
1129 != NULL)
1130 Tcl_DeleteHashEntry (entryPtr);
1131 Tcl_Free ((char *) sd -> sd_cb);
1132 }
1133
1134 if ((entryPtr = Tcl_FindHashEntry (&connTable, (char *) sd -> sd_conn))
1135 != NULL)
1136 Tcl_DeleteHashEntry (entryPtr);
1137 sasl_dispose (&sd -> sd_conn);
1138
1139 Tcl_Free ((char *) data);
1140 }
1141
1142
1143 static int
1144 sasl_aux_codec (Tcl_Interp *interp,
1145 sasl_data_t *sd,
1146 char *codep,
1147 int (*codec) (),
1148 Tcl_Obj *string) {
1149 int result;
1150 unsigned ilen,
1151 olen;
1152 CONST char *iptr,
1153 *optr;
1154
1155 iptr = Tcl_GetByteArrayFromObj (string, &ilen);
1156
1157 if ((result = (*codec) (sd -> sd_conn, iptr, ilen, &optr, &olen))
1158 != SASL_OK)
1159 return c2t_result (interp, codep, result);
1160
1161 Tcl_SetObjResult (interp, Tcl_NewByteArrayObj ((unsigned char *) optr,
1162 olen));
1163 return TCL_OK;
1164 }
1165
1166
1167 #define DECODE_OPERATION 0
1168 #define DECODE_INPUT 1
1169
1170 #define DECODE_MAXARGS 2
1171 #define DECODE_OPTIONAL DECODE_MAXARGS
1172
1173 static kv_pair_t decode_args[] = {
1174 { "-operation", DECODE_OPERATION },
1175 { "-input", DECODE_INPUT },
1176
1177 { NULL, 0 }
1178 };
1179
1180 static int
1181 sasl_aux_decode (ClientData data,
1182 Tcl_Interp *interp,
1183 int objc,
1184 Tcl_Obj *CONST objv[]) {
1185 int result;
1186 sasl_data_t *sd = (sasl_data_t *) data;
1187 Tcl_Obj *args[DECODE_MAXARGS];
1188
1189 memset (args, 0, sizeof *args * DECODE_MAXARGS);
1190 if ((result = crack_args (interp, objc, objv, decode_args,
1191 DECODE_OPTIONAL, args)) != TCL_OK)
1192 return result;
1193
1194 return sasl_aux_codec (interp, sd, "sasl_decode", sasl_decode,
1195 args[DECODE_INPUT]);
1196 }
1197
1198
1199 #define ENCODE_OPERATION 0
1200 #define ENCODE_OUTPUT 1
1201
1202 #define ENCODE_MAXARGS 2
1203 #define ENCODE_OPTIONAL ENCODE_MAXARGS
1204
1205 static kv_pair_t encode_args[] = {
1206 { "-operation", ENCODE_OPERATION },
1207 { "-output", ENCODE_OUTPUT },
1208
1209 { NULL, 0 }
1210 };
1211
1212 static int
1213 sasl_aux_encode (ClientData data,
1214 Tcl_Interp *interp,
1215 int objc,
1216 Tcl_Obj *CONST objv[]) {
1217 int result;
1218 sasl_data_t *sd = (sasl_data_t *) data;
1219 Tcl_Obj *args[ENCODE_MAXARGS];
1220
1221 memset (args, 0, sizeof *args * ENCODE_MAXARGS);
1222 if ((result = crack_args (interp, objc, objv, encode_args,
1223 ENCODE_OPTIONAL, args)) != TCL_OK)
1224 return result;
1225
1226 return sasl_aux_codec (interp, sd, "sasl_encode", sasl_encode,
1227 args[ENCODE_OUTPUT]);
1228 }
1229
1230
1231 #define GETPROP_OPERATION 0
1232 #define GETPROP_PROPERTY 1
1233
1234 #define GETPROP_MAXARGS 2
1235 #define GETPROP_OPTIONAL GETPROP_MAXARGS
1236
1237 static kv_pair_t getprop_args[] = {
1238 { "-operation", GETPROP_OPERATION },
1239 { "-property", GETPROP_PROPERTY },
1240
1241 { NULL, 0 }
1242 };
1243
1244 static kv_pair_t getprop_pairs[] = {
1245 { "auth_external", SASL_AUTH_EXTERNAL },
1246 { "authsource", SASL_AUTHSOURCE },
1247 { "callbacks", SASL_CALLBACK },
1248 { "defrealm", SASL_DEFUSERREALM },
1249 { "getoptctx", SASL_GETOPTCTX },
1250 { "iplocalport", SASL_IPLOCALPORT },
1251 { "ipremoteport", SASL_IPREMOTEPORT },
1252 { "maxoutbuf", SASL_MAXOUTBUF },
1253 { "mechname", SASL_MECHNAME },
1254 { "plugerr", SASL_PLUGERR },
1255 { "sec_props", SASL_SEC_PROPS },
1256 { "serverfqdn", SASL_SERVERFQDN },
1257 { "service", SASL_SERVICE },
1258 { "ssf", SASL_SSF },
1259 { "ssf_external", SASL_SSF_EXTERNAL },
1260 { "username", SASL_USERNAME },
1261
1262 { NULL, 0 }
1263 };
1264
1265 static kv_pair_t secprops_flags[] = {
1266 { "forward_secrecy", SASL_SEC_FORWARD_SECRECY },
1267 { "noactive", SASL_SEC_NOACTIVE },
1268 { "noanonymous", SASL_SEC_NOANONYMOUS },
1269 { "nodictionary", SASL_SEC_NODICTIONARY },
1270 { "noplaintext", SASL_SEC_NOPLAINTEXT },
1271 { "pass_credentials", SASL_SEC_PASS_CREDENTIALS },
1272
1273 { NULL, 0 }
1274 };
1275
1276
1277 static int
1278 sasl_aux_getprop (ClientData data,
1279 Tcl_Interp *interp,
1280 int objc,
1281 Tcl_Obj *CONST objv[]) {
1282 CONST void *pvalue;
1283 int offset,
1284 result;
1285 kv_pair_t *p;
1286 sasl_data_t *sd = (sasl_data_t *) data;
1287 Tcl_Obj *elemPtr,
1288 *resultPtr,
1289 *args[GETPROP_MAXARGS];
1290
1291 memset (args, 0, sizeof *args * GETPROP_MAXARGS);
1292 if ((result = crack_args (interp, objc, objv, getprop_args,
1293 GETPROP_OPTIONAL, args)) != TCL_OK)
1294 return result;
1295
1296 if ((result = tcl_GetIndexFromObjStruct (interp, args[GETPROP_PROPERTY],
1297 (char **) getprop_pairs,
1298 sizeof *getprop_pairs, "property",
1299 0, &offset)) != TCL_OK)
1300 return result;
1301 p = getprop_pairs + offset;
1302
1303 if ((offset = p -> p_value) == SASL_GETOPTCTX)
1304 offset = SASL_CALLBACK;
1305 if ((result = sasl_getprop (sd -> sd_conn, offset, &pvalue)) != SASL_OK)
1306 return c2t_result (interp, "sasl_getprop", result);
1307
1308 resultPtr = NULL;
1309 switch (p -> p_value) {
1310 case SASL_USERNAME:
1311 case SASL_DEFUSERREALM:
1312 case SASL_IPLOCALPORT:
1313 case SASL_IPREMOTEPORT:
1314 case SASL_SERVICE:
1315 case SASL_SERVERFQDN:
1316 case SASL_AUTHSOURCE:
1317 case SASL_MECHNAME:
1318 case SASL_PLUGERR:
1319 case SASL_AUTH_EXTERNAL:
1320 if (pvalue != NULL)
1321 resultPtr = Tcl_NewStringObj ((char *) pvalue, -1);
1322 break;
1323
1324 case SASL_SSF:
1325 case SASL_SSF_EXTERNAL:
1326 case SASL_MAXOUTBUF:
1327 resultPtr = Tcl_NewLongObj (*((unsigned *) pvalue));
1328 break;
1329
1330 case SASL_SEC_PROPS:
1331 {
1332 sasl_security_properties_t *sp =
1333 (sasl_security_properties_t *) pvalue;
1334
1335 resultPtr = Tcl_NewObj ();
1336
1337 Tcl_ListObjAppendElement (interp, resultPtr,
1338 Tcl_NewStringObj ("min_ssf", -1));
1339 Tcl_ListObjAppendElement (interp, resultPtr,
1340 Tcl_NewLongObj (sp -> min_ssf));
1341
1342 Tcl_ListObjAppendElement (interp, resultPtr,
1343 Tcl_NewStringObj ("max_ssf", -1));
1344 Tcl_ListObjAppendElement (interp, resultPtr,
1345 Tcl_NewLongObj (sp -> max_ssf));
1346
1347 Tcl_ListObjAppendElement (interp, resultPtr,
1348 Tcl_NewStringObj ("max_bufsize", -1));
1349 Tcl_ListObjAppendElement (interp, resultPtr,
1350 Tcl_NewLongObj (sp -> maxbufsize));
1351
1352 Tcl_ListObjAppendElement (interp, resultPtr,
1353 Tcl_NewStringObj ("flags", -1));
1354 elemPtr = Tcl_NewObj ();
1355 for (p = secprops_flags; p -> p_key; p++)
1356 if (sp -> security_flags & p -> p_value) {
1357 Tcl_ListObjAppendElement (interp, elemPtr,
1358 Tcl_NewStringObj (p -> p_key,
1359 -1));
1360 sp -> security_flags &= ~p -> p_value;
1361 }
1362 if (sp -> security_flags) {
1363 char buffer[BUFSIZ];
1364
1365 sprintf (buffer, "%u", sp -> security_flags);
1366 Tcl_ListObjAppendElement (interp, elemPtr,
1367 Tcl_NewStringObj (buffer, -1));
1368 }
1369 Tcl_ListObjAppendElement (interp, resultPtr, elemPtr);
1370
1371 break;
1372 }
1373
1374 case SASL_GETOPTCTX:
1375 offset = SASL_GETOPTCTX;
1376 /* and fall... */
1377
1378 case SASL_CALLBACK:
1379 {
1380 cb_context_t *cb;
1381 sasl_callback_t *pp,
1382 *qp;
1383
1384 if (!(pp = (sasl_callback_t *) pvalue))
1385 break;
1386
1387 if (offset == SASL_CALLBACK)
1388 resultPtr = Tcl_NewObj ();
1389 for (qp = pp; qp -> id != SASL_CB_LIST_END; qp++) {
1390 if (offset == SASL_GETOPTCTX) {
1391 if (qp -> id != SASL_CB_GETOPT)
1392 continue;
1393 if ((cb = (cb_context_t *) qp -> context) != NULL)
1394 resultPtr = cb -> ctx_cmdPtr;
1395 break;
1396 }
1397
1398 for (p = cb_pairs; p -> p_key; p++)
1399 if (p -> p_value == qp -> id)
1400 break;
1401 if (!p -> p_key)
1402 continue;
1403
1404 elemPtr = Tcl_NewObj ();
1405
1406 Tcl_ListObjAppendElement (interp, elemPtr,
1407 Tcl_NewStringObj (p -> p_key, -1));
1408
1409 if ((cb = (cb_context_t *) qp -> context) != NULL)
1410 Tcl_ListObjAppendElement (interp, elemPtr,
1411 cb -> ctx_cmdPtr);
1412
1413 Tcl_ListObjAppendElement (interp, resultPtr, elemPtr);
1414 }
1415 break;
1416 }
1417
1418 default:
1419 Tcl_SetResult (interp, "internal error, missing known case",
1420 TCL_STATIC);
1421 return TCL_ERROR;
1422 }
1423
1424 if (resultPtr)
1425 Tcl_SetObjResult (interp, resultPtr);
1426 else
1427 Tcl_ResetResult (interp);
1428 return TCL_OK;
1429 }
1430
1431
1432 #define SETPROP_OPERATION 0
1433 #define SETPROP_PROPERTY 1
1434 #define SETPROP_VALUE 2
1435
1436 #define SETPROP_MAXARGS 3
1437 #define SETPROP_OPTIONAL SETPROP_MAXARGS
1438
1439 static kv_pair_t setprop_args[] = {
1440 { "-operation", SETPROP_OPERATION },
1441 { "-property", SETPROP_PROPERTY },
1442 { "-value", SETPROP_VALUE },
1443
1444 { NULL, 0 }
1445 };
1446
1447 static kv_pair_t setprop_pairs[] = {
1448 { "auth_external", SASL_AUTH_EXTERNAL },
1449 { "defrealm", SASL_DEFUSERREALM },
1450 { "iplocalport", SASL_IPLOCALPORT },
1451 { "ipremoteport", SASL_IPREMOTEPORT },
1452 { "sec_props", SASL_SEC_PROPS },
1453 { "ssf_external", SASL_SSF_EXTERNAL },
1454
1455 { NULL, 0 }
1456 };
1457
1458 #define SECPROPS_FLAGS 0
1459 #define SECPROPS_MAXBUFSIZ 1
1460 #define SECPROPS_MAXSSF 2
1461 #define SECPROPS_MINSSF 3
1462
1463 #define SECPROPS_MAXPROPS 4
1464
1465 static kv_pair_t secprops_pairs[] = {
1466 { "flags", SECPROPS_FLAGS },
1467 { "max_bufsize", SECPROPS_MAXBUFSIZ },
1468 { "max_ssf", SECPROPS_MAXSSF },
1469 { "min_ssf", SECPROPS_MINSSF },
1470
1471 { NULL, 0 }
1472 };
1473
1474
1475 static int
1476 sasl_aux_setprop (ClientData data,
1477 Tcl_Interp *interp,
1478 int objc,
1479 Tcl_Obj *CONST objv[]) {
1480 CONST void *pvalue;
1481 int offset,
1482 result;
1483 long ssf;
1484 kv_pair_t *p;
1485 sasl_data_t *sd = (sasl_data_t *) data;
1486 Tcl_Obj *args[SETPROP_MAXARGS];
1487
1488 memset (args, 0, sizeof *args * SETPROP_MAXARGS);
1489 if ((result = crack_args (interp, objc, objv, setprop_args,
1490 SETPROP_OPTIONAL, args)) != TCL_OK)
1491 return result;
1492
1493 if ((result = tcl_GetIndexFromObjStruct (interp, args[SETPROP_PROPERTY],
1494 (char **) setprop_pairs,
1495 sizeof *setprop_pairs, "property",
1496 0, &offset)) != TCL_OK)
1497 return result;
1498 p = setprop_pairs + offset;
1499
1500 switch (p -> p_value) {
1501 case SASL_SSF_EXTERNAL:
1502 if ((result = Tcl_GetLongFromObj (interp, args[SETPROP_VALUE],
1503 &ssf)) != TCL_OK)
1504 return result;
1505 pvalue = (void *) &ssf;
1506 break;
1507
1508 case SASL_AUTH_EXTERNAL:
1509 case SASL_DEFUSERREALM:
1510 case SASL_IPLOCALPORT:
1511 case SASL_IPREMOTEPORT:
1512 pvalue = (void *) Tcl_GetString (args[SETPROP_VALUE]);
1513 break;
1514
1515 case SASL_SEC_PROPS:
1516 {
1517 int i,
1518 nelem,
1519 props[SECPROPS_MAXPROPS];
1520 sasl_security_properties_t sps,
1521 *sp = &sps;
1522
1523 if ((result = Tcl_ListObjLength (interp,
1524 args[SETPROP_VALUE], &nelem))
1525 != TCL_OK)
1526 return result;
1527 if (nelem % 2) {
1528 Tcl_SetResult (interp,
1529 "expecting an even number of list elements",
1530 TCL_STATIC);
1531 return TCL_ERROR;
1532 }
1533
1534 memset (props, 0, sizeof *props * SECPROPS_MAXPROPS);
1535 memset (sp, 0, sizeof *sp);
1536 for (i = 0; i < nelem; i += 2) {
1537 int offset;
1538 long longValue;
1539 Tcl_Obj *elemPtr;
1540
1541 if ((result = Tcl_ListObjIndex (interp,
1542 args[SETPROP_VALUE], i,
1543 &elemPtr)) != TCL_OK)
1544 return TCL_ERROR;
1545 if ((result =
1546 tcl_GetIndexFromObjStruct (interp, elemPtr,
1547 (char **) secprops_pairs,
1548 sizeof *secprops_pairs,
1549 "security property",
1550 0, &offset))
1551 != TCL_OK)
1552 return TCL_ERROR;
1553 if (props[offset]) {
1554 Tcl_ResetResult (interp);
1555 Tcl_AppendResult (interp, "property \"",
1556 secprops_pairs[offset].p_key,
1557 "\" appears more than once", NULL);
1558 return TCL_ERROR;
1559 }
1560 props[offset] = 1;
1561
1562 if ((result = Tcl_ListObjIndex (interp,
1563 args[SETPROP_VALUE], i + 1,
1564 &elemPtr)) != TCL_OK)
1565 return TCL_ERROR;
1566
1567 switch (offset) {
1568 case SECPROPS_FLAGS:
1569 if ((result = t2c_flags (interp, elemPtr,
1570 secprops_flags,
1571 &sp -> security_flags))
1572 != TCL_OK)
1573 return result;
1574 break;
1575
1576 case SECPROPS_MINSSF:
1577 case SECPROPS_MAXSSF:
1578 case SECPROPS_MAXBUFSIZ:
1579 if ((result = Tcl_GetLongFromObj (interp, elemPtr,
1580 &longValue))
1581 != TCL_OK)
1582 return result;
1583 if (offset == SECPROPS_MINSSF)
1584 sp -> min_ssf = longValue;
1585 else if (offset == SECPROPS_MAXSSF)
1586 sp -> max_ssf = longValue;
1587 else
1588 sp -> maxbufsize = longValue;
1589 break;
1590 }
1591 }
1592 pvalue = (void *) sp;
1593 break;
1594 }
1595
1596 default:
1597 Tcl_SetResult (interp, "internal error, missing known case",
1598 TCL_STATIC);
1599 return TCL_ERROR;
1600 }
1601
1602 return c2t_result (interp, "sasl_setprop",
1603 sasl_setprop (sd -> sd_conn, p -> p_value, pvalue));
1604 }
1605
1606
1607 static int
1608 sasl_aux_errdetail (ClientData data,
1609 Tcl_Interp *interp,
1610 int objc,
1611 Tcl_Obj *CONST objv[]) {
1612 sasl_data_t *sd = (sasl_data_t *) data;
1613
1614 if (objc != 3) {
1615 Tcl_ResetResult (interp);
1616 Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objv[0]),
1617 " -operation errdetail", NULL);
1618 return TCL_ERROR;
1619 }
1620
1621 Tcl_SetObjResult (interp,
1622 Tcl_NewStringObj (sasl_errdetail (sd -> sd_conn), -1));
1623 return TCL_OK;
1624 }
1625
1626
1627 static int
1628 sasl_aux_info (ClientData data,
1629 Tcl_Interp *interp,
1630 int objc,
1631 Tcl_Obj *CONST objv[]) {
1632 oc_pair_t *pp;
1633 sasl_data_t *sd = (sasl_data_t *) data;
1634 Tcl_Obj *resultPtr;
1635
1636 if (objc != 3) {
1637 Tcl_ResetResult (interp);
1638 Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objv[0]),
1639 " -operation info", NULL);
1640 return TCL_ERROR;
1641 }
1642
1643 resultPtr = Tcl_NewObj ();
1644 for (pp = sd -> sd_dispatch; pp -> p_key; pp++)
1645 Tcl_ListObjAppendElement (interp, resultPtr,
1646 Tcl_NewStringObj (pp -> p_key, -1));
1647
1648 Tcl_SetObjResult (interp, resultPtr);
1649 return TCL_OK;
1650 }
1651
1652
1653 /* server routines */
1654
1655 #define SERVERINIT_CALLBACKS 0
1656 #define SERVERINIT_APPNAME 1
1657
1658 #define SERVERINIT_MAXARGS 2
1659 #define SERVERINIT_OPTIONAL SERVERINIT_APPNAME
1660
1661 static kv_pair_t serverinit_args[] = {
1662 { "-callbacks", SERVERINIT_CALLBACKS },
1663 { "-appname", SERVERINIT_APPNAME },
1664
1665 { NULL, 0 }
1666 };
1667
1668 /* ARGSUSED */
1669
1670 static int
1671 server_init (ClientData unused,
1672 Tcl_Interp *interp,
1673 int objc,
1674 Tcl_Obj *CONST objv[]) {
1675 int result;
1676 char *appname;
1677 sasl_callback_t *cb;
1678 Tcl_Obj *args[SERVERINIT_MAXARGS];
1679
1680 if (objc == 1)
1681 return t2c_usage (interp, objv[0], serverinit_args,
1682 SERVERINIT_OPTIONAL, NULL, NULL);
1683
1684 memset (args, 0, sizeof *args * SERVERINIT_MAXARGS);
1685 if ((result = crack_args (interp, objc, objv, serverinit_args,
1686 SERVERINIT_OPTIONAL, args) != TCL_OK))
1687 return result;
1688
1689 if (args[SERVERINIT_APPNAME] != NULL)
1690 appname = Tcl_GetString (args[SERVERINIT_APPNAME]);
1691 else if (!(appname = Tcl_GetVar (interp, "argv0",
1692 TCL_GLOBAL_ONLY | TCL_LEAVE_ERR_MSG)))
1693 return TCL_ERROR;
1694
1695 if (!(cb = t2c_sasl_callback (interp, args[SERVERINIT_CALLBACKS])))
1696 return TCL_ERROR;
1697
1698 if ((result = sasl_server_init (cb, appname)) != SASL_OK) {
1699 Tcl_HashEntry *entryPtr;
1700
1701 if ((entryPtr = Tcl_FindHashEntry (&allocTable, (char *) cb)) != NULL)
1702 Tcl_DeleteHashEntry (entryPtr);
1703 free ((char *) cb);
1704 }
1705
1706 return c2t_result (interp, "sasl_server_init", result);
1707 }
1708
1709
1710 #define SAUXLIST_OPERATION 0
1711 #define SAUXLIST_USER 1
1712
1713 #define SAUXLIST_MAXARGS 2
1714 #define SAUXLIST_OPTIONAL SAUXLIST_USER
1715
1716 static kv_pair_t sauxlist_args[] = {
1717 { "-operation", SAUXLIST_OPERATION },
1718 { "-user", SAUXLIST_USER },
1719
1720 { NULL, 0 }
1721 };
1722
1723 static int
1724 server_aux_list (ClientData data,
1725 Tcl_Interp *interp,
1726 int objc,
1727 Tcl_Obj *CONST objv[]) {
1728 int result;
1729 CONST char *mptr;
1730 sasl_data_t *sd = (sasl_data_t *) data;
1731 Tcl_Obj *args[SAUXLIST_MAXARGS];
1732
1733 memset (args, 0, sizeof *args * SAUXLIST_MAXARGS);
1734 if ((result = crack_args (interp, objc, objv, sauxlist_args,
1735 SAUXLIST_OPTIONAL, args)) != TCL_OK)
1736 return result;
1737
1738 if ((result = sasl_listmech (sd -> sd_conn,
1739 Tcl_Obj2String (args[SAUXLIST_USER]),
1740 NULL, " ", NULL, &mptr, NULL, NULL))
1741 != SASL_OK)
1742 return c2t_result (interp, "sasl_listmech", result);
1743
1744 Tcl_SetObjResult (interp, Tcl_NewStringObj (mptr, -1));
1745 return TCL_OK;
1746 }
1747
1748
1749 #define SAUXSTART_OPERATION 0
1750 #define SAUXSTART_MECHANISM 1
1751 #define SAUXSTART_INPUT 2
1752
1753 #define SAUXSTART_MAXARGS 3
1754 #define SAUXSTART_OPTIONAL SAUXSTART_INPUT
1755
1756 static kv_pair_t sauxstart_args[] = {
1757 { "-operation", SAUXSTART_OPERATION },
1758 { "-mechanism", SAUXSTART_MECHANISM },
1759 { "-input", SAUXSTART_INPUT },
1760
1761 { NULL, 0 }
1762 };
1763
1764 static int
1765 server_aux_start (ClientData data,
1766 Tcl_Interp *interp,
1767 int objc,
1768 Tcl_Obj *CONST objv[]) {
1769 int ilen,
1770 olen,
1771 result;
1772 CONST char *iptr,
1773 *optr;
1774 sasl_data_t *sd = (sasl_data_t *) data;
1775 Tcl_Obj *args[SAUXSTART_MAXARGS];
1776
1777 if (objc == 3)
1778 return t2c_usage (interp, objv[0], sauxstart_args, SAUXSTART_OPTIONAL,
1779 "start", NULL);
1780
1781 memset (args, 0, sizeof *args * SAUXSTART_MAXARGS);
1782 if ((result = crack_args (interp, objc, objv, sauxstart_args,
1783 SAUXSTART_OPTIONAL, args)) != TCL_OK)
1784 return result;
1785 if (args[SAUXSTART_INPUT] != NULL)
1786 iptr = Tcl_GetByteArrayFromObj (args[SAUXSTART_INPUT], &ilen);
1787 else
1788 iptr = NULL, ilen = 0;
1789
1790 optr = NULL, olen = 0;
1791 switch (result =
1792 sasl_server_start (sd -> sd_conn,
1793 Tcl_GetString (args[SAUXSTART_MECHANISM]),
1794 iptr, ilen, &optr, &olen)) {
1795 case SASL_OK:
1796 case SASL_CONTINUE:
1797 Tcl_SetObjResult (interp,
1798 Tcl_NewByteArrayObj ((unsigned char *) optr,
1799 olen));
1800 return ((result == SASL_OK) ? TCL_OK : TCL_CONTINUE);
1801
1802 default:
1803 return c2t_result (interp, "sasl_server_start", result);
1804 }
1805 }
1806
1807
1808 #define SAUXSTEP_OPERATION 0
1809 #define SAUXSTEP_INPUT 1
1810
1811 #define SAUXSTEP_MAXARGS 2
1812 #define SAUXSTEP_OPTIONAL SAUXSTEP_MAXARGS
1813
1814 static kv_pair_t sauxstep_args[] = {
1815 { "-operation", SAUXSTEP_OPERATION },
1816 { "-input", SAUXSTEP_INPUT },
1817
1818 { NULL, 0 }
1819 };
1820
1821 static int
1822 server_aux_step (ClientData data,
1823 Tcl_Interp *interp,
1824 int objc,
1825 Tcl_Obj *CONST objv[]) {
1826 int ilen,
1827 olen,
1828 result;
1829 CONST char *iptr,
1830 *optr;
1831 sasl_data_t *sd = (sasl_data_t *) data;
1832 Tcl_Obj *args[SAUXSTEP_MAXARGS];
1833
1834 if (objc == 3)
1835 return t2c_usage (interp, objv[0], sauxstep_args, SAUXSTEP_OPTIONAL,
1836 "step", NULL);
1837
1838 memset (args, 0, sizeof *args * SAUXSTEP_MAXARGS);
1839 if ((result = crack_args (interp, objc, objv, sauxstep_args,
1840 SAUXSTEP_OPTIONAL, args)) != TCL_OK)
1841 return result;
1842 iptr = Tcl_GetByteArrayFromObj (args[SAUXSTEP_INPUT], &ilen);
1843
1844 switch (result = sasl_server_step (sd -> sd_conn, iptr, ilen, &optr,
1845 &olen)) {
1846 case SASL_OK:
1847 case SASL_CONTINUE:
1848 Tcl_SetObjResult (interp,
1849 Tcl_NewByteArrayObj ((unsigned char *) optr,
1850 olen));
1851 return ((result == SASL_OK) ? TCL_OK : TCL_CONTINUE);
1852
1853 default:
1854 return c2t_result (interp, "sasl_server_step", result);
1855 }
1856 };
1857
1858
1859 #define SAUXCPASS_OPERATION 0
1860 #define SAUXCPASS_USER 1
1861 #define SAUXCPASS_PASS 2
1862
1863 #define SAUXCPASS_MAXARGS 3
1864 #define SAUXCPASS_OPTIONAL SAUXCPASS_MAXARGS
1865
1866 static kv_pair_t sauxcpass_args[] = {
1867 { "-operation", SAUXCPASS_OPERATION },
1868 { "-user", SAUXCPASS_USER },
1869 { "-pass", SAUXCPASS_PASS },
1870
1871 { NULL, 0 }
1872 };
1873
1874 static int
1875 server_aux_cpass (ClientData data,
1876 Tcl_Interp *interp,
1877 int objc,
1878 Tcl_Obj *CONST objv[]) {
1879 int ulen,
1880 plen,
1881 result;
1882 CONST char *uptr,
1883 *pptr;
1884 sasl_data_t *sd = (sasl_data_t *) data;
1885 Tcl_Obj *args[SAUXCPASS_MAXARGS];
1886
1887 if (objc == 3)
1888 return t2c_usage (interp, objv[0], sauxcpass_args, SAUXCPASS_OPTIONAL,
1889 "checkpass", NULL);
1890
1891 memset (args, 0, sizeof *args * SAUXCPASS_MAXARGS);
1892 if ((result = crack_args (interp, objc, objv, sauxcpass_args,
1893 SAUXCPASS_OPTIONAL, args)) != TCL_OK)
1894 return result;
1895 uptr = Tcl_GetByteArrayFromObj (args[SAUXCPASS_USER], &ulen);
1896 pptr = Tcl_GetByteArrayFromObj (args[SAUXCPASS_PASS], &plen);
1897
1898 return c2t_result (interp, "sasl_checkpass",
1899 sasl_checkpass (sd -> sd_conn, uptr, ulen, pptr, plen));
1900 };
1901
1902
1903 #define SAUXCUSER_OPERATION 0
1904 #define SAUXCUSER_SERVER 1
1905 #define SAUXCUSER_USER 2
1906 #define SAUXCUSER_REALM 3
1907
1908 #define SAUXCUSER_MAXARGS 4
1909 #define SAUXCUSER_OPTIONAL SAUXCUSER_REALM
1910
1911 static kv_pair_t sauxcuser_args[] = {
1912 { "-operation", SAUXCUSER_OPERATION },
1913 { "-server", SAUXCUSER_SERVER },
1914 { "-user", SAUXCUSER_USER },
1915 { "-realm", SAUXCUSER_REALM },
1916
1917 { NULL, 0 }
1918 };
1919
1920 static int
1921 server_aux_cuser (ClientData data,
1922 Tcl_Interp *interp,
1923 int objc,
1924 Tcl_Obj *CONST objv[]) {
1925 int result;
1926 sasl_data_t *sd = (sasl_data_t *) data;
1927 Tcl_Obj *args[SAUXCUSER_MAXARGS];
1928
1929 if (objc == 3)
1930 return t2c_usage (interp, objv[0], sauxcuser_args, SAUXCUSER_OPTIONAL,
1931 "userexists", NULL);
1932
1933 memset (args, 0, sizeof *args * SAUXCUSER_MAXARGS);
1934 if ((result = crack_args (interp, objc, objv, sauxcuser_args,
1935 SAUXCUSER_OPTIONAL, args)) != TCL_OK)
1936 return result;
1937
1938
1939 return
1940 c2t_result (interp, "sasl_user_exists",
1941 sasl_user_exists (sd -> sd_conn,
1942 Tcl_GetString (args[SAUXCUSER_SERVER]),
1943 Tcl_Obj2String (args[SAUXCUSER_REALM]),
1944 Tcl_GetString (args[SAUXCUSER_USER])));
1945 }
1946
1947
1948 #define SAUXSPASS_OPERATION 0
1949 #define SAUXSPASS_USER 1
1950 #define SAUXSPASS_NEWPASS 2
1951 #define SAUXSPASS_OLDPASS 3
1952 #define SETPASS_FLAGS 4
1953
1954 #define SAUXSPASS_MAXARGS 5
1955 #define SAUXSPASS_OPTIONAL SAUXSPASS_NEWPASS
1956
1957 static kv_pair_t sauxspass_args[] = {
1958 { "-operation", SAUXSPASS_OPERATION },
1959 { "-user", SAUXSPASS_USER },
1960 { "-newpass", SAUXSPASS_NEWPASS },
1961 { "-oldpass", SAUXSPASS_OLDPASS },
1962 { "-flags", SETPASS_FLAGS },
1963
1964 { NULL, 0 }
1965 };
1966
1967 static int
1968 server_aux_spass (ClientData data,
1969 Tcl_Interp *interp,
1970 int objc,
1971 Tcl_Obj *CONST objv[]) {
1972 int nlen,
1973 olen,
1974 result;
1975 unsigned flags;
1976 CONST char *nptr,
1977 *optr;
1978 sasl_data_t *sd = (sasl_data_t *) data;
1979 Tcl_Obj *args[SAUXSPASS_MAXARGS];
1980
1981 if (objc == 3)
1982 return t2c_usage (interp, objv[0], sauxspass_args, SAUXSPASS_OPTIONAL,
1983 "setpass", setpass_flags);
1984
1985 memset (args, 0, sizeof *args * SAUXSPASS_MAXARGS);
1986 if ((result = crack_args (interp, objc, objv, sauxspass_args,
1987 SAUXSPASS_OPTIONAL, args)) != TCL_OK)
1988 return result;
1989 if (args[SAUXSPASS_NEWPASS] != NULL)
1990 nptr = Tcl_GetByteArrayFromObj (args[SAUXSPASS_NEWPASS], &nlen);
1991 else
1992 nptr = NULL, nlen = 0;
1993 if (args[SAUXSPASS_OLDPASS] != NULL)
1994 optr = Tcl_GetByteArrayFromObj (args[SAUXSPASS_NEWPASS], &olen);
1995 else
1996 optr = NULL, olen = 0;
1997 if ((result = t2c_flags (interp, args[SETPASS_FLAGS], setpass_flags,
1998 &flags)) != TCL_OK)
1999 return result;
2000
2001 return c2t_result (interp, "sasl_setpass",
2002 sasl_setpass (sd -> sd_conn,
2003 Tcl_GetString (args[SAUXSPASS_USER]),
2004 nptr, nlen, optr, olen, flags));
2005 };
2006
2007
2008 #define SPROPREQ_OPERATION 0
2009 #define SPROPREQ_PROPERTIES 1
2010
2011 #define SPROPREQ_MAXARGS 2
2012 #define SPROPREQ_OPTIONAL SPROPREQ_PROPERTIES
2013
2014 static kv_pair_t spropreq_args[] = {
2015 { "-operation", SPROPREQ_OPERATION },
2016 { "-properties", SPROPREQ_PROPERTIES },
2017
2018 { NULL, 0 }
2019 };
2020
2021 static int
2022 server_aux_propreq (ClientData data,
2023 Tcl_Interp *interp,
2024 int objc,
2025 Tcl_Obj *CONST objv[]) {
2026 int i,
2027 nelem,
2028 result;
2029 char **ap,
2030 *mp;
2031 sasl_data_t *sd = (sasl_data_t *) data;
2032 Tcl_Obj *objPtr,
2033 *args[SPROPREQ_MAXARGS];
2034
2035 if (objc == 3)
2036 return t2c_usage (interp, objv[0], spropreq_args, SPROPREQ_OPTIONAL,
2037 "userexists", NULL);
2038
2039 memset (args, 0, sizeof *args * SPROPREQ_MAXARGS);
2040 if ((result = crack_args (interp, objc, objv, spropreq_args,
2041 SPROPREQ_OPTIONAL, args)) != TCL_OK)
2042 return result;
2043
2044 if (!(objPtr = args[SPROPREQ_PROPERTIES]))
2045 return c2t_result (interp, "sasl_auxprop_request",
2046 sasl_auxprop_request (sd -> sd_conn, NULL));
2047
2048 if ((result = Tcl_ListObjLength (interp, objPtr, &nelem)) != TCL_OK)
2049 return result;
2050
2051 mp = Tcl_Alloc ((nelem + 1) * sizeof *ap);
2052
2053 ap = (char **) mp;
2054 for (i = 0; i < nelem; i++) {
2055 Tcl_Obj *elemPtr;
2056
2057 if ((result = Tcl_ListObjIndex (interp, objPtr, i, &elemPtr))
2058 != TCL_OK)
2059 goto out;
2060 *ap++ = Tcl_GetString (elemPtr);
2061 }
2062 *ap = NULL;
2063
2064 result = c2t_result (interp, "sasl_auxprop_request",
2065 sasl_auxprop_request (sd -> sd_conn,
2066 (const char **) mp));
2067
2068 out: ;
2069 Tcl_Free (mp);
2070
2071 return result;
2072 }
2073
2074
2075
2076 #define SPROPGET_OPERATION 0
2077
2078 #define SPROPGET_MAXARGS 1
2079 #define SPROPGET_OPTIONAL SPROPGET_MAXARGS
2080
2081 static kv_pair_t spropget_args[] = {
2082 { "-operation", SPROPGET_OPERATION },
2083
2084 { NULL, 0 }
2085 };
2086
2087 static int
2088 server_aux_propget (ClientData data,
2089 Tcl_Interp *interp,
2090 int objc,
2091 Tcl_Obj *CONST objv[]) {
2092 int result;
2093 sasl_data_t *sd = (sasl_data_t *) data;
2094 propctx_t *pc;
2095 Tcl_Obj *args[SPROPGET_MAXARGS];
2096
2097 memset (args, 0, sizeof *args * SPROPGET_MAXARGS);
2098 if ((result = crack_args (interp, objc, objv, spropget_args,
2099 SPROPGET_OPTIONAL, args)) != TCL_OK)
2100 return result;
2101
2102 if ((pc = sasl_auxprop_getctx (sd -> sd_conn)) != NULL)
2103 Tcl_SetObjResult (interp, c2t_propctx (pc));
2104 else
2105 Tcl_ResetResult (interp);
2106 return TCL_OK;
2107 }
2108
2109
2110 #define SERVERNEW_SERVICE 0
2111 #define SERVERNEW_SERVERFQDN 1
2112 #define SERVERNEW_IPLOCALPORT 2
2113 #define SERVERNEW_IPREMOTEPORT 3
2114 #define SERVERNEW_CALLBACKS 4
2115 #define SERVERNEW_FLAGS 5
2116 #define SERVERNEW_REALM 6
2117
2118 #define SERVERNEW_MAXARGS 7
2119 #define SERVERNEW_OPTIONAL SERVERNEW_SERVERFQDN
2120
2121 static kv_pair_t servernew_args[] = {
2122 { "-service", SERVERNEW_SERVICE },
2123 { "-serverFQDN", SERVERNEW_SERVERFQDN },
2124 { "-realm", SERVERNEW_REALM },
2125 { "-iplocalport", SERVERNEW_IPLOCALPORT },
2126 { "-ipremoteport", SERVERNEW_IPREMOTEPORT },
2127 { "-callbacks", SERVERNEW_CALLBACKS },
2128 { "-flags", SERVERNEW_FLAGS },
2129
2130 { NULL, 0 }
2131 };
2132
2133 static kv_pair_t servernew_flags[] = {
2134 { "success_data", SASL_SUCCESS_DATA },
2135
2136 { NULL, 0 }
2137 };
2138
2139 static oc_pair_t server_aux_pairs[] = {
2140 { "auxprop_request", server_aux_propreq },
2141 { "auxprop_getctx", server_aux_propget },
2142 { "checkpass", server_aux_cpass },
2143 { "decode", sasl_aux_decode },
2144 { "encode", sasl_aux_encode },
2145 { "errdetail", sasl_aux_errdetail },
2146 { "getprop", sasl_aux_getprop },
2147 { "info", sasl_aux_info },
2148 { "list", server_aux_list },
2149 { "setpass", server_aux_spass },
2150 { "setprop", sasl_aux_setprop },
2151 { "start", server_aux_start },
2152 { "step", server_aux_step },
2153 { "userexists", server_aux_cuser },
2154
2155 { NULL, 0 }
2156 };
2157
2158 /* ARGSUSED */
2159
2160 static int
2161 server_new (ClientData unused,
2162 Tcl_Interp *interp,
2163 int objc,
2164 Tcl_Obj *CONST objv[]) {
2165 int result;
2166 unsigned flags;
2167 char buffer[BUFSIZ],
2168 *cp;
2169 sasl_data_t *sd;
2170 Tcl_HashEntry *entryPtr;
2171 Tcl_Obj *args[SERVERNEW_MAXARGS];
2172 static int nproc = 0;
2173
2174 if (objc == 1)
2175 return t2c_usage (interp, objv[0], servernew_args, SERVERNEW_OPTIONAL,
2176 NULL, servernew_flags);
2177
2178 memset (args, 0, sizeof *args * SERVERNEW_MAXARGS);
2179 if ((result = crack_args (interp, objc, objv, servernew_args,
2180 SERVERNEW_OPTIONAL, args) != TCL_OK))
2181 return result;
2182 if ((result = t2c_flags (interp, args[SERVERNEW_FLAGS], servernew_flags,
2183 &flags)) != TCL_OK)
2184 return result;
2185
2186 cp = Tcl_Alloc (sizeof *sd);
2187 memset (cp, 0, sizeof *sd);
2188 sd = (sasl_data_t *) cp;
2189 sd -> sd_dispatch = server_aux_pairs;
2190
2191 if ((args[SERVERNEW_CALLBACKS] != NULL)
2192 && (!(sd -> sd_cb =
2193 t2c_sasl_callback (interp, args[SERVERNEW_CALLBACKS]))))
2194 goto out;
2195
2196 if ((result =
2197 sasl_server_new (Tcl_GetString (args[SERVERNEW_SERVICE]),
2198 Tcl_Obj2String (args[SERVERNEW_SERVERFQDN]),
2199 Tcl_Obj2String (args[SERVERNEW_REALM]),
2200 Tcl_Obj2String (args[SERVERNEW_IPLOCALPORT]),
2201 Tcl_Obj2String (args[SERVERNEW_IPREMOTEPORT]),
2202 sd -> sd_cb, flags,
2203 &sd -> sd_conn) != SASL_OK)) {
2204 c2t_result (interp, "sasl_server_new", result);
2205 goto out;
2206 }
2207
2208 sprintf (buffer, "::sasl::server_new_%d", nproc++);
2209 sd -> sd_token = Tcl_CreateObjCommand (sd -> sd_interp = interp, buffer,
2210 sasl_aux_proc, (ClientData) sd,
2211 sasl_aux_free);
2212
2213 entryPtr = Tcl_CreateHashEntry (&connTable, (char *) sd -> sd_conn,
2214 &result);
2215 Tcl_SetHashValue (entryPtr, (ClientData) sd);
2216
2217 Tcl_SetResult (interp, buffer, TCL_VOLATILE);
2218 return TCL_OK;
2219
2220 out: ;
2221 sasl_aux_free ((ClientData) sd);
2222
2223 return TCL_ERROR;
2224 }
2225
2226
2227 /* client routines */
2228
2229 #define CLIENTINIT_CALLBACKS 0
2230
2231 #define CLIENTINIT_MAXARGS 1
2232 #define CLIENTINIT_OPTIONAL CLIENTINIT_MAXARGS
2233
2234 static kv_pair_t clientinit_args[] = {
2235 { "-callbacks", CLIENTINIT_CALLBACKS },
2236
2237 { NULL, 0 }
2238 };
2239
2240 /* ARGSUSED */
2241
2242 static int
2243 client_init (ClientData unused,
2244 Tcl_Interp *interp,
2245 int objc,
2246 Tcl_Obj *CONST objv[]) {
2247 int result;
2248 sasl_callback_t *cb;
2249 Tcl_Obj *args[CLIENTINIT_MAXARGS];
2250
2251 if (objc == 1)
2252 return t2c_usage (interp, objv[0], clientinit_args,
2253 CLIENTINIT_OPTIONAL, NULL, NULL);
2254
2255 memset (args, 0, sizeof *args * CLIENTINIT_MAXARGS);
2256 if ((result = crack_args (interp, objc, objv, clientinit_args,
2257 CLIENTINIT_OPTIONAL, args) != TCL_OK))
2258 return result;
2259
2260 if (!(cb = t2c_sasl_callback (interp, args[CLIENTINIT_CALLBACKS])))
2261 return TCL_ERROR;
2262
2263 if ((result = sasl_client_init (cb)) != SASL_OK) {
2264 Tcl_HashEntry *entryPtr;
2265
2266 if ((entryPtr = Tcl_FindHashEntry (&allocTable, (char *) cb)) != NULL)
2267 Tcl_DeleteHashEntry (entryPtr);
2268 free ((char *) cb);
2269 }
2270
2271 return c2t_result (interp, "sasl_client_init", result);
2272
2273 }
2274
2275
2276 static int
2277 client_aux_interact (Tcl_Interp *interp,
2278 Tcl_Obj *cmdPtr,
2279 sasl_interact_t *interact) {
2280 int result;
2281 kv_pair_t *p;
2282 sasl_interact_t *ip;
2283 Tcl_Obj *argPtr,
2284 *evalPtr;
2285
2286 if (!interact)
2287 return TCL_OK;
2288
2289 for (ip = interact; ip -> id != SASL_CB_LIST_END; ip++) {
2290 ip -> result = NULL, ip -> len = 0;
2291
2292 if (!cmdPtr)
2293 return TCL_OK;
2294
2295 for (p = cb_pairs; p -> p_key; p++)
2296 if (p -> p_value == ip -> id)
2297 break;
2298 if (!p -> p_key)
2299 continue;
2300
2301 argPtr = Tcl_NewObj ();
2302
2303 Tcl_ListObjAppendElement (interp, argPtr,
2304 Tcl_NewStringObj ("id", -1));
2305 Tcl_ListObjAppendElement (interp, argPtr,
2306 Tcl_NewStringObj (p -> p_key, -1));
2307
2308 if (ip -> challenge) {
2309 Tcl_ListObjAppendElement (interp, argPtr,
2310 Tcl_NewStringObj ("challenge", -1));
2311 Tcl_ListObjAppendElement (interp, argPtr,
2312 Tcl_NewStringObj (ip -> challenge, -1));
2313 }
2314
2315 if (ip -> prompt) {
2316 Tcl_ListObjAppendElement (interp, argPtr,
2317 Tcl_NewStringObj ("prompt", -1));
2318 Tcl_ListObjAppendElement (interp, argPtr,
2319 Tcl_NewStringObj (ip -> prompt, -1));
2320 }
2321
2322 if (ip -> defresult) {
2323 Tcl_ListObjAppendElement (interp, argPtr,
2324 Tcl_NewStringObj ("default", -1));
2325 Tcl_ListObjAppendElement (interp, argPtr,
2326 Tcl_NewStringObj (ip -> defresult, -1));
2327 }
2328
2329 evalPtr = Tcl_DuplicateObj (cmdPtr);
2330 if ((result = Tcl_ListObjAppendElement (interp, evalPtr, argPtr))
2331 != TCL_OK)
2332 return result;
2333 if ((result = Tcl_EvalObjEx (interp, evalPtr, TCL_EVAL_DIRECT))
2334 == TCL_OK)
2335 ip -> result = allocate (interp, &ip -> len);
2336 }
2337
2338 return TCL_OK;
2339 }
2340
2341
2342 static void
2343 client_aux_interact_free () {
2344 Tcl_HashEntry *entryPtr;
2345 Tcl_HashSearch hs,
2346 *searchPtr = &hs;
2347
2348 for (entryPtr = Tcl_FirstHashEntry (&allocTable, searchPtr);
2349 entryPtr != NULL;
2350 entryPtr = Tcl_NextHashEntry (searchPtr)) {
2351 int refcnt = (int) Tcl_GetHashValue (entryPtr);
2352
2353 if (refcnt > 0)
2354 continue;
2355
2356 Tcl_Free (Tcl_GetHashKey (&allocTable, entryPtr));
2357 Tcl_DeleteHashEntry (entryPtr);
2358 }
2359 }
2360
2361
2362 #define CAUXSTART_OPERATION 0
2363 #define CAUXSTART_MECHANISMS 1
2364 #define CAUXSTART_INTERACT 2
2365
2366 #define CAUXSTART_MAXARGS 3
2367 #define CAUXSTART_OPTIONAL CAUXSTART_INTERACT
2368
2369 static kv_pair_t cauxstart_args[] = {
2370 { "-operation", CAUXSTART_OPERATION },
2371 { "-mechanisms", CAUXSTART_MECHANISMS },
2372 { "-interact", CAUXSTART_INTERACT },
2373
2374 { NULL, 0 }
2375 };
2376
2377 static int
2378 client_aux_start (ClientData data,
2379 Tcl_Interp *interp,
2380 int objc,
2381 Tcl_Obj *CONST objv[]) {
2382 int olen,
2383 result;
2384 CONST char *mechused,
2385 *optr;
2386 sasl_data_t *sd = (sasl_data_t *) data;
2387 sasl_interact_t *interact,
2388 **ip;
2389 Tcl_Obj *args[CAUXSTART_MAXARGS],
2390 *resultPtr;
2391
2392 if (objc == 3)
2393 return t2c_usage (interp, objv[0], cauxstart_args, CAUXSTART_OPTIONAL,
2394 "start", NULL);
2395
2396 memset (args, 0, sizeof *args * CAUXSTART_MAXARGS);
2397 if ((result = crack_args (interp, objc, objv, cauxstart_args,
2398 CAUXSTART_OPTIONAL, args)) != TCL_OK)
2399 return result;
2400
2401 interact = NULL;
2402 if (args[CAUXSTART_INTERACT] != NULL)
2403 ip = &interact;
2404 else
2405 ip = NULL;
2406 while ((result =
2407 sasl_client_start (sd -> sd_conn,
2408 Tcl_GetString (args[CAUXSTART_MECHANISMS]),
2409 ip, &optr, &olen, &mechused))
2410 == SASL_INTERACT)
2411 if ((result = client_aux_interact (interp, args[CAUXSTART_INTERACT],
2412 interact))
2413 != TCL_OK)
2414 return result;
2415
2416 switch (result) {
2417 case SASL_OK:
2418 client_aux_interact_free ();
2419 /* and fall... */
2420
2421 case SASL_CONTINUE:
2422 resultPtr = Tcl_NewObj ();
2423
2424 Tcl_ListObjAppendElement (interp, resultPtr,
2425 Tcl_NewStringObj ("mechanism", -1));
2426 Tcl_ListObjAppendElement (interp, resultPtr,
2427 Tcl_NewStringObj (mechused, -1));
2428
2429 Tcl_ListObjAppendElement (interp, resultPtr,
2430 Tcl_NewStringObj ("output", -1));
2431 Tcl_ListObjAppendElement (interp, resultPtr,
2432 Tcl_NewByteArrayObj ((unsigned char *) optr,
2433 olen));
2434
2435 Tcl_SetObjResult (interp, resultPtr);
2436 return ((result == SASL_OK) ? TCL_OK : TCL_CONTINUE);
2437
2438 default:
2439 client_aux_interact_free ();
2440 return c2t_result (interp, "sasl_client_start", result);
2441 }
2442 }
2443
2444
2445 #define CAUXSTEP_OPERATION 0
2446 #define CAUXSTEP_INPUT 1
2447 #define CAUXSTEP_INTERACT 2
2448
2449 #define CAUXSTEP_MAXARGS 3
2450 #define CAUXSTEP_OPTIONAL CAUXSTEP_INTERACT
2451
2452 static kv_pair_t cauxstep_args[] = {
2453 { "-operation", CAUXSTEP_OPERATION },
2454 { "-input", CAUXSTEP_INPUT },
2455 { "-interact", CAUXSTEP_INTERACT },
2456
2457 { NULL, 0 }
2458 };
2459
2460 static int
2461 client_aux_step (ClientData data,
2462 Tcl_Interp *interp,
2463 int objc,
2464 Tcl_Obj *CONST objv[]) {
2465 int ilen,
2466 olen,
2467 result;
2468 CONST char *iptr,
2469 *optr;
2470 sasl_data_t *sd = (sasl_data_t *) data;
2471 sasl_interact_t *interact,
2472 **ip;
2473 Tcl_Obj *args[CAUXSTEP_MAXARGS];
2474
2475 if (objc == 3)
2476 return t2c_usage (interp, objv[0], cauxstep_args, CAUXSTEP_OPTIONAL,
2477 "step", NULL);
2478
2479 memset (args, 0, sizeof *args * CAUXSTEP_MAXARGS);
2480 if ((result = crack_args (interp, objc, objv, cauxstep_args,
2481 CAUXSTEP_OPTIONAL, args)) != TCL_OK)
2482 return result;
2483 iptr = Tcl_GetByteArrayFromObj (args[CAUXSTEP_INPUT], &ilen);
2484
2485 interact = NULL;
2486 if (args[CAUXSTEP_INTERACT] != NULL)
2487 ip = &interact;
2488 else
2489 ip = NULL;
2490 while ((result = sasl_client_step (sd -> sd_conn, iptr, ilen, ip, &optr,
2491 &olen)) == SASL_INTERACT)
2492 if ((result = client_aux_interact (interp, args[CAUXSTEP_INTERACT],
2493 interact))
2494 != TCL_OK)
2495 return result;
2496
2497 switch (result) {
2498 case SASL_OK:
2499 client_aux_interact_free ();
2500 /* and fall... */
2501
2502 case SASL_CONTINUE:
2503 Tcl_SetObjResult (interp,
2504 Tcl_NewByteArrayObj ((unsigned char *) optr,
2505 olen));
2506 return ((result == SASL_OK) ? TCL_OK : TCL_CONTINUE);
2507
2508 default:
2509 client_aux_interact_free ();
2510 return c2t_result (interp, "sasl_client_step", result);
2511 }
2512 };
2513
2514
2515 #define CLIENTNEW_SERVICE 0
2516 #define CLIENTNEW_SERVERFQDN 1
2517 #define CLIENTNEW_IPLOCALPORT 2
2518 #define CLIENTNEW_IPREMOTEPORT 3
2519 #define CLIENTNEW_CALLBACKS 4
2520 #define CLIENTNEW_FLAGS 5
2521
2522 #define CLIENTNEW_MAXARGS 6
2523 #define CLIENTNEW_OPTIONAL CLIENTNEW_IPLOCALPORT
2524
2525 static kv_pair_t clientnew_args[] = {
2526 { "-service", CLIENTNEW_SERVICE },
2527 { "-serverFQDN", CLIENTNEW_SERVERFQDN },
2528 { "-iplocalport", CLIENTNEW_IPLOCALPORT },
2529 { "-ipremoteport", CLIENTNEW_IPREMOTEPORT },
2530 { "-callbacks", CLIENTNEW_CALLBACKS },
2531 { "-flags", CLIENTNEW_FLAGS },
2532
2533 { NULL, 0 }
2534 };
2535
2536 #define clientnew_flags servernew_flags
2537
2538 static oc_pair_t client_aux_pairs[] = {
2539 { "decode", sasl_aux_decode },
2540 { "encode", sasl_aux_encode },
2541 { "errdetail", sasl_aux_errdetail },
2542 { "getprop", sasl_aux_getprop },
2543 { "info", sasl_aux_info },
2544 { "setprop", sasl_aux_setprop },
2545 { "start", client_aux_start },
2546 { "step", client_aux_step },
2547
2548 { NULL, 0 }
2549 };
2550
2551
2552 /* ARGSUSED */
2553
2554 static int
2555 client_new (ClientData unused,
2556 Tcl_Interp *interp,
2557 int objc,
2558 Tcl_Obj *CONST objv[]) {
2559 int result;
2560 unsigned flags;
2561 char buffer[BUFSIZ],
2562 *cp;
2563 sasl_data_t *sd;
2564 Tcl_HashEntry *entryPtr;
2565 Tcl_Obj *args[CLIENTNEW_MAXARGS];
2566 static int nproc = 0;
2567
2568 if (objc == 1)
2569 return t2c_usage (interp, objv[0], clientnew_args, CLIENTNEW_OPTIONAL,
2570 NULL, clientnew_flags);
2571
2572 memset (args, 0, sizeof *args * CLIENTNEW_MAXARGS);
2573 if ((result = crack_args (interp, objc, objv, clientnew_args,
2574 CLIENTNEW_OPTIONAL, args) != TCL_OK))
2575 return result;
2576 if ((result = t2c_flags (interp, args[CLIENTNEW_FLAGS], clientnew_flags,
2577 &flags)) != TCL_OK)
2578 return result;
2579
2580 cp = Tcl_Alloc (sizeof *sd);
2581 memset (cp, 0, sizeof *sd);
2582 sd = (sasl_data_t *) cp;
2583 sd -> sd_dispatch = client_aux_pairs;
2584
2585 if ((args[CLIENTNEW_CALLBACKS] != NULL)
2586 && (!(sd -> sd_cb =
2587 t2c_sasl_callback (interp, args[CLIENTNEW_CALLBACKS]))))
2588 goto out;
2589
2590 if ((result =
2591 sasl_client_new (Tcl_GetString (args[CLIENTNEW_SERVICE]),
2592 Tcl_GetString (args[CLIENTNEW_SERVERFQDN]),
2593 Tcl_Obj2String (args[CLIENTNEW_IPLOCALPORT]),
2594 Tcl_Obj2String (args[CLIENTNEW_IPREMOTEPORT]),
2595 sd -> sd_cb, flags,
2596 &sd -> sd_conn) != SASL_OK)) {
2597 c2t_result (interp, "sasl_client_new", result);
2598 goto out;
2599 }
2600
2601 sprintf (buffer, "::sasl::client_new_%d", nproc++);
2602 sd -> sd_token = Tcl_CreateObjCommand (sd -> sd_interp = interp, buffer,
2603 sasl_aux_proc, (ClientData) sd,
2604 sasl_aux_free);
2605
2606 entryPtr = Tcl_CreateHashEntry (&connTable, (char *) sd -> sd_conn,
2607 &result);
2608 Tcl_SetHashValue (entryPtr, (ClientData) sd);
2609
2610 Tcl_SetResult (interp, buffer, TCL_VOLATILE);
2611 return TCL_OK;
2612
2613 out: ;
2614 sasl_aux_free ((ClientData) sd);
2615
2616 return TCL_ERROR;
2617 }
2618
2619
2620 /* the {de,en}code64 commands */
2621
2622 static int
2623 proc_codec64 (Tcl_Interp *interp,
2624 char *codep,
2625 int (*codec) (),
2626 int type,
2627 Tcl_Obj *string) {
2628 int result;
2629 unsigned ilen,
2630 olen,
2631 omax;
2632 CONST char *iptr;
2633 char *optr;
2634
2635 iptr = Tcl_GetByteArrayFromObj (string, &ilen);
2636
2637 omax = (type == 'e') ? ((ilen + 2) * 4) / 3 : ilen;
2638 optr = Tcl_Alloc (++omax);
2639
2640 if ((result = (*codec) (iptr, ilen, optr, omax, &olen)) != SASL_OK)
2641 result = c2t_result (interp, codep, result);
2642 else {
2643 result = TCL_OK;
2644 Tcl_SetObjResult (interp, Tcl_NewByteArrayObj (optr, olen));
2645 }
2646
2647 Tcl_Free (optr);
2648
2649 return TCL_OK;
2650 }
2651
2652
2653 /* ARGSUSED */
2654
2655 static int
2656 proc_decode64 (ClientData unused,
2657 Tcl_Interp *interp,
2658 int objc,
2659 Tcl_Obj *CONST objv[]) {
2660 if (objc != 2) {
2661 Tcl_ResetResult (interp);
2662 Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objv[0]),
2663 " string", NULL);
2664 return TCL_ERROR;
2665 }
2666
2667 return proc_codec64 (interp, "sasl_decode64", sasl_decode64, 'd', objv[1]);
2668 }
2669
2670
2671 /* ARGSUSED */
2672
2673 static int
2674 proc_encode64 (ClientData unused,
2675 Tcl_Interp *interp,
2676 int objc,
2677 Tcl_Obj *CONST objv[]) {
2678 if (objc != 2) {
2679 Tcl_ResetResult (interp);
2680 Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objv[0]),
2681 " string", NULL);
2682 return TCL_ERROR;
2683 }
2684
2685 return proc_codec64 (interp, "sasl_encode64", sasl_encode64, 'e', objv[1]);
2686 }
2687
2688
2689 /* the "errstring" command */
2690
2691 #define ERRSTRING_CODE 0
2692 #define ERRSTRING_LANGUAGES 1
2693
2694 #define ERRSTRING_MAXARGS 2
2695 #define ERRSTRING_OPTIONAL ERRSTRING_LANGUAGES
2696
2697 static kv_pair_t errstring_args[] = {
2698 { "-code", ERRSTRING_CODE },
2699 { "-languages", ERRSTRING_LANGUAGES },
2700
2701 { NULL, 0 }
2702 };
2703
2704 /* ARGSUSED */
2705
2706 static int
2707 proc_errstring (ClientData unused,
2708 Tcl_Interp *interp,
2709 int objc,
2710 Tcl_Obj *CONST objv[]) {
2711 int intValue,
2712 result;
2713 char *langPtr;
2714 Tcl_Obj *resultPtr,
2715 *args[ERRSTRING_MAXARGS];
2716
2717 if (objc == 1)
2718 return t2c_usage (interp, objv[0], errstring_args,
2719 ERRSTRING_OPTIONAL, NULL, NULL);
2720
2721 memset (args, 0, sizeof *args * ERRSTRING_MAXARGS);
2722 if ((result = crack_args (interp, objc, objv, errstring_args,
2723 ERRSTRING_OPTIONAL, args) != TCL_OK))
2724 return result;
2725
2726 if ((result = Tcl_GetIntFromObj (interp, args[ERRSTRING_CODE], &intValue))
2727 != TCL_OK)
2728 return result;
2729
2730
2731 resultPtr = Tcl_NewObj ();
2732
2733 Tcl_ListObjAppendElement (interp, resultPtr,
2734 Tcl_NewStringObj ("diagnostic", -1));
2735 Tcl_ListObjAppendElement (interp, resultPtr, Tcl_NewStringObj (
2736 sasl_errstring (intValue, Tcl_Obj2String (args[ERRSTRING_LANGUAGES]),
2737 (const char **) &langPtr), -1));
2738
2739 if (langPtr) {
2740 Tcl_ListObjAppendElement (interp, resultPtr,
2741 Tcl_NewStringObj ("language", -1));
2742 Tcl_ListObjAppendElement (interp, resultPtr,
2743 Tcl_NewStringObj (langPtr, -1));
2744 }
2745
2746 Tcl_SetObjResult (interp, resultPtr);
2747 return TCL_OK;
2748 }
2749
2750
2751 /* the "mechanisms" command */
2752
2753 /* ARGSUSED */
2754
2755 static int
2756 proc_mechanisms (ClientData unused,
2757 Tcl_Interp *interp,
2758 int objc,
2759 Tcl_Obj *CONST objv[]) {
2760 char **mp;
2761 Tcl_Obj *resultPtr;
2762
2763 Tcl_ResetResult (interp);
2764
2765 if (objc != 1) {
2766 Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objv[0]), NULL);
2767 return TCL_ERROR;
2768 }
2769
2770 if (!(mp = (char **) sasl_global_listmech ()))
2771 return TCL_OK;
2772
2773 resultPtr = Tcl_NewObj ();
2774
2775 for (; *mp; mp++)
2776 Tcl_ListObjAppendElement (interp, resultPtr,
2777 Tcl_NewStringObj (*mp, -1));
2778
2779 Tcl_SetObjResult (interp, resultPtr);
2780 return TCL_OK;
2781 }
2782
2783
2784 /* the "info" command */
2785
2786
2787 #define INFO_CALLBACKS 0
2788 #define INFO_CANONFLAGS 1
2789 #define INFO_CNEWFLAGS 2
2790 #define INFO_GETPROPS 3
2791 #define INFO_SECFLAGS 4
2792 #define INFO_SECPROPS 5
2793 #define INFO_SNEWFLAGS 6
2794 #define INFO_SPASSFLAGS 7
2795 #define INFO_SETPROPS 8
2796 #define INFO_VRFYTYPES 9
2797
2798 static kv_pair_t info_pairs[] = {
2799 { "callbacks", INFO_CALLBACKS },
2800 { "canon_flags", INFO_CANONFLAGS },
2801 { "clientnew_flags", INFO_CNEWFLAGS },
2802 { "getprops", INFO_GETPROPS },
2803 { "sec_flags", INFO_SECFLAGS },
2804 { "sec_props", INFO_SECPROPS },
2805 { "servernew_flags", INFO_SNEWFLAGS },
2806 { "setpass_flags", INFO_SPASSFLAGS },
2807 { "setprops", INFO_SETPROPS },
2808 { "verify_types", INFO_VRFYTYPES },
2809
2810 { NULL, 0 }
2811 };
2812
2813
2814 /* ARGSUSED */
2815
2816 static int
2817 proc_info (ClientData unused,
2818 Tcl_Interp *interp,
2819 int objc,
2820 Tcl_Obj *CONST objv[]) {
2821 int result;
2822 kv_pair_t *p;
2823 Tcl_Obj *resultPtr;
2824
2825 if (objc == 1)
2826 p = info_pairs;
2827 else if (objc != 2) {
2828 Tcl_ResetResult (interp);
2829 Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objv[0]),
2830 " option", NULL);
2831 return TCL_ERROR;
2832 } else {
2833 int offset;
2834 if ((result = tcl_GetIndexFromObjStruct (interp, objv[1],
2835 (char **) info_pairs,
2836 sizeof *info_pairs,
2837 "option", 0, &offset))
2838 != TCL_OK)
2839 return result;
2840
2841 switch (offset) {
2842 case INFO_CALLBACKS:
2843 p = cb_pairs;
2844 break;
2845
2846 case INFO_CANONFLAGS:
2847 p = canon_flags;
2848 break;
2849
2850 case INFO_CNEWFLAGS:
2851 p = clientnew_flags;
2852 break;
2853
2854 case INFO_GETPROPS:
2855 p = getprop_pairs;
2856 break;
2857
2858 case INFO_SECFLAGS:
2859 p = secprops_flags;
2860 break;
2861
2862 case INFO_SECPROPS:
2863 p = secprops_pairs;
2864 break;
2865
2866 case INFO_SNEWFLAGS:
2867 p = servernew_flags;
2868 break;
2869
2870 case INFO_SPASSFLAGS:
2871 p = setpass_flags;
2872 break;
2873
2874 case INFO_SETPROPS:
2875 p = setprop_pairs;
2876 break;
2877
2878 case INFO_VRFYTYPES:
2879 p = vf_pairs;
2880 break;
2881
2882 default:
2883 Tcl_SetResult (interp, "internal error, missing known case",
2884 TCL_STATIC);
2885 return TCL_ERROR;
2886 }
2887 }
2888
2889 resultPtr = Tcl_NewObj ();
2890 for (; p -> p_key; p++)
2891 Tcl_ListObjAppendElement (interp, resultPtr,
2892 Tcl_NewStringObj (p -> p_key, -1));
2893
2894 Tcl_SetObjResult (interp, resultPtr);
2895 return TCL_OK;
2896 }
2897
2898
2899 /* the "done" command */
2900
2901 /* ARGSUSED */
2902
2903 static int
2904 proc_done (ClientData unused,
2905 Tcl_Interp *interp,
2906 int objc,
2907 Tcl_Obj *CONST objv[]) {
2908 Tcl_HashEntry *entryPtr;
2909 Tcl_HashSearch hs,
2910 *searchPtr = &hs;
2911
2912 if (objc != 1) {
2913 Tcl_ResetResult (interp);
2914 Tcl_AppendResult (interp, "usage: ", Tcl_GetString (objv[0]), NULL);
2915 return TCL_ERROR;
2916 }
2917
2918 for (entryPtr = Tcl_FirstHashEntry (&connTable, searchPtr);
2919 entryPtr != NULL;
2920 entryPtr = Tcl_NextHashEntry (searchPtr)) {
2921 sasl_data_t *sd = Tcl_GetHashValue (entryPtr);
2922
2923 Tcl_DeleteCommandFromToken (sd -> sd_interp, sd -> sd_token);
2924 }
2925
2926 for (entryPtr = Tcl_FirstHashEntry (&t2pTable, searchPtr);
2927 entryPtr != NULL;
2928 entryPtr = Tcl_NextHashEntry (searchPtr)) {
2929 Tcl_Obj *objPtr = (Tcl_Obj *) Tcl_GetHashKey (&t2pTable, entryPtr);
2930 propctx_t *prop = (propctx_t *) Tcl_GetHashValue (entryPtr);
2931
2932 Tcl_DecrRefCount (objPtr);
2933 Tcl_DeleteHashEntry (entryPtr);
2934
2935 if ((entryPtr = Tcl_FindHashEntry (&p2tTable, (char *) prop)) != NULL)
2936 Tcl_DeleteHashEntry (entryPtr);
2937
2938 #if 0
2939 prop_dispose (&prop);
2940 #endif
2941 }
2942
2943 for (entryPtr = Tcl_FirstHashEntry (&allocTable, searchPtr);
2944 entryPtr != NULL;
2945 entryPtr = Tcl_NextHashEntry (searchPtr)) {
2946 Tcl_Free (Tcl_GetHashKey (&allocTable, entryPtr));
2947 Tcl_DeleteHashEntry (entryPtr);
2948 }
2949
2950 sasl_done ();
2951
2952 Tcl_ResetResult (interp);
2953 return TCL_OK;
2954 }
2955
2956
2957 /* module initialization */
2958
2959 static oc_pair_t init_pairs[] = {
2960 { "sasl::decode64", proc_decode64 },
2961 { "sasl::done", proc_done },
2962 { "sasl::encode64", proc_encode64 },
2963 { "sasl::errstring", proc_errstring },
2964 { "sasl::mechanisms", proc_mechanisms },
2965 { "sasl::info", proc_info },
2966
2967 { "sasl::server_init", server_init },
2968 { "sasl::server_new", server_new },
2969
2970 { "sasl::client_init", client_init },
2971 { "sasl::client_new", client_new },
2972
2973 { NULL, 0 }
2974 };
2975
2976
2977 int
2978 Tclsasl_Init (Tcl_Interp *interp) {
2979 oc_pair_t *pp;
2980
2981 if (Tcl_InitStubs (interp, "8.0", 0) == NULL)
2982 return TCL_ERROR;
2983
2984 if ((Tcl_PkgRequire (interp, "Tcl", TCL_VERSION, 0) == NULL)
2985 && (TCL_VERSION[0] == '7')
2986 && (Tcl_PkgRequire (interp, "Tcl", "8.0", 0) == NULL))
2987 return TCL_ERROR;
2988
2989 if (Tcl_PkgProvide (interp, "sasl", VERSION) != TCL_OK)
2990 return TCL_ERROR;
2991
2992 Tcl_InitHashTable (&allocTable, TCL_ONE_WORD_KEYS);
2993 Tcl_InitHashTable (&connTable, TCL_ONE_WORD_KEYS);
2994 Tcl_InitHashTable (&p2tTable, TCL_ONE_WORD_KEYS);
2995 Tcl_InitHashTable (&t2pTable, TCL_ONE_WORD_KEYS);
2996
2997 for (pp = init_pairs; pp -> p_key; pp++)
2998 Tcl_CreateObjCommand (interp, pp -> p_key, pp -> p_proc,
2999 (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
3000
3001 return TCL_OK;
3002 }
3003
3004
3005 int
3006 Sasl_Init (Tcl_Interp *interp) {
3007 return Tclsasl_Init (interp);
3008 }
3009
3010 #endif /* TCLSASL */
0 #!/bin/sh
1 # the following restarts using tclsh \
2 exec tclsh "$0" "$@"
3
4 # test the Tcl wrapper for Cyrus SASL
5
6
7 #
8 # load the library
9 #
10
11 load .libs/libtclsasl.so
12
13
14 if {[llength $argv] > 0} {
15 set mechanisms [list [lindex $argv 0]]
16 set argv [lrange $argv 1 end]
17 }
18 if {[llength $argv] > 0} {
19 set pass [lindex $argv 0]
20 set argv [lrange $argv 1 end]
21 }
22
23
24 #
25 # globals
26 #
27
28 global errorCode
29
30
31 global client server
32
33 foreach prop [sasl::info setprops] {
34 set client($prop) ""
35 set server($prop) ""
36 }
37
38 # edit these as you wish
39
40 array set server [list \
41 silent 1 \
42 service example \
43 fqdn "" \
44 auth_external client@example.com \
45 ssf_external 1 \
46 sec_props [list min_ssf 0 max_ssf 128] \
47 ]
48
49 array set client [list \
50 silent 0 \
51 service example \
52 fqdn example.com \
53 mechanisms digest-md5 \
54 user "" \
55 language en-US \
56 authname fred \
57 cnonce "" \
58 pass "secret" \
59 getrealm "" \
60 auth_external server@example.com \
61 ssf_external 1 \
62 sec_props [list min_ssf 0 max_ssf 255] \
63 ]
64
65 if {[info exists mechanisms]} {
66 set client(mechanisms) $mechanisms
67 }
68 if {[info exists pass]} {
69 set client(pass) $pass
70 }
71
72
73 #
74 # print out available commands and options
75 #
76
77 puts stdout "initializing package...\n"
78 puts -nonewline stdout [format "%15.15s:" "commands"]
79 set i 0
80 foreach p [lsort -dictionary [info commands ::sasl::*]] {
81 puts -nonewline stdout [format " %-15.15s" \
82 [string range $p 8 end]]
83 if {[expr [incr i]%3] == 0} {
84 puts -nonewline stdout [format "\n%15.15s " ""]
85 }
86 }
87 puts stdout "\n"
88
89
90 foreach p [lsort -dictionary [sasl::info]] {
91 puts -nonewline stdout [format "%15.15s:" $p]
92 set q [sasl::info $p]
93 set i 0
94 while {1} {
95 puts -nonewline stdout [format " %-15.15s" [lindex $q 0]]
96 if {[llength [set q [lrange $q 1 end]]] == 0} {
97 break
98 }
99 if {[expr [incr i]%3] == 0} {
100 puts -nonewline stdout [format "\n%15.15s " ""]
101 }
102 }
103 puts stdout "\n"
104 }
105 puts stdout ""
106
107
108 #
109 # callbacks
110 #
111
112 proc sasl_log {data} {
113 array set params $data
114
115 puts stdout "logging"
116 foreach {k v} $data {
117 puts stdout [format "%11.11s %s" $k $v]
118 }
119 puts stdout ""
120 }
121
122
123 #
124 # server-side callbacks
125 #
126
127 proc server_callback {id data} {
128 global server
129
130 array set params $data
131
132 if {!$server(silent)} {
133 puts stdout "looking for $id"
134 foreach {k v} $data {
135 puts stdout [format "%11.11s %s" $k $v]
136 }
137 }
138
139 switch -- $id {
140 getopt {
141 if {![info exists params(plugin)]} {
142 set params(plugin) ""
143 }
144 switch -- $params(plugin)/$params(option) {
145 /auto_transition
146 -
147 /canon_user_plugin
148 -
149 /mech_list
150 -
151 /sasldb_path
152 -
153 OTP/opiekeys {
154 }
155
156 default {
157 set value ""
158 }
159 }
160 }
161
162 verifyfile
163 -
164 proxy
165 -
166 checkpass {
167 set value 0
168 }
169 }
170
171 if {!$server(silent)} {
172 if {[info exists value]} {
173 puts stdout [format "%11.11s %s" returning $value]
174 }
175 puts stdout ""
176 }
177
178 return $value
179 }
180
181
182 #
183 # timing
184 #
185
186 proc ticks {now then} {
187 set elapsed [expr $now-$then]
188
189 if {[set x [string length $elapsed]] <= 6} {
190 return $elapsed
191 }
192
193 return [format %s.%s [string range $elapsed 0 [expr $x-7]] \
194 [string range $elapsed [expr $x-6] end]]
195 }
196
197
198 #
199 # init the server-side code
200 #
201
202 puts stdout "initializing server...\n"
203 sasl::server_init -callbacks [list [list log sasl_log]]
204
205 set callbacks [list [list log sasl_log]]
206 foreach id [list getopt verifyfile proxy checkpass] {
207 lappend callbacks [list $id "server_callback $id"]
208 }
209 set args {}
210 if {[string length $server(fqdn)] > 0} {
211 lappend args -serverFQDN $server(fqdn)
212 }
213
214 set server(token) \
215 [eval [list sasl::server_new -service $server(service) \
216 -callbacks $callbacks \
217 -flags [list success_data]] $args]
218
219 puts -nonewline stdout [format "%15.15s:" "operations"]
220 set i 0
221 foreach p [lsort -dictionary [$server(token) -operation info]] {
222 puts -nonewline stdout [format " %-15.15s" $p]
223 if {[expr [incr i]%3] == 0} {
224 puts -nonewline stdout [format "\n%15.15s " ""]
225 }
226 }
227 puts stdout "\n\n"
228
229
230 set hitP 0
231 foreach prop [lsort -dictionary [sasl::info setprops]] {
232 if {[string length [set value $server($prop)]] > 0} {
233 if {!$hitP} {
234 puts stdout "setting server properties...\n"
235 }
236 puts stdout " set $prop to $value"
237 $server(token) -operation setprop \
238 -property $prop \
239 -value $value
240 set hitP 1
241 }
242 }
243 if {$hitP} {
244 puts stdout "\n"
245 }
246
247
248 puts -nonewline stdout [format "%15.15s:" "mechanisms"]
249 set i 0
250 foreach p [lsort -dictionary [set mechlist [$server(token) -operation list]]] {
251 puts -nonewline stdout [format " %-15.15s" $p]
252 if {[expr [incr i]%3] == 0} {
253 puts -nonewline stdout [format "\n%15.15s " ""]
254 }
255 }
256 puts stdout "\n\n"
257
258 set server(silent) 0
259
260
261 #
262 # client-side callbacks
263 #
264
265 proc client_callback {data} {
266 global client
267
268 array set params $data
269
270 if {!$client(silent)} {
271 puts stdout "looking for $params(id)"
272 foreach {k v} $data {
273 puts stdout [format "%11.11s %s" $k $v]
274 }
275 }
276
277 switch -- $params(id) {
278 pass {
279 set value $client(pass)
280 }
281
282 getrealm {
283 if {(![info exists params(available)]) \
284 || ([lsearch -exact $params(available) \
285 $client(getrealm)] >= 0)} {
286 set value $client(getrealm)
287 }
288 }
289 }
290
291 if {!$client(silent)} {
292 if {[info exists value]} {
293 puts stdout [format "%11.11s %s" returning $value]
294 }
295 puts stdout ""
296 }
297
298 return $value
299 }
300
301 proc client_interact {data} {
302 global client
303
304 array set params $data
305 set id $params(id)
306
307 catch { set value $params(default) }
308
309 puts stdout "asking for $id"
310 foreach {k v} $data {
311 if {![string compare $k id]} {
312 continue
313 }
314 puts stdout [format "%11.11s %s" $k $v]
315 }
316
317 if {[string length $client($id)] > 0} {
318 set value $client($id)
319 }
320
321 if {[info exists value]} {
322 puts stdout [format "%11.11s %s" "returning" $value]
323 } else {
324 puts stdout [format "%11.11s %s" "nothing" "to return"]
325 }
326 puts stdout ""
327
328 # if value isn't defined, that's ok...
329 return $value
330 }
331
332
333 # init the client-side code
334
335 puts stdout "initializing client...\n"
336 sasl::client_init -callbacks [list [list log sasl_log]]
337
338 set callbacks [list [list log sasl_log]]
339 foreach id [list user language authname cnonce] {
340 if {[string length $client($id)] > 0} {
341 lappend callbacks $id
342 }
343 }
344 if {[string length $client(pass)] > 0} {
345 foreach id [list pass echoprompt noechoprompt] {
346 lappend callbacks [list $id client_callback]
347 }
348 }
349 set id getrealm
350 if {[string length $client($id)] > 0} {
351 lappend callbacks [list $id client_callback]
352 }
353
354 set client(token) [sasl::client_new -service $client(service) \
355 -serverFQDN $client(fqdn) \
356 -callbacks $callbacks \
357 -flags [list success_data]]
358
359 puts -nonewline stdout [format "%15.15s:" "operations"]
360 set i 0
361 foreach p [lsort -dictionary [$client(token) -operation info]] {
362 puts -nonewline stdout [format " %-15.15s" $p]
363 if {[expr [incr i]%3] == 0} {
364 puts -nonewline stdout [format "\n%15.15s " ""]
365 }
366 }
367 puts stdout "\n\n"
368
369
370 set hitP 0
371 foreach prop [lsort -dictionary [sasl::info setprops]] {
372 if {[string length [set value $client($prop)]] > 0} {
373 if {!$hitP} {
374 puts stdout "setting client properties...\n"
375 }
376 puts stdout " set $prop to $value"
377 $client(token) -operation setprop \
378 -property $prop \
379 -value $value
380 set hitP 1
381 }
382 }
383 if {$hitP} {
384 puts stdout "\n"
385 }
386
387
388 puts -nonewline stdout [format "%15.15s:" "mechanisms"]
389 set i 0
390 foreach p [lsort -dictionary [sasl::mechanisms]] {
391 puts -nonewline stdout [format " %-15.15s" $p]
392 if {[expr [incr i]%3] == 0} {
393 puts -nonewline stdout [format "\n%15.15s " ""]
394 }
395 }
396 puts stdout "\n\n"
397
398
399 puts stdout "starting client...\n"
400 flush stdout
401
402 if {[string length $client(mechanisms)] > 0} {
403 set mechlist $client(mechanisms)
404 }
405
406 set clicks [clock clicks]
407 set client(code) [catch {
408 $client(token) -operation start \
409 -mechanisms $mechlist \
410 -interact client_interact
411 } result]
412 puts stdout " elapsed: [ticks [clock clicks] $clicks] msec"
413
414 switch -- $client(code) {
415 0 {
416 puts stdout " OK: $result"
417 }
418
419 4 {
420 puts stdout " CONTINUE: $result"
421 }
422
423 default {
424 puts stdout " code: $client(code), $errorCode"
425 return
426 }
427 }
428 puts stdout "\n"
429 flush stdout
430
431
432 puts stdout "starting server...\n"
433 flush stdout
434
435 array set params $result
436
437 set clicks [clock clicks]
438 set server(code) [catch {
439 $server(token) -operation start \
440 -mechanism $params(mechanism) \
441 -input $params(output)
442 } result]
443 puts stdout " elapsed: [ticks [clock clicks] $clicks] msec"
444
445 switch -- $server(code) {
446 0 {
447 puts stdout " OK: $result"
448 }
449
450 4 {
451 puts stdout " CONTINUE: $result"
452 }
453
454 default {
455 puts stdout " code: $server(code), $errorCode"
456 }
457 }
458 puts stdout "\n"
459 flush stdout
460
461
462 while {($server(code) == 4) || ($client(code) == 4)} {
463 puts stdout "stepping client...\n"
464 flush stdout
465
466 set clicks [clock clicks]
467 set client(code) [catch {
468 $client(token) -operation step \
469 -input $result \
470 -interact client_interact
471 } result]
472 puts stdout " elapsed: [ticks [clock clicks] $clicks] msec"
473
474 switch -- $client(code) {
475 0 {
476 puts stdout " OK: $result"
477 }
478
479 4 {
480 puts stdout " CONTINUE: $result"
481 }
482
483 default {
484 puts stdout " code: $client(code), $errorCode"
485 return
486 }
487 }
488 puts stdout "\n\n"
489 flush stdout
490
491 if {($client(code) == 0) && ([string length $result] == 0)} {
492 break
493 }
494
495 puts stdout "stepping server...\n"
496 flush stdout
497
498 set clicks [clock clicks]
499 set server(code) [catch {
500 $server(token) -operation step \
501 -input $result
502 } result]
503 puts stdout " elapsed: [ticks [clock clicks] $clicks] msec"
504
505 switch -- $server(code) {
506 0 {
507 puts stdout " OK: $result"
508 }
509
510 4 {
511 puts stdout " CONTINUE: $result"
512 }
513
514 default {
515 puts stdout " code: $server(code), $errorCode"
516 }
517 }
518 puts stdout "\n\n"
519 flush stdout
520 }
521
522
523 switch -- $client(code)/$server(code) {
524 4/0 {
525 puts stderr "server done, but client isn't...\n"
526 return
527 }
528
529 0/4 {
530 puts stderr "client done, but server isn't...\n"
531 return
532 }
533 }
534
535
536 rename sasl_log ""
537
538
539 puts stdout "getting client properties...\n"
540 foreach prop [lsort -dictionary [sasl::info getprops]] {
541 if {[set code [catch { $client(token) -operation getprop \
542 -property $prop } result]]} {
543 set result "ERROR: $result"
544 }
545 puts stdout [format "%14.14s: %s" $prop $result]
546 }
547 puts stdout ""
548
549 if {[set code [catch { $client(token) -operation errdetail } result]]} {
550 set result "ERROR: $result"
551 }
552 puts stdout [format "%14.14s: %s" errdetail $result]
553 puts stdout "\n"
554
555
556 puts stdout "getting server properties...\n"
557 foreach prop [lsort -dictionary [sasl::info getprops]] {
558 if {[set code [catch { $server(token) -operation getprop \
559 -property $prop } result]]} {
560 set result "ERROR: $result"
561 }
562 puts stdout [format "%14.14s: %s" $prop $result]
563 }
564 puts stdout ""
565
566 if {[set code [catch { $server(token) -operation errdetail } result]]} {
567 set result "ERROR: $result"
568 }
569 puts stdout [format "%14.14s: %s" errdetail $result]
570 puts stdout "\n"
571
572
573 puts stdout "shutting down"
574 sasl::done
575
576 puts stdout "\n"
577
578
579 puts stdout "if you see this, the test was passed..."
0 Index: Makefile.am
1 ===================================================================
2 RCS file: /cvs/src/sasl/Makefile.am,v
3 retrieving revision 1.24
4 diff -u -r1.24 Makefile.am
5 --- Makefile.am 2001/12/04 17:46:35 1.24
6 +++ Makefile.am 2002/01/21 07:07:29
7 @@ -68,7 +68,8 @@
8 INSTALLOSX =
9 endif
10
11 -SUBDIRS=include sasldb plugins lib utils doc man $(PWC) $(SAM) $(JAV) $(SAD)
12 +SUBDIRS=include sasldb plugins lib utils doc man $(PWC) $(SAM) $(JAV) $(SAD) \
13 + tcl
14 EXTRA_DIST=config cmulocal win32 mac dlcompat-20010505
15
16 dist-hook:
17 Index: acconfig.h
18 ===================================================================
19 RCS file: /cvs/src/sasl/acconfig.h,v
20 retrieving revision 1.31
21 diff -u -r1.31 acconfig.h
22 --- acconfig.h 2001/12/11 17:35:29 1.31
23 +++ acconfig.h 2002/01/21 07:07:29
24 @@ -155,6 +155,9 @@
25 /* do we have a wierd location of db.h? */
26 #undef HAVE_DB3_DB_H
27
28 +/* is Tcl available? */
29 +#undef TCLSASL
30 +
31 /* define if your compile has __attribute__ */
32 #undef HAVE___ATTRIBUTE__
33
34 Index: configure.in
35 ===================================================================
36 RCS file: /cvs/src/sasl/configure.in,v
37 retrieving revision 1.122
38 diff -u -r1.122 configure.in
39 --- configure.in 2002/01/10 22:49:35 1.122
40 +++ configure.in 2002/01/21 07:07:29
41 @@ -592,6 +592,45 @@
42 AC_SUBST(SASL_UTIL_LIBS_EXTRA)
43 AC_SUBST(SASL_UTIL_HEADERS_EXTRA)
44
45 +dnl check for tcl
46 +AC_MSG_CHECKING(for tcl support)
47 +AC_ARG_WITH(tcl, [ --with-tcl=DIR with Tcl support [no] ],
48 + with_tcl=$withval,
49 + with_tcl=no)
50 +
51 +if test "$with_tcl" != "no"; then
52 + AC_CACHE_VAL(ac_cv_c_tclconfig,[
53 + if test "$with_tcl" = "yes"; then
54 + for i in `ls -d ${prefix}/lib 2>/dev/null` \
55 + `ls -d /usr/lib 2>/dev/null` \
56 + `ls -d /usr/local/lib 2>/dev/null` ; do
57 + if test -f "$i/tclConfig.sh" ; then
58 + ac_cv_c_tclconfig=`(cd $i; pwd)`
59 + break
60 + fi
61 + done
62 + with_tcl=`dirname ${ac_cv_c_tclconfig}`
63 + elif test -f "${with_tcl}/tclConfig.sh" ; then
64 + :
65 + else
66 + AC_MSG_ERROR([${with_tcl}/lib directory doesn't contain tclConfig.sh])
67 + fi
68 + ])
69 +
70 + . ${ac_cv_c_tclconfig}/tclConfig.sh
71 + LIB_TCL="${TCL_LIB_SPEC} ${TCL_LIBS}"
72 + PKG_TCL=${TCL_PACKAGE_PATH}/sasl
73 + INSTALL_TCLSASL=install-tclsasl
74 +
75 + AC_DEFINE(TCLSASL)
76 + AC_MSG_RESULT(yes)
77 +else
78 + AC_MSG_RESULT(no)
79 +fi
80 +AC_SUBST(LIB_TCL)
81 +AC_SUBST(PKG_TCL)
82 +AC_SUBST(INSTALL_TCLSASL)
83 +
84 dnl check for getsubopt
85 sasl_cv_getsubopt=no
86 AC_CHECK_FUNC(getsubopt, [AC_DEFINE(HAVE_GETSUBOPT)], [sasl_cv_getsubopt=yes])
87 @@ -695,6 +734,7 @@
88 java/javax/security/Makefile
89 java/javax/security/auth/Makefile
90 java/javax/security/auth/callback/Makefile
91 +tcl/Makefile
92 pwcheck/Makefile
93 man/Makefile)
94
95 Index: config/kerberos_v4.m4
96 ===================================================================
97 RCS file: /cvs/src/sasl/config/kerberos_v4.m4,v
98 retrieving revision 1.2
99 diff -u -r1.2 kerberos_v4.m4
100 --- kerberos_v4.m4 2001/12/04 02:05:09 1.2
101 +++ kerberos_v4.m4 2002/01/21 07:07:30
102 @@ -11,8 +11,19 @@
103 CPPFLAGS="$CPPFLAGS -I${with_des}/include"
104 LDFLAGS="$LDFLAGS -L${with_des}/lib"
105 fi
106 - AC_CHECK_LIB(des, des_pcbc_encrypt, [LIB_DES="-ldes";
107 - with_des=yes], with_des=no)
108 +
109 +dnl check for openssl installing -lcrypto, then make vanilla check
110 + AC_CHECK_LIB(crypto, des_pcbc_encrypt,
111 + AC_CHECK_HEADER(openssl/des.h, [AC_DEFINE(WITH_SSL_DES)
112 + LIB_DES="-lcrypto";
113 + with_des=yes],
114 + with_des=no),
115 + with_des=no, $LIB_RSAREF)
116 +
117 + if test "$with_des" = no; then
118 + AC_CHECK_LIB(des, des_pcbc_encrypt, [LIB_DES="-ldes";
119 + with_des=yes], with_des=no)
120 + fi
121
122 if test "$with_des" = no; then
123 AC_CHECK_LIB(des524, des_pcbc_encrypt, [LIB_DES="-ldes524";
124 Index: config/sasldb.m4
125 ===================================================================
126 RCS file: /cvs/src/sasl/config/sasldb.m4,v
127 retrieving revision 1.4
128 diff -u -r1.4 sasldb.m4
129 --- sasldb.m4 2001/12/10 17:02:36 1.4
130 +++ sasldb.m4 2002/01/21 07:07:30
131 @@ -76,10 +76,26 @@
132 BERKELEY_DB_CHK()
133 ;;
134 gdbm)
135 - AC_CHECK_HEADER(gdbm.h,
136 + AC_ARG_WITH(with-gdbm,[ --with-gdbm=PATH use gdbm from PATH],
137 + with_gdbm="${withval}")
138 +
139 + case "$with_gdbm" in
140 + ""|yes)
141 + AC_CHECK_HEADER(gdbm.h,
142 AC_CHECK_LIB(gdbm, gdbm_open, SASL_DB_LIB="-lgdbm",
143 dblib="no"),
144 dblib="no")
145 +
146 + ;;
147 + *)
148 + if test -d $with_gdbm; then
149 + CPPFLAGS="${CPPFLAGS} -I${with_gdbm}/include"
150 + LDFLAGS="${LDFLAGS} -L${with_gdbm}/lib"
151 + SASL_DB_LIB="-lgdbm"
152 + else
153 + with_gdbm="no"
154 + fi
155 + esac
156 ;;
157 ndbm)
158 dnl We want to attempt to use -lndbm if we can, just in case
159 Index: doc/index.html
160 ===================================================================
161 RCS file: /cvs/src/sasl/doc/index.html,v
162 retrieving revision 1.11
163 diff -u -r1.11 index.html
164 --- index.html 2002/01/18 16:40:06 1.11
165 +++ index.html 2002/01/21 07:07:30
166 @@ -33,6 +33,7 @@
167 <li> <a href="options.html">Options for use with Cyrus SASL</A></li>
168 <li> <a href="programming.html">The SASL Application Programmer's Guide</A></li>
169 <li> <a href="plugprog.html">The SASL Plugin Programmer's Guide</A></li>
170 +<li> <a href="tclsasl.html">Using SASL with Tcl</A></li>
171 <li> <a href="advanced.html">Advanced SASL usage</A></li>
172 </ul>
173
174 Index: sasldb/db_gdbm.c
175 ===================================================================
176 RCS file: /cvs/src/sasl/sasldb/db_gdbm.c,v
177 retrieving revision 1.2
178 diff -u -r1.2 db_gdbm.c
179 --- db_gdbm.c 2001/12/04 02:06:59 1.2
180 +++ db_gdbm.c 2002/01/21 07:07:30
181 @@ -99,7 +99,8 @@
182 }
183 db = gdbm_open((char *)path, 0, GDBM_READER, S_IRUSR | S_IWUSR, NULL);
184 if (! db) {
185 - utils->seterror(cntxt, 0, "Could not open db");
186 + utils->seterror(conn, 0, "Could not open %s: gdbm_errno=%d",
187 + path, gdbm_errno);
188 result = SASL_FAIL;
189 goto cleanup;
190 }
191 @@ -108,8 +109,17 @@
192 gvalue = gdbm_fetch(db, gkey);
193 gdbm_close(db);
194 if (! gvalue.dptr) {
195 - utils->seterror(cntxt, 0, "no user in db");
196 - result = SASL_NOUSER;
197 + if (gdbm_errno == GDBM_ITEM_NOT_FOUND) {
198 + utils->seterror(conn, SASL_NOLOG,
199 + "user: %s@%s property: %s not found in %s",
200 + authid, realm, propName, path);
201 + result = SASL_NOUSER;
202 + } else {
203 + utils->seterror(conn, 0,
204 + "Couldn't fetch entry from %s: gdbm_errno=%d",
205 + path, gdbm_errno);
206 + result = SASL_FAIL;
207 + }
208 goto cleanup;
209 }
210
211 @@ -177,7 +187,8 @@
212 utils->log(conn, SASL_LOG_ERR,
213 "SASL error opening password file. "
214 "Do you have write permissions?\n");
215 - utils->seterror(conn, 0, "Could not open db for write");
216 + utils->seterror(conn, 0, "Could not open %s for write: gdbm_errno=%d",
217 + path, gdbm_errno);
218 result = SASL_FAIL;
219 goto cleanup;
220 }
221 @@ -190,13 +201,15 @@
222 gvalue.dsize = data_len;
223 if (gdbm_store(db, gkey, gvalue, GDBM_REPLACE)) {
224 utils->seterror(conn, 0,
225 - "Couldn't update db");
226 + "Couldn't replace entry in %s: gdbm_errno=%d",
227 + path, gdbm_errno);
228 result = SASL_FAIL;
229 }
230 } else {
231 if (gdbm_delete(db, gkey)) {
232 utils->seterror(conn, 0,
233 - "Couldn't update db");
234 + "Couldn't delete entry in %s: gdbm_errno=%d",
235 + path, gdbm_errno);
236 result = SASL_NOUSER;
237 }
238 }
239 @@ -285,7 +298,8 @@
240 db = gdbm_open((char *)path, 0, GDBM_READER, S_IRUSR | S_IWUSR, NULL);
241
242 if(!db) {
243 - utils->seterror(conn, 0, "Could not open db");
244 + utils->seterror(conn, 0, "Could not open %s: gdbm_errno=%d",
245 + path, gdbm_errno);
246 return NULL;
247 }
248
249 Index: utils/dbconverter-2.c
250 ===================================================================
251 RCS file: /cvs/src/sasl/utils/dbconverter-2.c,v
252 retrieving revision 1.2
253 diff -u -r1.2 dbconverter-2.c
254 --- dbconverter-2.c 2001/12/04 02:07:01 1.2
255 +++ dbconverter-2.c 2002/01/21 07:07:30
256 @@ -349,6 +349,8 @@
257
258 #else
259
260 +/* ARGSUSED */
261 +
262 int listusers(const char *path, listcb_t *cb)
263 {
264 fprintf(stderr,"Unsupported DB format");
0 APPLE PUBLIC SOURCE LICENSE
1 Version 1.1 - April 19,1999
2
3 Please read this License carefully before downloading this software.
4 By downloading and using this software, you are agreeing to be bound
5 by the terms of this License. If you do not or cannot agree to the
6 terms of this License, please do not download or use the software.
7
8 1. General; Definitions. This License applies to any program or other
9 work which Apple Computer, Inc. ("Apple") publicly announces as
10 subject to this Apple Public Source License and which contains a
11 notice placed by Apple identifying such program or work as "Original
12 Code" and stating that it is subject to the terms of this Apple Public
13 Source License version 1.1 (or subsequent version thereof), as it may
14 be revised from time to time by Apple ("License"). As used in this
15 License:
16
17 1.1 "Affected Original Code" means only those specific portions of
18 Original Code that allegedly infringe upon any party's intellectual
19 property rights or are otherwise the subject of a claim of
20 infringement.
21
22 1.2 "Applicable Patent Rights" mean: (a) in the case where Apple is
23 the grantor of rights, (i) claims of patents that are now or hereafter
24 acquired, owned by or assigned to Apple and (ii) that cover subject
25 matter contained in the Original Code, but only to the extent
26 necessary to use, reproduce and/or distribute the Original Code
27 without infringement; and (b) in the case where You are the grantor of
28 rights, (i) claims of patents that are now or hereafter acquired,
29 owned by or assigned to You and (ii) that cover subject matter in Your
30 Modifications, taken alone or in combination with Original Code.
31
32 1.3 "Covered Code" means the Original Code, Modifications, the
33 combination of Original Code and any Modifications, and/or any
34 respective portions thereof.
35
36 1.4 "Deploy" means to use, sublicense or distribute Covered Code other
37 than for Your internal research and development (R&D), and includes
38 without limitation, any and all internal use or distribution of
39 Covered Code within Your business or organization except for R&D use,
40 as well as direct or indirect sublicensing or distribution of Covered
41 Code by You to any third party in any form or manner.
42
43 1.5 "Larger Work" means a work which combines Covered Code or portions
44 thereof with code not governed by the terms of this License.
45
46 1.6 "Modifications" mean any addition to, deletion from, and/or change
47 to, the substance and/or structure of Covered Code. When code is
48 released as a series of files, a Modification is: (a) any addition to
49 or deletion from the contents of a file containing Covered Code;
50 and/or (b) any new file or other representation of computer program
51 statements that contains any part of Covered Code.
52
53 1.7 "Original Code" means (a) the Source Code of a program or other
54 work as originally made available by Apple under this License,
55 including the Source Code of any updates or upgrades to such programs
56 or works made available by Apple under this License, and that has been
57 expressly identified by Apple as such in the header file(s) of such
58 work; and (b) the object code compiled from such Source Code and
59 originally made available by Apple under this License.
60
61 1.8 "Source Code" means the human readable form of a program or other
62 work that is suitable for making modifications to it, including all
63 modules it contains, plus any associated interface definition files,
64 scripts used to control compilation and installation of an executable
65 (object code).
66
67 1.9 "You" or "Your" means an individual or a legal entity exercising
68 rights under this License. For legal entities, "You" or "Your"
69 includes any entity which controls, is controlled by, or is under
70 common control with, You, where "control" means (a) the power, direct
71 or indirect, to cause the direction or management of such entity,
72 whether by contract or otherwise, or (b) ownership of fifty percent
73 (50%) or more of the outstanding shares or beneficial ownership of
74 such entity.
75
76 2. Permitted Uses; Conditions & Restrictions. Subject to the terms
77 and conditions of this License, Apple hereby grants You, effective on
78 the date You accept this License and download the Original Code, a
79 world-wide, royalty-free, non- exclusive license, to the extent of
80 Apple's Applicable Patent Rights and copyrights covering the Original
81 Code, to do the following:
82
83 2.1 You may use, copy, modify and distribute Original Code, with or
84 without Modifications, solely for Your internal research and
85 development, provided that You must in each instance:
86
87 (a) retain and reproduce in all copies of Original Code the copyright
88 and other proprietary notices and disclaimers of Apple as they appear
89 in the Original Code, and keep intact all notices in the Original Code
90 that refer to this License;
91
92 (b) include a copy of this License with every copy of Source Code of
93 Covered Code and documentation You distribute, and You may not offer
94 or impose any terms on such Source Code that alter or restrict this
95 License or the recipients' rights hereunder, except as permitted under
96 Section 6; and
97
98 (c) completely and accurately document all Modifications that you have
99 made and the date of each such Modification, designate the version of
100 the Original Code you used, prominently include a file carrying such
101 information with the Modifications, and duplicate the notice in
102 Exhibit A in each file of the Source Code of all such Modifications.
103
104 2.2 You may Deploy Covered Code, provided that You must in each
105 instance:
106
107 (a) satisfy all the conditions of Section 2.1 with respect to the
108 Source Code of the Covered Code;
109
110 (b) make all Your Deployed Modifications publicly available in Source
111 Code form via electronic distribution (e.g. download from a web site)
112 under the terms of this License and subject to the license grants set
113 forth in Section 3 below, and any additional terms You may choose to
114 offer under Section 6. You must continue to make the Source Code of
115 Your Deployed Modifications available for as long as you Deploy the
116 Covered Code or twelve (12) months from the date of initial
117 Deployment, whichever is longer;
118
119 (c) if You Deploy Covered Code containing Modifications made by You,
120 inform others of how to obtain those Modifications by filling out and
121 submitting the information found at
122 http://www.apple.com/publicsource/modifications.html, if available;
123 and
124
125 (d) if You Deploy Covered Code in object code, executable form only,
126 include a prominent notice, in the code itself as well as in related
127 documentation, stating that Source Code of the Covered Code is
128 available under the terms of this License with information on how and
129 where to obtain such Source Code.
130
131 3. Your Grants. In consideration of, and as a condition to, the
132 licenses granted to You under this License:
133
134 (a) You hereby grant to Apple and all third parties a non-exclusive,
135 royalty-free license, under Your Applicable Patent Rights and other
136 intellectual property rights owned or controlled by You, to use,
137 reproduce, modify, distribute and Deploy Your Modifications of the
138 same scope and extent as Apple's licenses under Sections 2.1 and 2.2;
139 and
140
141 (b) You hereby grant to Apple and its subsidiaries a non-exclusive,
142 worldwide, royalty-free, perpetual and irrevocable license, under Your
143 Applicable Patent Rights and other intellectual property rights owned
144 or controlled by You, to use, reproduce, execute, compile, display,
145 perform, modify or have modified (for Apple and/or its subsidiaries),
146 sublicense and distribute Your Modifications, in any form, through
147 multiple tiers of distribution.
148
149 4. Larger Works. You may create a Larger Work by combining Covered
150 Code with other code not governed by the terms of this License and
151 distribute the Larger Work as a single product. In each such
152 instance, You must make sure the requirements of this License are
153 fulfilled for the Covered Code or any portion thereof.
154
155 5. Limitations on Patent License. Except as expressly stated in
156 Section 2, no other patent rights, express or implied, are granted by
157 Apple herein. Modifications and/or Larger Works may require
158 additional patent licenses from Apple which Apple may grant in its
159 sole discretion.
160
161 6. Additional Terms. You may choose to offer, and to charge a fee
162 for, warranty, support, indemnity or liability obligations and/or
163 other rights consistent with the scope of the license granted herein
164 ("Additional Terms") to one or more recipients of Covered
165 Code. However, You may do so only on Your own behalf and as Your sole
166 responsibility, and not on behalf of Apple. You must obtain the
167 recipient's agreement that any such Additional Terms are offered by
168 You alone, and You hereby agree to indemnify, defend and hold Apple
169 harmless for any liability incurred by or claims asserted against
170 Apple by reason of any such Additional Terms.
171
172 7. Versions of the License. Apple may publish revised and/or new
173 versions of this License from time to time. Each version will be
174 given a distinguishing version number. Once Original Code has been
175 published under a particular version of this License, You may continue
176 to use it under the terms of that version. You may also choose to use
177 such Original Code under the terms of any subsequent version of this
178 License published by Apple. No one other than Apple has the right to
179 modify the terms applicable to Covered Code created under this
180 License.
181
182 8. NO WARRANTY OR SUPPORT. The Original Code may contain in whole or
183 in part pre-release, untested, or not fully tested works. The
184 Original Code may contain errors that could cause failures or loss of
185 data, and may be incomplete or contain inaccuracies. You expressly
186 acknowledge and agree that use of the Original Code, or any portion
187 thereof, is at Your sole and entire risk. THE ORIGINAL CODE IS
188 PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND
189 AND APPLE AND APPLE'S LICENSOR(S) (FOR THE PURPOSES OF SECTIONS 8 AND
190 9, APPLE AND APPLE'S LICENSOR(S) ARE COLLECTIVELY REFERRED TO AS
191 "APPLE") EXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS
192 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
193 AND/OR CONDITIONS OF MERCHANTABILITY OR SATISFACTORY QUALITY AND
194 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
195 RIGHTS. APPLE DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE
196 ORIGINAL CODE WILL MEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF
197 THE ORIGINAL CODE WILL BE UNINTERRUPTED OR ERROR- FREE, OR THAT
198 DEFECTS IN THE ORIGINAL CODE WILL BE CORRECTED. NO ORAL OR WRITTEN
199 INFORMATION OR ADVICE GIVEN BY APPLE OR AN APPLE AUTHORIZED
200 REPRESENTATIVE SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE
201 SCOPE OF THIS WARRANTY. You acknowledge that the Original Code is not
202 intended for use in the operation of nuclear facilities, aircraft
203 navigation, communication systems, or air traffic control machines in
204 which case the failure of the Original Code could lead to death,
205 personal injury, or severe physical or environmental damage.
206
207 9. Liability.
208
209 9.1 Infringement. If any portion of, or functionality implemented by,
210 the Original Code becomes the subject of a claim of infringement,
211 Apple may, at its option: (a) attempt to procure the rights necessary
212 for Apple and You to continue using the Affected Original Code; (b)
213 modify the Affected Original Code so that it is no longer infringing;
214 or (c) suspend Your rights to use, reproduce, modify, sublicense and
215 distribute the Affected Original Code until a final determination of
216 the claim is made by a court or governmental administrative agency of
217 competent jurisdiction and Apple lifts the suspension as set forth
218 below. Such suspension of rights will be effective immediately upon
219 Apple's posting of a notice to such effect on the Apple web site that
220 is used for implementation of this License. Upon such final
221 determination being made, if Apple is legally able, without the
222 payment of a fee or royalty, to resume use, reproduction,
223 modification, sublicensing and distribution of the Affected Original
224 Code, Apple will lift the suspension of rights to the Affected
225 Original Code by posting a notice to such effect on the Apple web site
226 that is used for implementation of this License. If Apple suspends
227 Your rights to Affected Original Code, nothing in this License shall
228 be construed to restrict You, at Your option and subject to applicable
229 law, from replacing the Affected Original Code with non-infringing
230 code or independently negotiating for necessary rights from such third
231 party.
232
233 9.2 LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES SHALL APPLE BE
234 LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
235 ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE OR INABILITY TO
236 USE THE ORIGINAL CODE, OR ANY PORTION THEREOF, WHETHER UNDER A THEORY
237 OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY
238 OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
239 SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF
240 ANY REMEDY. In no event shall Apple's total liability to You for all
241 damages under this License exceed the amount of fifty dollars
242 ($50.00).
243
244 10. Trademarks. This License does not grant any rights to use the
245 trademarks or trade names "Apple", "Apple Computer", "Mac OS X", "Mac
246 OS X Server" or any other trademarks or trade names belonging to Apple
247 (collectively "Apple Marks") and no Apple Marks may be used to endorse
248 or promote products derived from the Original Code other than as
249 permitted by and in strict compliance at all times with Apple's third
250 party trademark usage guidelines which are posted at
251 http://www.apple.com/legal/guidelinesfor3rdparties.html.
252
253 11. Ownership. Apple retains all rights, title and interest in and to
254 the Original Code and any Modifications made by or on behalf of Apple
255 ("Apple Modifications"), and such Apple Modifications will not be
256 automatically subject to this License. Apple may, at its sole
257 discretion, choose to license such Apple Modifications under this
258 License, or on different terms from those contained in this License or
259 may choose not to license them at all. Apple's development, use,
260 reproduction, modification, sublicensing and distribution of Covered
261 Code will not be subject to this License.
262
263 12. Termination.
264
265 12.1 Termination. This License and the rights granted hereunder will
266 terminate:
267
268 (a) automatically without notice from Apple if You fail to comply with
269 any term(s) of this License and fail to cure such breach within 30
270 days of becoming aware of such breach; (b) immediately in the event of
271 the circumstances described in Section 13.5(b); or (c) automatically
272 without notice from Apple if You, at any time during the term of this
273 License, commence an action for patent infringement against Apple.
274
275 12.2 Effect of Termination. Upon termination, You agree to
276 immediately stop any further use, reproduction, modification,
277 sublicensing and distribution of the Covered Code and to destroy all
278 copies of the Covered Code that are in your possession or control.
279 All sublicenses to the Covered Code which have been properly granted
280 prior to termination shall survive any termination of this License.
281 Provisions which, by their nature, should remain in effect beyond the
282 termination of this License shall survive, including but not limited
283 to Sections 3, 5, 8, 9, 10, 11, 12.2 and 13. Neither party will be
284 liable to the other for compensation, indemnity or damages of any sort
285 solely as a result of terminating this License in accordance with its
286 terms, and termination of this License will be without prejudice to
287 any other right or remedy of either party.
288
289 13. Miscellaneous.
290
291 13.1 Government End Users. The Covered Code is a "commercial item" as
292 defined in FAR 2.101. Government software and technical data rights
293 in the Covered Code include only those rights customarily provided to
294 the public as defined in this License. This customary commercial
295 license in technical data and software is provided in accordance with
296 FAR 12.211 (Technical Data) and 12.212 (Computer Software) and, for
297 Department of Defense purchases, DFAR 252.227-7015 (Technical Data --
298 Commercial Items) and 227.7202-3 (Rights in Commercial Computer
299 Software or Computer Software Documentation). Accordingly, all U.S.
300 Government End Users acquire Covered Code with only those rights set
301 forth herein.
302
303 13.2 Relationship of Parties. This License will not be construed as
304 creating an agency, partnership, joint venture or any other form of
305 legal association between You and Apple, and You will not represent to
306 the contrary, whether expressly, by implication, appearance or
307 otherwise.
308
309 13.3 Independent Development. Nothing in this License will impair
310 Apple's right to acquire, license, develop, have others develop for
311 it, market and/or distribute technology or products that perform the
312 same or similar functions as, or otherwise compete with,
313 Modifications, Larger Works, technology or products that You may
314 develop, produce, market or distribute.
315
316 13.4 Waiver; Construction. Failure by Apple to enforce any provision
317 of this License will not be deemed a waiver of future enforcement of
318 that or any other provision. Any law or regulation which provides
319 that the language of a contract shall be construed against the drafter
320 will not apply to this License.
321
322 13.5 Severability. (a) If for any reason a court of competent
323 jurisdiction finds any provision of this License, or portion thereof,
324 to be unenforceable, that provision of the License will be enforced to
325 the maximum extent permissible so as to effect the economic benefits
326 and intent of the parties, and the remainder of this License will
327 continue in full force and effect. (b) Notwithstanding the foregoing,
328 if applicable law prohibits or restricts You from fully and/or
329 specifically complying with Sections 2 and/or 3 or prevents the
330 enforceability of either of those Sections, this License will
331 immediately terminate and You must immediately discontinue any use of
332 the Covered Code and destroy all copies of it that are in your
333 possession or control.
334
335 13.6 Dispute Resolution. Any litigation or other dispute resolution
336 between You and Apple relating to this License shall take place in the
337 Northern District of California, and You and Apple hereby consent to
338 the personal jurisdiction of, and venue in, the state and federal
339 courts within that District with respect to this License. The
340 application of the United Nations Convention on Contracts for the
341 International Sale of Goods is expressly excluded.
342
343 13.7 Entire Agreement; Governing Law. This License constitutes the
344 entire agreement between the parties with respect to the subject
345 matter hereof. This License shall be governed by the laws of the
346 United States and the State of California, except that body of
347 California law concerning conflicts of law.
348
349 Where You are located in the province of Quebec, Canada, the following
350 clause applies: The parties hereby confirm that they have requested
351 that this License and all related documents be drafted in English. Les
352 parties ont exige que le present contrat et tous les documents
353 connexes soient rediges en anglais.
354
355 EXHIBIT A.
356
357 "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
358 Reserved. This file contains Original Code and/or Modifications of
359 Original Code as defined in and that are subject to the Apple Public
360 Source License Version 1.1 (the "License"). You may not use this file
361 except in compliance with the License. Please obtain a copy of the
362 License at http://www.apple.com/publicsource and read it before using
363 this file.
364
365 The Original Code and all software distributed under the License are
366 distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
367 EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
368 INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
369 FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
370 License for the specific language governing rights and limitations
371 under the License."
0 2001-05-05 Christoph Pfisterer <cp@chrisp.de>
1
2 * dlfcn.h: Added wrapper for C++.
3
4 2001-01-23 Christoph Pfisterer <cp@chrisp.de>
5
6 * dlopen.c: Added optional debugging output. Modules are now
7 searched for in various directories when no absolute path is
8 specified and the module is not found in the current directory. A
9 new function, _dl_search_paths, was added to accomplish the
10 search. Added an include for <limits.h>, because PATH_MAX is
11 defined there.
12 * Makefile: Some rearragements for the optional debugging
13 output. (Use "make DEBUG=1" to enable it.)
14
15 2001-01-16 Christoph Pfisterer <cp@chrisp.de>
16
17 * dlopen.c: Removed #include for ofi.h - it doesn't seem to be
18 needed.
19
0 #
1 # Makefile for dlcompat
2 #
3 #
4 # Copyright (c) 2001 Christoph Pfisterer.
5 #
6 # Portions Copyright (c) 1999-2001 Apple Computer, Inc. All Rights
7 # Reserved.
8 #
9 # This file contains Original Code and/or Modifications of Original
10 # Code as defined in and that are subject to the Apple Public Source
11 # License Version 1.2 (the "License"). You may not use this file
12 # except in compliance with the License. Please obtain a copy of the
13 # License at http://www.apple.com/publicsource and read it before
14 # using this file.
15 #
16 # The Original Code and all software distributed under the License are
17 # distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
18 # EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
19 # INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
20 # FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
21 # NON-INFRINGEMENT. Please see the License for the specific language
22 # governing rights and limitations under the License.
23 #
24
25
26 prefix=/usr/local
27 DEBUG=0
28
29 CC=cc
30 CFLAGS=-Wall -O2 -DDEBUG=$(DEBUG)
31 AR=ar cru
32 RANLIB=ranlib
33 INSTALL=install
34
35 OBJS = dlopen.o
36
37
38 all: libdl.a libdl.dylib
39
40 install: all
41 if test ! -d $(prefix)/lib ; then mkdir $(prefix)/lib ; fi
42 $(INSTALL) -m 644 libdl.a $(prefix)/lib
43 $(RANLIB) $(prefix)/lib/libdl.a
44 chmod 644 $(prefix)/lib/libdl.a
45 $(INSTALL) -m 755 libdl.dylib $(prefix)/lib
46 if test ! -d $(prefix)/include ; then mkdir $(prefix)/include ; fi
47 $(INSTALL) -c -m 644 dlfcn.h $(prefix)/include
48
49 .c.o:
50 $(CC) $(CFLAGS) -fno-common -o $@ -c $<
51
52 libdl.a: $(OBJS)
53 $(AR) libdl.a $(OBJS)
54 $(RANLIB) libdl.a
55
56 libdl.dylib: $(OBJS)
57 $(CC) -dynamiclib -undefined error -o libdl.dylib $(OBJS) -install_name $(prefix)/lib/libdl.dylib
58
59 clean:
60 rm -f $(OBJS) libdl.*
61
62 # EOF
0 dlcompat for Darwin
1 =====================
2
3 This is release 20010505 of dlcompat. dlcompat is a small library that
4 emulates the dlopen() interface on top of Darwin's dyld API. It is
5 based on a CVS snapshot of Apple's Darwin CVS repository, taken on
6 Jan 16 2001 (and still current as of May 5 2001). Since it's based on
7 Apple code, it is released under the terms of the Apple Public Source
8 License; see the file APPLE_LICENSE for the text of the license.
9
10 Changes were made to automatically search for the module in several
11 directories (taken from the environment variables DYLD_LIBRARY_PATH
12 and LD_LIBRARY_PATH, plus /usr/lib and /lib) when no absolute path is
13 specified and the module is not found in the current directory. If you
14 prefer to run unmodified Apple code, download release 20010116.
15
16
17 Installation
18 --------------
19 As root, type:
20
21 make install
22
23 This will compile the source file, generate both a static and shared
24 library called libdl and install it into /usr/local/lib. The header
25 file dlfcn.h will be installed in /usr/local/include.
26
27 If you want to place the files somewhere else, run
28
29 make clean
30 make install prefix=<prefix>
31
32 where <prefix> is the hierarchy you want to install into, e.g. /usr
33 for /usr/lib and /usr/include (_NOT_ recommended!).
34
35 To enable debugging output, run
36
37 make clean
38 make DEBUG=1
39 make install
40
41 Combinations of those commands are left as an excercise to the
42 reader. :-)
43
44
45 Usage
46 -------
47 Software that uses GNU autoconf will likely check for a library called
48 libdl, that's why I named it that way. For software that doesn't find
49 the library on its own, you must add a '-ldl' to the appropriate
50 Makefile (or environment) variable, usually LIBS.
51
52 If you installed dlcompat into a directory other than /usr/local/lib,
53 you must tell the compiler where to find it. Add '-L<prefix>/lib' to
54 LDFLAGS (or CFLAGS) and '-I<prefix>/include' to CPPFLAGS (or CFLAGS).
55
56
57 Genesis
58 ---------
59 The files dlfcn.h and dlopen.c are taken from the Darwin CVS,
60 directory Commands/Apple/cctools/libdyld. For release 20010116, I
61 removed an unneccessary include statement from dlopen.c and added the
62 Makefile. For release 20010123, I added debugging output and library
63 searching. The changes are clearly documented, as required by the
64 Apple Public Source License. For release 20010505, I added wrappers to
65 disable C++ name mangling. That allows the library to be used by C++
66 code, but be aware that there are issues with C++ and bundles, like
67 static initializers not being called.
68
69
70 Christoph Pfisterer <cp@chrisp.de>
0 /*
1 * This file was modified by Christoph Pfisterer <cp@chrisp.de>
2 * on Sat, May 5 2001. See the file "ChangeLog" for details of what
3 * was changed.
4 *
5 *
6 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
7 *
8 * @APPLE_LICENSE_HEADER_START@
9 *
10 * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
11 * Reserved. This file contains Original Code and/or Modifications of
12 * Original Code as defined in and that are subject to the Apple Public
13 * Source License Version 1.1 (the "License"). You may not use this file
14 * except in compliance with the License. Please obtain a copy of the
15 * License at http://www.apple.com/publicsource and read it before using
16 * this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
23 * License for the specific language governing rights and limitations
24 * under the License.
25 *
26 * @APPLE_LICENSE_HEADER_END@
27 */
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 extern void * dlopen(
34 const char *path,
35 int mode);
36 extern void * dlsym(
37 void * handle,
38 const char *symbol);
39 extern const char * dlerror(
40 void);
41 extern int dlclose(
42 void * handle);
43
44 #define RTLD_LAZY 0x1
45 #define RTLD_NOW 0x2
46 #define RTLD_LOCAL 0x4
47 #define RTLD_GLOBAL 0x8
48 #define RTLD_NOLOAD 0x10
49 #define RTLD_SHARED 0x20 /* not used, the default */
50 #define RTLD_UNSHARED 0x40
51 #define RTLD_NODELETE 0x80
52 #define RTLD_LAZY_UNDEF 0x100
53
54 #ifdef __cplusplus
55 }
56 #endif
0 /*
1 * This file was modified by Christoph Pfisterer <cp@chrisp.de>
2 * on Tue, Jan 23 2001. See the file "ChangeLog" for details of what
3 * was changed.
4 *
5 *
6 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
7 *
8 * @APPLE_LICENSE_HEADER_START@
9 *
10 * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
11 * Reserved. This file contains Original Code and/or Modifications of
12 * Original Code as defined in and that are subject to the Apple Public
13 * Source License Version 1.1 (the "License"). You may not use this file
14 * except in compliance with the License. Please obtain a copy of the
15 * License at http://www.apple.com/publicsource and read it before using
16 * this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
23 * License for the specific language governing rights and limitations
24 * under the License.
25 *
26 * @APPLE_LICENSE_HEADER_END@
27 */
28 #include <stdio.h>
29 #include <stdlib.h>
30 #include <string.h>
31 #include <errno.h>
32 #include <sys/types.h>
33 #include <sys/stat.h>
34 #include <limits.h>
35 #include "mach-o/dyld.h"
36 #include "dlfcn.h"
37
38 /*
39 * debugging macros
40 */
41 #if DEBUG > 0
42 #define DEBUG_PRINT(format) fprintf(stderr,(format));fflush(stderr)
43 #define DEBUG_PRINT1(format,arg1) fprintf(stderr,(format),(arg1));\
44 fflush(stderr)
45 #define DEBUG_PRINT2(format,arg1,arg2) fprintf(stderr,(format),\
46 (arg1),(arg2));fflush(stderr)
47 #define DEBUG_PRINT3(format,arg1,arg2,arg3) fprintf(stderr,(format),\
48 (arg1),(arg2),(arg3));fflush(stderr)
49 #else
50 #define DEBUG_PRINT(format) /**/
51 #define DEBUG_PRINT1(format,arg1) /**/
52 #define DEBUG_PRINT2(format,arg1,arg2) /**/
53 #define DEBUG_PRINT3(format,arg1,arg2,arg3) /**/
54 #undef DEBUG
55 #endif
56
57 /*
58 * The structure of a dlopen() handle.
59 */
60 struct dlopen_handle {
61 dev_t dev; /* the path's device and inode number from stat(2) */
62 ino_t ino;
63 int dlopen_mode; /* current dlopen mode for this handle */
64 int dlopen_count; /* number of times dlopen() called on this handle */
65 NSModule module; /* the NSModule returned by NSLinkModule() */
66 struct dlopen_handle *prev;
67 struct dlopen_handle *next;
68 };
69 static struct dlopen_handle *dlopen_handles = NULL;
70 static const struct dlopen_handle main_program_handle = {NULL};
71 static char *dlerror_pointer = NULL;
72
73 /*
74 * NSMakePrivateModulePublic() is not part of the public dyld API so we define
75 * it here. The internal dyld function pointer for
76 * __dyld_NSMakePrivateModulePublic is returned so thats all that maters to get
77 * the functionality need to implement the dlopen() interfaces.
78 */
79 static
80 int
81 NSMakePrivateModulePublic(
82 NSModule module)
83 {
84 static int (*p)(NSModule module) = NULL;
85
86 if(p == NULL)
87 _dyld_func_lookup("__dyld_NSMakePrivateModulePublic",
88 (unsigned long *)&p);
89 if(p == NULL){
90 #ifdef DEBUG
91 printf("_dyld_func_lookup of __dyld_NSMakePrivateModulePublic "
92 "failed\n");
93 #endif
94 return(FALSE);
95 }
96 return(p(module));
97 }
98
99 /*
100 * helper routine: search for a named module in various locations
101 */
102 static
103 int
104 _dl_search_paths(
105 const char *filename,
106 char *pathbuf,
107 struct stat *stat_buf)
108 {
109 const char *pathspec;
110 const char *element;
111 const char *p;
112 char *q;
113 char *pathbuf_end;
114 const char *envvars[] = {
115 "$DYLD_LIBRARY_PATH",
116 "$LD_LIBRARY_PATH",
117 "/usr/lib:/lib",
118 NULL };
119 int envvar_index;
120
121 pathbuf_end = pathbuf + PATH_MAX - 8;
122
123 for(envvar_index = 0; envvars[envvar_index]; envvar_index++){
124 if(envvars[envvar_index][0] == '$'){
125 pathspec = getenv(envvars[envvar_index]+1);
126 }
127 else {
128 pathspec = envvars[envvar_index];
129 }
130
131 if(pathspec != NULL){
132 element = pathspec;
133 while(*element){
134 /* extract path list element */
135 p = element;
136 q = pathbuf;
137 while(*p && *p != ':' && q < pathbuf_end)
138 *q++ = *p++;
139 if(q == pathbuf){ /* empty element */
140 if(*p){
141 element = p+1;
142 continue;
143 }
144 break;
145 }
146 if (*p){
147 element = p+1;
148 }
149 else{
150 element = p; /* this terminates the loop */
151 }
152
153 /* add slash if neccessary */
154 if(*(q-1) != '/' && q < pathbuf_end){
155 *q++ = '/';
156 }
157
158 /* append module name */
159 p = filename;
160 while(*p && q < pathbuf_end) *q++ = *p++;
161 *q++ = 0;
162
163 if(q >= pathbuf_end){
164 /* maybe add an error message here */
165 break;
166 }
167
168 if(stat(pathbuf, stat_buf) == 0){
169 return 0;
170 }
171 }
172 }
173 }
174
175 /* we have searched everywhere, now we give up */
176 return -1;
177 }
178
179 /*
180 * dlopen() the MacOS X version of the FreeBSD dlopen() interface.
181 */
182 void *
183 dlopen(
184 const char *path,
185 int mode)
186 {
187 const char *module_path;
188 void *retval;
189 struct stat stat_buf;
190 NSObjectFileImage objectFileImage;
191 NSObjectFileImageReturnCode ofile_result_code;
192 NSModule module;
193 struct dlopen_handle *p;
194 unsigned long options;
195 NSSymbol NSSymbol;
196 void (*init)(void);
197 char pathbuf[PATH_MAX];
198
199 DEBUG_PRINT2("libdl: dlopen(%s,0x%x) -> ", path, (unsigned int)mode);
200
201 dlerror_pointer = NULL;
202 /*
203 * A NULL path is to indicate the caller wants a handle for the
204 * main program.
205 */
206 if(path == NULL){
207 retval = (void *)&main_program_handle;
208 DEBUG_PRINT1("main / %p\n", retval);
209 return(retval);
210 }
211
212 /* see if the path exists and if so get the device and inode number */
213 if(stat(path, &stat_buf) == -1){
214 dlerror_pointer = strerror(errno);
215
216 if(path[0] == '/'){
217 DEBUG_PRINT1("ERROR (stat): %s\n", dlerror_pointer);
218 return(NULL);
219 }
220
221 /* search for the module in various places */
222 if(_dl_search_paths(path, pathbuf, &stat_buf)){
223 /* dlerror_pointer is unmodified */
224 DEBUG_PRINT1("ERROR (stat): %s\n", dlerror_pointer);
225 return(NULL);
226 }
227 DEBUG_PRINT1("found %s -> ", pathbuf);
228 module_path = pathbuf;
229 dlerror_pointer = NULL;
230 }
231 else{
232 module_path = path;
233 }
234
235 /*
236 * If we don't want an unshared handle see if we already have a handle
237 * for this path.
238 */
239 if((mode & RTLD_UNSHARED) != RTLD_UNSHARED){
240 p = dlopen_handles;
241 while(p != NULL){
242 if(p->dev == stat_buf.st_dev && p->ino == stat_buf.st_ino){
243 /* skip unshared handles */
244 if((p->dlopen_mode & RTLD_UNSHARED) == RTLD_UNSHARED)
245 continue;
246 /*
247 * We have already created a handle for this path. The
248 * caller might be trying to promote an RTLD_LOCAL handle
249 * to a RTLD_GLOBAL. Or just looking it up with
250 * RTLD_NOLOAD.
251 */
252 if((p->dlopen_mode & RTLD_LOCAL) == RTLD_LOCAL &&
253 (mode & RTLD_GLOBAL) == RTLD_GLOBAL){
254 /* promote the handle */
255 if(NSMakePrivateModulePublic(p->module) == TRUE){
256 p->dlopen_mode &= ~RTLD_LOCAL;
257 p->dlopen_mode |= RTLD_GLOBAL;
258 p->dlopen_count++;
259 DEBUG_PRINT1("%p\n", p);
260 return(p);
261 }
262 else{
263 dlerror_pointer = "can't promote handle from "
264 "RTLD_LOCAL to RTLD_GLOBAL";
265 DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
266 return(NULL);
267 }
268 }
269 p->dlopen_count++;
270 DEBUG_PRINT1("%p\n", p);
271 return(p);
272 }
273 p = p->next;
274 }
275 }
276
277 /*
278 * We do not have a handle for this path if we were just trying to
279 * look it up return NULL to indicate we don't have it.
280 */
281 if((mode & RTLD_NOLOAD) == RTLD_NOLOAD){
282 dlerror_pointer = "no existing handle for path RTLD_NOLOAD test";
283 DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
284 return(NULL);
285 }
286
287 /* try to create an object file image from this path */
288 ofile_result_code = NSCreateObjectFileImageFromFile(module_path,
289 &objectFileImage);
290 if(ofile_result_code != NSObjectFileImageSuccess){
291 switch(ofile_result_code){
292 case NSObjectFileImageFailure:
293 dlerror_pointer = "object file setup failure";
294 DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
295 return(NULL);
296 case NSObjectFileImageInappropriateFile:
297 dlerror_pointer = "not a Mach-O MH_BUNDLE file type";
298 DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
299 return(NULL);
300 case NSObjectFileImageArch:
301 dlerror_pointer = "no object for this architecture";
302 DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
303 return(NULL);
304 case NSObjectFileImageFormat:
305 dlerror_pointer = "bad object file format";
306 DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
307 return(NULL);
308 case NSObjectFileImageAccess:
309 dlerror_pointer = "can't read object file";
310 DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
311 return(NULL);
312 default:
313 dlerror_pointer = "unknown error from "
314 "NSCreateObjectFileImageFromFile()";
315 DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
316 return(NULL);
317 }
318 }
319
320 /* try to link in this object file image */
321 options = NSLINKMODULE_OPTION_PRIVATE;
322 if((mode & RTLD_NOW) == RTLD_NOW)
323 options |= NSLINKMODULE_OPTION_BINDNOW;
324 module = NSLinkModule(objectFileImage, module_path, options);
325 NSDestroyObjectFileImage(objectFileImage) ;
326 if(module == NULL){
327 dlerror_pointer = "NSLinkModule() failed for dlopen()";
328 DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
329 return(NULL);
330 }
331
332 /*
333 * If the handle is to be global promote the handle. It is done this
334 * way to avoid multiply defined symbols.
335 */
336 if((mode & RTLD_GLOBAL) == RTLD_GLOBAL){
337 if(NSMakePrivateModulePublic(module) == FALSE){
338 dlerror_pointer = "can't promote handle from RTLD_LOCAL to "
339 "RTLD_GLOBAL";
340 DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
341 return(NULL);
342 }
343 }
344
345 p = malloc(sizeof(struct dlopen_handle));
346 if(p == NULL){
347 dlerror_pointer = "can't allocate memory for the dlopen handle";
348 DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
349 return(NULL);
350 }
351
352 /* fill in the handle */
353 p->dev = stat_buf.st_dev;
354 p->ino = stat_buf.st_ino;
355 if(mode & RTLD_GLOBAL)
356 p->dlopen_mode = RTLD_GLOBAL;
357 else
358 p->dlopen_mode = RTLD_LOCAL;
359 p->dlopen_mode |= (mode & RTLD_UNSHARED) |
360 (mode & RTLD_NODELETE) |
361 (mode & RTLD_LAZY_UNDEF);
362 p->dlopen_count = 1;
363 p->module = module;
364 p->prev = NULL;
365 p->next = dlopen_handles;
366 if(dlopen_handles != NULL)
367 dlopen_handles->prev = p;
368 dlopen_handles = p;
369
370 /* call the init function if one exists */
371 NSSymbol = NSLookupSymbolInModule(p->module, "__init");
372 if(NSSymbol != NULL){
373 init = NSAddressOfSymbol(NSSymbol);
374 init();
375 }
376
377 DEBUG_PRINT1("%p\n", p);
378 return(p);
379 }
380
381 /*
382 * dlsym() the MacOS X version of the FreeBSD dlopen() interface.
383 */
384 void *
385 dlsym(
386 void * handle,
387 const char *symbol)
388 {
389 struct dlopen_handle *dlopen_handle, *p;
390 NSSymbol NSSymbol;
391 void *address;
392
393 DEBUG_PRINT2("libdl: dlsym(%p,%s) -> ", handle, symbol);
394
395 dlopen_handle = (struct dlopen_handle *)handle;
396
397 /*
398 * If this is the handle for the main program do a global lookup.
399 */
400 if(dlopen_handle == (struct dlopen_handle *)&main_program_handle){
401 if(NSIsSymbolNameDefined(symbol) == TRUE){
402 NSSymbol = NSLookupAndBindSymbol(symbol);
403 address = NSAddressOfSymbol(NSSymbol);
404 dlerror_pointer = NULL;
405 DEBUG_PRINT1("%p\n", address);
406 return(address);
407 }
408 else{
409 dlerror_pointer = "symbol not found";
410 DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
411 return(NULL);
412 }
413 }
414
415 /*
416 * Find this handle and do a lookup in just this module.
417 */
418 p = dlopen_handles;
419 while(p != NULL){
420 if(dlopen_handle == p){
421 NSSymbol = NSLookupSymbolInModule(p->module, symbol);
422 if(NSSymbol != NULL){
423 address = NSAddressOfSymbol(NSSymbol);
424 dlerror_pointer = NULL;
425 DEBUG_PRINT1("%p\n", address);
426 return(address);
427 }
428 else{
429 dlerror_pointer = "symbol not found";
430 DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
431 return(NULL);
432 }
433 }
434 p = p->next;
435 }
436
437 dlerror_pointer = "bad handle passed to dlsym()";
438 DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
439 return(NULL);
440 }
441
442 /*
443 * dlerror() the MacOS X version of the FreeBSD dlopen() interface.
444 */
445 const char *
446 dlerror(
447 void)
448 {
449 const char *p;
450
451 p = (const char *)dlerror_pointer;
452 dlerror_pointer = NULL;
453 return(p);
454 }
455
456 /*
457 * dlclose() the MacOS X version of the FreeBSD dlopen() interface.
458 */
459 int
460 dlclose(
461 void * handle)
462 {
463 struct dlopen_handle *p, *q;
464 unsigned long options;
465 NSSymbol NSSymbol;
466 void (*fini)(void);
467
468 DEBUG_PRINT1("libdl: dlclose(%p) -> ", handle);
469
470 dlerror_pointer = NULL;
471 q = (struct dlopen_handle *)handle;
472 p = dlopen_handles;
473 while(p != NULL){
474 if(p == q){
475 /* if the dlopen() count is not zero we are done */
476 p->dlopen_count--;
477 if(p->dlopen_count != 0){
478 DEBUG_PRINT("OK");
479 return(0);
480 }
481
482 /* call the fini function if one exists */
483 NSSymbol = NSLookupSymbolInModule(p->module, "__fini");
484 if(NSSymbol != NULL){
485 fini = NSAddressOfSymbol(NSSymbol);
486 fini();
487 }
488
489 /* unlink the module for this handle */
490 options = 0;
491 if(p->dlopen_mode & RTLD_NODELETE)
492 options |= NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED;
493 if(p->dlopen_mode & RTLD_LAZY_UNDEF)
494 options |= NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES;
495 if(NSUnLinkModule(p->module, options) == FALSE){
496 dlerror_pointer = "NSUnLinkModule() failed for dlclose()";
497 DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
498 return(-1);
499 }
500 if(p->prev != NULL)
501 p->prev->next = p->next;
502 if(p->next != NULL)
503 p->next->prev = p->prev;
504 if(dlopen_handles == p)
505 dlopen_handles = p->next;
506 free(p);
507 DEBUG_PRINT("OK");
508 return(0);
509 }
510 p = p->next;
511 }
512 dlerror_pointer = "invalid handle passed to dlclose()";
513 DEBUG_PRINT1("ERROR: %s\n", dlerror_pointer);
514 return(-1);
515 }
+0
-496
doc/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 # Makefile.am for SASL documentation
18 # Rob Earhart
19 # $Id: Makefile.am,v 1.34 2004/11/24 18:05:28 ken3 Exp $
20 #
21 ################################################################
22 # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
23 #
24 # Redistribution and use in source and binary forms, with or without
25 # modification, are permitted provided that the following conditions
26 # are met:
27 #
28 # 1. Redistributions of source code must retain the above copyright
29 # notice, this list of conditions and the following disclaimer.
30 #
31 # 2. Redistributions in binary form must reproduce the above copyright
32 # notice, this list of conditions and the following disclaimer in
33 # the documentation and/or other materials provided with the
34 # distribution.
35 #
36 # 3. The name "Carnegie Mellon University" must not be used to
37 # endorse or promote products derived from this software without
38 # prior written permission. For permission or any other legal
39 # details, please contact
40 # Office of Technology Transfer
41 # Carnegie Mellon University
42 # 5000 Forbes Avenue
43 # Pittsburgh, PA 15213-3890
44 # (412) 268-4387, fax: (412) 268-7395
45 # tech-transfer@andrew.cmu.edu
46 #
47 # 4. Redistributions of any form whatsoever must retain the following
48 # acknowledgment:
49 # "This product includes software developed by Computing Services
50 # at Carnegie Mellon University (http://www.cmu.edu/computing/)."
51 #
52 # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
53 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
54 # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
55 # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
56 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
57 # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
58 # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
59 #
60 ################################################################
61 VPATH = @srcdir@
62 pkgdatadir = $(datadir)/@PACKAGE@
63 pkgincludedir = $(includedir)/@PACKAGE@
64 pkglibdir = $(libdir)/@PACKAGE@
65 pkglibexecdir = $(libexecdir)/@PACKAGE@
66 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
67 install_sh_DATA = $(install_sh) -c -m 644
68 install_sh_PROGRAM = $(install_sh) -c
69 install_sh_SCRIPT = $(install_sh) -c
70 INSTALL_HEADER = $(INSTALL_DATA)
71 transform = $(program_transform_name)
72 NORMAL_INSTALL = :
73 PRE_INSTALL = :
74 POST_INSTALL = :
75 NORMAL_UNINSTALL = :
76 PRE_UNINSTALL = :
77 POST_UNINSTALL = :
78 build_triplet = @build@
79 host_triplet = @host@
80 target_triplet = @target@
81 subdir = doc
82 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO
83 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
84 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
85 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
86 $(top_srcdir)/config/sasldb.m4 \
87 $(top_srcdir)/cmulocal/berkdb.m4 \
88 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
89 $(top_srcdir)/cmulocal/c-attribute.m4 \
90 $(top_srcdir)/cmulocal/common.m4 \
91 $(top_srcdir)/cmulocal/cyrus.m4 \
92 $(top_srcdir)/cmulocal/init_automake.m4 \
93 $(top_srcdir)/cmulocal/ipv6.m4 \
94 $(top_srcdir)/cmulocal/openldap.m4 \
95 $(top_srcdir)/cmulocal/openssl.m4 \
96 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
97 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
98 $(ACLOCAL_M4)
99 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
100 CONFIG_HEADER = $(top_builddir)/config.h
101 CONFIG_CLEAN_FILES =
102 CONFIG_CLEAN_VPATH_FILES =
103 SOURCES =
104 DIST_SOURCES =
105 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
106 ACLOCAL = @ACLOCAL@
107 AMTAR = @AMTAR@
108 AUTOCONF = @AUTOCONF@
109 AUTOHEADER = @AUTOHEADER@
110 AUTOMAKE = @AUTOMAKE@
111 AWK = @AWK@
112 CC = @CC@
113 CCDEPMODE = @CCDEPMODE@
114 CFLAGS = @CFLAGS@
115 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
116 CPP = @CPP@
117 CPPFLAGS = @CPPFLAGS@
118 CYGPATH_W = @CYGPATH_W@
119 DEFS = @DEFS@
120 DEPDIR = @DEPDIR@
121 DIRS = @DIRS@
122 DMALLOC_LIBS = @DMALLOC_LIBS@
123 ECHO_C = @ECHO_C@
124 ECHO_N = @ECHO_N@
125 ECHO_T = @ECHO_T@
126 EGREP = @EGREP@
127 EXEEXT = @EXEEXT@
128 GETADDRINFOOBJS = @GETADDRINFOOBJS@
129 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
130 GETSUBOPT = @GETSUBOPT@
131 GREP = @GREP@
132 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
133 GSSAPI_LIBS = @GSSAPI_LIBS@
134 INSTALL = @INSTALL@
135 INSTALL_DATA = @INSTALL_DATA@
136 INSTALL_PROGRAM = @INSTALL_PROGRAM@
137 INSTALL_SCRIPT = @INSTALL_SCRIPT@
138 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
139 IPCTYPE = @IPCTYPE@
140 JAVAC = @JAVAC@
141 JAVADOC = @JAVADOC@
142 JAVAH = @JAVAH@
143 JAVAROOT = @JAVAROOT@
144 JAVA_INCLUDES = @JAVA_INCLUDES@
145 LDFLAGS = @LDFLAGS@
146 LIBOBJS = @LIBOBJS@
147 LIBS = @LIBS@
148 LIBTOOL = @LIBTOOL@
149 LIB_CRYPT = @LIB_CRYPT@
150 LIB_DES = @LIB_DES@
151 LIB_DOOR = @LIB_DOOR@
152 LIB_LDAP = @LIB_LDAP@
153 LIB_MYSQL = @LIB_MYSQL@
154 LIB_PGSQL = @LIB_PGSQL@
155 LIB_SOCKET = @LIB_SOCKET@
156 LIB_SQLITE = @LIB_SQLITE@
157 LIB_SQLITE3 = @LIB_SQLITE3@
158 LN_S = @LN_S@
159 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
160 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
161 LTLIBOBJS = @LTLIBOBJS@
162 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
163 MAKEINFO = @MAKEINFO@
164 MKDIR_P = @MKDIR_P@
165 NM = @NM@
166 NTLM_LIBS = @NTLM_LIBS@
167 OBJEXT = @OBJEXT@
168 OTP_LIBS = @OTP_LIBS@
169 PACKAGE = @PACKAGE@
170 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
171 PACKAGE_NAME = @PACKAGE_NAME@
172 PACKAGE_STRING = @PACKAGE_STRING@
173 PACKAGE_TARNAME = @PACKAGE_TARNAME@
174 PACKAGE_VERSION = @PACKAGE_VERSION@
175 PASSDSS_LIBS = @PASSDSS_LIBS@
176 PATH_SEPARATOR = @PATH_SEPARATOR@
177 PLAIN_LIBS = @PLAIN_LIBS@
178 PURECOV = @PURECOV@
179 PURIFY = @PURIFY@
180 PWCHECKMETH = @PWCHECKMETH@
181 RANLIB = @RANLIB@
182 SASL_DB_BACKEND = @SASL_DB_BACKEND@
183 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
184 SASL_DB_INC = @SASL_DB_INC@
185 SASL_DB_LIB = @SASL_DB_LIB@
186 SASL_DB_MANS = @SASL_DB_MANS@
187 SASL_DB_UTILS = @SASL_DB_UTILS@
188 SASL_DL_LIB = @SASL_DL_LIB@
189 SASL_KRB_LIB = @SASL_KRB_LIB@
190 SASL_MECHS = @SASL_MECHS@
191 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
192 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
193 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
194 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
195 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
196 SCRAM_LIBS = @SCRAM_LIBS@
197 SET_MAKE = @SET_MAKE@
198 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
199 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
200 SHELL = @SHELL@
201 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
202 SNPRINTFOBJS = @SNPRINTFOBJS@
203 SRP_LIBS = @SRP_LIBS@
204 STRIP = @STRIP@
205 VERSION = @VERSION@
206 abs_builddir = @abs_builddir@
207 abs_srcdir = @abs_srcdir@
208 abs_top_builddir = @abs_top_builddir@
209 abs_top_srcdir = @abs_top_srcdir@
210 ac_ct_CC = @ac_ct_CC@
211 am__include = @am__include@
212 am__leading_dot = @am__leading_dot@
213 am__quote = @am__quote@
214 am__tar = @am__tar@
215 am__untar = @am__untar@
216 bindir = @bindir@
217 build = @build@
218 build_alias = @build_alias@
219 build_cpu = @build_cpu@
220 build_os = @build_os@
221 build_vendor = @build_vendor@
222 builddir = @builddir@
223 configdir = @configdir@
224 datadir = @datadir@
225 datarootdir = @datarootdir@
226 docdir = @docdir@
227 dvidir = @dvidir@
228 exec_prefix = @exec_prefix@
229 host = @host@
230 host_alias = @host_alias@
231 host_cpu = @host_cpu@
232 host_os = @host_os@
233 host_vendor = @host_vendor@
234 htmldir = @htmldir@
235 includedir = @includedir@
236 infodir = @infodir@
237 install_sh = @install_sh@
238 libdir = @libdir@
239 libexecdir = @libexecdir@
240 localedir = @localedir@
241 localstatedir = @localstatedir@
242 mandir = @mandir@
243 mkdir_p = @mkdir_p@
244 oldincludedir = @oldincludedir@
245 pdfdir = @pdfdir@
246 plugindir = @plugindir@
247 prefix = @prefix@
248 program_transform_name = @program_transform_name@
249 psdir = @psdir@
250 sbindir = @sbindir@
251 sharedstatedir = @sharedstatedir@
252 srcdir = @srcdir@
253 subdirs = @subdirs@
254 sysconfdir = @sysconfdir@
255 target = @target@
256 target_alias = @target_alias@
257 target_cpu = @target_cpu@
258 target_os = @target_os@
259 target_vendor = @target_vendor@
260 top_build_prefix = @top_build_prefix@
261 top_builddir = @top_builddir@
262 top_srcdir = @top_srcdir@
263 EXTRA_DIST = rfc1321.txt \
264 rfc1939.txt \
265 rfc2104.txt \
266 rfc2195.txt \
267 rfc2222.txt \
268 rfc2243.txt \
269 rfc2245.txt \
270 rfc2289.txt \
271 rfc2444.txt \
272 rfc2595.txt \
273 rfc2831.txt \
274 rfc2945.txt \
275 rfc3174.txt \
276 testing.txt \
277 server-plugin-flow.fig \
278 draft-burdis-cat-srp-sasl-xx.txt \
279 draft-ietf-sasl-anon-xx.txt \
280 draft-ietf-sasl-crammd5-xx.txt \
281 draft-ietf-sasl-gssapi-xx.txt \
282 draft-ietf-sasl-plain-xx.txt \
283 draft-ietf-sasl-rfc2222bis-xx.txt \
284 draft-ietf-sasl-rfc2831bis-xx.txt \
285 draft-ietf-sasl-saslprep-xx.txt \
286 draft-murchison-sasl-login-xx.txt \
287 draft-newman-sasl-c-api-xx.txt \
288 draft-newman-sasl-passdss-xx.txt \
289 programming.html \
290 sysadmin.html \
291 gssapi.html \
292 advanced.html \
293 options.html \
294 plugprog.html \
295 appconvert.html \
296 macosx.html \
297 windows.html \
298 readme.html \
299 mechanisms.html \
300 upgrading.html \
301 index.html \
302 components.html \
303 install.html \
304 TODO \
305 ONEWS \
306 NTMakefile
307
308 all: all-am
309
310 .SUFFIXES:
311 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
312 @for dep in $?; do \
313 case '$(am__configure_deps)' in \
314 *$$dep*) \
315 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
316 && { if test -f $@; then exit 0; else break; fi; }; \
317 exit 1;; \
318 esac; \
319 done; \
320 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
321 $(am__cd) $(top_srcdir) && \
322 $(AUTOMAKE) --gnu doc/Makefile
323 .PRECIOUS: Makefile
324 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
325 @case '$?' in \
326 *config.status*) \
327 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
328 *) \
329 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
330 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
331 esac;
332
333 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
334 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
335
336 $(top_srcdir)/configure: $(am__configure_deps)
337 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
338 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
339 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
340 $(am__aclocal_m4_deps):
341
342 mostlyclean-libtool:
343 -rm -f *.lo
344
345 clean-libtool:
346 -rm -rf .libs _libs
347 tags: TAGS
348 TAGS:
349
350 ctags: CTAGS
351 CTAGS:
352
353
354 distdir: $(DISTFILES)
355 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
356 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
357 list='$(DISTFILES)'; \
358 dist_files=`for file in $$list; do echo $$file; done | \
359 sed -e "s|^$$srcdirstrip/||;t" \
360 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
361 case $$dist_files in \
362 */*) $(MKDIR_P) `echo "$$dist_files" | \
363 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
364 sort -u` ;; \
365 esac; \
366 for file in $$dist_files; do \
367 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
368 if test -d $$d/$$file; then \
369 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
370 if test -d "$(distdir)/$$file"; then \
371 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
372 fi; \
373 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
374 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
375 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
376 fi; \
377 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
378 else \
379 test -f "$(distdir)/$$file" \
380 || cp -p $$d/$$file "$(distdir)/$$file" \
381 || exit 1; \
382 fi; \
383 done
384 check-am: all-am
385 check: check-am
386 all-am: Makefile
387 installdirs:
388 install: install-am
389 install-exec: install-exec-am
390 install-data: install-data-am
391 uninstall: uninstall-am
392
393 install-am: all-am
394 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
395
396 installcheck: installcheck-am
397 install-strip:
398 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
399 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
400 `test -z '$(STRIP)' || \
401 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
402 mostlyclean-generic:
403
404 clean-generic:
405
406 distclean-generic:
407 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
408 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
409
410 maintainer-clean-generic:
411 @echo "This command is intended for maintainers to use"
412 @echo "it deletes files that may require special tools to rebuild."
413 clean: clean-am
414
415 clean-am: clean-generic clean-libtool mostlyclean-am
416
417 distclean: distclean-am
418 -rm -f Makefile
419 distclean-am: clean-am distclean-generic
420
421 dvi: dvi-am
422
423 dvi-am:
424
425 html: html-am
426
427 html-am:
428
429 info: info-am
430
431 info-am:
432
433 install-data-am:
434
435 install-dvi: install-dvi-am
436
437 install-dvi-am:
438
439 install-exec-am:
440
441 install-html: install-html-am
442
443 install-html-am:
444
445 install-info: install-info-am
446
447 install-info-am:
448
449 install-man:
450
451 install-pdf: install-pdf-am
452
453 install-pdf-am:
454
455 install-ps: install-ps-am
456
457 install-ps-am:
458
459 installcheck-am:
460
461 maintainer-clean: maintainer-clean-am
462 -rm -f Makefile
463 maintainer-clean-am: distclean-am maintainer-clean-generic
464
465 mostlyclean: mostlyclean-am
466
467 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
468
469 pdf: pdf-am
470
471 pdf-am:
472
473 ps: ps-am
474
475 ps-am:
476
477 uninstall-am:
478
479 .MAKE: install-am install-strip
480
481 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
482 distclean distclean-generic distclean-libtool distdir dvi \
483 dvi-am html html-am info info-am install install-am \
484 install-data install-data-am install-dvi install-dvi-am \
485 install-exec install-exec-am install-html install-html-am \
486 install-info install-info-am install-man install-pdf \
487 install-pdf-am install-ps install-ps-am install-strip \
488 installcheck installcheck-am installdirs maintainer-clean \
489 maintainer-clean-generic mostlyclean mostlyclean-generic \
490 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
491
492
493 # Tell versions [3.59,3.63) of GNU make to not export all variables.
494 # Otherwise a system limit (for SysV at least) may be exceeded.
495 .NOEXPORT:
0
1
2
3 Network K. Burdis
4 Internet-Draft Rhodes University
5 Expires: November 28, 2003 R. Naffah
6 Forge Research
7 May 30, 2003
8
9
10 Secure Remote Password Authentication Mechanism
11 draft-burdis-cat-srp-sasl-08
12
13 Status of this Memo
14
15 This document is an Internet-Draft and is in full conformance with
16 all provisions of Section 10 of RFC2026.
17
18 Internet-Drafts are working documents of the Internet Engineering
19 Task Force (IETF), its areas, and its working groups. Note that other
20 groups may also distribute working documents as Internet-Drafts.
21
22 Internet-Drafts are draft documents valid for a maximum of six months
23 and may be updated, replaced, or obsoleted by other documents at any
24 time. It is inappropriate to use Internet-Drafts as reference
25 material or to cite them other than as "work in progress."
26
27 The list of current Internet-Drafts can be accessed at http://
28 www.ietf.org/ietf/1id-abstracts.txt.
29
30 The list of Internet-Draft Shadow Directories can be accessed at
31 http://www.ietf.org/shadow.html.
32
33 This Internet-Draft will expire on November 28, 2003.
34
35 Copyright Notice
36
37 Copyright (C) The Internet Society (2003). All Rights Reserved.
38
39 Abstract
40
41 This document describes an authentication mechanism based on the
42 Secure Remote Password protocol (SRP-6) and how to use it with the
43 authentication frameworks Secure Authentication and Security Layer
44 (SASL), Generic Security Services Application Programming Interface
45 (GSS-API) and Extensible Authentication Protocol (EAP). This
46 mechanism performs mutual authentication and can provide a security
47 layer with replay detection, integrity protection and/or
48 confidentiality protection.
49
50
51
52
53
54
55 Burdis & Naffah Expires November 28, 2003 [Page 1]
56
57 Internet-Draft SRP Authentication Mechanism May 2003
58
59
60 Table of Contents
61
62 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
63 2. Conventions Used in this Document . . . . . . . . . . . . . 5
64 3. Data Element Formats . . . . . . . . . . . . . . . . . . . . 6
65 3.1 Scalar Numbers . . . . . . . . . . . . . . . . . . . . . . . 6
66 3.2 Multi-Precision Integers . . . . . . . . . . . . . . . . . . 6
67 3.3 Octet Sequences . . . . . . . . . . . . . . . . . . . . . . 7
68 3.4 Extended Octet Sequences . . . . . . . . . . . . . . . . . . 7
69 3.5 Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
70 3.6 Buffers . . . . . . . . . . . . . . . . . . . . . . . . . . 8
71 3.7 Data Element Size Limits . . . . . . . . . . . . . . . . . . 8
72 3.8 Unsigned Integers . . . . . . . . . . . . . . . . . . . . . 8
73 4. Protocol Description . . . . . . . . . . . . . . . . . . . . 9
74 4.1 Client Sends its Identity . . . . . . . . . . . . . . . . . 11
75 4.2 Server Agrees to Re-use Parameters of a Previous Session . . 11
76 4.3 Server Sends Protocol Elements . . . . . . . . . . . . . . . 12
77 4.4 Client Sends its Ephemeral Public Key and Evidence . . . . . 15
78 4.5 Server Verifies Client's Evidence and Sends its Evidence . . 17
79 5. Security Layer . . . . . . . . . . . . . . . . . . . . . . . 19
80 5.1 Cryptographic Primitives . . . . . . . . . . . . . . . . . . 20
81 5.1.1 Pseudo Random Number Generator . . . . . . . . . . . . . . . 20
82 5.1.2 Key Derivation Function . . . . . . . . . . . . . . . . . . 22
83 5.2 Confidentiality Protection . . . . . . . . . . . . . . . . . 23
84 5.3 Replay Detection . . . . . . . . . . . . . . . . . . . . . . 24
85 5.4 Integrity Protection . . . . . . . . . . . . . . . . . . . . 25
86 5.5 Summary of Security Layer Output . . . . . . . . . . . . . . 25
87 6. Discussion . . . . . . . . . . . . . . . . . . . . . . . . . 27
88 6.1 Mandatory Algorithms . . . . . . . . . . . . . . . . . . . . 27
89 6.2 Modulus and Generator Values . . . . . . . . . . . . . . . . 27
90 6.3 Replay Detection Sequence Number Counters . . . . . . . . . 27
91 6.4 Re-using the Parameters of a Previous Session . . . . . . . 28
92 7. SASL . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
93 7.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 30
94 7.2 Mechanism Name . . . . . . . . . . . . . . . . . . . . . . . 30
95 7.3 Security Layer . . . . . . . . . . . . . . . . . . . . . . . 30
96 7.4 Profile Considerations . . . . . . . . . . . . . . . . . . . 30
97 7.5 Example . . . . . . . . . . . . . . . . . . . . . . . . . . 31
98 8. GSS-API . . . . . . . . . . . . . . . . . . . . . . . . . . 34
99 8.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 34
100 8.2 Terminology . . . . . . . . . . . . . . . . . . . . . . . . 34
101 8.3 Initial Token . . . . . . . . . . . . . . . . . . . . . . . 34
102 8.4 Security Layer . . . . . . . . . . . . . . . . . . . . . . . 35
103 9. EAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
104 9.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 36
105 9.2 Terminology . . . . . . . . . . . . . . . . . . . . . . . . 36
106 9.3 Method Details . . . . . . . . . . . . . . . . . . . . . . . 36
107 9.4 Security Claims . . . . . . . . . . . . . . . . . . . . . . 37
108
109
110
111 Burdis & Naffah Expires November 28, 2003 [Page 2]
112
113 Internet-Draft SRP Authentication Mechanism May 2003
114
115
116 10. Security Considerations . . . . . . . . . . . . . . . . . . 40
117 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 41
118 Normative References . . . . . . . . . . . . . . . . . . . . 42
119 Informative References . . . . . . . . . . . . . . . . . . . 44
120 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 46
121 A. Modulus and Generator Values . . . . . . . . . . . . . . . . 47
122 B. Changes since the previous draft . . . . . . . . . . . . . . 49
123 Intellectual Property and Copyright Statements . . . . . . . 50
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167 Burdis & Naffah Expires November 28, 2003 [Page 3]
168
169 Internet-Draft SRP Authentication Mechanism May 2003
170
171
172 1. Introduction
173
174 The Secure Remote Password (SRP) is a password-based, zero-knowledge,
175 authentication and key-exchange protocol developed by Thomas Wu. It
176 has good performance, is not plaintext-equivalent and maintains
177 perfect forward secrecy. It provides authentication (optionally
178 mutual authentication) and the negotiation of a shared context key
179 [SRP].
180
181 The mechanism described herein is based on the SRP-6 protocol,
182 described in [SRP-6] and [SRP-6i]. SRP-6 is an improved version of
183 the original SRP protocol (also called SRP-3) described in
184 [RFC-2945]. Due to the design of the mechanism, mutual
185 authentication is MANDATORY.
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223 Burdis & Naffah Expires November 28, 2003 [Page 4]
224
225 Internet-Draft SRP Authentication Mechanism May 2003
226
227
228 2. Conventions Used in this Document
229
230 o A hex digit is an element of the set:
231
232 {0, 1, 2, 3, 4, 5, 6, 7, 8 , 9, A, B, C, D, E, F}
233
234 A hex digit is the representation of a 4-bit string. Examples:
235
236 7 = 0111
237
238 A = 1010
239
240 o An octet is an 8-bit string. In this document an octet may be
241 written as a pair of hex digits. Examples:
242
243 7A = 01111010
244
245 02 = 00000010
246
247 o All data is encoded and sent in network byte order (big-endian).
248
249 o The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
250 NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL"
251 in this document are to be interpreted as described in [RFC-2119].
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279 Burdis & Naffah Expires November 28, 2003 [Page 5]
280
281 Internet-Draft SRP Authentication Mechanism May 2003
282
283
284 3. Data Element Formats
285
286 This section describes the encoding of the data elements used by the
287 mechanism described in this document.
288
289 3.1 Scalar Numbers
290
291 Scalar numbers are unsigned quantities. Using b[k] to refer to the
292 k-th octet being processed, the value of a two-octet scalar is:
293
294 ((b[0] << 8) + b[1]),
295
296 where << is the bit left-shift operator. The value of a four-octet
297 scalar is:
298
299 ((b[0] << 24) + (b[1] << 16) + (b[2] << 8) + b[3]).
300
301
302 3.2 Multi-Precision Integers
303
304 Multi-Precision Integers, or MPIs, are positive integers used to hold
305 large integers used in cryptographic computations.
306
307 MPIs are encoded using a scheme inspired by that used by OpenPGP -
308 [RFC-2440] (section 3.2) - for encoding such entities:
309
310 The encoded form of an MPI SHALL consist of two pieces: a
311 two-octet scalar that represents the length of the entity, in
312 octets, followed by a sequence of octets that contain the actual
313 integer.
314
315 These octets form a big-endian number; A big-endian number can be
316 encoded by prefixing it with the appropriate length.
317
318 Examples: (all numbers are in hexadecimal)
319
320 The sequence of octets [00 01 01] encodes an MPI with the value
321 1, while the sequence [00 02 01 FF] encodes an MPI with the
322 value of 511.
323
324 Additional rule:
325
326 * The length field of an encoded MPI describes the octet count
327 starting from the MPI's first non-zero octet, containing the
328 most significant non-zero bit. Thus, the encoding [00 02 01]
329 is not formed correctly; It should be [00 01 01].
330
331 We shall use the syntax mpi(A) to denote the encoded form of the
332
333
334
335 Burdis & Naffah Expires November 28, 2003 [Page 6]
336
337 Internet-Draft SRP Authentication Mechanism May 2003
338
339
340 multi-precision integer A. Furthermore, we shall use the syntax
341 bytes(A) to denote the big-endian sequence of octets forming the
342 multi-precision integer with the most significant octet being the
343 first non-zero octet containing the most significant bit of A.
344
345 3.3 Octet Sequences
346
347 This mechanism generates, uses and exchanges sequences of octets;
348 e.g. output values of message digest algorithm functions. When such
349 entities travel on the wire, they shall be preceded by a one-octet
350 scalar quantity representing the count of following octets.
351
352 Note that a zero-length octet sequence is encoded as a single 00
353 octet.
354
355 We shall use the syntax os(s) to denote the encoded form of the octet
356 sequence. Furthermore, we shall use the syntax bytes(s) to denote
357 the sequence of octets s, in big-endian order.
358
359 3.4 Extended Octet Sequences
360
361 Extended sequences of octets are exchanged when using the security
362 layer. When these sequences travel on the wire, they shall be
363 preceded by a four-octet scalar quantity representing the count of
364 following octets.
365
366 We shall use the syntax eos(s) to denote the encoded form of the
367 extended octet sequence. Furthermore, we shall use the syntax
368 bytes(s) to denote the sequence of octets s, in big-endian order.
369
370 3.5 Text
371
372 The only character set for text is the UTF-8 encoding [RFC-2279] of
373 Unicode characters [ISO-10646]. All text MUST be in Unicode
374 Normalization Form KC [UNICODE-KC] without NUL characters.
375
376 In addition, to avoid non-interoperability due to incompatible
377 normalisation techniques, the client MUST prepare strings using the
378 [SASLprep] profile of [RFC-3454]
379
380 We shall use the syntax utf8(L) to denote the string L in UTF-8
381 encoding, preceded by a two-octet scalar quantity representing the
382 count of following octets. Furthermore, we shall use the syntax
383 bytes(L) to denote the sequence of octets representing the UTF-8
384 encoding of L, in big-endian order.
385
386 Not that the empty string is encoded as the two octet sequence 00 00.
387
388
389
390
391 Burdis & Naffah Expires November 28, 2003 [Page 7]
392
393 Internet-Draft SRP Authentication Mechanism May 2003
394
395
396 3.6 Buffers
397
398 In this mechanism data is exchanged between the client and server
399 using buffers. A buffer acts as an envelope for the sequence of data
400 elements sent by one end-point of the exchange, and expected by the
401 other.
402
403 A buffer MAY NOT contain other buffers. It may only contain zero,
404 one or more data elements.
405
406 A buffer shall be encoded as two fields: a four-octet scalar quantity
407 representing the count of following octets, and the concatenation of
408 the octets of the data element(s) contained in the buffer.
409
410 We shall use the syntax {A|B|C} to denote a buffer containing A, B
411 and C in that order. For example:
412
413 { mpi(N) | mpi(g) | utf8(L) }
414
415 is a buffer containing, in the designated order, the encoded forms of
416 an MPI N, an MPI g and a Text L.
417
418 3.7 Data Element Size Limits
419
420 The following table details the size limit, in number of octets, for
421 each of the data element encodings described earlier.
422
423 Data element type Header Size limit in octets
424 (octets) (excluding header)
425 ------------------------------------------------------------
426 Octet Sequence 1 255
427 MPI 2 65,535
428 Text 2 65,535
429 Extended Octet Sequence 4 2,147,483,383
430 Buffer 4 2,147,483,643
431
432 An implementation MUST signal an exception if any size constraint is
433 violated.
434
435 3.8 Unsigned Integers
436
437 This mechanism uses unsigned integer values ranging from zero to
438 4,294,967,296.
439
440 When such entities travel on the wire, they shall be encoded as
441 4-octet Scalar Numbers. We shall use the syntax uint(n) to denote
442 the encoding of an Unsigned Integer n.
443
444
445
446
447 Burdis & Naffah Expires November 28, 2003 [Page 8]
448
449 Internet-Draft SRP Authentication Mechanism May 2003
450
451
452 4. Protocol Description
453
454 The following sections describe the sequence of data transmitted
455 between the client and server for SRP authentication, as well as the
456 extra control information exchanged to enable a client to request
457 whether or not replay detection, integrity protection and/or
458 confidentiality protection should be provided by a security layer.
459 There are two possible mechanism data exchanges during the
460 authentication phase:
461
462 The following exchange occurs when a new session is negotiated
463 between the client and the server. It will also occur when the
464 client requests re-use of the parameters of a previous session and
465 either the server does not support such re-use or no longer considers
466 the previous session to be valid:
467
468 Client Server
469
470 --- { utf8(U) | utf8(I) | utf8(sid) | os(cn) } ------------->
471
472 <------ { 00 | mpi(N) | mpi(g) | os(s) | mpi(B) | utf8(L) } ---
473
474 --- { mpi(A) | os(M1) | utf8(o) | os(cIV) } ---------------->
475
476 <------ { os(M2) | os(sIV) | utf8(sid) | uint(ttl) } ---------
477
478 where:
479
480 U is the authentication identity (username),
481
482 I is the authorisation identity (userid),
483
484 sid is the identifier of a previous session whose parameters the
485 client wishes to re-use,
486
487 cn is the client's nonce used in deriving a new shared context
488 key from the shared context key of the previous session,
489
490 00 is an octet indicating that the previous session parameters
491 will NOT be re-used,
492
493 N is the safe prime modulus,
494
495 g is the generator,
496
497 s is the user's password salt,
498
499 B is the server's ephemeral public key,
500
501
502
503 Burdis & Naffah Expires November 28, 2003 [Page 9]
504
505 Internet-Draft SRP Authentication Mechanism May 2003
506
507
508 L is the options list indicating available security services,
509
510 A is the client's ephemeral public key,
511
512 M1 is the client's evidence that the shared key K is known,
513
514 o is the options list indicating chosen security services,
515
516 cIV is the client's initial vector for the chosen encryption
517 algorithm,
518
519 M2 is the server's evidence that the shared key K is known.
520
521 sIV is the server's initial vector for the chosen encryption
522 algorithm,
523
524 sid is the identifier the server gives to this session for
525 possible later re-use of the negotiated parameters,
526
527 ttl is the time period for which this session's parameters may be
528 re-usable,
529
530 The following exchange occurs when the client requests that the
531 parameters negotiated in a previous session be re-used in this
532 session, but with a newly derived shared context key, and the server
533 agrees:
534
535 Client Server
536
537 --- { utf8(U) | utf8(I) | utf8(sid) | os(cn) } -------------->
538
539 <---------------------------------- { FF | os(sn) } ----------
540
541 where:
542
543 U is the authentication identity (username),
544
545 I is the authorisation identity (userid),
546
547 sid is the identifier of a previous session whose parameters the
548 client wishes to re-use,
549
550 cn is the client's nonce used in deriving a new shared context
551 key from the shared context key of the previous session,
552
553 FF is an octet indicating that the previous session parameters
554 WILL be re-used,
555
556
557
558
559 Burdis & Naffah Expires November 28, 2003 [Page 10]
560
561 Internet-Draft SRP Authentication Mechanism May 2003
562
563
564 sn is the server's nonce used in deriving a new shared context
565 key from the shared context key of the previous session,
566
567
568 4.1 Client Sends its Identity
569
570 The client determines its authentication identity U and authorisation
571 identity I, encodes them and sends them to the server.
572
573 The semantics of both U and I are intended to be the same as
574 described in [SASL]. Specifically, the authentication identity U is
575 derived from the client's authentication credentials, and the
576 authorisation identity I is used by the server as the primary
577 identity for making access policy decisions.
578
579 As a client might not have the same information as the server,
580 clients SHOULD NOT themselves try to derive authorisation identities
581 from authentication identities. When an authorisation identity is
582 not specified by the user the client SHOULD send an empty string
583 instead.
584
585 If the client does not wish to re-use parameters negotiated in a
586 previous session then it sets sid to the empty string and cn to a
587 zero-length octet sequence.
588
589 However, if the client does wish to attempt to re-use the parameters
590 negotiated in a previous session then it sets sid to the session
591 identifier for that session, and sets cn as follows:
592
593 cn = prng()
594
595 where:
596
597 prng() is a random number generation function that outputs at
598 least 16 octets of data.
599
600 See Section 6.4 for more information on re-using negotiated
601 parameters of a previous session.
602
603 The client sends:
604
605 { utf8(U) | utf8(I) | utf8(sid) | os(cn) }
606
607
608 4.2 Server Agrees to Re-use Parameters of a Previous Session
609
610 If the server supports re-using the parameters negotiated in a
611 previous session and it considers the previous session, identified by
612
613
614
615 Burdis & Naffah Expires November 28, 2003 [Page 11]
616
617 Internet-Draft SRP Authentication Mechanism May 2003
618
619
620 the session identifier (sid) received from the client, to be valid,
621 it responds as follows:
622
623 The server sends the octet FF as the first element of the message to
624 indicate to the client that parameters of the previous session are
625 being re-used. It also generates a nonce (sn), which is later used
626 in deriving a new shared context key for this session:
627
628 sn = prng()
629
630 where:
631
632 prng() is a random number generation function that outputs at
633 least 16 octets of data.
634
635 Note that the server nonce (sn) MUST NOT be the same as the client
636 nonce (cn).
637
638 The server sends:
639
640 { FF | os(sn) }
641
642 See Section 6.4 for more information on re-using negotiated
643 parameters of a previous session and deriving the new shared context
644 key.
645
646 4.3 Server Sends Protocol Elements
647
648 Otherwise, the server receives U and looks up the safe prime modulus
649 N, the generator g, the salt s, and the verifier v, to be used for
650 that identity. It uses the this information to generate its
651 ephemeral public key B as follows:
652
653 b = prng();
654
655 B = ((3 * v) + (g ** b)) % N;
656
657 where:
658
659 prng() is a random number generation function,
660
661 b is the MPI that will act as the server's private key,
662
663 v is the stored password verifier value,
664
665 g is the generator,
666
667 N is the safe prime modulus,
668
669
670
671 Burdis & Naffah Expires November 28, 2003 [Page 12]
672
673 Internet-Draft SRP Authentication Mechanism May 2003
674
675
676 * is the multiplication operator,
677
678 + is the addition operator,
679
680 ** is the exponentiation operator,
681
682 % is the modulus operator,
683
684 The server also creates an options list L, which consists of a
685 comma-separated list of option strings that specify the options the
686 server supports. This options list MUST NOT contain any whitespace
687 characters and all alphabetic characters MUST be in lowercase. When
688 used in digest calculations by the client the options list MUST be
689 used as received.
690
691 The following option strings are defined:
692
693 o "mda=<MDA-name>" indicates that the server supports the designated
694 hash function as the underlying Message Digest Algorithm for the
695 designated user to be used for all SRP calculations - to compute
696 both client-side and server-side digests. The specified algorithm
697 MUST meet the requirements specified in section 3.2 of [RFC-2945]:
698
699 "Any hash function used with SRP should produce an output of at
700 least 16 bytes and have the property that small changes in the
701 input cause significant nonlinear changes in the output."
702
703 Note that in the interests of interoperability between client and
704 server implementations and with other SRP-based tools, both the
705 client and the server MUST support SHA-160 as an underlying
706 Message Digest Algorithm. While the server is not required to
707 list SHA-160 as an available underlying Message Digest Algorithm,
708 it must be able to do so.
709
710 o "integrity=hmac-<MDA-name>" indicates that the server supports
711 integrity protection using the HMAC algorithm [RFC-2104] with
712 <MDA-name> as the underlying Message Digest Algorithm. Acceptable
713 MDA names are chosen from [SCAN] under the MessageDigest section.
714 A server SHOULD send such an option string for each HMAC algorithm
715 it supports. The server MUST advertise at least one integrity
716 protection algorithm and in the interest of interoperability the
717 server SHOULD advertise support for the HMAC-SHA-160 algorithm.
718
719 o "replay_detection" indicates that the server supports replay
720 detection using sequence numbers. Replay detection SHALL NOT be
721 activated without also activating integrity protection. If the
722 replay detection option is offered (by the server) and/or chosen
723 (by the client) without explicitly specifying an integrity
724
725
726
727 Burdis & Naffah Expires November 28, 2003 [Page 13]
728
729 Internet-Draft SRP Authentication Mechanism May 2003
730
731
732 protection option, then the default integrity protection option
733 "integrity=hmac-sha-160" is implied and SHALL be activated.
734
735 o "confidentiality=<cipher-name>" indicates that the server supports
736 confidentiality protection using the symmetric key block cipher
737 algorithm <cipher-name>. The server SHOULD send such an option
738 string for each confidentiality protection algorithm it supports.
739 Note that in the interest of interoperability, if the server
740 offers confidentiality protection, it MUST send the option string
741 "confidentiality=aes" since it is then MANDATORY for it to provide
742 support for the [AES] algorithm.
743
744 o "mandatory=[integrity|replay_detection|confidentiality]" is an
745 option only available to the server that indicates that the
746 specified security layer option is MANDATORY and MUST be chosen by
747 the client for use in the resulting security layer. If a server
748 specifies an option as mandatory in this way, it MUST abort the
749 connection if the specified option is not chosen by the client.
750 It doesn't make sense for the client to send this option since it
751 is only able to choose options that the server advertises. The
752 client SHOULD abort the connection if the server does not offer an
753 option that it requires. If this option is not specified then
754 this implies that no options are mandatory. The server SHOULD
755 always send the "mandatory=integrity" option indicating that
756 integrity protection is required.
757
758 o "maxbuffersize=<number-of-bytes>" indicates to the peer the
759 maximum number of raw bytes (excluding the buffer header) to be
760 processed by the security layer at a time, if one is negotiated.
761 The value of <number-of-bytes> MUST NOT exceed the Buffer size
762 limit defined in section 3.7. If this option is not detected by a
763 client or server mechanism, then it shall operate its security
764 layer on the assumption that the maximum number of bytes that may
765 be sent, to the peer server or client mechanism respectively, is
766 the Buffer data size limit indicated in section 3.7. On the other
767 hand, if a recipient detects this option, it shall break any
768 octet-sequence longer than the designated limit into two or more
769 fragments, before sending them separately, in sequence, to the
770 peer.
771
772 For example, if the server supports integrity protection using the
773 HMAC-SHA-160 and HMAC-MD5 algorithms, replay detection and no
774 confidentiality protection, the options list would be:
775
776 mda=sha-1,integrity=hmac-sha-160,integrity=hmac-md5,replay_detection
777
778 The server sends the octet 00 as the first element of the message to
779 indicate to the client that parameters from a previous session are
780
781
782
783 Burdis & Naffah Expires November 28, 2003 [Page 14]
784
785 Internet-Draft SRP Authentication Mechanism May 2003
786
787
788 NOT being used.
789
790 The server sends:
791
792 { 00 | mpi(N) | mpi(g) | os(s) | mpi(B) | utf8(L) }
793
794
795 4.4 Client Sends its Ephemeral Public Key and Evidence
796
797 The client receives the options list L from the server that specifies
798 the Message Digest Algorithm(s) available to be used for all SRP
799 calculations, the security service options the server supports,
800 including the maximum buffer size the server can handle, and the
801 server's ephemeral public key B. The client selects options from
802 this list and creates a new options list o that specifies the
803 selected Message Digest Algorithm to be used for SRP calculations and
804 the security services that will be used in the security layer. At
805 most one available Message Digest Algorithm name, one available
806 integrity protection algorithm and one available confidentiality
807 protection algorithm may be selected. In addition the client may
808 specify the maximum buffer size it can handle. The client MUST
809 include any option specified by the mandatory option.
810
811 The client SHOULD always select an integrity protection algorithm
812 even if the server does not make it mandatory to do so. If the
813 client selects a confidentiality protection algorithm it SHOULD then
814 also select an integrity protection algorithm.
815
816 The options list o MUST NOT contain any whitespace characters and all
817 alphabetic characters MUST be in lowercase. When used in digest
818 calculations by the server the options list MUST be used as received.
819
820 The client generates its ephemeral public key A as follows:
821
822 a = prng();
823
824 A = (g ** a) % N;
825
826 where:
827
828 a is the MPI that will act as the client's private key,
829
830 The client also calculates the shared context key K, and calculates
831 the evidence M1 that proves to the server that it knows the shared
832 context key K, as well as the server's ephemeral public key B, the
833 user's authorisation identity I and the server's options list L.
834
835 K, on the client's side is computed as follows:
836
837
838
839 Burdis & Naffah Expires November 28, 2003 [Page 15]
840
841 Internet-Draft SRP Authentication Mechanism May 2003
842
843
844 x = H(s | H(U | ":" | p));
845
846 u = H(A | B);
847
848 S = ((B - (3 * (g ** x))) ** (a + (u * x))) % N;
849
850 K = H(S);
851
852 where:
853
854 s is the user's password salt,
855
856 U is the authentication identity (username),
857
858 p is the password value.
859
860 A is the client's ephemeral public key,
861
862 B is the server's ephemeral public key,
863
864 g is the generator,
865
866 N is the safe prime modulus,
867
868 H() is the result of digesting the designated input/data with the
869 chosen underlying Message Digest Algorithm function.
870
871 - is the subtraction operator,
872
873 * is the multiplication operator,
874
875 + is the addition operator,
876
877 ** is the exponentiation operator,
878
879 % is the modulus operator,
880
881 M1 is computed as:
882
883 H( bytes(H( bytes(N) )) ^ bytes( H( bytes(g) ))
884 | bytes(H( bytes(U) ))
885 | bytes(s)
886 | bytes(A)
887 | bytes(B)
888 | bytes(K)
889 | bytes(H( bytes(I) ))
890 | bytes(H( bytes(L) ))
891 )
892
893
894
895 Burdis & Naffah Expires November 28, 2003 [Page 16]
896
897 Internet-Draft SRP Authentication Mechanism May 2003
898
899
900 where:
901
902 ^ is the bitwise XOR operator.
903
904 All parameters received from the server that are used as input to a
905 digest operation MUST be used as received.
906
907 If the client chooses to activate the Confidentiality Protection
908 service in the Security Layer, it MUST send the Initial Vector cIV
909 that the server will use to set up its encryption context. (See
910 Section 5.2 for details on the Confidentiality Protection service and
911 how cIV is generated.) However, this element MAY be a zero-length
912 octet stream if the server does not advertise the Confidentiality
913 Protection service or the client decides not to activate it.
914
915 The client sends:
916
917 { mpi(A) | os(M1) | utf8(o) | os(cIV) }
918
919
920 4.5 Server Verifies Client's Evidence and Sends its Evidence
921
922 The server calculates the shared context key K, and verifies the
923 client's evidence M1.
924
925 K, on the server's side is computed as follows:
926
927 u = H(A | B);
928
929 S = ((A * (v ** u)) ** b) % N;
930
931 K = H(S);
932
933 where:
934
935 A is the client's ephemeral public key,
936
937 B is the server's ephemeral public key,
938
939 v is the stored password verifier value,
940
941 b is the server's ephemeral private key,
942
943 N is the safe prime modulus,
944
945 H() is the result of digesting the designated input/data with the
946 chosen underlying Message Digest Algorithm function.
947
948
949
950
951 Burdis & Naffah Expires November 28, 2003 [Page 17]
952
953 Internet-Draft SRP Authentication Mechanism May 2003
954
955
956 * is the multiplication operator,
957
958 ** is the exponentiation operator,
959
960 % is the modulus operator,
961
962 If the client chose to activate the Confidentiality Protection
963 service in the Security Layer then the server MUST send the Initial
964 Vector sIV that the client will use to set up its encryption context.
965 (See Section 5.2 for details on the Confidentiality Protection
966 service and how sIV is generated.) However, this element MAY be a
967 zero-length octet sequence if the client did not choose to activate
968 the Confidentiality Protection service.
969
970 If the server's policy allows re-using the parameters of this session
971 then it sets sid to a unique identifier for this session and sets ttl
972 to the number of seconds for which the session MAY be valid. If the
973 server does not support re-using the parameters of this session then
974 it sets sid to the empty string and ttl to any value. See Section
975 6.4 for more information on re-using negotiated parameters of a
976 previous session.
977
978 The server computes its evidence M2, which proves to the client that
979 it knows the shared context key K, as well as U, I and o, as follows:
980
981 H( bytes(A)
982 | bytes(M1)
983 | bytes(K)
984 | bytes(H( bytes(I) ))
985 | bytes(H( bytes(o) ))
986 | bytes(sid)
987 | ttl
988 )
989
990 All parameters received from the client that are used as input to a
991 digest operation MUST be used as received.
992
993 The server sends:
994
995 { os(M2) | os(sIV) | sid | ttl }
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007 Burdis & Naffah Expires November 28, 2003 [Page 18]
1008
1009 Internet-Draft SRP Authentication Mechanism May 2003
1010
1011
1012 5. Security Layer
1013
1014 Depending on the options offered by the server and chosen by the
1015 client, the security layer may provide integrity protection, replay
1016 detection, and/or confidentiality protection.
1017
1018 The security layer can be thought of as a three-stage filter through
1019 which the data flows from the output of one stage to the input of the
1020 following one. The first input is the original data, while the last
1021 output is the data after being subject to the transformations of this
1022 filter.
1023
1024 The data always passes through this three-stage filter, though any of
1025 the stages may be inactive. Only when a stage is active would the
1026 output be different from the input. In other words, if a stage is
1027 inactive, the octet sequence at the output side is an exact duplicate
1028 of the same sequence at the input side.
1029
1030 Schematically, the three-stage filter security layer appears as
1031 follows:
1032
1033 +----------------------------+
1034 | | I/ p1
1035 p1 --->| Confidentiality protection |---+
1036 | | | A/ c
1037 +----------------------------+ |
1038 |
1039 +------------------------------------+
1040 |
1041 | +----------------------------+
1042 | | | I/ p2
1043 p2 +-->| Replay detection |---+
1044 | | | A/ p2 | q
1045 +----------------------------+ |
1046 |
1047 +------------------------------------+
1048 |
1049 | +----------------------------+
1050 | | | I/ p3
1051 p3 +-->| Integrity protection |--->
1052 | | A/ p3 | C
1053 +----------------------------+
1054
1055 where:
1056
1057 p1, p2 and p3 are the input octet sequences at each stage,
1058
1059 I/ denotes the output at the end of one stage if/when the stage is
1060
1061
1062
1063 Burdis & Naffah Expires November 28, 2003 [Page 19]
1064
1065 Internet-Draft SRP Authentication Mechanism May 2003
1066
1067
1068 inactive or disabled,
1069
1070 A/ denotes the output at the end of one stage if/when the stage is
1071 active or enabled,
1072
1073 c is the encrypted (sender-side) or decrypted (receiver-side)
1074 octet sequence. c1 shall denote the value computed by the sender,
1075 while c2 shall denote the value computed by the receiver.
1076
1077 q is a four-octet scalar quantity representing a sequence number,
1078
1079 C is the Message Authentication Code. C1 shall denote the value
1080 of the MAC as computed by the sender, while C2 shall denote the
1081 value computed by the receiver.
1082
1083 It is worth noting here that both client and server have their own
1084 distinct security contexts, including distinct encryption and
1085 decryption sub-contexts. In principal, nothing in this specification
1086 should prevent an implementation from supporting asynchronous
1087 connections.
1088
1089 5.1 Cryptographic Primitives
1090
1091 5.1.1 Pseudo Random Number Generator
1092
1093 This mechanism requires random data to be generated for use in:
1094
1095 1. The CALG key material for both the client and server when the
1096 Confidentiality Protection service is enabled.
1097
1098 2. The IALG key material for both the client and server when the
1099 Integrity Protection service is enabled.
1100
1101 The PRNG used in this specification is based on the pseudo-random
1102 function described in section 5 of [UMAC]. It uses the [AES]
1103 algorithm, in its 128-bit key size variant, as the underlying
1104 symmetric key block cipher for its operations.
1105
1106 A formal description of this PRNG follows:
1107
1108 o Initialisation
1109
1110 * SK: a 16-octet sequence (seeding key to AES)
1111
1112 o Input
1113
1114 * n: a positive integer
1115
1116
1117
1118
1119 Burdis & Naffah Expires November 28, 2003 [Page 20]
1120
1121 Internet-Draft SRP Authentication Mechanism May 2003
1122
1123
1124 o Output
1125
1126 * Y: an n-octet sequence
1127
1128 o Algorithm
1129
1130 * (initialisation)
1131
1132 1. Initialise an AES instance for encryption with the first 16
1133 octets of SK as its user-supplied key material. Let "aes"
1134 be that instance; i.e. aes = AES(SK, ENCRYPTION);
1135
1136 2. Initialise T to be an all-zero 16-octet long sequence;
1137
1138 * (for every input)
1139
1140 1. Initialise "remaining" to n;
1141
1142 2. Initialise Y to be a 0-length octet sequence;
1143
1144 3. while (remaining > 0) do
1145
1146 1. T = aes(T);
1147
1148 2. Append m octets from T to Y, where m is the minimum of
1149 16 and remaining;
1150
1151 3. Subtract 16 from remaining;
1152
1153 4. return Y;
1154
1155 In this document, "PRNG(key,n)" will refer to this algorithm, with
1156 the initialisation parameter SK set to be the octets of the specified
1157 key, returning n bits of pseudo-random data. For example,
1158 "PRNG(K,n)" will refer to this algorithm, with the initialisation
1159 parameters SK set to the shared context key K computed by the SRP
1160 calculations (see Section 4.4 and Section 4.5), returning n bits of
1161 pseudo-random data.
1162
1163 This algorithm MAY also be used as part of the SRP calculations to
1164 generate the required "a" and "b" parameters used in creating the
1165 client and server ephemeral private keys ("A" and "B"), or to
1166 generate the cn and sn parameters used in session re-use, or to
1167 generate the initial vectors sIV and cIV used to set up the
1168 encryption contexts. In this case the initialisation parameter SK can
1169 be any 16-octet sequence (e.g. multiple representations of the
1170 time-of-day).
1171
1172
1173
1174
1175 Burdis & Naffah Expires November 28, 2003 [Page 21]
1176
1177 Internet-Draft SRP Authentication Mechanism May 2003
1178
1179
1180 If the same PRNG instance is used for both these calculations and the
1181 calculations in this specification, it MUST be re-initialised with
1182 the shared context key K before any of the latter calculations are
1183 performed.
1184
1185 5.1.2 Key Derivation Function
1186
1187 During the authentication phase, both parties compute the shared
1188 context key K (see Section 4.4 for the client, and Section 4.5 for
1189 the server sides respectively). The length of K is s bits, where "s"
1190 is the output length of the chosen underlying Message Digest
1191 Algorithm used in the SRP calculations (see "mda" option in Section
1192 4.3).
1193
1194 When Confidentiality Protection is required, and the length of K is
1195 not equal to the length of the user-supplied key material needed to
1196 initialise the chosen Confidentiality Algorithm (CALG), the peers
1197 MUST apply the Key Derivation Function (KDF) in order to obtain
1198 enough data for this purpose.
1199
1200 Similarly, when Integrity Protection is required, and the length of K
1201 is not equal to the required length of the key material needed to
1202 initialise the chosen Integrity Algorithm (IALG), the peers MUST
1203 apply the Key Derivation Function (KDF) in order to obtain enough
1204 data for this purpose too.
1205
1206 If the KDF is required for both the key used with the CALG and the
1207 key used with the IALG then it is first applied for the CALG key and
1208 thereafter for the IALG key.
1209
1210 We define this KDF as:
1211
1212 Km = KDF(n)
1213
1214 where:
1215
1216 Km is the required key material,
1217
1218 K is the shared context key, and
1219
1220 n is the required length of Km.
1221
1222 The following steps describe the KDF algorithm:
1223
1224 If length of K is greater than or equal to n, then
1225
1226 Let Km be the first n bytes of K;
1227
1228
1229
1230
1231 Burdis & Naffah Expires November 28, 2003 [Page 22]
1232
1233 Internet-Draft SRP Authentication Mechanism May 2003
1234
1235
1236 Else
1237
1238 Let Km = PRNG(K, n);
1239
1240 return Km
1241
1242
1243 5.2 Confidentiality Protection
1244
1245 The plaintext data octet sequence p1 is encrypted using the chosen
1246 confidentiality algorithm (CALG) with key size m, initialised for
1247 encryption with the key material Kc obtained as follows:
1248
1249 Kc = KDF(m)
1250
1251 c1 = CALG(Kc, ENCRYPTION)( bytes(p1) )
1252
1253 On the receiving side, the ciphertext data octet sequence p1 is
1254 decrypted using the chosen confidentiality algorithm (CALG)
1255 initialised for decryption, with the key Kc obtained by a similar
1256 process:
1257
1258 Kc = KDF(m)
1259
1260 c2 = CALG(Kc, DECRYPTION)( bytes(p1) )
1261
1262 The designated CALG symmetric-key block cipher MUST be used in OFB
1263 (Output Feedback Block) mode in the ISO variant, as described in
1264 [HAC], algorithm 7.20.
1265
1266 Let k be the block size of the chosen symmetric key block cipher
1267 algorithm; e.g. for AES this is 128 bits or 16 octets. The OFB mode
1268 used shall have a block size of k.
1269
1270 It is recommended that block ciphers operating in OFB mode be used
1271 with an Initial Vector (the mode's IV). In such a mode of operation
1272 - OFB with key re-use - the IV need not be secret. For the mechanism
1273 described in this document, the server MUST use cIV received from the
1274 client as the Initial Vector when initialising its encryption
1275 context, and the client MUST use sIV received from the server as the
1276 Initial Vector when initialising its encryption context. These
1277 Initial Vectors are generated as:
1278
1279 cIV = prng(k);
1280
1281 sIV = prng(k);
1282
1283 where:
1284
1285
1286
1287 Burdis & Naffah Expires November 28, 2003 [Page 23]
1288
1289 Internet-Draft SRP Authentication Mechanism May 2003
1290
1291
1292 prng() is a random number generation function that outputs k
1293 octets of data,
1294
1295 k is the block size of the chosen symmetric key block cipher
1296 algorithm
1297
1298 The input data to the confidentiality protection algorithm shall be a
1299 multiple of the symmetric key block cipher block size k. When the
1300 input length is not a multiple of k octets, the data shall be padded
1301 according to the following scheme (described in [PKCS7] which itself
1302 is based on [RFC-1423]):
1303
1304 Assuming the length of the input is l octets, (k - (l mod k))
1305 octets, all having the value (k - (l mod k)), shall be appended to
1306 the original data. In other words, the input is padded at the
1307 trailing end with one of the following sequences:
1308
1309
1310
1311 01 -- if l mod k = k-1
1312 02 02 -- if l mod k = k-2
1313 ...
1314 ...
1315 ...
1316 k k ... k k -- if l mod k = 0
1317
1318 The padding can be removed unambiguously since all input is padded
1319 and no padding sequence is a suffix of another. This padding
1320 method is well-defined if and only if k < 256 octets, which is the
1321 case with symmetric block ciphers today, and in the forseeable
1322 future.
1323
1324 The output of this stage, when it is active, is:
1325
1326 at the sending side: CALG(Kc, ENCRYPT)( bytes(p1) )
1327
1328 at the receiving side: CALG(Kc, DECRYPT)( bytes(p1) )
1329
1330
1331 5.3 Replay Detection
1332
1333 A sequence number q is incremented every time a message is sent to
1334 the peer.
1335
1336 The output of this stage, when it is active, is:
1337
1338 p2 | q
1339
1340
1341
1342
1343 Burdis & Naffah Expires November 28, 2003 [Page 24]
1344
1345 Internet-Draft SRP Authentication Mechanism May 2003
1346
1347
1348 At the other end, the receiver increments its instance of the
1349 sequence number. This new value of the sequence number is then used
1350 in the integrity protection transformation, which must also be active
1351 as described in Section 4.3. See Section 6.3 for more details.
1352
1353 5.4 Integrity Protection
1354
1355 When the Integrity Protection stage is active, a message
1356 authentication code C is computed using the chosen integrity
1357 protection algorithm (IALG) as follows:
1358
1359 o the IALG is initialised (once) with the key material Ki of size n
1360 (the required key size of the chosen IALG); i.e. Ki = KDF(n),
1361
1362 o the IALG is updated with every exchange of the sequence p3,
1363 yielding the value C and a new IALG context for use in the
1364 following exchange.
1365
1366 At the other end, the receiver computes its version of C, using the
1367 same transformation, and checks that its value is equal to that
1368 received. If the two values do not agree, the receiver MUST signal an
1369 exception and abort.
1370
1371 The output of this stage, when it is active, is then:
1372
1373 IALG(Ki)( bytes(p3) )
1374
1375
1376 5.5 Summary of Security Layer Output
1377
1378 The following table shows the data exchanged by the security layer
1379 peers, depending on the possible legal combinations of the three
1380 security services in operation:
1381
1382 CP IP RD Peer sends/receives
1383
1384 I I I { eos(p) }
1385 I A I { eos(p) | os( IALG(Ki)( bytes(p) ) ) }
1386 I A A { eos(p) | os( IALG(Ki)( bytes(p) | bytes(q)) ) }
1387 A I I { eos(c) }
1388 A A I { eos(c) | os( IALG(Ki)( bytes(c) ) ) }
1389 A A A { eos(c) | os( IALG(Ki)((bytes(c) | bytes(q)) )}
1390
1391 where
1392
1393 CP Confidentiality protection,
1394
1395 IP Integrity protection,
1396
1397
1398
1399 Burdis & Naffah Expires November 28, 2003 [Page 25]
1400
1401 Internet-Draft SRP Authentication Mechanism May 2003
1402
1403
1404 RD Replay detection,
1405
1406 I Security service is Inactive/disabled,
1407
1408 A Security service is Active/enabled,
1409
1410 p The original plaintext,
1411
1412 q The sequence number.
1413
1414 c The enciphered input obtained by either:
1415
1416 CALG(Kc, ENCRYPT)( bytes(p) ) at the sender's side, or
1417
1418 CALG(Kc, DECRYPT)( bytes(p) ) at the receiver's side
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455 Burdis & Naffah Expires November 28, 2003 [Page 26]
1456
1457 Internet-Draft SRP Authentication Mechanism May 2003
1458
1459
1460 6. Discussion
1461
1462 6.1 Mandatory Algorithms
1463
1464 The algorithms specified as mandatory were chosen for utility and
1465 availablity. We felt that a mandatory confidentiality and integrity
1466 protection algorithm for the security layer and a mandatory Message
1467 Digest Algorithm for SRP calculations should be specified to ensure
1468 interoperability between implementations of this mechanism:
1469
1470 o The SHA-160 Message Digest Algorithm was chosen as an underlying
1471 algorithm for SRP calculations because this allows for easy
1472 interoperability with other SRP-based tools that use the SRP-SHA1
1473 protocol described in section 3 of [RFC-2945] and create their
1474 password files using this algorithm.
1475
1476 o The HMAC algorithm was chosen as an integrity algorithm because it
1477 is faster than MAC algorithms based on secret key encryption
1478 algorithms [RFC-2847].
1479
1480 o AES was chosen as a symmetric-key block cipher because it has
1481 undergone thorough scrutiny by the best cryptographers in the
1482 world.
1483
1484 Since confidentiality protection is optional, this mechanism should
1485 be usable in countries that have strict controls on the use of
1486 cryptography.
1487
1488 6.2 Modulus and Generator Values
1489
1490 It is RECOMMENDED that the server use values for the modulus N and
1491 generator g chosen from those listed in Appendix A so that the client
1492 can avoid expensive constraint checks, since these predefined values
1493 already meet the constraints described in [RFC-2945]:
1494
1495 "For maximum security, N should be a safe prime (i.e. a number of
1496 the form N = 2q + 1, where q is also prime). Also, g should be a
1497 generator modulo N (see [SRP] for details), which means that for
1498 any X where 0 < X < N, there exists a value x for which g**x == X
1499 (mod N).
1500
1501 If other values are used for N and g then these values SHOULD undergo
1502 the specified constraint checks.
1503
1504 6.3 Replay Detection Sequence Number Counters
1505
1506 The mechanism described in this document allows the use of a Replay
1507 Detection security service that works by including sequence number
1508
1509
1510
1511 Burdis & Naffah Expires November 28, 2003 [Page 27]
1512
1513 Internet-Draft SRP Authentication Mechanism May 2003
1514
1515
1516 counters in the message authentication code (MAC) created by the
1517 Integrity Protection service. As noted in Section 4.3 integrity
1518 protection is always activated when the Replay Detection service is
1519 activated.
1520
1521 Both the client and the server keep two sequence number counters.
1522 Each of these counters is a 32-bit unsigned integer initialised with
1523 a Starting Value and incremented by an Increment Value with every
1524 successful transmission of a data buffer through the security layer.
1525 The Sent counter is incremented for each buffer sent through the
1526 security layer. The Received counter is incremented for each buffer
1527 received through the security layer. If the value of a sequence
1528 number counter exceeds 2**32-1 it wraps around and starts from zero
1529 again.
1530
1531 When a sender sends a buffer it includes the value of its Sent
1532 counter in the computation of the MAC accompanying each integrity
1533 protected message. When a recipient receives a buffer it uses the
1534 value of it's Received counter in its computation of the integrity
1535 protection MAC for the received message. The recipient's Received
1536 counter must be the same as the sender's Sent counter in order for
1537 the received and computed MACs to match.
1538
1539 This specification assumes that for each sequence number counter the
1540 Starting Value is ZERO, and that the Increment Value is ONE. These
1541 values do not affect the security or the intended objective of the
1542 replay detection service, since they never travel on the wire.
1543
1544 6.4 Re-using the Parameters of a Previous Session
1545
1546 Re-using the parameters of a previous session enables the client and
1547 server to avoid the overhead of the full authentication exchange
1548 where the client and server communicate more than once during a
1549 server-specified time period.
1550
1551 Servers are not required to support re-using the parameters of the
1552 current session in future sessions. If they do not wish to support
1553 this then they send an empty string for the session identifier (sid).
1554 However, if the server's policy allows for the parameters of the
1555 current session to be re-used later, it generates a session
1556 identifier (sid) that will uniquely identify the session within the
1557 specified time period (ttl). The time period (ttl) is specified in
1558 seconds and only gives an indication to the client how long the
1559 session may be valid. The server is not required to ensure that the
1560 session is valid for this time period. Note that a ttl of 0 indicates
1561 an indeterminate time period.
1562
1563 To avoid session hijacking, servers SHOULD NOT indicate that a
1564
1565
1566
1567 Burdis & Naffah Expires November 28, 2003 [Page 28]
1568
1569 Internet-Draft SRP Authentication Mechanism May 2003
1570
1571
1572 session may be re-used unless a security layer with integrity
1573 protection and/or confidentiality protection has been negotiated.
1574
1575 Clients are not required to support re-using the parameters of
1576 previous sessions. If they do not wish to support it or they do not
1577 wish to re-use the parameters of a previous session then they send
1578 the empty string as the value for the session identifier (sid) and
1579 send a zero-length octet sequence for the nonce (cn). If they do
1580 support it and wish to use the parameters of a previous session then
1581 they send the session identifier for this session that they
1582 previously received from the server and calculate cn as described in
1583 Section 4.1.
1584
1585 If a client specifies a session id (sid) for a session that the
1586 server still considers valid then the server sends the octet FF, to
1587 indicate to the client that parameters of a previous session are
1588 being re-used, and the nonce (sn) calculated as described in Section
1589 4.2. The client and server then calculate the new shared context key
1590 Kn for this session as follows:
1591
1592 Kn = H(K | cn | sn)
1593
1594 where:
1595
1596 K is the shared context key for the previous session identified
1597 by sid.
1598
1599 H() is the result of digesting the designated input/data with the
1600 Message Digest Algorithm function negotiated in the previous
1601 session identified by sid.
1602
1603 Then, if the confidentiality and/or integrity protection services
1604 were negotiated for the previous session, new keys for these services
1605 are derived using the KDF for use in this session. (See Section
1606 5.1.2.)
1607
1608 If the server does not support re-using parameters of previous
1609 sessions or no longer considers the specified previous session to be
1610 valid, it ignores the session id specified by the client and
1611 continues the full authentication exchange. However, the first
1612 element of the next buffer it sends is the octet 00, which indicates
1613 to the client that no parameters of a previous session will be
1614 re-used.
1615
1616
1617
1618
1619
1620
1621
1622
1623 Burdis & Naffah Expires November 28, 2003 [Page 29]
1624
1625 Internet-Draft SRP Authentication Mechanism May 2003
1626
1627
1628 7. SASL
1629
1630 7.1 Overview
1631
1632 SASL is described as follows [RFC-2222]:
1633
1634 The Simple Authentication and Security Layer (SASL) is a method
1635 for adding authentication support to connection-based protocols.
1636
1637 This document describes a mechanism that can be used within the SASL
1638 authentication framework.
1639
1640 7.2 Mechanism Name
1641
1642 The SASL mechanism name associated with this protocol is "SRP".
1643
1644 7.3 Security Layer
1645
1646 Section 3 of [RFC-2222] describes the operation of the security layer
1647 as follows:
1648
1649 "The security layer takes effect immediately following the last
1650 response of the authentication exchange for data sent by the
1651 client and the completion indication for data sent by the server.
1652 Once the security layer is in effect, the protocol stream is
1653 processed by the security layer into buffers of cipher-text. Each
1654 buffer is transferred over the connection as a stream of octets
1655 prepended with a four octet field in network byte order that
1656 represents the length of the following buffer. The length of the
1657 cipher-text buffer must be no larger than the maximum size that
1658 was defined or negotiated by the other side."
1659
1660
1661 7.4 Profile Considerations
1662
1663 As mentioned briefly in [RFC-2222], and detailed in [SASL] a SASL
1664 specification has three layers: (a) a protocol definition using SASL
1665 known as the "Profile", (b) a SASL mechanism definition, and (c) the
1666 SASL framework.
1667
1668 Point (3) in section 5 of [SASL] ("Protocol profile requirements")
1669 clearly states that it is the responsibility of the Profile to define
1670 "...how the challenges and responses are encoded, how the server
1671 indicates completion or failure of the exchange, how the client
1672 aborts an exchange, and how the exchange method interacts with any
1673 line length limits in the protocol."
1674
1675 The username entity, referenced as U throughout this document, and
1676
1677
1678
1679 Burdis & Naffah Expires November 28, 2003 [Page 30]
1680
1681 Internet-Draft SRP Authentication Mechanism May 2003
1682
1683
1684 used by the server to locate the password data, is assumed to travel
1685 "in the clear," meaning that no transformation is applied to its
1686 contents. This assumption was made to allow the same SRP password
1687 files to be used in this mechanism, as those used with other SRP
1688 applications and tools.
1689
1690 A Profile may decide, for privacy or other reason, to disallow such
1691 information to travel in the clear, and instead use a hashed version
1692 of U, or more generally a transformation function applied to U; i.e.
1693 f(U). Such a Profile would require additional tools to add the
1694 required entries to the SRP password files for the new value(s) of
1695 f(U). It is worth noting too that if this is the case, and the same
1696 user shall access the server through this mechanism as well as
1697 through other SRP tools, then at least two entries, one with U and
1698 the other with f(U) need to be present in the SRP password files if
1699 those same files are to be used for both types of access.
1700
1701 7.5 Example
1702
1703 The example below uses SMTP authentication [RFC-2554]. The base64
1704 encoding of challenges and responses, as well as the reply codes
1705 preceding the responses are part of the SMTP authentication
1706 specification, not part of this SASL mechanism itself.
1707
1708 "C:" and "S:" indicate lines sent by the client and server
1709 respectively.
1710
1711 S: 220 smtp.example.com ESMTP server ready
1712
1713 C: EHLO zaau.example.com
1714
1715 S: 250-smtp.example.com
1716 S: 250 AUTH SRP CRAM-MD5 DIGEST-MD5
1717
1718 C: AUTH SRP AAAADAAEdGVzdAAEdGVzdA==
1719
1720 with:
1721
1722 U = "test"
1723
1724 I = "test"
1725
1726 S: 334 AAABygEArGvbQTJKmpvxZt5eE4lYL69ytmUZh+4H/DGSlD21YFCjcynLtKCZ
1727 7YGT4HV3Z6E91SMSq0sDMQ3Nf0ip2gT9UOgIOWntt2ewz2CVF5oWOrNmGgX71fqq6Ck
1728 YqZYvC5O4Vfl5k+yXXuqoDXQK2/T/dHNZ0EHVwz6nHSgeRGsUdzvKl7Q6I/uAFna9IH
1729 pDbGSB8dK5B4cXRhpbnTLmiPh3SFRFI7UksNV9Xqd6J3XS7PoDLPvb9S+zeGFgJ5AE5
1730 Xrmr4dOcwPOUymczAQce8MI2CpWmPOo0MOCca41+Onb+7aUtcgD2J965DXeI21SX1R1
1731 m2XjcvzWjvIPpxEfnkr/cwABAgqsi3AvmIqdEbREALhtZGE9U0hBLTEsbWFuZGF0b3J
1732
1733
1734
1735 Burdis & Naffah Expires November 28, 2003 [Page 31]
1736
1737 Internet-Draft SRP Authentication Mechanism May 2003
1738
1739
1740 5PXJlcGxheSBkZXRlY3Rpb24scmVwbGF5IGRldGVjdGlvbixpbnRlZ3JpdHk9aG1hYy
1741 1zaGExLGludGVncml0eT1obWFjLW1kNSxjb25maWRlbnRpYWxpdHk9YWVzLGNvbmZpZ
1742 GVudGlhbGl0eT1jYXN0NSxjb25maWRlbnRpYWxpdHk9Ymxvd2Zpc2gsbWF4YnVmZmVy
1743 c2l6ZT0yMTQ3NDgzNjQz
1744
1745 with:
1746
1747 N = "21766174458617435773191008891802753781907668374255538511144
1748 6432246898862353838409572109090130860564015713997172358072665816
1749 4960647214841029141336415219736447718088739565548373811507267740
1750 2235101762521901569820740293149529620419333266262073471054548368
1751 7360395197024862265062488610602569718029849535611214426801576680
1752 0076142998822245709041387397397017192709399211475176516806361476
1753 1119615476233422096442783117971236371647333871414335895773474667
1754 3089670508070055093204247996784170368679283167612722742303140675
1755 4829113358247958306143957755934710196177140617368437852270348349
1756 5337037655006751328447510550299250924469288819"
1757
1758 g = "2"
1759
1760 s = "814819216327401865851972"
1761
1762 L = "mda=sha-1,mandatory=replay_detection,replay_detection,integ
1763 rity=hmac-sha1,integrity=hmac-md5,confidentiality=aes,confidenti
1764 ality=cast5,confidentiality=blowfish,maxbuffersize=2147483643"
1765
1766 C: AAABYwEAAp5q/4zhXoTUzXBscozN97SWgfDcAImIk3lNHNvd0b+Dr7jEm6upXblZ
1767 T5sL9mPgFsejlIh+B/eCu/HvzWCrXj6ylPZv8dy3LCH3LIORqQ45S7Lsbmrrg/dukDh
1768 4tZCJMLD4r3evzaY8KVhtJeLMVbeXuh4JljKP42Ll59Lzwf8jfPh4+4Lae1rpWUCL9D
1769 ueKcY+nN+xNHTit/ynLATxwL93P6+GoGY4TkUbUBfjiI1+rAMvyMDMw5XozGy07FOEc
1770 ++U0iPeXCQP4MT5FipOUoz8CYX7J1LbaXp2WJuFHlkyVXF7oCoyHbhld/5CfR3o6q/B
1771 /x9+yZRqaHH+JfllOgBfbWRhPVNIQS0xLHJlcGxheSBkZXRlY3Rpb24saW50ZWdyaXR
1772 5PWhtYWMtbWQ1LGNvbmZpZGVudGlhbGl0eT1ibG93ZmlzaCxtYXhidWZmZXJzaXplPT
1773 IxNDc0ODM2NDM=
1774
1775 with:
1776
1777 A = "33059541846712102497463123211304342021934496372587869281515
1778 9695658237779884462777478850394977744553746930451895815615888405
1779 0562780707370878253753979367019077142882237029766166623275718227
1780 6555389834190840322081091599089081947324537907613924707058150037
1781 7802790776231793962143786411792516760030102436603621046541729396
1782 6890613394379900527412007068242559299422872893332111365840536495
1783 1858834742328835373387573188369956379881606380890675411966073665
1784 1106922002294035533470301541999274557200666703389531481794516625
1785 4757418442215980634933876533189969562613241499465295849832999091
1786 40398081321840949606581251320320995783959866"
1787
1788
1789
1790
1791 Burdis & Naffah Expires November 28, 2003 [Page 32]
1792
1793 Internet-Draft SRP Authentication Mechanism May 2003
1794
1795
1796 o = mda=sha-1,replay_detection,integrity=hmac-md5,confidentialit
1797 y=blowfish,maxbuffersize=2147483643"
1798
1799 S: 334 AAABAgEAOUKbXpnzMhziivGgMwm+FS8sKGSvjh5M3D+80RF/5z9rm0oPoi4+
1800 pF83fueWn4Hz9M+muF/22PHHZkHtlutDrtapj4OtirdxC21fS9bMtEh3F0whTX+3mPv
1801 thw5sk11turandHiLvcUZOgcrAGIoDKcBPoGyBud+8bMgpkf/uGfyBM2nEX/hV+oGgg
1802 X+LiHjmkxAJ3kewfQPH0eV9ffEuuyu8BUcBXkJsS6l7eWkuERSCttVOi/jS031c+CD/
1803 nuecUXYiF8IYzW03rbcwYhZzifmTi3VK9C8zG2K1WmGU+cDKlZMkyCPMmtCsxlbgE8z
1804 SHCuCiOgQ35XhcA0Qa0C3Q==
1805
1806 with:
1807
1808 B: "722842847565031844205403087285424428589273458129750231766015
1809 4465607827529853239240118185263492617243523916106658696965596526
1810 8585300845435562962039149169549800169184521786717633959469278439
1811 8771344445002432579509292115598435685062882631760796416554562980
1812 8475896198325835507901319556929511421472132184990365213059654962
1813 7218189966140113906545856088040473723048909402258929560823932725
1814 2022154114087913895411927676707073040281136096806681758265221209
1815 8822374723416364340410020172215773934302794679034424699999611678
1816 9730443114919539575466941344964841591072763617954717789621871251
1817 71089179399349194452686682517183909017223901"
1818
1819 C: AAAAFRTkoju6xGP+zH89iaDWIFjfIKt5Kg==
1820
1821 S: 235 Authentication successful.
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847 Burdis & Naffah Expires November 28, 2003 [Page 33]
1848
1849 Internet-Draft SRP Authentication Mechanism May 2003
1850
1851
1852 8. GSS-API
1853
1854 8.1 Overview
1855
1856 The GSS-API is described as follows:
1857
1858 The Generic Security Service Application Program Interface
1859 (GSS-API), Version 2, as defined in [RFC-2078], provides security
1860 services to callers in a generic fashion, supportable with a range
1861 of underlying mechanisms and technologies and hence allowing
1862 source-level portability of applications to different
1863 environments.
1864
1865 According to [RFC-2078] there are certain specifications related to
1866 the GSS-API that are:
1867
1868 "documents defining token formats, protocols, and procedures to be
1869 implemented in order to realize GSS-API services atop particular
1870 security mechanisms"
1871
1872 This specification is such a document - it defines a security
1873 mechanism that can be used with the GSS-API authentication framework.
1874
1875 8.2 Terminology
1876
1877 The tokens referred to in the GSS-API specification [RFC-2078] are
1878 the same as the buffers referred to in this document.
1879
1880 8.3 Initial Token
1881
1882 [RFC-2078] states that:
1883
1884 The first context-level token obtained from GSS_Init_sec_context()
1885 is required to indicate at its very beginning a
1886 globally-interpretable mechanism identifier, i.e., an Object
1887 Identifier (OID) of the security mechanism. The remaining part of
1888 this token as well as the whole content of all other tokens are
1889 specific to the particular underlying mechanism used to support
1890 the GSS-API.
1891
1892 To satisfy this requirement and make use of the mechanism described
1893 in this document as a GSS-API mechanism, the following octets must be
1894 prefixed to the first buffer sent as part of the protocol described
1895 in Section 4:
1896
1897 [ 60 08 06 06 2B 06 01 05 05 08 ]
1898
1899 Each octet is written as a pair of hex digits - see Section 2.
1900
1901
1902
1903 Burdis & Naffah Expires November 28, 2003 [Page 34]
1904
1905 Internet-Draft SRP Authentication Mechanism May 2003
1906
1907
1908 These octets represent the encoding of the GSS-API mechanism
1909 identifier as per section 3.1 of [RFC-2078]. The OID for this
1910 mechanism is iso.org.dod.internet.security.mechanisms.srp
1911 (1.3.6.1.5.5.8).
1912
1913 Note that it is not possible to make this requirement part of the
1914 security protocol itself, because other authentication frameworks
1915 have different requirements for the initial octets in a mechanism
1916 buffer.
1917
1918 8.4 Security Layer
1919
1920 This mechanism does not provide distinct replay detection and
1921 sequencing services as part of the security layer. Both of these
1922 services are provided through the use of sequence numbers in
1923 integrity protected messages. If a GSS-API caller sets either the
1924 replay_det_req_flag or the sequence_req_flag (section 1.2.3 of
1925 [RFC-2078]) then this selects the "replay_detection" security
1926 service.
1927
1928 This mechanism does not make use of any channel binding data (section
1929 1.1.6 of [RFC-2078]).
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959 Burdis & Naffah Expires November 28, 2003 [Page 35]
1960
1961 Internet-Draft SRP Authentication Mechanism May 2003
1962
1963
1964 9. EAP
1965
1966 9.1 Overview
1967
1968 The Extensible Authentication Protocol (EAP) [RFC-2284] is an
1969 authentication framework that supports multiple authentication
1970 mechanisms. It is used with link layer protocols such as PPP and the
1971 IEEE-802 wired and wireless protocols.
1972
1973 9.2 Terminology
1974
1975 EAP uses the following terms to describe the entities involved in the
1976 authentication exchange [rfc2284bis]:
1977
1978 Authenticator: The entity that initiates EAP authentication in order
1979 to authenticate a Peer.
1980
1981 Peer: The entity that responds to requests from the Authenticator.
1982
1983 In this document, the Server corresponds to the Authenticator and the
1984 Client corresponds to the Peer.
1985
1986 9.3 Method Details
1987
1988 The EAP authentication method described in this document has the
1989 following properties:
1990
1991 Method Name: SRP
1992
1993 Method Type: 7
1994
1995 As described in section 2 of [rfc2284bis] the EAP authentication
1996 exchange is initiated by the Authenticator sending a Request packet
1997 to the peer with a Type field indicating the type of request. The
1998 Peer responds with a corresponding Reply packet, and the
1999 Authenticator and Peer exchange additional corresponding Request and
2000 Reply packets until the Authenticator deems that the authentication
2001 exchange is successful and complete, whereafter the Authenticator
2002 sends a Success packet. However, if at any time the Authenticator
2003 deems the authentication exchange to be unsuccessful it sends a
2004 Failure packet to indicate this.
2005
2006 When using this authentication method, the Type field in all Request
2007 and Reply packets is set to 7 and the Type Data is as described in
2008 Section 4 and the rest of this document. The diagrams below
2009 illustrate the EAP packet exchanges for this authentication method.
2010
2011 The following exchange occurs when a new session is negotiated
2012
2013
2014
2015 Burdis & Naffah Expires November 28, 2003 [Page 36]
2016
2017 Internet-Draft SRP Authentication Mechanism May 2003
2018
2019
2020 between the client and the server. It will also occur when the
2021 client requests re-use of the parameters of a previous session and
2022 either the server does not support such re-use or no longer considers
2023 the previous session to be valid:
2024
2025 Peer (client) Authenticator (server)
2026
2027 <------------ Request [ 7, { } ] ----------------------------
2028
2029 ---- Reply [ 7, { U, I, sid, cn } ] ------------------------->
2030
2031 <------------ Request [ 7, { 00, N, g, s, B, L } ] ----------
2032
2033 ---- Reply [ 7, { A, M1, o, cIV } ] ------------------------>
2034
2035 <------------ Request [ 7, { M2, sIV, sid, ttl } ] ----------
2036
2037 ---- Reply [ 7, { } ] -------------------------------------->
2038
2039 The following exchange occurs when the client requests that the
2040 parameters negotiated in a previous session be re-used in this
2041 session, but with a newly derived shared context key, and the server
2042 agrees:
2043
2044 Peer (client) Authenticator (server)
2045
2046 <----------------------------- Request [ 7, { } ] -----------
2047
2048 --------- Reply [ 7, { U, I, sid, cn } ] ------------------->
2049
2050 <----------------------------- Request [ 7, { FF, sn } ] ----
2051
2052 --------- Reply [ 7, { } ] --------------------------------->
2053
2054 If a security layer is negotiated then the payloads of all subsequent
2055 lower layer packets sent over the link are protected using the
2056 negotiated security services.
2057
2058 9.4 Security Claims
2059
2060 As required by section 7.2 of [rfc2284bis], these are the security
2061 claims made by this authentication method indicating the level of
2062 security provided:
2063
2064 Intended Use: Wired networks, including PPP, PPPOE, and IEEE-802
2065 wired media. Use over the Internet or with wireless media only
2066 when the recommended security layer has been negotiated.
2067
2068
2069
2070
2071 Burdis & Naffah Expires November 28, 2003 [Page 37]
2072
2073 Internet-Draft SRP Authentication Mechanism May 2003
2074
2075
2076 Mechanism: Passphrase
2077
2078 Mutual authentication: Yes. This mechanism requires mutual
2079 authentication.
2080
2081 Integrity protection: Yes. The calculations of evidence that the
2082 shared context key is known - M1 sent by the client and M2 sent by
2083 the server - include the protocol elements received from the
2084 other party, so any modification by a third party will be
2085 detected. SRP itself is resistent to known active and passive
2086 attacks - see [SRP].
2087
2088 Replay protection: Yes. Both the client and the server randomly
2089 generate ephemeral private keys (a and b) that are used in the SRP
2090 calculations, but are not publicly revealed. New ephemeral
2091 private keys are generated for each session making replay attacks
2092 infeasible.
2093
2094 Confidentiality: No.
2095
2096 Key Derivation: No.
2097
2098 Dictionary attack protection: Yes. From [SRP]: "An attacker with
2099 neither the user's password nor the host's password file cannot
2100 mount a dictionary attack on the password".
2101
2102 Fast reconnect: Yes. An optional, optimised alternate authentication
2103 exchange is available where the parameters of a previously
2104 negotiated session are re-used, but with a newly derived shared
2105 context key - see Section 6.4.
2106
2107 Man-in-the-Middle resistance: Yes. The calculations of evidence - M1
2108 sent by the client and M2 sent by the server - include the
2109 protocol elements received from the other party, so any
2110 modification by a third party will be detected. SRP itself is
2111 resistent to known active attacks, including man-in-the-middle
2112 attacks - see [SRP].
2113
2114 Acknowledged result indications: Yes. When the client receives M2
2115 from the server it knows that the server has verified that the
2116 evidence (M1) it presented to prove its knowledge of the shared
2117 context key is correct, so it knows that it is authenticated to
2118 the server. When the server receives the empty response from the
2119 client at the end of the authentication exchange, it knows that
2120 the client has verified that the evidence (M2) it presented to
2121 prove its knowledge of the shared context key is correct, so it
2122 knows that it is authenticated to the client. Similarly for
2123 session re-use where the client receives the server nonce (sn)
2124
2125
2126
2127 Burdis & Naffah Expires November 28, 2003 [Page 38]
2128
2129 Internet-Draft SRP Authentication Mechanism May 2003
2130
2131
2132 from the server, and the server receives the final empty response
2133 from the client.
2134
2135 Key hierarchy: N/A
2136
2137 Key strength: The shared context key (K) negotiated between the
2138 client and server has a length of s, where "s" is the output
2139 length of the chosen underlying Message Digest Algorithm used in
2140 the SRP calculations (see "mda" option in Section 4.3). For
2141 example, the recommended Message Digest Algorithm SHA-160 has an
2142 output length of 160 bits, so in this case the length of K would
2143 be 160 bits. Keys for the confidentiality and integrity
2144 protection services are derived from K - see Section 5.1.2 - and
2145 have sizes appropriate for the algorithms being used. Note that
2146 all Message Digest Algorithms used with this mechanism MUST have
2147 an output of at least 16 bytes (see "mda" option in Section 4.3),
2148 which means that the shared context key will always have a length
2149 of at least 128 bits.
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183 Burdis & Naffah Expires November 28, 2003 [Page 39]
2184
2185 Internet-Draft SRP Authentication Mechanism May 2003
2186
2187
2188 10. Security Considerations
2189
2190 This mechanism relies on the security of SRP, which bases its
2191 security on the difficulty of solving the Diffie-Hellman problem in
2192 the multiplicative field modulo a large safe prime. See section 4
2193 "Security Considerations" of [RFC-2945], section 4 "Security
2194 analysis" of [SRP], and [SRP-6i].
2195
2196 This mechanism also relies on the security of the HMAC algorithm and
2197 the underlying hash function when integrity protection is used.
2198 Section 6 "Security" of [RFC-2104] discusses these security issues in
2199 detail. Weaknesses found in MD5 do not impact HMAC-MD5 [DOBBERTIN].
2200
2201 U, I, A and o, sent from the client to the server, and N, g, s, B and
2202 L, sent from the server to the client, could be modified by an
2203 attacker before reaching the other party. For this reason, these
2204 values are included in the respective calculations of evidence (M1
2205 and M2) to prove that each party knows the shared context key K.
2206 This allows each party to verify that these values were received
2207 unmodified.
2208
2209 The use of integrity protection is RECOMMENDED to detect message
2210 tampering and to avoid session hijacking after authentication has
2211 taken place.
2212
2213 Replay attacks may be avoided through the use of sequence numbers,
2214 because sequence numbers make each integrity protected message
2215 exchanged during a session different, and each session uses a
2216 different key.
2217
2218 Research [KRAWCZYK] shows that the order and way of combining message
2219 encryption (Confidentiality Protection) and message authentication
2220 (Integrity Protection) are important. This mechanism follows the EtA
2221 (encrypt-then-authenticate) method and is "generically secure".
2222
2223 This mechanism uses a Pseudo-Random Number Generator (PRNG) for
2224 generating some of its parameters. Section 5.1.1 describes a
2225 securely seeded, cryptographically strong PRNG implementation for
2226 this purpose.
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239 Burdis & Naffah Expires November 28, 2003 [Page 40]
2240
2241 Internet-Draft SRP Authentication Mechanism May 2003
2242
2243
2244 11. Acknowledgements
2245
2246 The following people provided valuable feedback in the preparation of
2247 this document:
2248
2249 Stephen Farrell <stephen.farrell@baltimore.ie>
2250
2251 Sam Hartman <hartmans@mit.edu>
2252
2253 Timothy Martin <tmartin@andrew.cmu.edu>
2254
2255 Alexey Melnikov <mel@messagingdirect.com>
2256
2257 Ken Murchison <ken@oceana.com>
2258
2259 Magnus Nystrom <magnus@rsasecurity.com>
2260
2261 David Taylor <DavidTaylor@forge.com.au>
2262
2263 Thomas Wu <tom@arcot.com>
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295 Burdis & Naffah Expires November 28, 2003 [Page 41]
2296
2297 Internet-Draft SRP Authentication Mechanism May 2003
2298
2299
2300 Normative References
2301
2302 [RFC-2078]
2303 Linn, J., "Generic Security Service Application Program
2304 Interface, Version 2", RFC 2078, January 1997, <http://
2305 www.ietf.org/rfc/rfc2078.txt>.
2306
2307 [RFC-2104]
2308 Krawczyk, H., "HMAC: Keyed-Hashing for Message
2309 Authentication", RFC 2104, February 1997, <http://
2310 www.ietf.org/rfc/rfc2104.txt>.
2311
2312 [RFC-2119]
2313 Bradner, S., "Key words for use in RFCs to Indicate
2314 Requirement Levels", BCP 0014, RFC 2119, March 1997,
2315 <http://www.ietf.org/rfc/rfc2119.txt>.
2316
2317 [RFC-2222]
2318 Myers, J., "Simple Authentication and Security Layer
2319 (SASL)", RFC 2222, October 1997, <http://www.ietf.org/rfc/
2320 rfc2222.txt>.
2321
2322 [RFC-2284]
2323 Blunk, L. and J. Vollbrecht, "PPP Extensible
2324 Authentication Protocol (EAP)", RFC 2284, March 1998,
2325 <http://www.ietf.org/rfc/rfc2284.txt>.
2326
2327 [rfc2284bis]
2328 Blunk, L., Vollbrecht, J., Aboba, B., Carlson, J. and H.
2329 Levkowetz, "Extensible Authentication Protocol (EAP), work
2330 in progress", May 2003, <http://www.ietf.org/
2331 internet-drafts/draft-ietf-eap-rfc2284bis-03.txt>.
2332
2333 [RFC-2945]
2334 Wu, T., "The SRP Authentication and Key Exchange System",
2335 RFC 2945, September 2000, <http://www.ietf.org/rfc/
2336 rfc2945.txt>.
2337
2338 [RFC-3454]
2339 Hoffman, P. and M. Blanchet, "Preparation of
2340 Internationalized Strings ("stringprep")", RFC 3454,
2341 December 2002, <http://www.ietf.org/rfc/rfc3454.txt>.
2342
2343 [SASL] Myers, J., "Simple Authentication and Security Layer
2344 (SASL)", April 2002, <http://www.ietf.org/internet-drafts/
2345 draft-myers-saslrev-02.txt>.
2346
2347 [SASLprep]
2348
2349
2350
2351 Burdis & Naffah Expires November 28, 2003 [Page 42]
2352
2353 Internet-Draft SRP Authentication Mechanism May 2003
2354
2355
2356 Zeilenga, K., "SASLprep: Stringprep profile for user names
2357 and passwords, work in progress", May 2003, <http://
2358 www.ietf.org/internet-drafts/
2359 draft-ietf-sasl-saslprep-01.txt>.
2360
2361 [SRP] Wu, T., "The Secure Remote Password Protocol, Proceedings
2362 of the 1998 Internet Society Network and Distributed
2363 System Security Symposium, San Diego, CA, Mar 1998, pp.
2364 97-111", March 1998, <http://srp.stanford.edu/ndss.html>.
2365
2366 [SRP-6i] Wu, T., "SRP-6: Improvements and Refinements to the Secure
2367 Remote Password Protocol", October 2002, <http://
2368 srp.stanford.edu/srp6.ps>.
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407 Burdis & Naffah Expires November 28, 2003 [Page 43]
2408
2409 Internet-Draft SRP Authentication Mechanism May 2003
2410
2411
2412 Informative References
2413
2414 [AES] National Institute of Standards and Technology, "Rijndael:
2415 NIST's Selection for the AES", December 2000, <http://
2416 csrc.nist.gov/encryption/aes/rijndael/Rijndael.pdf>.
2417
2418 [DOBBERTIN]
2419 Dobbertin, H., "The Status of MD5 After a Recent Attack",
2420 December 1996, <ftp://ftp.rsasecurity.com/pub/cryptobytes/
2421 crypto2n2.pdf>.
2422
2423 [HAC] Menezes, A., van Oorschot, P. and S. Vanstone, "Handbook
2424 of Applied Cryptography", CRC Press, Inc., ISBN
2425 0-8493-8523-7, 1997, <http://www.cacr.math.uwaterloo.ca/
2426 hac/about/chap7.ps>.
2427
2428 [ISO-10646]
2429 International Standards Organization, "International
2430 Standard --Information technology-- Universal
2431 Multiple-Octet Coded Character Set (UCS) -- Part 1
2432 Architecture and Basic Multilingual Plane. UTF-8 is
2433 described in Annex R, adopted but not yet published.
2434 UTF-16 is described in Annex Q, adopted but not yet
2435 published.", ISO/IEC 10646-1, 1993.
2436
2437 [KRAWCZYK]
2438 Krawczyk, H., "The order of encryption and authentication
2439 for protecting communications (Or: how secure is SSL?)",
2440 June 2001, <http://eprint.iacr.org/2001/045/>.
2441
2442 [PKCS7] RSA Data Security, Inc., "PKCS #7: Cryptographic Message
2443 Syntax Standard", Version 1.5, November 1993, <ftp://
2444 ftp.rsasecurity.com/pub/pkcs/ascii/pkcs-7.asc>.
2445
2446 [RFC-1423]
2447 Balenson, D., "Privacy Enhancement for Internet Electronic
2448 Mail: Part III: Algorithms, Modes, and Identifiers", RFC
2449 1423, February 1993, <http://www.ietf.org/rfc/
2450 rfc1423.txt>.
2451
2452 [RFC-2279]
2453 Yergeau, F., "UTF-8, a transformation format of Unicode
2454 and ISO 10646", RFC 2279, January 1998, <http://
2455 www.ietf.org/rfc/rfc2279.txt>.
2456
2457 [RFC-2440]
2458 Callas, J., Donnerhacke, L., Finney, H. and R. Thayer,
2459 "OpenPGP Message Format", RFC 2440, November 1998, <http:/
2460
2461
2462
2463 Burdis & Naffah Expires November 28, 2003 [Page 44]
2464
2465 Internet-Draft SRP Authentication Mechanism May 2003
2466
2467
2468 /www.ietf.org/rfc/rfc2440.txt>.
2469
2470 [RFC-2554]
2471 Myers, J., "SMTP Service Extension for Authentication",
2472 RFC 2554, March 1999.
2473
2474 [RFC-2629]
2475 Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629,
2476 June 1999, <http://www.ietf.org/rfc/rfc2629.txt>.
2477
2478 [RFC-2847]
2479 Eisler, M., "LIPKEY - A Low Infrastructure Public Key
2480 Mechanism Using SPKM", RFC 2847, June 2000, <http://
2481 www.ietf.org/rfc/rfc2847.txt>.
2482
2483 [SCAN] Hopwood, D., "Standard Cryptographic Algorithm Naming",
2484 June 2000, <http://www.eskimo.com/~weidai/scan-mirror/>.
2485
2486 [SRP-6] Wu, T., "SRP Protocol Design", October 2002, <http://
2487 srp.stanford.edu/design.html>.
2488
2489 [SRPimpl] Wu, T., "SRP: The Open Source Password Authentication
2490 Standard", March 1998, <http://srp.stanford.edu/srp/>.
2491
2492 [UMAC] Black, J., Halevi, S., Krawczyk, H., Krovetz, T. and P.
2493 Rogaway, "UMAC: Fast and Secure Message Authentication,
2494 Advances in Cryptology - CRYPTO '99. Lecture Notes in
2495 Computer Science, vol. 1666, Springer-Verlag, 1999, pp.
2496 216-233", October 2000, <http://www.cs.ucdavis.edu/
2497 ~rogaway/umac/umac_proc.pdf>.
2498
2499 [UNICODE] The Unicode Consortium, "The Unicode Standard, Version
2500 3.2.0, is defined by The Unicode Standard, Version 3.0, as
2501 amended by the Unicode Standard Annex #27: Unicode 3.1 and
2502 by the Unicode Standard Annex #28: Unicode 3.2.", March
2503 2002, <http://www.unicode.org/reports/tr28/tr28-3.html>.
2504
2505 [UNICODE-KC]
2506 Durst, D., "Unicode Standard Annex #15: Unicode
2507 Normalization Forms.", March 2001, <http://
2508 www.unicode.org/unicode/reports/tr15>.
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519 Burdis & Naffah Expires November 28, 2003 [Page 45]
2520
2521 Internet-Draft SRP Authentication Mechanism May 2003
2522
2523
2524 Authors' Addresses
2525
2526 Keith Burdis
2527 Rhodes University
2528 Computer Science Department
2529 Grahamstown 6139
2530 ZA
2531
2532 EMail: keith@rucus.ru.ac.za
2533
2534
2535 Raif S. Naffah
2536 Forge Research Pty. Limited
2537 Suite 116, Bay 9
2538 Locomotive Workshop,
2539 Australian Technology Park
2540 Cornwallis Street
2541 Eveleigh, NSW 1430
2542 AU
2543
2544 EMail: raif@forge.com.au
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575 Burdis & Naffah Expires November 28, 2003 [Page 46]
2576
2577 Internet-Draft SRP Authentication Mechanism May 2003
2578
2579
2580 Appendix A. Modulus and Generator Values
2581
2582 Modulus N and generator g values for various modulus lengths are
2583 given below. In each case the modulus is a large safe prime and the
2584 generator is a primitve root of GF(n) [RFC-2945]. These values are
2585 taken from software developed by Tom Wu and Eugene Jhong for the
2586 Stanford SRP distribution [SRPimpl].
2587
2588 [264 bits]
2589 Modulus (base 16) =
2590 115B8B692E0E045692CF280B436735C77A5A9E8A9E7ED56C965F87DB5B2A2
2591 ECE3
2592 Generator = 2
2593
2594 [384 bits]
2595 Modulus (base 16) =
2596 8025363296FB943FCE54BE717E0E2958A02A9672EF561953B2BAA3BAACC3E
2597 D5754EB764C7AB7184578C57D5949CCB41B
2598 Generator = 2
2599
2600 [512 bits]
2601 Modulus (base 16) =
2602 D4C7F8A2B32C11B8FBA9581EC4BA4F1B04215642EF7355E37C0FC0443EF75
2603 6EA2C6B8EEB755A1C723027663CAA265EF785B8FF6A9B35227A52D86633DB
2604 DFCA43
2605 Generator = 2
2606
2607 [640 bits]
2608 Modulus (base 16) =
2609 C94D67EB5B1A2346E8AB422FC6A0EDAEDA8C7F894C9EEEC42F9ED250FD7F0
2610 046E5AF2CF73D6B2FA26BB08033DA4DE322E144E7A8E9B12A0E4637F6371F
2611 34A2071C4B3836CBEEAB15034460FAA7ADF483
2612 Generator = 2
2613
2614 [768 bits]
2615 Modulus (base 16) =
2616 B344C7C4F8C495031BB4E04FF8F84EE95008163940B9558276744D91F7CC9
2617 F402653BE7147F00F576B93754BCDDF71B636F2099E6FFF90E79575F3D0DE
2618 694AFF737D9BE9713CEF8D837ADA6380B1093E94B6A529A8C6C2BE33E0867
2619 C60C3262B
2620 Generator = 2
2621
2622 [1024 bits]
2623 Modulus (base 16) =
2624 EEAF0AB9ADB38DD69C33F80AFA8FC5E86072618775FF3C0B9EA2314C9C256
2625 576D674DF7496EA81D3383B4813D692C6E0E0D5D8E250B98BE48E495C1D60
2626 89DAD15DC7D7B46154D6B6CE8EF4AD69B15D4982559B297BCF1885C529F56
2627 6660E57EC68EDBC3C05726CC02FD4CBF4976EAA9AFD5138FE8376435B9FC6
2628
2629
2630
2631 Burdis & Naffah Expires November 28, 2003 [Page 47]
2632
2633 Internet-Draft SRP Authentication Mechanism May 2003
2634
2635
2636 1D2FC0EB06E3
2637 Generator = 2
2638
2639 [1280 bits]
2640 Modulus (base 16) =
2641 D77946826E811914B39401D56A0A7843A8E7575D738C672A090AB1187D690
2642 DC43872FC06A7B6A43F3B95BEAEC7DF04B9D242EBDC481111283216CE816E
2643 004B786C5FCE856780D41837D95AD787A50BBE90BD3A9C98AC0F5FC0DE744
2644 B1CDE1891690894BC1F65E00DE15B4B2AA6D87100C9ECC2527E45EB849DEB
2645 14BB2049B163EA04187FD27C1BD9C7958CD40CE7067A9C024F9B7C5A0B4F5
2646 003686161F0605B
2647 Generator = 2
2648
2649 [1536 bits]
2650 Modulus (base 16) =
2651 9DEF3CAFB939277AB1F12A8617A47BBBDBA51DF499AC4C80BEEEA9614B19C
2652 C4D5F4F5F556E27CBDE51C6A94BE4607A291558903BA0D0F84380B655BB9A
2653 22E8DCDF028A7CEC67F0D08134B1C8B97989149B609E0BE3BAB63D4754838
2654 1DBC5B1FC764E3F4B53DD9DA1158BFD3E2B9C8CF56EDF019539349627DB2F
2655 D53D24B7C48665772E437D6C7F8CE442734AF7CCB7AE837C264AE3A9BEB87
2656 F8A2FE9B8B5292E5A021FFF5E91479E8CE7A28C2442C6F315180F93499A23
2657 4DCF76E3FED135F9BB
2658 Generator = 2
2659
2660 [2048 bits]
2661 Modulus (base 16) =
2662 AC6BDB41324A9A9BF166DE5E1389582FAF72B6651987EE07FC3192943DB56
2663 050A37329CBB4A099ED8193E0757767A13DD52312AB4B03310DCD7F48A9DA
2664 04FD50E8083969EDB767B0CF6095179A163AB3661A05FBD5FAAAE82918A99
2665 62F0B93B855F97993EC975EEAA80D740ADBF4FF747359D041D5C33EA71D28
2666 1E446B14773BCA97B43A23FB801676BD207A436C6481F1D2B9078717461A5
2667 B9D32E688F87748544523B524B0D57D5EA77A2775D2ECFA032CFBDBF52FB3
2668 786160279004E57AE6AF874E7303CE53299CCC041C7BC308D82A5698F3A8D
2669 0C38271AE35F8E9DBFBB694B5C803D89F7AE435DE236D525F54759B65E372
2670 FCD68EF20FA7111F9E4AFF73
2671 Generator = 2
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687 Burdis & Naffah Expires November 28, 2003 [Page 48]
2688
2689 Internet-Draft SRP Authentication Mechanism May 2003
2690
2691
2692 Appendix B. Changes since the previous draft
2693
2694 Removed specific references to SASL in the main document, instead
2695 isolating them to their own section.
2696
2697 Added sections describing how the mechanism can be used with the
2698 GSS-API and EAP authentication frameworks.
2699
2700 Adopted SRP-6 exchange for the base protocol.
2701
2702 Mandated the use of SASLprep profile for text based information.
2703
2704 Added an optional, optimised alternate authentication exchange where
2705 the parameters of a previously negotiated session are re-used, but
2706 with a newly derived shared context key.
2707
2708 TODO: Regenerate SASL example.
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743 Burdis & Naffah Expires November 28, 2003 [Page 49]
2744
2745 Internet-Draft SRP Authentication Mechanism May 2003
2746
2747
2748 Intellectual Property Statement
2749
2750 The IETF takes no position regarding the validity or scope of any
2751 intellectual property or other rights that might be claimed to
2752 pertain to the implementation or use of the technology described in
2753 this document or the extent to which any license under such rights
2754 might or might not be available; neither does it represent that it
2755 has made any effort to identify any such rights. Information on the
2756 IETF's procedures with respect to rights in standards-track and
2757 standards-related documentation can be found in BCP-11. Copies of
2758 claims of rights made available for publication and any assurances of
2759 licenses to be made available, or the result of an attempt made to
2760 obtain a general license or permission for the use of such
2761 proprietary rights by implementors or users of this specification can
2762 be obtained from the IETF Secretariat.
2763
2764 The IETF invites any interested party to bring to its attention any
2765 copyrights, patents or patent applications, or other proprietary
2766 rights which may cover technology that may be required to practice
2767 this standard. Please address the information to the IETF Executive
2768 Director.
2769
2770
2771 Full Copyright Statement
2772
2773 Copyright (C) The Internet Society (2003). All Rights Reserved.
2774
2775 This document and translations of it may be copied and furnished to
2776 others, and derivative works that comment on or otherwise explain it
2777 or assist in its implementation may be prepared, copied, published
2778 and distributed, in whole or in part, without restriction of any
2779 kind, provided that the above copyright notice and this paragraph are
2780 included on all such copies and derivative works. However, this
2781 document itself may not be modified in any way, such as by removing
2782 the copyright notice or references to the Internet Society or other
2783 Internet organizations, except as needed for the purpose of
2784 developing Internet standards in which case the procedures for
2785 copyrights defined in the Internet Standards process must be
2786 followed, or as required to translate it into languages other than
2787 English.
2788
2789 The limited permissions granted above are perpetual and will not be
2790 revoked by the Internet Society or its successors or assignees.
2791
2792 This document and the information contained herein is provided on an
2793 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
2794 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
2795 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
2796
2797
2798
2799 Burdis & Naffah Expires November 28, 2003 [Page 50]
2800
2801 Internet-Draft SRP Authentication Mechanism May 2003
2802
2803
2804 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
2805 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
2806
2807
2808 Acknowledgement
2809
2810 Funding for the RFC Editor function is currently provided by the
2811 Internet Society.
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855 Burdis & Naffah Expires November 28, 2003 [Page 51]
2856
2857
0
1
2
3
4
5
6 INTERNET-DRAFT Editor: Kurt D. Zeilenga
7 Intended Category: Standards Track OpenLDAP Foundation
8 Expires in six months 30 June 2003
9 Obsoletes: RFC 2245
10
11
12 The Anonymous SASL Mechanism
13 <draft-ietf-sasl-anon-02.txt>
14
15
16 Status of Memo
17
18 This document is an Internet-Draft and is in full conformance with all
19 provisions of Section 10 of RFC2026.
20
21 This document is intended to be, after appropriate review and
22 revision, submitted to the RFC Editor as a Standards Track document.
23 Distribution of this memo is unlimited. Technical discussion of this
24 document will take place on the IETF SASL mailing list
25 <ietf-sasl@imc.org>. Please send editorial comments directly to the
26 document editor <Kurt@OpenLDAP.org>.
27
28 Internet-Drafts are working documents of the Internet Engineering Task
29 Force (IETF), its areas, and its working groups. Note that other
30 groups may also distribute working documents as Internet-Drafts.
31 Internet-Drafts are draft documents valid for a maximum of six months
32 and may be updated, replaced, or obsoleted by other documents at any
33 time. It is inappropriate to use Internet-Drafts as reference
34 material or to cite them other than as ``work in progress.''
35
36 The list of current Internet-Drafts can be accessed at
37 <http://www.ietf.org/ietf/1id-abstracts.txt>. The list of
38 Internet-Draft Shadow Directories can be accessed at
39 <http://www.ietf.org/shadow.html>.
40
41 Copyright (C) The Internet Society (2003). All Rights Reserved.
42
43 Please see the Full Copyright section near the end of this document
44 for more information.
45
46
47 Abstract
48
49 It is common practice on the Internet to permit anonymous access to
50 various services. Traditionally, this has been done with a plain text
51 password mechanism using "anonymous" as the user name and optional
52 trace information, such as an email address, as the password. As
53 plain text login commands are not permitted in new IETF protocols, a
54
55
56
57 Zeilenga Anonymous SASL Mechanism [Page 1]
58
59 INTERNET-DRAFT draft-ietf-sasl-anon-02.txt 30 June 2003
60
61
62 new way to provide anonymous login is needed within the context of the
63 Simple Authentication and Security Layer (SASL) framework.
64
65
66 Conventions
67
68 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
69 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
70 document are to be interpreted as described in [Keywords].
71
72
73 1. Anonymous SASL mechanism
74
75 This document defines an anonymous mechanism for the Simple
76 Authentication and Security Layer ([SASL]) framework. The name
77 associated with this mechanism is "ANONYMOUS".
78
79 This document replaces RFC 2245. Changes since RFC 2245 are detailed
80 in Appendix A.
81
82 The mechanism consists of a single message from the client to the
83 server. The client sends optional trace information in the form of a
84 string of [UTF-8] encoded [Unicode] characters prepared in accordance
85 with [StringPrep] and the "trace" stringprep profile defined in
86 Section 2 of this document. The trace information, which has no
87 semantical value, should take one of three forms: an Internet email
88 address, an opaque string which does not contain the '@' (U+0040)
89 character and can be interpreted by the system administrator of the
90 client's domain, or nothing. For privacy reasons, an Internet email
91 address or other information identifying the user should only be used
92 with permission from the user.
93
94 A server which permits anonymous access will announce support for the
95 ANONYMOUS mechanism, and allow anyone to log in using that mechanism,
96 usually with restricted access.
97
98 This mechanism does not provide a security layer.
99
100 A formal grammar for the client message using Augmented BNF [ABNF] is
101 provide below as a tool for understanding this technical
102 specification.
103
104 message = [ email / token ]
105 ;; MUST be prepared in accordance with Section 2
106
107 UTF1 = %x00-3F / %x41-7F ;; less '@' (U+0040)
108 UTF2 = %xC2-DF UTF0
109 UTF3 = %xE0 %xA0-BF UTF0 / %xE1-EC 2(UTF0) /
110
111
112
113 Zeilenga Anonymous SASL Mechanism [Page 2]
114
115 INTERNET-DRAFT draft-ietf-sasl-anon-02.txt 30 June 2003
116
117
118 %xED %x80-9F UTF0 / %xEE-EF 2(UTF0)
119 UTF4 = %xF0 %x90-BF 2(UTF0) / %xF1-F3 3(UTF0) /
120 %xF4 %x80-8F 2(UTF0)
121 UTF0 = %x80-BF
122
123 TCHAR = UTF1 / UTF2 / UTF3 / UTF4
124 ;; any UTF-8 encoded Unicode character
125 ;; except '@' (U+0040)
126
127 email = addr-spec
128 ;; as defined in [IMAIL], except with no free
129 ;; insertion of linear-white-space, and the
130 ;; local-part MUST either be entirely enclosed in
131 ;; quotes or entirely unquoted
132
133 token = 1*255TCHAR
134
135 Note to implementors:
136 The <token> production is restricted to 255 UTF-8 encoded Unicode
137 characters. As the encoding of a characters uses a sequence of 1
138 to 4 octets, a token may be long as 1020 octets.
139
140
141 2. The "trace" profile of "Stringprep"
142
143 This section defines the "trace" profile of [StringPrep]. This
144 profile is designed for use with the SASL ANONYMOUS Mechanism.
145 Specifically, the client MUST prepare the <message> production in
146 accordance with this profile.
147
148 The character repertoire of this profile is Unicode 3.2 [Unicode].
149
150 No mapping is required by this profile.
151
152 No Unicode normalization is required by this profile.
153
154 The list of unassigned code points for this profile is that provided
155 in appendix A of [RFC 3454]. Unassigned code points are not
156 prohibited.
157
158 Characters from the following tables of [StringPrep] are prohibited:
159 - C.2.1 (ASCII control characters)
160 - C.2.2 (Non-ASCII control characters)
161 - C.3 (Private use characters)
162 - C.4 (Non-character code points)
163 - C.5 (Surrogate codes)
164 - C.6 (Inappropriate for plain text)
165 - C.8 (Change display properties are deprecated)
166
167
168
169 Zeilenga Anonymous SASL Mechanism [Page 3]
170
171 INTERNET-DRAFT draft-ietf-sasl-anon-02.txt 30 June 2003
172
173
174 - C.9 (Tagging characters)
175
176 No additional characters are prohibited.
177
178 This profile requires bidirectional character checking per Section 6
179 of [StringPrep].
180
181
182 3. Example
183
184 Here is a sample ANONYMOUS login between an IMAP client and server.
185 In this example, "C:" and "S:" indicate lines sent by the client and
186 server respectively. If such lines are wrapped without a new "C:" or
187 "S:" label, then the wrapping is for editorial clarity and is not part
188 of the command.
189
190 Note that this example uses the IMAP profile [IMAP4] of SASL. The
191 base64 encoding of challenges and responses, as well as the "+ "
192 preceding the responses are part of the IMAP4 profile, not part of
193 SASL itself. Newer profiles of SASL will include the client message
194 with the AUTHENTICATE command itself so the extra round trip below
195 (the server response with an empty "+ ") can be eliminated.
196
197 In this example, the user's opaque identification token is "sirhc".
198
199 S: * OK IMAP4 server ready
200 C: A001 CAPABILITY
201 S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=DIGEST-MD5 AUTH=ANONYMOUS
202 S: A001 OK done
203 C: A002 AUTHENTICATE ANONYMOUS
204 S: +
205 C: c2lyaGM=
206 S: A003 OK Welcome, trace information has been logged.
207
208
209 4. Security Considerations
210
211 The ANONYMOUS mechanism grants access to information by anyone. For
212 this reason it should be disabled by default so the administrator can
213 make an explicit decision to enable it.
214
215 If the anonymous user has any write privileges, a denial of service
216 attack is possible by filling up all available space. This can be
217 prevented by disabling all write access by anonymous users.
218
219 If anonymous users have read and write access to the same area, the
220 server can be used as a communication mechanism to anonymously
221 exchange information. Servers which accept anonymous submissions
222
223
224
225 Zeilenga Anonymous SASL Mechanism [Page 4]
226
227 INTERNET-DRAFT draft-ietf-sasl-anon-02.txt 30 June 2003
228
229
230 should implement the common "drop box" model which forbids anonymous
231 read access to the area where anonymous submissions are accepted.
232
233 If the anonymous user can run many expensive operations (e.g., an IMAP
234 SEARCH BODY command), this could enable a denial of service attack.
235 Servers are encouraged to reduce the priority of anonymous users or
236 limit their resource usage.
237
238 While servers may impose a limit on the number of anonymous users, it
239 is noted that such limits enable denial of service attacks and should
240 be used with caution.
241
242 The trace information is not authenticated so it can be falsified.
243 This can be used as an attempt to get someone else in trouble for
244 access to questionable information. Administrators trying to trace
245 abuse need to realize this information may be falsified.
246
247 A client which uses the user's correct email address as trace
248 information without explicit permission may violate that user's
249 privacy. Information about who accesses an anonymous archive on a
250 sensitive subject (e.g., sexual abuse) has strong privacy needs.
251 Clients should not send the email address without explicit permission
252 of the user and should offer the option of supplying no trace token --
253 thus only exposing the source IP address and time. Anonymous proxy
254 servers could enhance this privacy, but would have to consider the
255 resulting potential denial of service attacks.
256
257 Anonymous connections are susceptible to man in the middle attacks
258 which view or alter the data transferred. Clients and servers are
259 encouraged to support external integrity and encryption mechanisms.
260
261 Protocols which fail to require an explicit anonymous login are more
262 susceptible to break-ins given certain common implementation
263 techniques. Specifically, Unix servers which offer user login may
264 initially start up as root and switch to the appropriate user id after
265 an explicit login command. Normally such servers refuse all data
266 access commands prior to explicit login and may enter a restricted
267 security environment (e.g., the Unix chroot(2) function) for anonymous
268 users. If anonymous access is not explicitly requested, the entire
269 data access machinery is exposed to external security attacks without
270 the chance for explicit protective measures. Protocols which offer
271 restricted data access should not allow anonymous data access without
272 an explicit login step.
273
274 General [SASL] security considerations apply to this mechanism.
275
276 [StringPrep] security considerations as well as [Unicode] security
277 considerations discussed in [StringPrep] apply to this mechanism.
278
279
280
281 Zeilenga Anonymous SASL Mechanism [Page 5]
282
283 INTERNET-DRAFT draft-ietf-sasl-anon-02.txt 30 June 2003
284
285
286 [UTF-8] security considerations also apply.
287
288
289 5. IANA Considerations
290
291 It is requested that the SASL Mechanism registry [IANA-SASL] entry for
292 the ANONYMOUS mechanism be updated to reflect that this document now
293 provides its technical specification.
294
295 To: iana@iana.org
296 Subject: Updated Registration of SASL mechanism ANONYMOUS
297
298 SASL mechanism name: ANONYMOUS
299 Security considerations: See RFC XXXX.
300 Published specification (optional, recommended): RFC XXXX
301 Person & email address to contact for further information:
302 Kurt Zeilenga <kurt@openldap.org>
303 Chris Neuman <chris.newman@innosoft.com>
304 Intended usage: COMMON
305 Author/Change controller: IESG <iesg@ietf.org>
306 Note: Updates existing entry for ANONYMOUS
307
308
309 It is requested that the [Stringprep] profile "trace", first defined
310 in this RFC, be registered:
311
312 To: iana@iana.org
313 Subject: Initial Registration of Stringprep "trace" profile
314
315 Stringprep profile: trace
316 Published specification: RFC XXXX
317 Person & email address to contact for further information:
318 Kurt Zeilenga <kurt@openldap.org>
319
320
321 6. Acknowledgment
322
323 This document is a revision of RFC 2245 by Chris Newman. Portions of
324 the grammar defined in Section 1 were borrowed from [UTF-8] by
325 Francois Yergeau.
326
327 This document is a product of the IETF SASL WG.
328
329
330 7. Normative References
331
332 [ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax
333 Specifications: ABNF", RFC 2234, November 1997.
334
335
336
337 Zeilenga Anonymous SASL Mechanism [Page 6]
338
339 INTERNET-DRAFT draft-ietf-sasl-anon-02.txt 30 June 2003
340
341
342 [IMAIL] Crocker, D., "Standard for the Format of Arpa Internet
343 Text Messages", STD 11, RFC 822, August 1982.
344
345 [Keywords] Bradner, S., "Key words for use in RFCs to Indicate
346 Requirement Levels", BCP 14, RFC 2119, March 1997
347
348 [SASL] Myers, J., "Simple Authentication and Security Layer
349 (SASL)", draft-myers-saslrev-xx.txt, a work in progress.
350
351 [StringPrep] Hoffman P. and M. Blanchet, "Preparation of
352 Internationalized Strings ('stringprep')", RFC 3454,
353 December 2002.
354
355 [Unicode] The Unicode Consortium, "The Unicode Standard, Version
356 3.2.0" is defined by "The Unicode Standard, Version 3.0"
357 (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5),
358 as amended by the "Unicode Standard Annex #27: Unicode
359 3.1" (http://www.unicode.org/reports/tr27/) and by the
360 "Unicode Standard Annex #28: Unicode 3.2"
361 (http://www.unicode.org/reports/tr28/).
362
363 [UTF-8] Yergeau, F., "UTF-8, a transformation
364 format of ISO 10646", draft-yergeau-rfc2279bis, a work
365 in progress.
366
367
368 8. Informative References
369
370 [IMAP4] Crispin, M., "Internet Message Access Protocol - Version
371 4rev1", RFC 2060, December 1996.
372
373 [IANA-SASL] IANA, "SIMPLE AUTHENTICATION AND SECURITY LAYER (SASL)
374 MECHANISMS", http://www.iana.org/assignments/sasl-
375 mechanisms.
376
377
378 9. Editor's Address
379
380 Kurt Zeilenga
381 OpenLDAP Foundation
382
383 Email: kurt@OpenLDAP.org
384
385
386 Appendix A. Changes since RFC 2245
387
388 This appendix is non-normative.
389
390
391
392
393 Zeilenga Anonymous SASL Mechanism [Page 7]
394
395 INTERNET-DRAFT draft-ietf-sasl-anon-02.txt 30 June 2003
396
397
398 RFC 2245 allows the client to send optional trace information in the
399 form of a human readable string. RFC 2245 restricted this string to
400 US-ASCII. As the Internet is international, this document uses a
401 string restricted to UTF-8 encoded Unicode characters. A "stringprep"
402 profile is defined to precisely define which Unicode characters are
403 allowed in this string. While the string remains restricted to 255
404 characters, the encoded length of each character may now range from 1
405 to 4 octets.
406
407 Additionally, a number of editorial changes were made.
408
409
410
411 Intellectual Property Rights
412
413 The IETF takes no position regarding the validity or scope of any
414 intellectual property or other rights that might be claimed to pertain
415 to the implementation or use of the technology described in this
416 document or the extent to which any license under such rights might or
417 might not be available; neither does it represent that it has made any
418 effort to identify any such rights. Information on the IETF's
419 procedures with respect to rights in standards-track and
420 standards-related documentation can be found in BCP-11. Copies of
421 claims of rights made available for publication and any assurances of
422 licenses to be made available, or the result of an attempt made to
423 obtain a general license or permission for the use of such proprietary
424 rights by implementors or users of this specification can be obtained
425 from the IETF Secretariat.
426
427 The IETF invites any interested party to bring to its attention any
428 copyrights, patents or patent applications, or other proprietary
429 rights which may cover technology that may be required to practice
430 this standard. Please address the information to the IETF Executive
431 Director.
432
433
434
435 Full Copyright
436
437 Copyright (C) The Internet Society (2003). All Rights Reserved.
438
439 This document and translations of it may be copied and furnished to
440 others, and derivative works that comment on or otherwise explain it
441 or assist in its implmentation may be prepared, copied, published and
442 distributed, in whole or in part, without restriction of any kind,
443 provided that the above copyright notice and this paragraph are
444 included on all such copies and derivative works. However, this
445 document itself may not be modified in any way, such as by removing
446
447
448
449 Zeilenga Anonymous SASL Mechanism [Page 8]
450
451 INTERNET-DRAFT draft-ietf-sasl-anon-02.txt 30 June 2003
452
453
454 the copyright notice or references to the Internet Society or other
455 Internet organizations, except as needed for the purpose of
456 developing Internet standards in which case the procedures for
457 copyrights defined in the Internet Standards process must be followed,
458 or as required to translate it into languages other than English.
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505 Zeilenga Anonymous SASL Mechanism [Page 9]
506
0
1
2 Network Working Group L. Nerenberg, Editor
3 Internet Draft: The CRAM-MD5 SASL Mechanism Orthanc Systems
4 Document: draft-ietf-sasl-crammd5-01.txt November 2003
5
6
7
8 The CRAM-MD5 SASL Mechanism
9
10
11 Status of this Memo
12
13 This document is an Internet Draft and is in full conformance with
14 all provisions of Section 10 of RFC 2026.
15
16 Internet Drafts are working documents of the Internet Engineering
17 Task Force (IETF), its areas, and its working groups. Note that
18 other groups may also distribute working documents as Internet
19 Drafts.
20
21 Internet Drafts are draft documents valid for a maximum of six
22 months and may be updated, replaced, or obsoleted by other docu-
23 ments at any time. It is inappropriate to use Internet Drafts as
24 reference material or to cite them other than as "work in
25 progress."
26
27 The list of current Internet Drafts can be accessed at
28 http://www.ietf.org/ietf/1id-abstracts.txt The list of Internet
29 Draft Shadow Directories can be accessed at
30 http://www.ietf.org/shadow.html.
31
32 Copyright 2003, The Internet Society. All Rights Reserved.
33
34 Please see the Copyright section near the end of this document for
35 more information.
36
37 Abstract
38
39 This document defines a simple challenge-response authentication
40 mechanism, using a keyed-hash digest, for use with the Simple
41 Authentication and Security Layer (SASL).
42
43 1. Conventions Used in this Document
44
45 The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
46 in this document are to be interpreted as defined in [KEYWORD].
47
48
49 2. CRAM-MD5 Authentication Mechanism
50
51 This document defines a simple challenge-response [SASL] authenti-
52 cation mechanism, using a [KEYED-MD5] digest, for use with [SASL].
53 The mechanism name associated with CRAM-MD5 is 'CRAM-MD5'.
54
55 This mechanism does not provide a security layer.
56
57
58
59 Nerenberg draft-ietf-sasl-crammd5-01.txt [Page 1]
60
61 Internet Draft CRAM-MD5 SASL Mechanism November 2003
62
63
64 The data encoded in the challenge contains a presumptively arbi-
65 trary string of random digits, a time-stamp, and the fully-quali-
66 fied primary host name of the server.
67
68 The client makes note of the data and then responds with a string
69 consisting of the user name, a space, and a "digest." The latter
70 is computed by applying the keyed MD5 algorithm from [KEYED-MD5]
71 where the key is a shared secret and the digested text is the chal-
72 lenge (including angle-brackets). The client MUST NOT interpret or
73 attempt to validate the contents of the challenge in any way.
74
75 This shared secret is a string known only to the client and server.
76 The "digest" parameter itself is a 16-octet value which is sent in
77 hexadecimal format, using lower-case US-ASCII characters.
78
79 When the server receives this client response, it verifies the
80 digest provided. Since the user name may contain the space charac-
81 ter, the server MUST scan the client response from right to left;
82 the first space character encountered separates the digest from the
83 user name. If the digest is correct, the server should consider
84 the client authenticated and respond appropriately.
85
86 The client MUST prepare the user name and shared secret strings
87 using the [SASLPrep] profile of the [StringPrep] algorithm. The
88 resulting values MUST be encoded as UTF-8 [UTF8].
89
90
91 2.1. Formal Syntax
92
93 The following syntax specification uses the augmented Backus-Naur
94 Form (ABNF) as specified in [ABNF], and incorporates by reference
95 the Core Rules defined in that document.
96
97 challenge = "<" 1*DIGIT "." 1*DIGIT "@" hostname ">"
98
99 digest = 32(DIGIT / %x61-66)
100 ; A hexadecimal string using only lower-case
101 ; letters
102
103 hostname = 1*(ALPHA / DIGIT) *("." / "-" / ALPHA / DIGIT)
104
105 response = user SP digest
106
107 user = 1*OCTET
108
109
110 2.2. Examples
111
112 The examples in this section do NOT form part of the specification.
113 Where conflicts exist between the examples and the formal grammar
114 or specification text, the latter are authoritative.
115
116 These examples show the use of the CRAM-MD5 mechanism with the
117 IMAP4 AUTHENTICATE command [IMAP4]. The base64 encoding of the
118
119
120
121 Nerenberg draft-ietf-sasl-crammd5-01.txt [Page 2]
122
123 Internet Draft CRAM-MD5 SASL Mechanism November 2003
124
125
126 challenges and responses is part of the IMAP4 AUTHENTICATE command,
127 not part of the CRAM-MD5 specification itself.
128
129 S: * OK [CAPABILITY IMAP4rev1 STARTTLS LOGINDISABLED AUTH=CRAM-MD5]
130 C: A0001 AUTHENTICATE CRAM-MD5
131 S: + PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+
132 C: dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw
133 S: A0001 OK CRAM-MD5 authentication successful
134
135 In this example, the shared secret is the string
136
137 tanstaaftanstaaf
138
139 Hence, the Keyed MD5 digest is produced by calculating
140
141 MD5((tanstaaftanstaaf XOR opad),
142 MD5((tanstaaftanstaaf XOR ipad),
143 <1896.697170952@postoffice.example.net>))
144
145 where ipad and opad are as defined in [KEYED-MD5] and the string
146 shown in the challenge is the base64 encoding of
147 <1896.697170952@postoffice.reston.mci.net>. The shared secret is
148 null-padded to a length of 64 bytes. If the shared secret is longer
149 than 64 bytes, the MD5 digest of the shared secret is used as a 16
150 byte input to the keyed MD5 calculation.
151
152 This produces a digest value (in hexadecimal) of
153
154 b913a602c7eda7a495b4e6e7334d3890
155
156 The user name is then prepended to it, forming
157
158 tim b913a602c7eda7a495b4e6e7334d3890
159
160 Which is then base64 encoded to meet the requirements of the IMAP4
161 AUTHENTICATE command (or the similar POP3 AUTH command), yielding
162
163 dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw
164
165
166
167 3. References
168
169 3.1. Normative References
170
171 [ABNF]
172 Crocker, D., P. Overell, "Augmented BNF for Syntax Specifications:
173 ABNF", RFC2234, Internet Mail Consortium and Demon Internet Ltd.,
174 November 1997.
175
176 [KEYED-MD5]
177 Krawczyk, Bellare, Canetti, "HMAC: Keyed-Hashing for Message
178 Authentication", RFC 2104, IBM and UCSD, February 1997.
179
180
181
182
183 Nerenberg draft-ietf-sasl-crammd5-01.txt [Page 3]
184
185 Internet Draft CRAM-MD5 SASL Mechanism November 2003
186
187
188 [KEYWORD]
189 Bradner, S., "Key words for use in RFCs to Indicate Requirement
190 Levels", BCP 14, RFC2119, Harvard University, March 1997.
191
192 [MD5]
193 Rivest, R., "The MD5 Message Digest Algorithm", RFC 1321, MIT Labo-
194 ratory for Computer Science and RSA Data Security, Inc., April
195 1992.
196
197 [SASL]
198 Myers, J., "Simple Authentication and Security Layer (SASL)," RFC
199 2222, Netscape Communications, October 1997.
200
201 [SASLPrep]
202 Zeilenga, K., "SASL String Preparation Profiles", draft-ietf-sasl-
203 saslprep (work in progress)
204
205 [StringPrep]
206 Hoffman, P., M. Blanchet, "Preparation of Internationalized Strings
207 (stringprep)", RFC 3454, IMC and Viagenie, December 2002.
208
209 [UTF8]
210 Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC
211 2279, Alis Technologies, January 1998.
212
213 3.2. Informative References
214
215 [IMAP4]
216 Crispin, M., "Internet Message Access Protocol - Version 4rev1,"
217 RFC 3501, University of Washington, March 2003.
218
219
220 4. Security Considerations
221
222 It is conjectured that use of the CRAM-MD5 authentication mechanism
223 provides replay protection for a session.
224
225 This mechanism does not obscure the user name in any way. Accord-
226 ingly, a server that implements both a clear-text password command
227 and this authentication type should not allow both methods of
228 access for a given user name.
229
230 Keyed MD5 is chosen for this application because of the greater
231 security imparted to authentication of short messages. In addition,
232 the use of the techniques described in [KEYED-MD5] for pre-computa-
233 tion of intermediate results make it possible to avoid explicit
234 clear-text storage of the shared secret on the server system by
235 instead storing the intermediate results which are known as "con-
236 texts." While the saving, on the server, of the MD5 "context" is
237 marginally better than saving the shared secrets in clear-text, it
238 is not sufficient to protect the secrets if the server itself is
239 compromised. Consequently, servers that store the secrets or con-
240 texts must both be protected to a level appropriate to the poten-
241 tial information value in the data and services protected by this
242
243
244
245 Nerenberg draft-ietf-sasl-crammd5-01.txt [Page 4]
246
247 Internet Draft CRAM-MD5 SASL Mechanism November 2003
248
249
250 mechanism. In other words, techniques like this one involve a
251 trade-off between vulnerability to network sniffing and I/O buffer
252 snooping and vulnerability of the server host's databases. If one
253 believes that the host and its databases are subject to compromise,
254 and the network is not, this technique (and all others like it) is
255 unattractive. It is perhaps even less attractive than clear-text
256 passwords, which are typically stored on hosts in one-way hash
257 form. On the other hand, if the server databases are perceived as
258 reasonably secure, and one is concerned about client-side or net-
259 work interception of the passwords (secrets), then this (and simi-
260 lar) techniques are preferable to clear-text passwords by a wide
261 margin.
262
263 As the length of the shared secret increases, so does the diffi-
264 culty of deriving it.
265
266 While there are now suggestions in the literature that the use of
267 MD5 and keyed MD5 in authentication procedures probably has a lim-
268 ited effective lifetime, the technique is now widely deployed and
269 widely understood. It is believed that this general understanding
270 may assist with the rapid replacement, by CRAM-MD5, of the current
271 uses of permanent clear-text passwords in many protocols. This
272 document has been deliberately written to permit easy upgrading to
273 use SHA (or whatever alternatives emerge) when they are considered
274 to be widely available and adequately safe.
275
276 Even with the use of CRAM-MD5, users are still vulnerable to active
277 attacks. An example of an increasingly common active attack is
278 'TCP Session Hijacking' as described in CERT Advisory CA-95:01.
279
280 CRAM-MD5 does not authenticate the server and does not include a
281 client-supplied nonce. As a result, it is possible to construct a
282 server with a fixed challenge string that has pre-computed the
283 hashes for all possible passwords up to a certain length (or from a
284 dictionary). Such a server could then immediately determine the
285 user's password if it is sufficiently short.
286
287
288 5. IANA Considerations
289
290 The SASL Mechanism Registry entry for CRAM-MD5 must be updated to
291 reference this specification.
292
293
294 6. Contributors
295
296 The CRAM-MD5 mechanism was originally specified in RFC 2095,
297 IMAP/POP AUTHorize Extension for Simple Challenge/Response. The
298 authors of that document -- John C. Klensin, Paul Krumviede, and
299 Randy Catoe -- are to be credited with the design and specification
300 of CRAM-MD5. This memo serves only to re-state CRAM-MD5 within the
301 formal context of SASL, which specification it preceded by several
302 months.
303
304
305
306
307 Nerenberg draft-ietf-sasl-crammd5-01.txt [Page 5]
308
309 Internet Draft CRAM-MD5 SASL Mechanism November 2003
310
311
312 7. Intellectual Property
313
314 The IETF takes no position regarding the validity or scope of any
315 intellectual property or other rights that might be claimed to per-
316 tain to the implementation or use of the technology described in
317 this document or the extent to which any license under such rights
318 might or might not be available; neither does it represent that it
319 has made any effort to identify any such rights. Information on
320 the IETF's procedures with respect to rights in standards-track and
321 standards-related documentation can be found in BCP-11. Copies of
322 claims of rights made available for publication and any assurances
323 of licenses to be made available, or the result of an attempt made
324 to obtain a general license or permission for the use of such pro-
325 prietary rights by implementers or users of this specification can
326 be obtained from the IETF Secretariat.
327
328 The IETF invites any interested party to bring to its attention any
329 copyrights, patents or patent applications, or other proprietary
330 rights which may cover technology that may be required to practice
331 this standard. Please address the information to the IETF Execu-
332 tive Director.
333
334
335 8. Editors' Address
336
337 Lyndon Nerenberg
338 Orthanc Systems
339 1606 - 10770 Winterburn Road
340 Edmonton, Alberta
341 Canada T5S 1T6
342 Email: lyndon+rfc-crammd5@orthanc.ca
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369 Nerenberg draft-ietf-sasl-crammd5-01.txt [Page 6]
370
371 Internet Draft CRAM-MD5 SASL Mechanism November 2003
372
373
374 9. Full Copyright Statement
375
376 Copyright 2003, The Internet Society. All Rights Reserved.
377
378 This document and translations of it may be copied and furnished to
379 others, and derivative works that comment on or otherwise explain
380 it or assist in its implementation may be prepared, copied, pub-
381 lished and distributed, in whole or in part, without restriction of
382 any kind, provided that the above copyright notice and this para-
383 graph are included on all such copies and derivative works. How-
384 ever, this document itself may not be modified in any way, such as
385 by removing the copyright notice or references to the Internet
386 Society or other Internet organizations, except as needed for the
387 purpose of developing Internet standards in which case the proce-
388 dures for copyrights defined in the Internet Standards process must
389 be followed, or as required to translate it into languages other
390 than English. The limited permissions granted above are perpetual
391 and will not be revoked by the Internet Society or its successors
392 or assigns.
393
394 This document and the information contained herein is provided on
395 an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGI-
396 NEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
397 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
398 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WAR-
399 RANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431 Nerenberg draft-ietf-sasl-crammd5-01.txt [Page 7]
432
433
0
1
2 SASL Working Group A. Melnikov
3 Internet-Draft Isode
4 Expires: May 22, 2004 November 22, 2003
5
6
7 SASL GSSAPI mechanisms
8 draft-ietf-sasl-gssapi-00
9
10 Status of this Memo
11
12 This document is an Internet-Draft and is in full conformance with
13 all provisions of Section 10 of RFC2026.
14
15 Internet-Drafts are working documents of the Internet Engineering
16 Task Force (IETF), its areas, and its working groups. Note that
17 other groups may also distribute working documents as Internet-
18 Drafts.
19
20 Internet-Drafts are draft documents valid for a maximum of six months
21 and may be updated, replaced, or obsoleted by other documents at any
22 time. It is inappropriate to use Internet-Drafts as reference
23 material or to cite them other than as "work in progress."
24
25 The list of current Internet-Drafts can be accessed at http://
26 www.ietf.org/ietf/1id-abstracts.txt.
27
28 The list of Internet-Draft Shadow Directories can be accessed at
29 http://www.ietf.org/shadow.html.
30
31 This Internet-Draft will expire on May 22, 2004.
32
33 Copyright Notice
34
35 Copyright (C) The Internet Society (2003). All Rights Reserved.
36
37 Abstract
38
39 The Simple Authentication and Security Layer [SASL] is a method for
40 adding authentication support to connection-based protocols. This
41 document describes the method for using the Generic Security Service
42 Application Program Interface [GSSAPI] in the Simple Authentication
43 and Security Layer [SASL].
44
45 This document replaces section 7.2 of RFC 2222 [SASL], the definition
46 of the "GSSAPI" SASL mechanism.
47
48
49
50
51
52
53
54 Melnikov Expires May 22, 2004 [Page 1]
55
56 Internet-Draft SASL GSSAPI mechanisms November 2003
57
58
59 Table of Contents
60
61 1. Conventions Used in this Document . . . . . . . . . . . . . . 3
62 2. Introduction and Overview . . . . . . . . . . . . . . . . . . 4
63 2.1 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
64 3. SPNEGO . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
65 4. Specification common to all GSSAPI mechanisms . . . . . . . . 6
66 4.1 Client side of authentication protocol exchange . . . . . . . 6
67 4.2 Server side of authentication protocol exchange . . . . . . . 7
68 4.3 Security layer . . . . . . . . . . . . . . . . . . . . . . . . 8
69 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9
70 6. Security Considerations . . . . . . . . . . . . . . . . . . . 11
71 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 12
72 Normative References . . . . . . . . . . . . . . . . . . . . . 13
73 Informative References . . . . . . . . . . . . . . . . . . . . 14
74 Author's Address . . . . . . . . . . . . . . . . . . . . . . . 14
75 Full Copyright Statement . . . . . . . . . . . . . . . . . . . 15
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110 Melnikov Expires May 22, 2004 [Page 2]
111
112 Internet-Draft SASL GSSAPI mechanisms November 2003
113
114
115 1. Conventions Used in this Document
116
117 The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
118 in this document are to be interpreted as defined in "Key words for
119 use in RFCs to Indicate Requirement Levels" [KEYWORDS].
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166 Melnikov Expires May 22, 2004 [Page 3]
167
168 Internet-Draft SASL GSSAPI mechanisms November 2003
169
170
171 2. Introduction and Overview
172
173 Each and every GSSAPI mechanism used within SASL is implicitly
174 registered by this specification.
175
176 For backwards compatibility with existing implementations of Kerberos
177 V5 and SPNEGO under SASL, the SASL mechanism name for the Kerberos V5
178 GSSAPI mechanism [KRB5GSS] is "GSSAPI" and the SASL mechanism for the
179 SPNEGO GSSAPI mechanism [SPNEGO] is "GSS-SPNEGO". The SASL mechanism
180 name for any other GSSAPI mechanism is the concatenation of "GSS-"
181 and the Base32 [BASE-ENCODING] encoding of the first ten bytes of the
182 MD5 hash [MD5] of the ASN.1 DER encoding [ASN1] of the GSSAPI
183 mechanism's OID. The Base32 rules on padding characters and
184 characters outside of the base32 alphabet are not relevant to this
185 use of Base32.
186
187 SASL mechanism names starting with "GSS-" are reserved for SASL
188 mechanisms which conform to this document.
189
190 The specification of all SASL mechanisms conforming to this document
191 is in the "Specification common to all GSSAPI mechanisms" section of
192 this document.
193
194 The IESG is considered to be the owner of all SASL mechanisms which
195 conform to this document. This does NOT necessarily imply that the
196 IESG is considered to be the owner of the underlying GSSAPI
197 mechanism.
198
199 2.1 Example
200
201 The OID for the SPKM-1 mechanism [SPKM1] is 1.3.6.1.5.5.1. The ASN.1
202 DER encoding of this OID is 06 06 2b 06 01 05 05 01. The MD5 hash of
203 the ASN.1 DER encoding is 57 ee 81 82 4e ac 4d b0 e6 50 9f 60 1f 46
204 8a 30. The Base32 encoding of the first ten bytes of this is
205 "K7XIDASOVRG3BZSQ". Thus the SASL mechanism name for the SPKM-1
206 GSSAPI mechanism is "GSS-K7XIDASOVRG3BZSQ".
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222 Melnikov Expires May 22, 2004 [Page 4]
223
224 Internet-Draft SASL GSSAPI mechanisms November 2003
225
226
227 3. SPNEGO
228
229 Use of the Simple and Protected GSS-API Negotiation Mechanism
230 [SPNEGO] underneath SASL introduces subtle interoperability problems
231 and security considerations. To address these, this section places
232 additional requirements on implementations which support SPNEGO
233 underneath SASL.
234
235 A client which supports, for example, the Kerberos V5 GSSAPI
236 mechanism only underneath SPNEGO underneath the "GSS-SPNEGO" SASL
237 mechanism will not interoperate with a server which supports the
238 Kerberos V5 GSSAPI mechanism only underneath the "GSSAPI" SASL
239 mechanism.
240
241 Since SASL is capable of negotiating amongst GSSAPI mechanisms, the
242 only reason for a server or client to support the "GSS-SPNEGO"
243 mechanism is to allow a policy of only using mechanisms below a
244 certain strength if those mechanism's negotiation is protected. In
245 such a case, a client or server would only want to negotiate those
246 weaker mechanisms through SPNEGO. In any case, there is no down-
247 negotiation security consideration with using the strongest mechanism
248 and set of options the implementation supports, so for
249 interoperability that mechanism and set of options MUST be negotiable
250 without using the "GSS-SPNEGO" mechanism.
251
252 If a client's policy is to first prefer GSSAPI mechanism X, then non-
253 GSSAPI mechanism Y, then GSSAPI mechanism Z, and if a server supports
254 mechanisms Y and Z but not X, then if the client attempts to
255 negotiate mechanism X by using the "GSS-SPNEGO" SASL mechanism, it
256 may end up using mechanism Z when it should have used mechanism Y.
257 For this reason, implementations MUST exclude from SPNEGO those
258 GSSAPI mechanisms which are weaker than the strongest non-GSSAPI SASL
259 mechanism advertised by the server.
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278 Melnikov Expires May 22, 2004 [Page 5]
279
280 Internet-Draft SASL GSSAPI mechanisms November 2003
281
282
283 4. Specification common to all GSSAPI mechanisms
284
285 Each SASL mechanism which uses a GSSAPI mechanism uses the following
286 specification.
287
288 The implementation MAY set any GSSAPI flags or arguments not
289 mentioned in this specification as is necessary for the
290 implementation to enforce its security policy.
291
292 4.1 Client side of authentication protocol exchange
293
294 The client calls GSS_Init_sec_context, passing in
295 input_context_handle of 0 (initially), mech_type of the GSSAPI
296 mechanism for which this SASL mechanism is registered, chan_binding
297 of NULL, and targ_name equal to output_name from GSS_Import_Name
298 called with input_name_type of GSS_C_NT_HOSTBASED_SERVICE and
299 input_name_string of "service@hostname" where "service" is the
300 service name specified in the protocol's profile, and "hostname" is
301 the fully qualified host name of the server. If the client will be
302 requesting a security layer, it MUST also supply to the
303 GSS_Init_sec_context a mutual_req_flag of TRUE, a sequence_req_flag
304 of TRUE, and an integ_req_flag of TRUE. If the client will be
305 requesting a security layer providing confidentiality protection, it
306 MUST also supply to the GSS_Init_sec_context a conf_req_flag of TRUE.
307 The client then responds with the resulting output_token. If
308 GSS_Init_sec_context returns GSS_S_CONTINUE_NEEDED, then the client
309 should expect the server to issue a token in a subsequent challenge.
310 The client must pass the token to another call to
311 GSS_Init_sec_context, repeating the actions in this paragraph.
312
313 When GSS_Init_sec_context returns GSS_S_COMPLETE, the client examines
314 the context to ensure that it provides a level of protection
315 permitted by the client's security policy. If the context is
316 acceptable, the client takes the following actions: If the last call
317 to GSS_Init_sec_context returned an output_token, then the client
318 responds with the output_token, otherwise the client responds with no
319 data. The client should then expect the server to issue a token in a
320 subsequent challenge. The client passes this token to GSS_Unwrap and
321 interprets the first octet of resulting cleartext as a bit-mask
322 specifying the security layers supported by the server and the second
323 through fourth octets as the network byte order maximum size
324 output_message to send to the server (if the resulting cleartext is
325 not 4 octets long, the client fails the negotiation). The client
326 then constructs data, with the first octet containing the bit-mask
327 specifying the selected security layer, the second through fourth
328 octets containing in network byte order the maximum size
329 output_message the client is able to receive, and the remaining
330 octets containing the authorization identity, encoded according to
331
332
333
334 Melnikov Expires May 22, 2004 [Page 6]
335
336 Internet-Draft SASL GSSAPI mechanisms November 2003
337
338
339 the application profile specification. The authorization identity is
340 not NUL-terminated. The client passes the data to GSS_Wrap with
341 conf_flag set to FALSE, and responds with the generated
342 output_message. The client can then consider the server
343 authenticated.
344
345 4.2 Server side of authentication protocol exchange
346
347 The server passes the initial client response to
348 GSS_Accept_sec_context as input_token, setting input_context_handle
349 to 0 (initially), mech_type of the GSSAPI mechanism for which this
350 SASL mechanism is registered, chan_binding of NULL, and
351 acceptor_cred_handle equal to output_cred_handle from
352 GSS_Acquire_cred called with desired_name equal to output_name from
353 GSS_Import_name with input_name_type of GSS_C_NT_HOSTBASED_SERVICE
354 and input_name_string of "service@hostname" where "service" is the
355 service name specified in the protocol's profile, and "hostname" is
356 the fully qualified host name of the server. If
357 GSS_Accept_sec_context returns GSS_S_CONTINUE_NEEDED, the server
358 returns the generated output_token to the client in challenge and
359 passes the resulting response to another call to
360 GSS_Accept_sec_context, repeating the actions in this paragraph.
361
362 When GSS_Accept_sec_context returns GSS_S_COMPLETE, the server
363 examines the context to ensure that it provides a level of protection
364 permitted by the server's security policy. If the context is
365 acceptable, the server takes the following actions: If the last call
366 to GSS_Accept_sec_context returned an output_token, the server
367 returns it to the client in a challenge and expects a reply from the
368 client with no data. Whether or not an output_token was returned
369 (and after receipt of any response from the client to such an
370 output_token), the server then constructs 4 octets of data, with the
371 first octet containing a bit-mask specifying the security layers
372 supported by the server and the second through fourth octets
373 containing in network byte order the maximum size output_token the
374 server is able to receive. The server must then pass the plaintext
375 to GSS_Wrap with conf_flag set to FALSE and issue the generated
376 output_message to the client in a challenge. The server must then
377 pass the resulting response to GSS_Unwrap and interpret the first
378 octet of resulting cleartext as the bit-mask for the selected
379 security layer, the second through fourth octets as the network byte
380 order maximum size output_message to send to the client, and the
381 remaining octets as the authorization identity. The server must
382 verify that the src_name is authorized to authenticate as the
383 authorization identity. After these verifications, the
384 authentication process is complete.
385
386
387
388
389
390 Melnikov Expires May 22, 2004 [Page 7]
391
392 Internet-Draft SASL GSSAPI mechanisms November 2003
393
394
395 4.3 Security layer
396
397 The security layers and their corresponding bit-masks are as follows:
398
399 1 No security layer
400 2 Integrity protection.
401 Sender calls GSS_Wrap with conf_flag set to FALSE
402 4 Confidentiality protection.
403 Sender calls GSS_Wrap with conf_flag set to TRUE
404
405 Other bit-masks may be defined in the future; bits which are not
406 understood must be negotiated off.
407
408 Note that SASL negotiates the maximum size of the output_message to
409 send. Implementations can use the GSS_Wrap_size_limit call to
410 determine the corresponding maximum size input_message.
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446 Melnikov Expires May 22, 2004 [Page 8]
447
448 Internet-Draft SASL GSSAPI mechanisms November 2003
449
450
451 5. IANA Considerations
452
453 The IANA is advised that SASL mechanism names starting with "GSS-"
454 are reserved for SASL mechanisms which conform to this document. The
455 IANA is directed to place a statement to that effect in the sasl-
456 mechanisms registry.
457
458 Family of SASL mechanisms: YES
459
460 Prefix: GSS-
461
462 Security considerations: RFC [THIS-DOC]
463
464 Published Specification: RFC [THIS-DOC]
465
466 Person & email address to contact for further information: Alexey
467 Melnikov <Alexey.Melnikov@isode.com>
468
469 Intended usage: COMMON
470
471 Author/Change controller: iesg@ietf.org
472
473 The IANA is directed to modify the existing registration for "GSSAPI"
474 as follows.
475
476 Family of SASL mechanisms: NO
477
478 SASL mechanism name: GSSAPI
479
480 Security considerations: ?
481
482 Published Specification: RFC [THIS-DOC]
483
484 Person & email address to contact for further information: Alexey
485 Melnikov <Alexey.Melnikov@isode.com>
486
487 Intended usage: COMMON
488
489 Author/Change controller: iesg@ietf.org
490
491 Additional Information: This mechanism is for the Kerberos V5
492 mechanism of GSSAPI. Other GSSAPI mechanisms use other SASL
493 mechanism names, as described in this mechanism's published
494 specification.
495
496 The IANA is directed to modify the existing registration for "GSS-
497 SPNEGO" as follows.
498
499
500
501
502 Melnikov Expires May 22, 2004 [Page 9]
503
504 Internet-Draft SASL GSSAPI mechanisms November 2003
505
506
507 Family of SASL mechanisms: NO
508
509 SASL mechanism name: GSS-SPNEGO
510
511 Security considerations: See the "SPNEGO" section of RFC [THIS-DOC].
512
513 Published Specification: RFC [THIS-DOC]
514
515 Person & email address to contact for further information: Alexey
516 Melnikov <Alexey.Melnikov@isode.com>
517
518 Intended usage: LIMITED USE
519
520 Author/Change controller: iesg@ietf.org
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558 Melnikov Expires May 22, 2004 [Page 10]
559
560 Internet-Draft SASL GSSAPI mechanisms November 2003
561
562
563 6. Security Considerations
564
565 Security issues are discussed throughout this memo.
566
567 When a server or client supports multiple authentication mechanisms,
568 each of which has a different security strength, it is possible for
569 an active attacker to cause a party to use the least secure mechanism
570 supported. To protect against this sort of attack, a client or
571 server which supports mechanisms of different strengths should have a
572 configurable minimum strength that it will use. It is not sufficient
573 for this minimum strength check to only be on the server, since an
574 active attacker can change which mechanisms the client sees as being
575 supported, causing the client to send authentication credentials for
576 its weakest supported mechanism.
577
578 The client's selection of a SASL mechanism is done in the clear and
579 may be modified by an active attacker. It is important for any new
580 SASL mechanisms to be designed such that an active attacker cannot
581 obtain an authentication with weaker security properties by modifying
582 the SASL mechanism name and/or the challenges and responses.
583
584 [SPNEGO] has protection against many of these down-negotiation
585 attacks, SASL does not itself have such protection. The section
586 titled "SPNEGO" mentions considerations of choosing negotiation
587 through SASL versus SPNEGO.
588
589 The integrity protection provided by the security layer is useless to
590 the client unless the client also requests mutual authentication.
591 Therefore, a client wishing to benefit from the integrity protection
592 of a security layer MUST pass to the GSS_Init_sec_context call a
593 mutual_req_flag of TRUE.
594
595 When constructing the input_name_string, the client should not
596 canonicalize the server's fully qualified domain name using an
597 insecure or untrusted directory service.
598
599 Additional security considerations are in the [SASL] and [GSSAPI]
600 specifications.
601
602
603
604
605
606
607
608
609
610
611
612
613
614 Melnikov Expires May 22, 2004 [Page 11]
615
616 Internet-Draft SASL GSSAPI mechanisms November 2003
617
618
619 7. Acknowledgements
620
621 This document is a revision of RFC 2222 written by John G. Myers.
622 He also contributed significantly to this revision.
623
624 Thank you to Lawrence Greenfield for converting text of this draft to
625 XML format.
626
627 Contributions of many members of the SASL mailing list are gratefully
628 acknowledged.
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670 Melnikov Expires May 22, 2004 [Page 12]
671
672 Internet-Draft SASL GSSAPI mechanisms November 2003
673
674
675 Normative References
676
677 [ASN1] International Organization for Standardization,
678 "Information Processing Systems - Open Systems
679 Interconnection - Specification of Abstract Syntax
680 Notation One (ASN.1)", ISO Standard 8824, December
681 1990.
682
683 [BASE-ENCODING] Josefsson, S., "The Base16, Base32, and Base64 Data
684 Encodings", RFC 3548, July 2003.
685
686 [GSSAPI] Linn, J., "Generic Security Service Application
687 Program Interface Version 2, Update 1", RFC 2743,
688 January 2000.
689
690 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
691 Requirement Levels", BCP 14, RFC 2119, March 1997.
692
693 [KRB5GSS] Linn, J., "The Kerberos Version 5 GSS-API
694 Mechanism", RFC 1964, June 1996.
695
696 [MD5] Rivest, R., "The MD5 Message-Digest Algorithm", RFC
697 1321, April 1992.
698
699 [SASL] Myers, J., "Simple Authentication and Security Layer
700 (SASL)", RFC 2222, October 1997.
701
702 [SASL(rev)] Melnikov, A., "Simple Authentication and Security
703 Layer (SASL)", draft-ietf-sasl-rfc2222bis (work in
704 progress), October 2003.
705
706 [SPNEGO] Baize, E. and D. Pinkas, "The Simple and Protected
707 GSS-API Negotiation Mechanism", RFC 2478, December
708 1998.
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726 Melnikov Expires May 22, 2004 [Page 13]
727
728 Internet-Draft SASL GSSAPI mechanisms November 2003
729
730
731 Informative References
732
733 [SPKM1] Adams, C., "The Simple Public-Key GSS-API Mechanism (SPKM)",
734 RFC 2025, October 1996.
735
736 [UTF8] Yergeau, F., "UTF-8, a transformation format of ISO 10646",
737 RFC 2279, January 1998.
738
739
740 Author's Address
741
742 Alexey Melnikov (Ed.)
743 Isode Limited
744 5 Castle Business Village
745 36 Station Road
746 Hampton, Middlesex TW12 2BX
747 UK
748
749 EMail: Alexey.Melnikov@isode.com
750 URI: http://www.melnikov.ca/
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782 Melnikov Expires May 22, 2004 [Page 14]
783
784 Internet-Draft SASL GSSAPI mechanisms November 2003
785
786
787 Full Copyright Statement
788
789 Copyright (C) The Internet Society (2003). All Rights Reserved.
790
791 This document and translations of it may be copied and furnished to
792 others, and derivative works that comment on or otherwise explain it
793 or assist in its implementation may be prepared, copied, published
794 and distributed, in whole or in part, without restriction of any
795 kind, provided that the above copyright notice and this paragraph are
796 included on all such copies and derivative works. However, this
797 document itself may not be modified in any way, such as by removing
798 the copyright notice or references to the Internet Society or other
799 Internet organizations, except as needed for the purpose of
800 developing Internet standards in which case the procedures for
801 copyrights defined in the Internet Standards process must be
802 followed, or as required to translate it into languages other than
803 English.
804
805 The limited permissions granted above are perpetual and will not be
806 revoked by the Internet Society or its successors or assigns.
807
808 This document and the information contained herein is provided on an
809 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
810 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
811 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
812 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
813 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
814
815 Acknowledgement
816
817 Funding for the RFC Editor function is currently provided by the
818 Internet Society.
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838 Melnikov Expires May 22, 2004 [Page 15]
839
840
0
1
2
3
4
5
6 INTERNET-DRAFT Editor: Kurt D. Zeilenga
7 Intended Category: Standards Track OpenLDAP Foundation
8 Expires in six months 27 October 2003
9 Updates: RFC 2595
10
11
12 The Plain SASL Mechanism
13 <draft-ietf-sasl-plain-03.txt>
14
15
16 Status of Memo
17
18 This document is an Internet-Draft and is in full conformance with all
19 provisions of Section 10 of RFC2026.
20
21 This document is intended to be, after appropriate review and
22 revision, submitted to the RFC Editor as a Standards Track document.
23 Distribution of this memo is unlimited. Technical discussion of this
24 document will take place on the IETF SASL mailing list
25 <ietf-sasl@imc.org>. Please send editorial comments directly to the
26 document editor <Kurt@OpenLDAP.org>.
27
28 Internet-Drafts are working documents of the Internet Engineering Task
29 Force (IETF), its areas, and its working groups. Note that other
30 groups may also distribute working documents as Internet-Drafts.
31 Internet-Drafts are draft documents valid for a maximum of six months
32 and may be updated, replaced, or obsoleted by other documents at any
33 time. It is inappropriate to use Internet-Drafts as reference
34 material or to cite them other than as ``work in progress.''
35
36 The list of current Internet-Drafts can be accessed at
37 <http://www.ietf.org/ietf/1id-abstracts.txt>. The list of
38 Internet-Draft Shadow Directories can be accessed at
39 <http://www.ietf.org/shadow.html>.
40
41 Copyright (C) The Internet Society (2003). All Rights Reserved.
42
43 Please see the Full Copyright section near the end of this document
44 for more information.
45
46
47 Abstract
48
49 This document defines a simple clear-text user/password Simple
50 Authentication and Security Layer (SASL) mechanism called the PLAIN
51 mechanism. The PLAIN mechanism is intended to be used, in combination
52 with data confidentiality services provided by a lower layer, in
53 protocols which lack a simple password authentication command.
54
55
56
57 Zeilenga Plain SASL Mechanism [Page 1]
58
59 INTERNET-DRAFT draft-ietf-sasl-plain-03.txt 27 October 2003
60
61
62 Conventions
63
64 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
65 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
66 document are to be interpreted as described in [Keywords].
67
68
69 1. Background and Intended Usage
70
71 Clear-text passwords are simple, interoperate with almost all existing
72 operating system authentication databases, and are useful for a smooth
73 transition to a more secure password-based authentication mechanism.
74 The drawback is that they are unacceptable for use over an unencrypted
75 network connection.
76
77 This document defines the PLAIN Simple Authentication and Security
78 Layer ([SASL]) mechanism for use in protocols with no clear-text login
79 command (e.g., [ACAP] or [SMTP-AUTH]).
80
81 The name associated with this mechanism is "PLAIN".
82
83 The PLAIN SASL mechanism does not provide a security layer. This
84 mechanism MUST NOT be used without adequate security protection as the
85 mechanism affords no integrity nor confidentiality protection itself.
86 The PLAIN SASL mechanism MUST NOT be advertised unless a strong
87 encryption layer, such as provided by Transport Layer Security
88 ([TLS]), is active or backwards compatibility dictates otherwise.
89
90 This document updates RFC 2595, replacing Section 6. Changes since
91 RFC 2595 are detailed in Appendix A.
92
93
94 2. PLAIN SASL mechanism
95
96 The mechanism consists of a single message from the client to the
97 server. The client sends the authorization identity (identity to
98 login as), followed by a NUL (U+0000) character, followed by the
99 authentication identity (identity whose password will be used),
100 followed by a NUL (U+0000) character, followed by the clear-text
101 password. The client leaves the authorization identity empty if it
102 wishes the server to derive the authorization identity from the
103 authentication identity.
104
105 The formal grammar for the client message using Augmented BNF [ABNF]
106 follows.
107
108 message = [authzid] NUL authcid NUL passwd
109 authcid = 1*SAFE ; MUST accept up to 255 octets
110
111
112
113 Zeilenga Plain SASL Mechanism [Page 2]
114
115 INTERNET-DRAFT draft-ietf-sasl-plain-03.txt 27 October 2003
116
117
118 authzid = 1*SAFE ; MUST accept up to 255 octets
119 passwd = 1*SAFE ; MUST accept up to 255 octets
120 NUL = %x00
121
122 SAFE = UTF1 / UTF2 / UTF3 / UTF4
123 ;; any UTF-8 encoded Unicode character except NUL
124
125 UTF1 = %x01-7F ;; except NULL
126 UTF2 = %xC2-DF UTF0
127 UTF3 = %xE0 %xA0-BF UTF0 / %xE1-EC 2(UTF0) /
128 %xED %x80-9F UTF0 / %xEE-EF 2(UTF0)
129 UTF4 = %xF0 %x90-BF 2(UTF0) / %xF1-F3 3(UTF0) /
130 %xF4 %x80-8F 2(UTF0)
131 UTF0 = %x80-BF
132
133 The authorization identity (authzid), authentication identity
134 (authcid) and password (passwd) SHALL be transferred as [UTF-8]
135 encoded strings of [Unicode] characters. As NUL (U+0000) is used as a
136 deliminator, the NUL (U+0000) MUST NOT appear in authzid, authcid, or
137 passwd productions.
138
139 The form of the authzid production is specific to the
140 application-level protocol's SASL profile [SASL]. The authcid and
141 passwd productions are form-free. Use of non-visible characters or
142 characters which a user may be unable to enter on some keyboards is
143 discouraged.
144
145 Servers MUST be capable of accepting authzid, authcid, and passwd
146 productions up to and including 255 octets. It is noted that the
147 UTF-8 encoding of a Unicode character may be as long as 4 octets.
148
149 Upon receipt of the message, the server will verify the presented
150 authentication identity (authcid) and password (passwd) with the
151 system authentication database and verify the authentication
152 credentials permit the client to login as the (presented or derived)
153 authorization identity. If both steps succeed, the user is
154 authenticated.
155
156 The presented authentication identity and password strings are not to
157 be compared directly with stored strings. The server SHALL first
158 prepare authentication identity and password strings using the
159 [SASLPrep] profile of the [StringPrep] algorithm. If preparation
160 fails or results in an empty string, verification SHALL fail. If the
161 server stores only the hash of expected string, that string MUST be
162 prepared before generation of the hash.
163
164 When the no authorization identity is provided, the server SHALL
165 derive the authorization identity from the prepared representation of
166
167
168
169 Zeilenga Plain SASL Mechanism [Page 3]
170
171 INTERNET-DRAFT draft-ietf-sasl-plain-03.txt 27 October 2003
172
173
174 the provided authentication identity string. This ensures that the
175 derivation of different representations of the authentication identity
176 produce the same authorization identity.
177
178 The verification function (using hashed password) can be written (in
179 pseudo-code):
180
181 boolean Verify(string authzid, string authcid, string passwd) {
182 string pAuthcid = SASLprep(authcid); # prepare authcid
183 string pPasswd = SASLprep(passwd); # prepare passwd
184 if (pAuthcid == NULL || pPasswd == NULL) {
185 return false; # preparation failed
186 }
187 if (pAuthcid == "" || pPasswd == "") {
188 return false; # empty prepared string
189 }
190
191 storedHash = FetchPasswordHash(pAuthcid);
192 if (storedHash == NULL || storedHash == "") {
193 return false; # error or unknown authcid
194 }
195
196 if (!Compare(storedHash, Hash(pPassword))) {
197 return false; # incorrect password
198 }
199
200 if (authzid == NULL) {
201 authzid = DeriveAuthzid(pAuthcid);
202 if (authzid == NULL || authzid == "") {
203 return false; # could not derive authzid
204 }
205 }
206
207 if (!Authorize(pAuthcid, authzid)) {
208 return false; # not authorized
209 }
210
211 return true;
212 }
213
214 Also note that the second parameter provided to the Authorize function
215 is not prepared by this code. The application-level SASL profile
216 should be consulted to determine what, if any, preparation is
217 necessary.
218
219 The server MAY also use the credentials to initialize any new
220 authentication database, such as one suitable for [CRAM-MD5] or
221 [DIGEST-MD5].
222
223
224
225 Zeilenga Plain SASL Mechanism [Page 4]
226
227 INTERNET-DRAFT draft-ietf-sasl-plain-03.txt 27 October 2003
228
229
230 4. Example
231
232 Here is an example of how this might be used to initialize a CRAM-MD5
233 authentication database using the Application Configuration Access
234 Protocol ([ACAP]). "C:" and "S:" indicate lines sent by the client
235 and server respectively and <NUL> represents a single NUL (U+0000)
236 character.
237
238 S: * ACAP (SASL "CRAM-MD5") (STARTTLS)
239 C: a001 AUTHENTICATE "CRAM-MD5"
240 S: + "<1896.697170952@postoffice.reston.mci.net>"
241 C: "tim b913a602c7eda7a495b4e6e7334d3890"
242 S: a001 NO (TRANSITION-NEEDED)
243 "Please change your password, or use TLS to login"
244 C: a002 STARTTLS
245 S: a002 OK "Begin TLS negotiation now"
246 <TLS negotiation, further commands are under TLS layer>
247 S: * ACAP (SASL "CRAM-MD5" "PLAIN" "EXTERNAL")
248 C: a003 AUTHENTICATE "PLAIN" {21+}
249 C: <NUL>tim<NUL>tanstaaftanstaaf
250 S: a003 OK CRAM-MD5 password initialized
251
252
253
254 5. Security Considerations
255
256 The PLAIN mechanism relies on the TLS encryption layer for security.
257 When used without TLS, it is vulnerable to a common network
258 eavesdropping attack. Therefore PLAIN MUST NOT be advertised or used
259 unless a suitable TLS encryption layer is active or backwards
260 compatibility dictates otherwise.
261
262 When the PLAIN mechanism is used, the server gains the ability to
263 impersonate the user to all services with the same password regardless
264 of any encryption provided by TLS or other network privacy mechanisms.
265 While many other authentication mechanisms have similar weaknesses,
266 stronger SASL mechanisms address this issue. Clients are encouraged
267 to have an operational mode where all mechanisms which are likely to
268 reveal the user's password to the server are disabled.
269
270 General SASL security considerations apply to this mechanism.
271 "stringprep" and Unicode [StringPrep] security considerations also
272 apply, as do [UTF-8] security considerations.
273
274
275 6. IANA Considerations
276
277 It is requested that the SASL Mechanism registry [IANA-SASL] entry for
278
279
280
281 Zeilenga Plain SASL Mechanism [Page 5]
282
283 INTERNET-DRAFT draft-ietf-sasl-plain-03.txt 27 October 2003
284
285
286 the PLAIN mechanism be updated to reflect that this document now
287 provides its technical specification.
288
289 To: iana@iana.org
290 Subject: Updated Registration of SASL mechanism PLAIN
291
292 SASL mechanism name: PLAIN
293 Security considerations: See RFC XXXX.
294 Published specification (optional, recommended): RFC XXXX
295 Person & email address to contact for further information:
296 Kurt Zeilenga <kurt@openldap.org>
297 IETF SASL WG <ietf-sasl@imc.org>
298 Intended usage: COMMON
299 Author/Change controller: IESG <iesg@ietf.org>
300 Note: Updates existing entry for PLAIN
301
302
303 7. Acknowledgment
304
305 This document is a revision of RFC 2595 by Chris Newman. Portions of
306 the grammar defined in Section 2 were borrowed from [UTF-8] by
307 Francois Yergeau.
308
309 This document is a product of the IETF SASL WG.
310
311
312 8. Normative References
313
314 [ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax
315 Specifications: ABNF", RFC 2234, November 1997.
316
317 [Keywords] Bradner, S., "Key words for use in RFCs to Indicate
318 Requirement Levels", BCP 14, RFC 2119, March 1997
319
320 [SASL] Melnikov, A. (Editor), "Simple Authentication and
321 Security Layer (SASL)",
322 draft-ietf-sasl-rfc2222bis-xx.txt, a work in progress.
323
324 [StringPrep] Hoffman P. and M. Blanchet, "Preparation of
325 Internationalized Strings ('stringprep')",
326 draft-hoffman-rfc3454bis-xx.txt, a work in progress.
327
328 [Unicode] The Unicode Consortium, "The Unicode Standard, Version
329 3.2.0" is defined by "The Unicode Standard, Version 3.0"
330 (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5),
331 as amended by the "Unicode Standard Annex #27: Unicode
332 3.1" (http://www.unicode.org/reports/tr27/) and by the
333 "Unicode Standard Annex #28: Unicode 3.2"
334
335
336
337 Zeilenga Plain SASL Mechanism [Page 6]
338
339 INTERNET-DRAFT draft-ietf-sasl-plain-03.txt 27 October 2003
340
341
342 (http://www.unicode.org/reports/tr28/).
343
344 [UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO
345 10646", draft-yergeau-rfc2279bis-xx.txt, a work in
346 progress.
347
348 [TLS] Dierks, T. and, E. Rescorla, "The TLS Protocol Version
349 1.1", draft-ietf-tls-rfc2246-bis-xx.txt, a work in
350 progress.
351
352
353 9. Informative References
354
355 [ACAP] Newman, C. and J. Myers, "ACAP -- Application
356 Configuration Access Protocol", RFC 2244, November 1997.
357 [CRAM-MD5] Nerenberg, L., "The CRAM-MD5 SASL Mechanism",
358 draft-ietf-sasl-crammd5-xx.txt, a work in progress.
359
360 [DIGEST-MD5] Leach, P., C. Newman, and A. Melnikov, "Using Digest
361 Authentication as a SASL Mechanism",
362 draft-ietf-sasl-rfc2831bis-xx.txt, a work in progress.
363
364 [IANA-SASL] IANA, "SIMPLE AUTHENTICATION AND SECURITY LAYER (SASL)
365 MECHANISMS", http://www.iana.org/assignments/sasl-
366 mechanisms.
367
368 [SMTP-AUTH] Myers, J., "SMTP Service Extension for Authentication",
369 RFC 2554, March 1999.
370
371
372
373 10. Editor's Address
374
375 Kurt Zeilenga
376 OpenLDAP Foundation
377
378 Email: kurt@OpenLDAP.org
379
380
381 Appendix A. Changes since RFC 2595
382
383 This appendix is non-normative.
384
385 This document replaces Section 6 of RFC 2595.
386
387 The specification details how the server is to compare client-provided
388 character strings with stored character strings.
389
390
391
392
393 Zeilenga Plain SASL Mechanism [Page 7]
394
395 INTERNET-DRAFT draft-ietf-sasl-plain-03.txt 27 October 2003
396
397
398 The ABNF grammar was updated. In particular, the grammar now allows
399 LINE FEED (U+000A) and CARRIAGE RETURN (U+000D) characters in the
400 authzid, authcid, passwd productions. However, whether these control
401 characters may be used depends on the string preparation rules
402 applicable to the production. For passwd and authcid productions,
403 control characters are prohibited. For authzid, one must consult the
404 application-level SASL profile.
405
406
407
408 Intellectual Property Rights
409
410 The IETF takes no position regarding the validity or scope of any
411 intellectual property or other rights that might be claimed to pertain
412 to the implementation or use of the technology described in this
413 document or the extent to which any license under such rights might or
414 might not be available; neither does it represent that it has made any
415 effort to identify any such rights. Information on the IETF's
416 procedures with respect to rights in standards-track and
417 standards-related documentation can be found in BCP-11. Copies of
418 claims of rights made available for publication and any assurances of
419 licenses to be made available, or the result of an attempt made to
420 obtain a general license or permission for the use of such proprietary
421 rights by implementors or users of this specification can be obtained
422 from the IETF Secretariat.
423
424 The IETF invites any interested party to bring to its attention any
425 copyrights, patents or patent applications, or other proprietary
426 rights which may cover technology that may be required to practice
427 this standard. Please address the information to the IETF Executive
428 Director.
429
430
431
432 Full Copyright
433
434 Copyright (C) The Internet Society (2003). All Rights Reserved.
435
436 This document and translations of it may be copied and furnished to
437 others, and derivative works that comment on or otherwise explain it
438 or assist in its implmentation may be prepared, copied, published and
439 distributed, in whole or in part, without restriction of any kind,
440 provided that the above copyright notice and this paragraph are
441 included on all such copies and derivative works. However, this
442 document itself may not be modified in any way, such as by removing
443 the copyright notice or references to the Internet Society or other
444 Internet organizations, except as needed for the purpose of
445 developing Internet standards in which case the procedures for
446
447
448
449 Zeilenga Plain SASL Mechanism [Page 8]
450
451 INTERNET-DRAFT draft-ietf-sasl-plain-03.txt 27 October 2003
452
453
454 copyrights defined in the Internet Standards process must be followed,
455 or as required to translate it into languages other than English.
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505 Zeilenga Plain SASL Mechanism [Page 9]
506
0
1
2
3
4
5
6 Network Working Group A. Melnikov
7 Internet Draft Editor
8 Document: draft-ietf-sasl-rfc2222bis-03.txt October 2003
9 Expires in six months
10
11
12 Simple Authentication and Security Layer (SASL)
13
14 Status of this Memo
15
16 This document is an Internet Draft and is in full conformance with
17 all provisions of Section 10 of RFC 2026.
18
19 Internet Drafts are working documents of the Internet Engineering
20 Task Force (IETF), its Areas, and its Working Groups. Note that
21 other groups may also distribute working documents as Internet
22 Drafts. Internet Drafts are draft documents valid for a maximum of
23 six months. Internet Drafts may be updated, replaced, or obsoleted
24 by other documents at any time. It is not appropriate to use
25 Internet Drafts as reference material or to cite them other than as
26 ``work in progress''.
27
28 The list of current Internet-Drafts can be accessed at
29 http://www.ietf.org/ietf/1id-abstracts.txt
30
31 The list of Internet-Draft Shadow Directories can be accessed at
32 http://www.ietf.org/shadow.html.
33
34 A revised version of this draft document will be submitted to the RFC
35 editor as a Draft Standard for the Internet Community. Discussion
36 and suggestions for improvement are requested. Distribution of this
37 draft is unlimited.
38
39 When published as an RFC this document will obsolete RFC 2222.
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57 A. Melnikov FORMFEED[Page i]
58
59
60
61
62
63 Internet DRAFT SASL 18 October 2003
64
65
66 1. Abstract
67
68 The Simple Authentication and Security Layer (SASL) provides a method
69 for adding authentication support with an optional security layer to
70 connection-based protocols. It also describes a structure for
71 authentication mechanisms. The result is an abstraction layer
72 between protocols and authentication mechanisms such that any SASL-
73 compatible authentication mechanism can be used with any SASL-
74 compatible protocol.
75
76 This document describes how a SASL authentication mechanism is
77 structured, describes how a protocol adds support for SASL, defines
78 the protocol for carrying a security layer over a connection, and
79 defines the EXTERNAL SASL authentication mechanism.
80
81 2. Organization of this document
82
83 2.1. How to read this document
84
85 This document is written to serve two different audiences, protocol
86 designers using this specification to support authentication in their
87 protocol, and implementors of clients or servers for those protocols
88 using this specification.
89
90 The sections "Overview", "Authentication Mechanisms", "Protocol
91 Profile Requirements", "Specific Issues", and "Security
92 Considerations" cover issues that protocol designers need to
93 understand and address in profiling this specification for use in a
94 specific protocol.
95
96 Implementors of a protocol using this specification need the
97 protocol-specific profiling information in addition to the
98 information in this document.
99
100 2.2. Conventions used in this document
101
102 In examples, "C:" and "S:" indicate lines sent by the client and
103 server respectively.
104
105 The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
106 in this document are to be interpreted as defined in "Key words for
107 use in RFCs to Indicate Requirement Levels" [KEYWORDS].
108
109 Character names in this document use the notation for code points and
110 names from the Unicode Standard [Unicode]. For example, the letter
111 "a" may be represented as either <U+0061> or <LATIN SMALL LETTER A>.
112
113
114
115
116
117 A. Melnikov FORMFEED[Page 2]
118
119
120
121
122
123 Internet DRAFT SASL 18 October 2003
124
125
126 3. Overview
127
128 The Simple Authentication and Security Layer (SASL) is a method for
129 adding authentication support to connection-based protocols.
130
131 The SASL specification has three layers, as indicated in the diagram
132 below. At the top, a protocol definition using SASL specifies a
133 profile, including a command for identifying and authenticating a
134 user to a server and for optionally negotiating a security layer for
135 subsequent protocol interactions. At the bottom, a SASL mechanism
136 definition specifies an authentication mechanism. The SASL
137 framework, specified by this document, constrains the behavior of
138 protocol profiles and mechanisms, separating protocol from mechanism
139 and defining how they interact.
140
141 SMTP Protocol LDAP Protocol Etc
142 Profile Profile . . .
143 ----- | -----//
144 | //
145 SASL framework
146 / | \
147 /----- | -----\
148 EXTERNAL DIGEST-MD5 Etc
149 SASL mechanism SASL mechanism . . .
150
151 This separation between the definition of protocols and the
152 definition of authentication mechanisms is crucial. It permits an
153 authentication mechanism to be defined once, making it usable by any
154 SASL protocol profile. In many implementations, the same SASL
155 mechanism code is used for multiple protocols.
156
157 4. Authentication mechanisms
158
159 SASL mechanisms are named by strings, from 1 to 20 characters in
160 length, consisting of upper-case ASCII [ASCII] letters, digits,
161 hyphens, and/or underscores. SASL mechanism names must be registered
162 with the Internet Assigned Numbers Authority (IANA). IETF standards
163 track documents may direct the IANA to reserve a portion of the SASL
164 mechanism namespace and may specify different registration criteria
165 for the reserved portion; the GSSAPI mechanism specification [SASL-
166 GSSAPI] does this. Procedures for registering new SASL mechanisms are
167 given in the section 8.
168
169 The "sasl-mech" rule below defines the syntax of a SASL mechanism
170 name. This uses the Augmented Backus-Naur Form (ABNF) notation as
171 specified in [ABNF] and the ABNF core rules as specified in Appendix
172 A of the ABNF specification [ABNF].
173
174
175
176
177 A. Melnikov FORMFEED[Page 3]
178
179
180
181
182
183 Internet DRAFT SASL 18 October 2003
184
185
186 sasl-mech = 1*20mech-char
187 mech-char = %x41-5A / DIGIT / "-" / "_"
188 ; mech names restricted to uppercase ASCII letters,
189 ; digits, "-" and "_"
190
191
192 4.1. Authentication protocol exchange
193
194 A SASL mechanism is responsible for conducting an authentication
195 protocol exchange. This consists of a series of server challenges
196 and client responses, the contents of which are specific to and
197 defined by the mechanism. To the protocol, the challenges and
198 responses are opaque binary tokens of arbitrary length. The
199 protocol's profile then specifies how these binary tokens are then
200 encoded for transfer over the connection.
201
202 After receiving an authentication command or any client response, a
203 server mechanism may issue a challenge, indicate failure, or indicate
204 completion. The server mechanism may return additional data with a
205 completion indication. The protocol's profile specifies how each of
206 these is then represented over the connection.
207
208 After receiving a challenge, a client mechanism may issue a response
209 or abort the exchange. The protocol's profile specifies how each of
210 these is then represented over the connection.
211
212 During the authentication protocol exchange, the mechanism performs
213 authentication, transmits an authorization identity (frequently known
214 as a userid) from the client to server, and negotiates the use of a
215 mechanism-specific security layer. If the use of a security layer is
216 agreed upon, then the mechanism must also define or negotiate the
217 maximum security layer buffer size that each side is able to receive.
218
219 4.2. Authorization identities and proxy authentication
220
221 An authorization identity is a string of zero or more ISO 10646
222 [ISO-10646] coded characters. The NUL <U+0000> character is not
223 permitted in authorization identities. The meaning of an
224 authorization identity of the empty string (zero length) is defined
225 below in this section. The authorization identity is used by the
226 server as the primary identity for making access policy decisions.
227
228 The character encoding scheme used (see [CHARSET-POLICY] for IETF
229 policy regarding character sets in IETF protocols) for transmitting
230 an authorization identity over protocol is specified in each
231 authentication mechanism (with the authentication mechanism's data
232 being further restricted/encoded by the protocol profile).
233 Authentication mechanisms SHOULD encode these and other strings in
234
235
236
237 A. Melnikov FORMFEED[Page 4]
238
239
240
241
242
243 Internet DRAFT SASL 18 October 2003
244
245
246 UTF-8 [UTF-8]. While some legacy mechanisms are incapable of
247 transmitting an authorization identity other than the empty string,
248 newly defined mechanisms are expected to be capable of carrying the
249 entire Unicode repertoire (with the exception of the NUL character).
250 An authorization identity of the empty string and an absent
251 authorization identity MUST be treated as equivalent. However,
252 mechanisms SHOULD NOT allow both. That is, a mechanism which provides
253 an optional field for an authorization identity, SHOULD NOT allow
254 that field, when present, to be empty.
255
256 The identity derived from the client's authentication credentials is
257 known as the "authentication identity". With any mechanism,
258 transmitting an authorization identity of the empty string directs
259 the server to derive an authorization identity from the client's
260 authentication identity.
261
262 If the authorization identity transmitted during the authentication
263 protocol exchange is not the empty string, this is typically referred
264 to as "proxy authentication". This feature permits agents such as
265 proxy servers to authenticate using their own credentials, yet
266 request the access privileges of the identity for which they are
267 proxying.
268
269 The server makes an implementation defined policy decision as to
270 whether the authentication identity is permitted to have the access
271 privileges of the authorization identity and whether the
272 authorization identity is permitted to receive service. If it is
273 not, the server indicates failure of the authentication protocol
274 exchange.
275
276 As a client might not have the same information as the server,
277 clients SHOULD NOT derive authorization identities from
278 authentication identities. Instead, clients SHOULD provide no (or
279 empty) authorization identity when the user has not provided an
280 authorization identity.
281
282 The server MUST verify that a received authorization identity is in
283 the correct form. Profiles whose authorization identities are simple
284 user names (e.g. IMAP [RFC 3501]) SHOULD use "SASLPrep" profile
285 [SASLPrep] of the "stringprep" algorithm [StringPrep] to prepare
286 these names for matching. The profiles MAY use a stringprep profile
287 that is more strict than "SASLPrep". If the preparation of the
288 authorization identity fails or results in an empty string, the
289 server MUST fail the authentication exchange. The only exception to
290 this rule is when the received authorization identity is already the
291 empty string.
292
293
294
295
296
297 A. Melnikov FORMFEED[Page 5]
298
299
300
301
302
303 Internet DRAFT SASL 18 October 2003
304
305
306 4.3. Security layers
307
308 If use of a security layer is negotiated by the authentication
309 protocol exchange, the security layer is applied to all subsequent
310 data sent over the connection (until another security layer or no
311 security layer is negotiated; see also section 6.3). The security
312 layer takes effect immediately following the last response of the
313 authentication exchange for data sent by the client and the
314 completion indication for data sent by the server.
315
316 Once the security layer is in effect, the protocol stream is
317 processed by the security layer into buffers of security encoded
318 data. Each buffer of security encoded data is transferred over the
319 connection as a stream of octets prepended with a four octet field in
320 network byte order that represents the length of the following
321 buffer. The length of the security encoded data buffer MUST be no
322 larger than the maximum size that was either defined in the mechanism
323 specification or negotiated by the other side during the
324 authentication protocol exchange. Upon the receipt of a data buffer
325 which is larger than the defined/negotiated maximal buffer size, the
326 receiver SHOULD close the connection. This might be a sign of an
327 attack or a buggy implementation.
328
329 4.4. Character string issues
330
331 Authentication mechanisms SHOULD encode character strings in UTF-8
332 [UTF-8] (see [CHARSET-POLICY] for IETF policy regarding character
333 sets in IETF protocols). In order to avoid noninteroperability due
334 to differing normalizations, when a mechanism specifies that a string
335 authentication identity or password used as input to a cryptographic
336 function (or used for comparison) it SHOULD specify that the string
337 first be prepared using the "SASLPrep" profile [SASLPrep] of the
338 "stringprep" algorithm [StringPrep]. There are three entities that
339 has to deal with this issue: a client (upon getting user input or
340 retrieving a value from configuration), a server (upon receiving the
341 value from the client) and a utility that is able to store
342 passwords/hashes in a database that can be later used by the server.
343 The preparation must be done by the client and the utility and may be
344 done by the server. If preparation fails or results in an empty
345 string, the entity doing the preparation SHALL fail the
346 authentication exchange.
347
348
349 5. Protocol profile requirements
350
351 In order to use this specification, a protocol definition MUST supply
352 the following information:
353
354
355
356
357 A. Melnikov FORMFEED[Page 6]
358
359
360
361
362
363 Internet DRAFT SASL 18 October 2003
364
365
366 A service name, to be selected from the IANA registry of "service"
367 elements for the GSSAPI host-based service name form [GSSAPI]. This
368 service name is made available to the authentication mechanism.
369
370 The registry is available at the URL
371 <http://www.iana.org/assignments/gssapi-service-names>.
372
373 A definition of the command to initiate the authentication protocol
374 exchange. This command must have as a parameter the name of the
375 mechanism being selected by the client.
376
377 The command SHOULD have an optional parameter giving an initial
378 response. This optional parameter allows the client to avoid a round
379 trip when using a mechanism which is defined to have the client send
380 data first. When this initial response is sent by the client and the
381 selected mechanism is defined to have the server start with an
382 initial challenge, the command fails. See section 6.1 of this
383 document for further information.
384
385 A definition of the method by which the authentication protocol
386 exchange is carried out, including how the challenges and responses
387 are encoded, how the server indicates completion or failure of the
388 exchange, how the client aborts an exchange, and how the exchange
389 method interacts with any line length limits in the protocol.
390
391 The exchange method SHOULD allow the server to include an optional
392 data ("optional challenge") with a success notification. This allows
393 the server to avoid a round trip when using a mechanism which is
394 defined to have the server send additional data along with the
395 indication of successful completion. See section 6.2 of this
396 document for further information.
397
398 In addition, a protocol profile SHOULD specify a mechanism through
399 which a client may obtain the names of the SASL mechanisms available
400 to it. This is typically done through the protocol's extensions or
401 capabilities mechanism.
402
403 Identification of the octet where any negotiated security layer
404 starts to take effect, in both directions.
405
406 Specify if the protocol supports "multiple authentications" (see
407 section 6.3).
408
409 If both TLS and SASL security layer are allowed to be negotiated by
410 the protocol, the protocol profile MUST define in which order they
411 are applied to a cleartext data sent over the connection.
412
413 A protocol profile MAY further refine the definition of an
414
415
416
417 A. Melnikov FORMFEED[Page 7]
418
419
420
421
422
423 Internet DRAFT SASL 18 October 2003
424
425
426 authorization identity by adding additional syntactic restrictions
427 and protocol-specific semantics. A protocol profile MUST specify the
428 form of the authorization identity (since it is protocol specific, as
429 opposed to the authentication identity, which is mechanism specific)
430 and how authorization identities are to be compared. Profiles whose
431 authorization identities are simple user names (e.g. IMAP [RFC 3501])
432 SHOULD use "SASLPrep" profile [SASLPrep] of the "stringprep"
433 algorithm [StringPrep] to prepare these names for matching. The
434 profiles MAY use a stringprep profile that is more strict than
435 SASLPrep.
436
437 A protocol profile SHOULD NOT attempt to amend the definition of
438 mechanisms or make mechanism-specific encodings. This breaks the
439 separation between protocol and mechanism that is fundamental to the
440 design of SASL. Likewise, SASL mechanisms SHOULD be profile neutral.
441
442 6. Specific issues
443
444 6.1. Client sends data first
445
446 Some mechanisms specify that the first data sent in the
447 authentication protocol exchange is from the client to the server.
448
449 If a protocol's profile permits the command which initiates an
450 authentication protocol exchange to contain an initial client
451 response, this parameter SHOULD be used with such mechanisms.
452
453 If the initial client response parameter is not given, or if a
454 protocol's profile does not permit the command which initiates an
455 authentication protocol exchange to contain an initial client
456 response, then the server issues a challenge with no data. The
457 client's response to this challenge is then used as the initial
458 client response. (The server then proceeds to send the next
459 challenge, indicates completion, or indicates failure.)
460
461 6.2. Server returns success with additional data
462
463 Some mechanisms may specify that additional data be sent to the
464 client along with an indication of successful completion of the
465 exchange. This data would, for example, authenticate the server to
466 the client.
467
468 If a protocol's profile does not permit this additional data to be
469 returned with a success indication, then the server issues the data
470 as a server challenge, without an indication of successful
471 completion. The client then responds with no data. After receiving
472 this empty response, the server then indicates successful completion
473 (with no additional data).
474
475
476
477 A. Melnikov FORMFEED[Page 8]
478
479
480
481
482
483 Internet DRAFT SASL 18 October 2003
484
485
486 Client implementors should be aware of an additional failure case
487 that might occur when the profile supports sending the additional
488 data with success. Imagine that an active attacker is trying to
489 impersonate the server and sends faked data, which should be used to
490 authenticate the server to the client, with success. (A similar
491 situation can happen when either the server and/or the client has a
492 bug and they calculate different responses.) After checking the data,
493 the client will think that the authentication exchange has failed,
494 however the server will think that the authentication exchange has
495 completed successfully. At this point the client can not abort the
496 authentication exchange, it SHOULD close the connection instead.
497 However, if the profile did not support sending of additional data
498 with success, the client could have aborted the exchange at the very
499 last step of the authentication exchange.
500
501 6.3. Multiple authentications
502
503 Unless otherwise stated by the protocol's profile, only one
504 successful SASL negotiation may occur in a protocol session. In this
505 case, once an authentication protocol exchange has successfully
506 completed, further attempts to initiate an authentication protocol
507 exchange fail.
508
509 If a profile explicitly permits multiple successful SASL negotiations
510 to occur, then in no case may multiple security layers be
511 simultaneously in effect. If a security layer is in effect and a
512 subsequent SASL negotiation selects a second security layer, then the
513 second security layer replaces the first. If a security layer is in
514 effect and a subsequent SASL negotiation selects no security layer,
515 the original security layer MUST be removed. The next paragraphs
516 explain why this is important.
517
518 Let's assume that the protected resources on a server are partitioned
519 into a set of protection spaces, each with its own authentication
520 mechanisms and/or authorization database. Let's use the term "realm"
521 to reference any such protected space. Conceptually, realm is a named
522 collection of user's accounts. For example, a proxy/frontend can use
523 different realms for different servers/backends it represents.
524
525 Now consider the following scenario. A client has already
526 authenticated and established a security layer with "Realm A" which
527 is managed by the server AA. Now the same client authenticates to
528 "Realm B" (managed by the server BB) without negotiating a new
529 security layer, while the security layer negotiated with "Realm A"
530 remains in effect. The server BB is now able observe how known
531 cleartext is encrypted. This scenario enables the server BB to make
532 guesses about previously observed ciphertext between the client and
533 the server AA using the server's SASL engine as an oracle. This
534
535
536
537 A. Melnikov FORMFEED[Page 9]
538
539
540
541
542
543 Internet DRAFT SASL 18 October 2003
544
545
546 scenario is illustrated below:
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597 A. Melnikov FORMFEED[Page 10]
598
599
600
601
602
603 Internet DRAFT SASL 18 October 2003
604
605
606 +---------+ +---------+
607 | | | |
608 | Realm B | | Realm A |
609 | | | |
610 +---------+ +---------+
611 | ^ |
612 | : +-----------+ |
613 Traffic from | : | Encryption| | Traffic from A
614 B to client +-------->| end point |<-------+ to client
615 : | (SSL/SASL)|
616 : +-----------+
617 : |
618 : |
619 : +---+
620 : | |
621 : | |
622 : | | Encryption tunnel, e.g. SASL or SSL,
623 : | | between the server
624 (1) Recording +---------:| | and a single client only.
625 encrypted | | Separate tunnels to different
626 traffic between | | clients.
627 Realm A and client +---+
628 |
629 |
630 +-----------> Traffic to clients
631
632 7. The EXTERNAL mechanism
633
634 The mechanism name associated with external authentication is
635 "EXTERNAL".
636
637 The client sends an initial response with the UTF-8 encoding of the
638 authorization identity. The form of the authorization identity is
639 further restricted by the application-level protocol's SASL profile.
640
641 The server uses information, external to SASL, to determine whether
642 the client is authorized to authenticate as the authorization
643 identity. If the client is so authorized, the server indicates
644 successful completion of the authentication exchange; otherwise the
645 server indicates failure.
646
647 The system providing this external information may be, for example,
648 IPSec or TLS. However, the client can make no assumptions as to what
649 information the server can use in determining client authorization.
650 E.g., just because TLS was established, doesn't mean that the server
651 will use the information provided by TLS.
652
653 If the client sends the empty string as the authorization identity
654
655
656
657 A. Melnikov FORMFEED[Page 11]
658
659
660
661
662
663 Internet DRAFT SASL 18 October 2003
664
665
666 (thus requesting that the authorization identity be derived from the
667 client's authentication credentials), the authorization identity is
668 to be derived from authentication credentials which exist in the
669 system that is providing the external authentication.
670
671 7.1. Formal syntax
672
673 The following syntax specification uses the augmented Backus-Naur
674 Form (BNF) notation as specified in [ABNF]. This uses the ABNF core
675 rules as specified in Appendix A of the ABNF specification [ABNF].
676 Non-terminals referenced but not defined below are as defined by
677 [UTF-8].
678
679 The "extern-init-resp" rule below defines the initial response sent
680 from client to server.
681
682 extern-init-resp = *( UTF8-char-no-nul )
683
684 UTF8-char-no-nul = UTF8-1-no-nul / UTF8-2 / UTF8-3 / UTF8-4
685
686 UTF8-1-no-nul = %x01-7F
687
688
689 7.2. Example
690
691 The following is an example of an EXTERNAL authentication in the SMTP
692 protocol [SMTP]. In this example, the client is proxy
693 authenticating, sending the authorization id "fred". The server has
694 determined the client's identity through IPsec and has a security
695 policy that permits that identity to proxy authenticate as any other
696 identity.
697
698 To the protocol profile, the four octet sequence "fred" is an opaque
699 binary data. The SASL protocol profile for SMTP [SMTP-AUTH] specifies
700 that server challenges and client responses are encoded in BASE64
701 [BASE64]; the BASE64 encoding of "fred" is "ZnJlZA==".
702
703 S: 220 smtp.example.com ESMTP server ready
704 C: EHLO jgm.example.com
705 S: 250-smtp.example.com
706 S: 250 AUTH DIGEST-MD5 EXTERNAL
707 C: AUTH EXTERNAL ZnJlZA==
708 S: 235 Authentication successful.
709
710 8. IANA Considerations
711
712
713
714
715
716
717 A. Melnikov FORMFEED[Page 12]
718
719
720
721
722
723 Internet DRAFT SASL 18 October 2003
724
725
726 8.1. Guidelines for IANA
727
728
729 It is requested that IANA updates the SASL mechanisms registry as
730 follows:
731
732
733 Change the "Intended usage" of the KERBEROS_V4 and SKEY mechanism
734 registrations to OBSOLETE. Change the "Published specification"
735 of the EXTERNAL mechanism to this document. Updated registration
736 is provided in Section 8.6.
737
738 8.2. Registration procedure
739
740
741 Registration of a SASL mechanism is done by filling in the template
742 in section 8.5 and sending it via electronic mail to <iana@iana.org>.
743 IANA has the right to reject obviously bogus registrations, but will
744 perform no review of claims made in the registration form. SASL
745 mechanism registrations are currently available at the URL
746 <http://www.iana.org/assignments/sasl-mechanisms>.
747
748 There is no naming convention for SASL mechanisms; any name that
749 conforms to the syntax of a SASL mechanism name can be registered.
750 An IETF Standards Track document may reserve a portion of the SASL
751 mechanism namespace ("family of SASL mechanisms") for its own use,
752 amending the registration rules for that portion of the namespace.
753 Each family of SASL mechanisms MUST be identified by a prefix.
754
755 While the registration procedures do not require it, authors of SASL
756 mechanisms are encouraged to seek community review and comment
757 whenever that is feasible. Authors may seek community review by
758 posting a specification of their proposed mechanism as an Internet-
759 Draft. SASL mechanisms intended for widespread use should be
760 standardized through the normal IETF process, when appropriate.
761
762 8.3. Comments on SASL mechanism registrations
763
764 Comments on registered SASL mechanisms should first be sent to the
765 "owner" of the mechanism and/or to the SASL WG mailing list.
766 Submitters of comments may, after a reasonable attempt to contact the
767 owner, request IANA to attach their comment to the SASL mechanism
768 registration itself. If IANA approves of this, the comment will be
769 made accessible in conjunction with the SASL mechanism registration
770 itself.
771
772
773
774
775
776
777 A. Melnikov FORMFEED[Page 13]
778
779
780
781
782
783 Internet DRAFT SASL 18 October 2003
784
785
786 8.4. Change control
787
788 Once a SASL mechanism registration has been published by IANA, the
789 author may request a change to its definition. The change request
790 follows the same procedure as the registration request.
791
792 The owner of a SASL mechanism may pass responsibility for the SASL
793 mechanism to another person or agency by informing IANA; this can be
794 done without discussion or review.
795
796 The IESG may reassign responsibility for a SASL mechanism. The most
797 common case of this will be to enable changes to be made to
798 mechanisms where the author of the registration has died, moved out
799 of contact or is otherwise unable to make changes that are important
800 to the community.
801
802 SASL mechanism registrations may not be deleted; mechanisms which are
803 no longer believed appropriate for use can be declared OBSOLETE by a
804 change to their "intended use" field; such SASL mechanisms will be
805 clearly marked in the lists published by IANA.
806
807 The IESG is considered to be the owner of all SASL mechanisms which
808 are on the IETF standards track.
809
810 8.5. Registration template
811
812
813 Subject: Registration of SASL mechanism X
814
815 Family of SASL mechanisms: (YES or NO)
816
817 SASL mechanism name (or prefix for the family):
818
819 Security considerations:
820
821 Published specification (optional, recommended):
822
823 Person & email address to contact for further information:
824
825 Intended usage:
826
827 (One of COMMON, LIMITED USE or OBSOLETE)
828
829 Owner/Change controller:
830
831 (Any other information that the author deems interesting may be
832 added below this line.)
833
834
835
836
837 A. Melnikov FORMFEED[Page 14]
838
839
840
841
842
843 Internet DRAFT SASL 18 October 2003
844
845
846 8.6. The EXTERNAL mechanism registration
847
848 It is requested that the SASL Mechanism registry [IANA-SASL] entry
849 for the EXTERNAL mechanism be updated to reflect that this document
850 now provides its technical specification.
851
852
853 Subject: Updated Registration of SASL mechanism EXTERNAL
854
855 Family of SASL mechanisms: NO
856
857 SASL mechanism name: EXTERNAL
858
859 Security considerations: See RFC XXXX, section 9.
860
861 Published specification (optional, recommended): RFC XXXX
862
863 Person & email address to contact for further information:
864 Alexey Melnikov <Alexey.Melnikov@isode.com>
865
866 Intended usage: COMMON
867
868 Owner/Change controller: IESG <iesg@ietf.org>
869
870 Note: Updates existing entry for EXTERNAL
871
872 9. Security considerations
873
874 Security issues are discussed throughout this memo.
875
876 The mechanisms that support integrity protection are designed such
877 that the negotiation of the security layer and authorization identity
878 is integrity protected. When the client selects a security layer
879 with at least integrity protection, this protects against an active
880 attacker hijacking the connection and modifying the authentication
881 exchange to negotiate a plaintext connection.
882
883 When a server or client supports multiple authentication mechanisms,
884 each of which has a different security strength, it is possible for
885 an active attacker to cause a party to use the least secure mechanism
886 supported. To protect against this sort of attack, a client or
887 server which supports mechanisms of different strengths should have a
888 configurable minimum strength that it will use. It is not sufficient
889 for this minimum strength check to only be on the server, since an
890 active attacker can change which mechanisms the client sees as being
891 supported, causing the client to send authentication credentials for
892 its weakest supported mechanism.
893
894
895
896
897 A. Melnikov FORMFEED[Page 15]
898
899
900
901
902
903 Internet DRAFT SASL 18 October 2003
904
905
906 The client's selection of a SASL mechanism is done in the clear and
907 may be modified by an active attacker. It is important for any new
908 SASL mechanisms to be designed such that an active attacker cannot
909 obtain an authentication with weaker security properties by modifying
910 the SASL mechanism name and/or the challenges and responses.
911
912 Any protocol interactions prior to authentication are performed in
913 the clear and may be modified by an active attacker. In the case
914 where a client selects integrity protection, it is important that any
915 security-sensitive protocol negotiations be performed after
916 authentication is complete. Protocols should be designed such that
917 negotiations performed prior to authentication should be either
918 ignored or revalidated once authentication is complete.
919
920 When use of a security layer is negotiated by the authentication
921 protocol exchange, the receiver should handle gracefully any security
922 encoded data buffer larger than the defined/negotiated maximal size.
923 In particular, it must not blindly allocate the amount of memory
924 specified in the buffer size field, as this might cause the "out of
925 memory" condition. If the receiver detects a large block, it SHOULD
926 close the connection.
927
928 "stringprep" and Unicode security considerations apply to
929 authentication identities, authorization identities and passwords.
930
931 The EXTERNAL mechanism provides no security protection; it is
932 vulnerable to spoofing by either client or server, active attack, and
933 eavesdropping. It should only be used when external security
934 mechanisms are present and have sufficient strength.
935
936 10. References
937
938 10.1. Normative References
939
940 [ABNF] Crocker, Overell, "Augmented BNF for Syntax Specifications:
941 ABNF", RFC 2234, November 1997
942
943 [ASCII] American National Standards Institute, "Code Extension
944 Techniques for Use with the 7-bit Coded Character Set of American
945 National Standard Code (ASCII) for Information Interchange", FIPS PUB
946 35, 1974
947
948 [CHARSET-POLICY] Alvestrand, "IETF Policy on Character Sets and
949 Languages", RFC 2277, January 1998
950
951 [GSSAPI] Linn, "Generic Security Service Application Program
952 Interface, Version 2, Update 1", RFC 2743, January 2000
953
954
955
956
957 A. Melnikov FORMFEED[Page 16]
958
959
960
961
962
963 Internet DRAFT SASL 18 October 2003
964
965
966 [ISO-10646] "Universal Multiple-Octet Coded Character Set (UCS) -
967 Architecture and Basic Multilingual Plane", ISO/IEC 10646-1 : 1993.
968
969 [KEYWORDS] Bradner, "Key words for use in RFCs to Indicate
970 Requirement Levels", RFC 2119, March 1997
971
972 [Unicode] The Unicode Consortium, "The Unicode Standard, Version
973 3.2.0" is defined by "The Unicode Standard, Version 3.0" (Reading,
974 MA, Addison-Wesley, 2000. ISBN 0-201-61633-5), as amended by the
975 "Unicode Standard Annex #27: Unicode 3.1"
976 (http://www.unicode.org/reports/tr27/) and by the "Unicode Standard
977 Annex #28: Unicode 3.2" (http://www.unicode.org/reports/tr28/).
978
979 [Stringprep] P. Hoffman, M. Blanchet, "Preparation of
980 Internationalized Strings ("stringprep")", RFC 3454, December 2002.
981
982 [SASLPrep] Zeilenga, K., "SASLprep: Stringprep profile for user names
983 and passwords", Work in progress, draft-ietf-sasl-saslprep-XX.txt.
984
985 [UTF-8] Yergeau, "UTF-8, a transformation format of ISO 10646", work
986 in progress (draft-yergeau-rfc2279bis-XX) that replaces RFC 2279,
987 Janyary 1998
988
989 10.2. Informative References
990
991 <<Update the reference below>> [SASL-GSSAPI] Myers, J., "SASL GSSAPI
992 mechanisms", work in progress, draft-ietf-cat-sasl-gssapi-XX.txt,
993 September 2000
994
995 [SASL-DIGEST] Leach, P., Newman, C., Melnikov, A., "Using Digest
996 Authentication as a SASL Mechanism", work in progress, draft-ietf-
997 sasl-rfc2831bis-XX.txt, replaces RFC 2831
998
999 [SASL-OTP] Newman, C., "The One-Time-Password SASL Mechanism", RFC
1000 2444, October 1998
1001
1002 [SMTP] Klensin, J., "Simple Mail Transfer Protocol", RFC 2821, April
1003 2001
1004
1005 [SMTP-AUTH] Myers, J., "SMTP Service Extension for Authentication",
1006 RFC 2554, March 1999
1007
1008 [BASE64] Josefsson, S., "The Base16, Base32, and Base64 Data
1009 Encodings", RFC 3548, July 2003
1010
1011 [RFC-INSTRUCTIONS] Postel, Reynolds, "Instructions to RFC Authors",
1012 RFC 2223, October 1997
1013
1014
1015
1016
1017 A. Melnikov FORMFEED[Page 17]
1018
1019
1020
1021
1022
1023 Internet DRAFT SASL 18 October 2003
1024
1025
1026 [IANA-SASL] IANA, "SIMPLE AUTHENTICATION AND SECURITY LAYER (SASL)
1027 MECHANISMS", http://www.iana.org/assignments/sasl-mechanisms.
1028
1029 11. Editor's Address
1030
1031 Alexey Melnikov
1032 Isode
1033
1034 Email: Alexey.Melnikov@isode.com
1035
1036 12. Acknowledgments
1037
1038 This document is a revision of RFC 2222 written by John G. Myers. He
1039 also contributed significantly to this revision.
1040
1041 Magnus Nystrom provided the ASCII art used in Section 6.3.
1042
1043 Definition of realm was extracted from RFC 2617 ("HTTP
1044 Authentication: Basic and Digest Access Authentication").
1045
1046 Contributions of many members of the SASL mailing list are gratefully
1047 acknowledged, in particular Kurt D. Zeilenga, Peter Saint-Andre, Rob
1048 Siemborski, Jeffrey Hutzelman and Hallvard B Furuseth for
1049 proofreading the document and various editorial suggestions.
1050
1051
1052 13. Full Copyright Statement
1053
1054 Copyright (C) The Internet Society (2003). All Rights Reserved.
1055
1056 This document and translations of it may be copied and furnished to
1057 others, and derivative works that comment on or otherwise explain it
1058 or assist in its implementation may be prepared, copied, published
1059 and distributed, in whole or in part, without restriction of any
1060 kind, provided that the above copyright notice and this paragraph are
1061 included on all such copies and derivative works. However, this
1062 document itself may not be modified in any way, such as by removing
1063 the copyright notice or references to the Internet Society or other
1064 Internet organizations, except as needed for the purpose of
1065 developing Internet standards in which case the procedures for
1066 copyrights defined in the Internet Standards process must be
1067 followed, or as required to translate it into languages other than
1068 English.
1069
1070 The limited permissions granted above are perpetual and will not be
1071 revoked by the Internet Society or its successors or assigns.
1072
1073 This document and the information contained herein is provided on an
1074
1075
1076
1077 A. Melnikov FORMFEED[Page 18]
1078
1079
1080
1081
1082
1083 Internet DRAFT SASL 18 October 2003
1084
1085
1086 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
1087 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
1088 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
1089 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
1090 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
1091
1092 Acknowledgement
1093
1094 Funding for the RFC Editor function is currently provided by the
1095 Internet Society.
1096
1097 Appendix A. Relation of SASL to transport security
1098
1099 Questions have been raised about the relationship between SASL and
1100 various services (such as IPsec and TLS) which provide a secured
1101 connection.
1102
1103 Two of the key features of SASL are:
1104
1105 The separation of the authorization identity from the identity in
1106 the client's credentials. This permits agents such as proxy
1107 servers to authenticate using their own credentials, yet request
1108 the access privileges of the identity for which they are proxying.
1109
1110 Upon successful completion of an authentication exchange, the
1111 server knows the authorization identity the client wishes to use.
1112 This allows servers to move to a "user is authenticated" state in
1113 the protocol.
1114
1115 These features are extremely important to some application protocols,
1116 yet Transport Security services do not always provide them. To
1117 define SASL mechanisms based on these services would be a very messy
1118 task, as the framing of these services would be redundant with the
1119 framing of SASL and some method of providing these important SASL
1120 features would have to be devised.
1121
1122 Sometimes it is desired to enable within an existing connection the
1123 use of a security service which does not fit the SASL model. (TLS is
1124 an example of such a service.) This can be done by adding a command,
1125 for example "STARTTLS", to the protocol. Such a command is outside
1126 the scope of SASL, and should be different from the command which
1127 starts a SASL authentication protocol exchange.
1128
1129 In certain situations, it is reasonable to use SASL underneath one of
1130 these Transport Security services. The transport service would
1131 secure the connection, either service would authenticate the client,
1132 and SASL would negotiate the authorization identity. The SASL
1133 negotiation would be what moves the protocol from "unauthenticated"
1134
1135
1136
1137 A. Melnikov FORMFEED[Page 19]
1138
1139
1140
1141
1142
1143 Internet DRAFT SASL 18 October 2003
1144
1145
1146 to "authenticated" state. The "EXTERNAL" SASL mechanism is
1147 explicitly intended to handle the case where the transport service
1148 secures the connection and authenticates the client and SASL
1149 negotiates the authorization identity.
1150
1151 Appendix B. Changes since RFC 2222
1152
1153 The GSSAPI mechanism was removed. It is now specified in a separate
1154 document [SASL-GSSAPI].
1155
1156 The "KERBEROS_V4" mechanism defined in RFC 2222 is obsolete and has
1157 been removed.
1158
1159 The "SKEY" mechanism described in RFC 2222 is obsolete and has been
1160 removed. It has been replaced by the OTP mechanism [SASL-OTP].
1161
1162 The overview has been substantially reorganized and clarified.
1163
1164 Clarified the definition and semantics of the authorization identity.
1165
1166 Prohibited the NUL character in authorization identities.
1167
1168 Added a section on character string issues.
1169
1170 The word "must" in the first paragraph of the "Protocol profile
1171 requirements" section was changed to "MUST".
1172
1173 Specified that protocol profiles SHOULD provide a way for clients to
1174 discover available SASL mechanisms.
1175
1176 Made the requirement that protocol profiles specify the semantics of
1177 the authorization identity optional to the protocol profile.
1178 Clarified that such a specification is a refinement of the definition
1179 in the base SASL spec.
1180
1181 Added a requirement discouraging protocol profiles from breaking the
1182 separation between protocol and mechanism.
1183
1184 Mentioned that standards track documents may carve out their own
1185 portions of the SASL mechanism namespace and may amend registration
1186 rules for the portion. However registration of individual SASL
1187 mechanisms is still required.
1188
1189 Specified that the authorization identity in the EXTERNAL mechanism
1190 is encoded in UTF-8.
1191
1192 Added a statement that a protocol profile SHOULD allow challenge data
1193 to be sent with a success indication.
1194
1195
1196
1197 A. Melnikov FORMFEED[Page 20]
1198
1199
1200
1201
1202
1203 Internet DRAFT SASL 18 October 2003
1204
1205
1206 Added a security consideration for the EXTERNAL mechansim.
1207
1208 Clarified sections concerning success with additional data.
1209
1210 Cleaned up IANA considerations/registrations and assembled them in
1211 one place.
1212
1213 Updated references and split them into Informative and Normative.
1214
1215 Added text to the Security Considerations section regarding handling
1216 of extremely large SASL blocks.
1217
1218 Replaced UTF-8 ABNF with the reference to the UTF-8 document.
1219
1220 Added text about SASLPrep for authentication identities and
1221 passwords. Described where SASLPrep preparation should take place.
1222
1223 Added paragraph about verifying authorization identities.
1224
1225 This document requires to drop a security layer on reauthentication
1226 when no security layer is negotiated. This differs from RFC 2222,
1227 which required to keep the last security layer in this case.
1228
1229 Added a protocol profile requirement to specify interaction between
1230 SASL and TLS security layers.
1231
1232 Added a protocol profile requirement to specify if it supports
1233 reauthentication.
1234
1235 Removed the text that seemed to suggest that SASL security layer must
1236 not be used when TLS is available.
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257 A. Melnikov FORMFEED[Page 21]
1258
1259
1260
1261
1262
1263 Internet DRAFT SASL 18 October 2003
1264
1265
1266 Status of this Memo .......................................... i
1267 1. Abstract ............................................... 2
1268 2. Organization of this document .......................... 2
1269 2.1. How to read this document .............................. 2
1270 2.2. Conventions used in this document ...................... 2
1271 3. Overview ............................................... 3
1272 4. Authentication mechanisms .............................. 3
1273 4.1. Authentication protocol exchange ....................... 4
1274 4.2. Authorization identities and proxy authentication ...... 4
1275 4.3. Security layers ........................................ 6
1276 4.4. Character string issues ................................ 6
1277 5. Protocol profile requirements .......................... 6
1278 6. Specific issues ........................................ 8
1279 6.1. Client sends data first ................................ 8
1280 6.2. Server returns success with additional data ............ 8
1281 6.3. Multiple authentications ............................... 9
1282 7. The EXTERNAL mechanism ................................ 11
1283 7.1. Formal syntax ......................................... 12
1284 7.2. Example ............................................... 12
1285 8. IANA Considerations ................................... 12
1286 8.1. Guidelines for IANA ................................... 13
1287 8.2. Registration procedure ................................ 13
1288 8.3. Comments on SASL mechanism registrations .............. 13
1289 8.4. Change control ........................................ 14
1290 8.5. Registration template ................................. 14
1291 8.6. The EXTERNAL mechanism registration ................... 15
1292 9. Security considerations ................................ 15
1293 10. References ........................................... 16
1294 10.1. Normative References ................................. 16
1295 10.2. Informative References ............................... 17
1296 11. Editor's Address ...................................... 18
1297 12. Acknowledgments ....................................... 18
1298 13. Full Copyright Statement .............................. 18
1299 Appendix A. Relation of SASL to transport security .......... 19
1300 Appendix B. Changes since RFC 2222 .......................... 20
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317 A. Melnikov FORMFEED[Page ii]
1318
1319
0
1
2
3
4
5
6 INTERNET-DRAFT P. Leach
7 Obsoletes: 2831 Microsoft
8 Intended category: Standards track C. Newman
9 Sun Microsystems
10 A. Melnikov
11 Isode
12 June 2003
13
14 Using Digest Authentication as a SASL Mechanism
15 draft-ietf-sasl-rfc2831bis-02.txt
16
17 Status of this Memo
18
19 This document is an Internet-Draft and is in full conformance with
20 all provisions of Section 10 of RFC 2026.
21
22 Internet-Drafts are working documents of the Internet Engineering
23 Task Force (IETF), its areas, and its working groups. Note that other
24 groups may also distribute working documents as Internet-Drafts.
25
26 Internet-Drafts are draft documents valid for a maximum of six months
27 and may be updated, replaced, or obsoleted by other documents at any
28 time. It is inappropriate to use Internet-Drafts as reference
29 material or to cite them other than as "work in progress."
30
31 The list of current Internet-Drafts can be accessed at
32 http://www.ietf.org/ietf/1id-abstracts.txt
33
34 The list of Internet-Draft Shadow Directories can be accessed at
35 http://www.ietf.org/shadow.html.
36
37 Copyright Notice
38
39 Copyright (C) The Internet Society (2003). All Rights Reserved.
40
41 Abstract
42
43 This specification defines how HTTP Digest Authentication [Digest]
44 can be used as a SASL [RFC 2222] mechanism for any protocol that has
45 a SASL profile. It is intended both as an improvement over CRAM-MD5
46 [RFC 2195] and as a convenient way to support a single authentication
47 mechanism for web, mail, LDAP, and other protocols.
48
49
50
51
52
53
54
55
56
57 Leach & Newman Expires: December 2003 [Page 1]
58
59
60
61
62
63 INTERNET DRAFT Digest SASL Mechanism June 2003
64
65
66 Table of Contents
67
68 1 INTRODUCTION.....................................................3
69 1.1 CONVENTIONS AND NOTATION......................................3
70 1.2 REQUIREMENTS..................................................4
71 2 AUTHENTICATION...................................................5
72 2.1 INITIAL AUTHENTICATION........................................5
73 2.1.1 Step One...................................................5
74 2.1.2 Step Two...................................................9
75 2.1.3 Step Three................................................16
76 2.2 SUBSEQUENT AUTHENTICATION....................................17
77 2.2.1 Step one..................................................17
78 2.2.2 Step Two..................................................17
79 2.3 INTEGRITY PROTECTION.........................................18
80 2.4 CONFIDENTIALITY PROTECTION...................................18
81 3 SECURITY CONSIDERATIONS.........................................21
82 3.1 AUTHENTICATION OF CLIENTS USING DIGEST AUTHENTICATION........21
83 3.2 COMPARISON OF DIGEST WITH PLAINTEXT PASSWORDS................21
84 3.3 REPLAY ATTACKS...............................................21
85 3.4 ONLINE DICTIONARY ATTACKS....................................22
86 3.5 OFFLINE DICTIONARY ATTACKS...................................22
87 3.6 MAN IN THE MIDDLE............................................22
88 3.7 CHOSEN PLAINTEXT ATTACKS.....................................22
89 3.8 CBC MODE ATTACKS.............................................
90 3.9 SPOOFING BY COUNTERFEIT SERVERS..............................23
91 3.10 STORING PASSWORDS...........................................23
92 3.11 MULTIPLE REALMS.............................................24
93 3.12 SUMMARY.....................................................24
94 4 EXAMPLE.........................................................24
95 5 REFERENCES......................................................26
96 5.1 NORMATIVE REFERENCES.........................................26
97 5.2 INFORMATIVE REFERENCES.......................................27
98 6 AUTHORS' ADDRESSES..............................................28
99 7 ABNF............................................................29
100 7.1 AUGMENTED BNF................................................29
101 7.2 BASIC RULES..................................................31
102 8 SAMPLE CODE.....................................................33
103 9 INTEROPERABILITY CONSIDERATIONS.................................34
104 9.1 Implementing DES cipher in CBC mode..........................34
105 10 ACKNOWLEDGEMENTS..............................................34
106 11 FULL COPYRIGHT STATEMENT.......................................35
107 Appendix A: Changes from 2831.....................................36
108 Appendix B: Open Issues...........................................37
109
110
111
112
113
114
115
116
117 Leach & Newman Expires: December 2003 [Page 2]
118
119
120
121
122
123 INTERNET DRAFT Digest SASL Mechanism June 2003
124
125
126 1 Introduction
127
128 This specification describes the use of HTTP Digest Access
129 Authentication as a SASL mechanism. The authentication type
130 associated with the Digest SASL mechanism is "DIGEST-MD5".
131
132 This specification is intended to be upward compatible with the
133 "md5-sess" algorithm of HTTP/1.1 Digest Access Authentication
134 specified in [Digest]. The only difference in the "md5-sess"
135 algorithm is that some directives not needed in a SASL mechanism have
136 had their values defaulted.
137
138 There is one new feature for use as a SASL mechanism: integrity
139 protection on application protocol messages after an authentication
140 exchange.
141
142 Also, compared to CRAM-MD5, DIGEST-MD5 prevents chosen plaintext
143 attacks, and permits the use of third party authentication servers,
144 mutual authentication, and optimized reauthentication if a client has
145 recently authenticated to a server.
146
147 1.1 Conventions and Notation
148
149 This specification uses the same ABNF notation and lexical
150 conventions as HTTP/1.1 specification; see section 7.
151
152 Let { a, b, ... } be the concatenation of the octet strings a, b, ...
153
154 Let ** denote the power operation.
155
156 Let H(s) be the 16 octet MD5 hash [RFC 1321] of the octet string s.
157
158 Let KD(k, s) be H({k, ":", s}), i.e., the 16 octet hash of the string
159 k, a colon and the string s.
160
161 Let HEX(n) be the representation of the 16 octet MD5 hash n as a
162 string of 32 hex digits (with alphabetic characters always in lower
163 case, since MD5 is case sensitive).
164
165 Let HMAC(k, s) be the 16 octet HMAC-MD5 [RFC 2104] of the octet
166 string s using the octet string k as a key.
167
168
169
170
171
172
173
174
175
176
177 Leach & Newman Expires: December 2003 [Page 3]
178
179
180
181
182
183 INTERNET DRAFT Digest SASL Mechanism June 2003
184
185
186 Let unq(X) be the value of the quoted-string X without the
187 surrounding quotes and with all escape characters "\\" removed. For
188 example for the quoted-string "Babylon" the value of unq("Babylon")
189 is Babylon; for the quoted string "ABC\"123\\" the value of
190 unq("ABC\"123\\") is ABC"123\.
191
192 The value of a quoted string constant as an octet string does not
193 include any terminating null character.
194
195 1.2 Requirements
196
197 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
198 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
199 document are to be interpreted as described in RFC 2119 [RFC 2119].
200
201 An implementation is not compliant if it fails to satisfy one or more
202 of the MUST level requirements for the protocols it implements. An
203 implementation that satisfies all the MUST level and all the SHOULD
204 level requirements for its protocols is said to be "unconditionally
205 compliant"; one that satisfies all the MUST level requirements but
206 not all the SHOULD level requirements for its protocols is said to be
207 "conditionally compliant."
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237 Leach & Newman Expires: December 2003 [Page 4]
238
239
240
241
242
243 INTERNET DRAFT Digest SASL Mechanism June 2003
244
245
246 2 Authentication
247
248 The following sections describe how to use Digest as a SASL
249 authentication mechanism.
250
251 2.1 Initial Authentication
252
253 If the client has not recently authenticated to the server, then it
254 must perform "initial authentication", as defined in this section. If
255 it has recently authenticated, then a more efficient form is
256 available, defined in the next section.
257
258 2.1.1 Step One
259
260 The server starts by sending a challenge. The data encoded in the
261 challenge contains a string formatted according to the rules for a
262 "digest-challenge" defined as follows:
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297 Leach & Newman Expires: December 2003 [Page 5]
298
299
300
301
302
303 INTERNET DRAFT Digest SASL Mechanism June 2003
304
305
306 digest-challenge =
307 1#( realm | nonce | qop-options | stale | server_maxbuf | charset
308 algorithm | cipher-opts | auth-param )
309
310 realm = "realm" "=" <"> realm-value <">
311 realm-value = qdstr-val
312 nonce = "nonce" "=" <"> nonce-value <">
313 nonce-value = *qdtext
314 qop-options = "qop" "=" <"> qop-list <">
315 qop-list = 1#qop-value
316 qop-value = "auth" | "auth-int" | "auth-conf" |
317 token
318 stale = "stale" "=" "true"
319 server_maxbuf = "maxbuf" "=" maxbuf-value
320 maxbuf-value = 1*DIGIT
321 charset = "charset" "=" "utf-8"
322 algorithm = "algorithm" "=" "md5-sess"
323 cipher-opts = "cipher" "=" <"> 1#cipher-value <">
324 cipher-value = "3des" | "des" | "rc4-40" | "rc4" |
325 "rc4-56" | "aes" | token
326 auth-param = token "=" ( token | quoted-string )
327
328 The meanings of the values of the directives used above are as
329 follows:
330
331 realm
332 Mechanistically, a string which can enable users to know which
333 username and password to use, in case they might have different
334 ones for different servers. Conceptually, it is the name of a
335 collection of accounts that might include the user's account. This
336 string should contain at least the name of the host performing the
337 authentication and might additionally indicate the collection of
338 users who might have access. An example might be
339 "registered_users@gotham.news.example.com". This directive is
340 optional; if not present, the client SHOULD solicit it from the
341 user or be able to compute a default; a plausible default might be
342 the realm supplied by the user when they logged in to the client
343 system. Multiple realm directives are allowed, in which case the
344 user or client must choose one as the realm for which to supply to
345 username and password.
346
347 If at least one realm is present and the charset directive is also
348 specified (which means that realm(s) are encoded as UTF-8), the
349 client should prepare each instance of realm using the "SASLPrep"
350 profile [SASLPrep] of the "stringprep" algorithm [StringPrep]. If
351 preparation of a realm instance fails or results in an empty
352 string, the client should abort the authentication exchange.
353
354
355
356
357 Leach & Newman Expires: December 2003 [Page 6]
358
359
360
361
362
363 INTERNET DRAFT Digest SASL Mechanism June 2003
364
365
366 nonce
367 A server-specified data string which MUST be different each time a
368 digest-challenge is sent as part of initial authentication. It is
369 recommended that this string be base64 or hexadecimal data. Note
370 that since the string is passed as a quoted string, the
371 double-quote character is not allowed unless escaped (see section
372 7.2). The contents of the nonce are implementation dependent. The
373 security of the implementation depends on a good choice. It is
374 RECOMMENDED that it contain at least 64 bits of entropy. The nonce
375 is opaque to the client. This directive is required and MUST
376 appear exactly once; if not present, or if multiple instances are
377 present, the client should abort the authentication exchange.
378
379 qop-options
380 A quoted string of one or more tokens indicating the "quality of
381 protection" values supported by the server. The value "auth"
382 indicates authentication; the value "auth-int" indicates
383 authentication with integrity protection; the value "auth-conf"
384 indicates authentication with integrity protection and encryption.
385 This directive is optional; if not present it defaults to "auth".
386 The client MUST ignore unrecognized options; if the client
387 recognizes no option, it should abort the authentication exchange.
388
389 stale
390 The "stale" directive is not used in initial authentication. See
391 the next section for its use in subsequent authentications. This
392 directive may appear at most once; if multiple instances are
393 present, the client should abort the authentication exchange.
394
395 server_maxbuf ("maximal ciphertext buffer size")
396 A number indicating the size of the largest buffer the server is
397 able to receive when using "auth-int" or "auth-conf". The value
398 MUST be bigger than 16 and smaller or equal to 16777215 (i.e.
399 2**24-1). If this directive is missing, the default value is
400 65536. This directive may appear at most once; if multiple
401 instances are present, the client MUST abort the authentication
402 exchange.
403
404 Let call "maximal cleartext buffer size" (or "maximal sender
405 size") the maximal size of a cleartext buffer that, after being
406 transformed by integrity (section 2.3) or confidentiality (section
407 2.4) protection function, will produce a SASL block of the maxbuf
408 size. As it should be clear from the name, the sender MUST never
409 pass a block of data bigger than the "maximal sender size" through
410 the selected protection function. This will guaranty that the
411 receiver will never get a block bigger than the maxbuf.
412
413
414
415
416
417 Leach & Newman Expires: December 2003 [Page 7]
418
419
420
421
422
423 INTERNET DRAFT Digest SASL Mechanism June 2003
424
425
426 charset
427 This directive, if present, specifies that the server supports
428 UTF-8 [UTF-8] encoding for the username, realm and password. If
429 present, the username, realm and password are in Unicode, prepared
430 using the "SASLPrep" profile [SASLPrep] of the "stringprep"
431 algorithm [StringPrep] and than encoded as UTF-8 [UTF-8]. If not
432 present, the username, realm and password MUST be encoded in ISO
433 8859-1 [ISO-8859] (of which US-ASCII [USASCII] is a subset). The
434 directive is needed for backwards compatibility with HTTP Digest,
435 which only supports ISO 8859-1. This directive may appear at most
436 once; if multiple instances are present, the client should abort
437 the authentication exchange.
438
439 Note, that this directive doesn't affect authorization id
440 ("authzid").
441
442 algorithm
443 This directive is required for backwards compatibility with HTTP
444 Digest, which supports other algorithms. This directive is
445 required and MUST appear exactly once; if not present, or if
446 multiple instances are present, the client should abort the
447 authentication exchange.
448
449 cipher-opts
450 A list of ciphers that the server supports. This directive must be
451 present exactly once if "auth-conf" is offered in the
452 "qop-options" directive, in which case the "3des" cipher is
453 mandatory-to-implement. The client MUST ignore unrecognized
454 options; if the client recognizes no option, it should abort the
455 authentication exchange. See section 2.4 for more detailed
456 description of the ciphers.
457
458 des
459 the Data Encryption Standard (DES) cipher [FIPS] in cipher
460 block chaining (CBC) mode with a 56 bit key.
461
462 3des
463 the "triple DES" cipher in CBC mode with EDE
464 (Encrypt,Decrypt,Encrypt) with the same key for each E stage
465 (aka "two keys mode") for a total key length of 112 bits.
466
467 rc4, rc4-40, rc4-56
468 the RC4 cipher with a 128 bit, 40 bit, and 56 bit key,
469 respectively.
470
471 aes
472 the Advanced Encryption Standard (AES) cipher [AES] in cipher
473 block chaining (CBC) mode with a 128 bit key. This mode
474
475
476
477 Leach & Newman Expires: December 2003 [Page 8]
478
479
480
481
482
483 INTERNET DRAFT Digest SASL Mechanism June 2003
484
485
486 requires an Initialization Vector (IV) that has the same size
487 as the block size.
488
489 auth-param
490 This construct allows for future extensions; it may appear more
491 than once. The client MUST ignore any unrecognized directives.
492
493 For use as a SASL mechanism, note that the following changes are made
494 to "digest-challenge" from HTTP: the following Digest options (called
495 "directives" in HTTP terminology) are unused (i.e., MUST NOT be sent,
496 and MUST be ignored if received):
497
498 opaque
499 domain
500
501 The size of a digest-challenge MUST be less than 2048 bytes.
502
503 2.1.2 Step Two
504
505 The client makes note of the "digest-challenge" and then responds
506 with a string formatted and computed according to the rules for a
507 "digest-response" defined as follows:
508
509 digest-response = 1#( username | realm | nonce | cnonce |
510 nonce-count | qop | digest-uri | response |
511 client_maxbuf | charset | cipher | authzid |
512 auth-param )
513
514 username = "username" "=" <"> username-value <">
515 username-value = qdstr-val
516 cnonce = "cnonce" "=" <"> cnonce-value <">
517 cnonce-value = *qdtext
518 nonce-count = "nc" "=" nc-value
519 nc-value = 8LHEX
520 client_maxbuf = "maxbuf" "=" maxbuf-value
521 qop = "qop" "=" qop-value
522 digest-uri = "digest-uri" "=" <"> digest-uri-value <">
523 digest-uri-value = serv-type "/" host [ "/" serv-name ]
524 serv-type = 1*ALPHA
525 serv-name = host
526 response = "response" "=" response-value
527 response-value = 32LHEX
528 LHEX = "0" | "1" | "2" | "3" |
529 "4" | "5" | "6" | "7" |
530 "8" | "9" | "a" | "b" |
531 "c" | "d" | "e" | "f"
532 cipher = "cipher" "=" cipher-value
533 authzid = "authzid" "=" <"> authzid-value <">
534
535
536
537 Leach & Newman Expires: December 2003 [Page 9]
538
539
540
541
542
543 INTERNET DRAFT Digest SASL Mechanism June 2003
544
545
546 authzid-value = qdstr-val
547
548 The 'host' non-terminal is defined in [RFC 2732] as
549
550 host = hostname | IPv4address | IPv6reference
551 ipv6reference = "[" IPv6address "]"
552
553 where IPv6address and IPv4address are defined in [RFC 2373]
554 and 'hostname' is defined in [RFC 2396].
555
556 username
557 The user's name in the specified realm, encoded according to the
558 value of the "charset" directive. This directive is required and
559 MUST be present exactly once; otherwise, authentication fails.
560
561 Upon the receipt of this value and if the charset directive is
562 also specified (which means that the username is encoded as
563 UTF-8), the server MUST prepare the username using the "SASLPrep"
564 profile [SASLPrep] of the "stringprep" algorithm [StringPrep]. If
565 preparation of the username fails or results in an empty string,
566 the server MUST fail the authentication exchange.
567
568 realm
569 The realm containing the user's account, encoded according to the
570 value of the "charset" directive. This directive is required if
571 the server provided any realms in the
572 "digest-challenge", in which case it may appear exactly once and
573 its value SHOULD be one of those realms. If the directive is
574 missing, "realm-value" will set to the empty string when computing
575 A1 (see below for details).
576
577 If realm was provided by the client and if the charset directive
578 was also specified (which means that the realm is encoded as
579 UTF-8), the server MUST prepare the realm using the "SASLPrep"
580 profile [SASLPrep] of the "stringprep" algorithm [StringPrep]. If
581 preparation of the realm fails or results in an empty string, the
582 server MUST fail the authentication exchange.
583
584 nonce
585 The server-specified data string received in the preceding digest-
586 challenge. This directive is required and MUST be present exactly
587 once; otherwise, authentication fails.
588
589
590
591
592
593
594
595
596
597 Leach & Newman Expires: December 2003 [Page 10]
598
599
600
601
602
603 INTERNET DRAFT Digest SASL Mechanism June 2003
604
605
606 cnonce
607 A client-specified data string which MUST be different each time a
608 digest-response is sent as part of initial authentication. The
609 cnonce-value is an opaque quoted string value provided by the
610 client and used by both client and server to avoid chosen
611 plaintext attacks, and to provide mutual authentication. The
612 security of the implementation depends on a good choice. It is
613 RECOMMENDED that it contain at least 64 bits of entropy. This
614 directive is required and MUST be present exactly once; otherwise,
615 authentication fails.
616
617 nonce-count
618 The nc-value is the hexadecimal count of the number of requests
619 (including the current request) that the client has sent with the
620 nonce value in this request. For example, in the first request
621 sent in response to a given nonce value, the client sends
622 "nc=00000001". The purpose of this directive is to allow the
623 server to detect request replays by maintaining its own copy of
624 this count - if the same nc-value is seen twice, then the request
625 is a replay. See the description below of the construction of the
626 response value. This directive is required and MUST be present
627 exactly once; otherwise, authentication fails.
628
629 qop
630 Indicates what "quality of protection" the client accepted. If
631 present, it may appear exactly once and its value MUST be one of
632 the alternatives in qop-options. If not present, it defaults to
633 "auth". These values affect the computation of the response. Note
634 that this is a single token, not a quoted list of alternatives.
635
636 serv-type
637 Indicates the type of service, such as "http" for web service,
638 "ftp" for FTP service, "smtp" for mail delivery service, etc. The
639 service name as defined in the SASL profile for the protocol see
640 section 4 of [RFC 2222], registered in the IANA registry of
641 "service" elements for the GSSAPI host-based service name form
642 [RFC 2078].
643
644 host
645 The DNS host name or IP (IPv4 or IPv6) address for the service
646 requested. The DNS host name must be the fully-qualified
647 canonical name of the host. The DNS host name is the preferred
648 form; see notes on server processing of the digest-uri.
649
650
651
652
653
654
655
656
657 Leach & Newman Expires: December 2003 [Page 11]
658
659
660
661
662
663 INTERNET DRAFT Digest SASL Mechanism June 2003
664
665
666 serv-name
667 Indicates the name of the service if it is replicated. The service
668 is considered to be replicated if the client's service-location
669 process involves resolution using standard DNS lookup operations,
670 and if these operations involve DNS records (such as SRV [RFC
671 2052], or MX) which resolve one DNS name into a set of other DNS
672 names. In this case, the initial name used by the client is the
673 "serv-name", and the final name is the "host" component. For
674 example, the incoming mail service for "example.com" may be
675 replicated through the use of MX records stored in the DNS, one of
676 which points at an SMTP server called "mail3.example.com"; it's
677 "serv-name" would be "example.com", it's "host" would be
678 "mail3.example.com". If the service is not replicated, or the
679 serv-name is identical to the host, then the serv-name component
680 MUST be omitted.
681
682 digest-uri
683 Indicates the principal name of the service with which the client
684 wishes to connect, formed from the serv-type, host, and serv-name.
685 For example, the FTP service on "ftp.example.com" would have a
686 "digest-uri" value of "ftp/ftp.example.com"; the SMTP server from
687 the example above would have a "digest-uri" value of
688 "SMTP/mail3.example.com/example.com".
689
690 Servers SHOULD check that the supplied value is correct. This will
691 detect accidental connection to the incorrect server, as well as some
692 redirection attacks. It is also so that clients will be trained to
693 provide values that will work with implementations that use a shared
694 back-end authentication service that can provide server
695 authentication.
696
697 The serv-type component should match the service being offered. The
698 host component should match one of the host names of the host on
699 which the service is running, or it's IP address. Servers SHOULD NOT
700 normally support the IP address form, because server authentication
701 by IP address is not very useful; they should only do so if the DNS
702 is unavailable or unreliable. The serv-name component should match
703 one of the service's configured service names.
704
705 This directive may appear at most once; if multiple instances are
706 present, the client should abort the authentication exchange.
707
708 Note: In the HTTP use of Digest authentication, the digest-uri is the
709 URI (usually a URL) of the resource requested -- hence the name of
710 the directive.
711
712
713
714
715
716
717 Leach & Newman Expires: December 2003 [Page 12]
718
719
720
721
722
723 INTERNET DRAFT Digest SASL Mechanism June 2003
724
725
726 response
727 A string of 32 hex digits computed as defined below, which proves
728 that the user knows a password. This directive is required and
729 MUST be present exactly once; otherwise, authentication fails.
730
731 client_maxbuf
732 A number indicating the size of the largest ciphertext buffer the
733 client is able to receive when using "auth-int" or "auth-conf". If
734 this directive is missing, the default value is 65536. This
735 directive may appear at most once; if multiple instances are
736 present, the server MUST abort the authentication exchange. If the
737 value is less or equal to 16 or bigger than 16777215 (i.e.
738 2**24-1), the server MUST abort the authentication exchange.
739
740 Upon processing/sending of the client_maxbuf value both the server
741 and the client calculate their "maximal ciphertext buffer size" as
742 the minimum of the server_maxbuf (Step One) and the client_maxbuf
743 (Step Two). The "maximal sender size" can be calculated by
744 subtracting 16 from the calculated "maximal ciphertext buffer
745 size".
746
747 When sending a block of data the client/server MUST NOT pass more
748 than the "maximal sender size" bytes of data to the selected
749 protection function (2.3 or 2.4).
750
751 charset
752 This directive, if present, specifies that the client has used
753 UTF-8 [UTF-8] encoding for the username, realm and password. If
754 present, the username, realm and password are in Unicode, prepared
755 using the "SASLPrep" profile [SASLPrep] of the "stringprep"
756 algorithm [StringPrep] and than encoded as UTF-8 [UTF-8]. If not
757 present, the username and password must be encoded in ISO 8859-1
758 [ISO-8859] (of which
759 US-ASCII [USASCII] is a subset). The client should send this
760 directive only if the server has indicated it supports UTF-8
761 [UTF-8]. The directive is needed for backwards compatibility with
762 HTTP Digest, which only supports ISO 8859-1.
763
764 Note, that this directive doesn't affect authorization id
765 ("authzid").
766
767 LHEX
768 32 hex digits, where the alphabetic characters MUST be lower case,
769 because MD5 is not case insensitive.
770
771 cipher
772 The cipher chosen by the client. This directive MUST appear
773 exactly once if "auth-conf" is negotiated; if required and not
774
775
776
777 Leach & Newman Expires: December 2003 [Page 13]
778
779
780
781
782
783 INTERNET DRAFT Digest SASL Mechanism June 2003
784
785
786 present, authentication fails.
787
788 authzid
789 The "authorization ID" directive is optional. If present, and the
790 authenticating user has sufficient privilege, and the server
791 supports it, then after authentication the server will use this
792 identity for making all accesses and access checks. If the client
793 specifies it, and the server does not support it, then the
794 response-value calculated on the server will not match the one
795 calculated on the client and authentication will fail.
796
797 The authzid MUST NOT be an empty string.
798
799 The authorization identifier MUST NOT be converted to ISO 8859-1
800 even if the authentication identifier ("username") is converted
801 for compatibility as directed by "charset" directive.
802
803 The server SHOULD verify the correctness of an authzid as
804 specified by the corresponding SASL protocol profile.
805
806 The size of a digest-response MUST be less than 4096 bytes.
807
808 2.1.2.1 Response-value
809
810 The definition of "response-value" above indicates the encoding for
811 its value -- 32 lower case hex characters. The following definitions
812 show how the value is computed.
813
814 Although qop-value and components of digest-uri-value may be
815 case-insensitive, the case which the client supplies in step two is
816 preserved for the purpose of computing and verifying the
817 response-value.
818
819 response-value =
820 HEX( KD ( HEX(H(A1)),
821 { nonce-value, ":" nc-value, ":",
822 cnonce-value, ":", qop-value, ":", HEX(H(A2)) }))
823
824 If authzid is specified, then A1 is
825
826
827 A1 = { H( { unq(username-value), ":", unq(realm-value), ":", passwd } ),
828 ":", nonce-value, ":", cnonce-value, ":", unq(authzid-value) }
829
830 If authzid is not specified, then A1 is
831
832
833 A1 = { H( { unq(username-value), ":", unq(realm-value), ":", passwd } ),
834
835
836
837 Leach & Newman Expires: December 2003 [Page 14]
838
839
840
841
842
843 INTERNET DRAFT Digest SASL Mechanism June 2003
844
845
846 ":", nonce-value, ":", cnonce-value }
847
848 where
849
850 passwd = *OCTET
851
852 The "username-value", "realm-value" and "passwd" are encoded
853 according to the value of the "charset" directive. If "charset=UTF-8"
854 is present, and all the characters of "username-value" are, after
855 preparing using the "SASLPrep" profile [SASLPrep] of the "stringprep"
856 algorithm [StringPrep], in the ISO 8859-1 character set, then it must
857 be converted to ISO 8859-1 before being hashed. The same
858 transformation has to be done for "realm-value" and "passwd". This is
859 so that authentication databases that store the hashed username,
860 realm and password (which is common) can be shared compatibly with
861 HTTP, which specifies ISO 8859-1. A sample implementation of this
862 conversion is in section 8.
863
864 If the "qop" directive's value is "auth", then A2 is:
865
866 A2 = { "AUTHENTICATE:", digest-uri-value }
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897 Leach & Newman Expires: December 2003 [Page 15]
898
899
900
901
902
903 INTERNET DRAFT Digest SASL Mechanism June 2003
904
905
906 If the "qop" value is "auth-int" or "auth-conf" then A2 is:
907
908 A2 = { "AUTHENTICATE:", digest-uri-value,
909 ":00000000000000000000000000000000" }
910
911 Note that "AUTHENTICATE:" must be in upper case, and the second
912 string constant is a string with a colon followed by 32 zeros.
913
914 These apparently strange values of A2 are for compatibility with
915 HTTP; they were arrived at by setting "Method" to "AUTHENTICATE" and
916 the hash of the entity body to zero in the HTTP digest calculation of
917 A2.
918
919 Also, in the HTTP usage of Digest, several directives in the
920 "digest-challenge" sent by the server have to be returned by the
921 client in the "digest-response". These are:
922
923 opaque
924 algorithm
925
926 These directives are not needed when Digest is used as a SASL
927 mechanism (i.e., MUST NOT be sent, and MUST be ignored if received).
928
929 2.1.3 Step Three
930
931 The server receives and validates the "digest-response". The server
932 checks that the nonce-count is "00000001". If it supports subsequent
933 authentication (see section 2.2), it saves the value of the nonce and
934 the nonce-count. It sends a message formatted as follows:
935
936 response-auth = "rspauth" "=" response-value
937
938 where response-value is calculated as above, using the values sent in
939 step two, except that if qop is "auth", then A2 is
940
941 A2 = { ":", digest-uri-value }
942
943 And if qop is "auth-int" or "auth-conf" then A2 is
944
945 A2 = { ":", digest-uri-value, ":00000000000000000000000000000000" }
946
947 Compared to its use in HTTP, the following Digest directives in the
948 "digest-response" are unused:
949
950 nextnonce
951 qop
952 cnonce
953 nonce-count
954
955
956
957 Leach & Newman Expires: December 2003 [Page 16]
958
959
960
961
962
963 INTERNET DRAFT Digest SASL Mechanism June 2003
964
965
966 2.2 Subsequent Authentication
967
968 If the client has previously authenticated to the server, and
969 remembers the values of username, realm, nonce, nonce-count, cnonce,
970 and qop that it used in that authentication, and the SASL profile for
971 a protocol permits an initial client response, then it MAY perform
972 "subsequent authentication", as defined in this section.
973
974 2.2.1 Step one
975
976 The client uses the values from the previous authentication and sends
977 an initial response with a string formatted and computed according to
978 the rules for a "digest-response", as defined above, but with a
979 nonce-count one greater than used in the last "digest-response".
980
981 2.2.2 Step Two
982
983 The server receives the "digest-response". If the server does not
984 support subsequent authentication, then it sends a
985 "digest-challenge", and authentication proceeds as in initial
986 authentication. If the server has no saved nonce and nonce-count from
987 a previous authentication, then it sends a "digest-challenge", and
988 authentication proceeds as in initial authentication. Otherwise, the
989 server validates the "digest-response", checks that the nonce-count
990 is one greater than that used in the previous authentication using
991 that nonce, and saves the new value of nonce-count.
992
993 If the response is invalid, then the server sends a
994 "digest-challenge", and authentication proceeds as in initial
995 authentication (and should be configurable to log an authentication
996 failure in some sort of security audit log, since the failure may be
997 a symptom of an attack). The nonce-count MUST NOT be incremented in
998 this case: to do so would allow a denial of service attack by sending
999 an out-of-order nonce-count.
1000
1001 If the response is valid, the server MAY choose to deem that
1002 authentication has succeeded. However, if it has been too long since
1003 the previous authentication, or for any o including the next
1004 subsequent authentication, between the client and the server MUST be
1005 integrity protected. Using as a base session key the value of H(A1)
1006 as defined above the client and server calculate a pair of message
1007 integrity keys as follows.
1008
1009 The key for integrity protecting messages from client to server is:
1010
1011 Kic = MD5({H(A1),
1012 "Digest session key to client-to-server signing key magic constant"})
1013
1014
1015
1016
1017 Leach & Newman Expires: December 2003 [Page 17]
1018
1019
1020
1021
1022
1023 INTERNET DRAFT Digest SASL Mechanism June 2003
1024
1025
1026 The key for integrity protecting messages from server to client is:
1027
1028 Kis = MD5({H(A1),
1029 "Digest session key to server-to-client signing key magic constant"})
1030
1031 where MD5 is as specified in [RFC 1321]. If message integrity is
1032 negotiated, a MAC block for each message is appended to the message.
1033 The MAC block is 16 bytes: the first 10 bytes of the HMAC-MD5 [RFC
1034 2104] of the message, a 2-byte message type number in network byte
1035 order with value 1, and the 4-byte sequence number in network byte
1036 order. The message type is to allow for future extensions such as
1037 rekeying.
1038
1039 MAC(Ki, SeqNum, msg) = (HMAC(Ki, {SeqNum, msg})[0..9], 0x0001,
1040 SeqNum)
1041
1042 where Ki is Kic for messages sent by the client and Kis for those
1043 sent by the server. The sequence number (SeqNum) is an unsigned
1044 number initialized to zero after initial or subsequent
1045 authentication, and incremented by one for each message
1046 sent/successfully verified. (Note, that there are two independent
1047 counters for sending and receiving.) The sequence number wraps around
1048 to 0 after 2**32-1.
1049
1050 Upon receipt, MAC(Ki, SeqNum, msg) is computed and compared with the
1051 received value; the message is discarded if they differ. The
1052 receiver's sequence counter is incremented if they match.
1053
1054 2.4 Confidentiality Protection
1055
1056 If the server sent a "cipher-opts" directive and the client responded
1057 with a "cipher" directive, then subsequent messages between the
1058 client and the server MUST be confidentiality protected. Using as a
1059 base session key the value of H(A1) as defined above the client and
1060 server calculate a pair of message integrity keys as follows.
1061
1062 The key for confidentiality protecting messages from client to server
1063 is:
1064
1065 Kcc = MD5({H(A1)[0..n-1],
1066 "Digest H(A1) to client-to-server sealing key magic constant"})
1067
1068 The key for confidentiality protecting messages from server to client
1069 is:
1070
1071 Kcs = MD5({H(A1)[0..n-1],
1072 "Digest H(A1) to server-to-client sealing key magic constant"})
1073
1074
1075
1076
1077 Leach & Newman Expires: December 2003 [Page 18]
1078
1079
1080
1081
1082
1083 INTERNET DRAFT Digest SASL Mechanism June 2003
1084
1085
1086 where MD5 is as specified in [RFC 1321]. For cipher "rc4-40" n is 5;
1087 for "rc4-56" n is 7; for the rest n is 16. The key for the "rc4-*"
1088 and "aes" ciphers is all 16 bytes of Kcc or Kcs; the key for "des" is
1089 the first 7 bytes; the key for "3des" is the first 14 bytes.
1090
1091 The IV used to send/receive the initial buffer of security encoded
1092 data for "des" and "3des" is the last 8 bytes of Kcc or Kcs. For all
1093 subsequent buffers the last 8 bytes of the ciphertext of the buffer
1094 NNN is used as the IV for the buffer (NNN + 1).
1095
1096 The IV for the "aes" cipher in CBC mode for messages going from the
1097 client to the server (IVc) consists of 16 bytes calculated as
1098 follows:
1099
1100 IVc = MD5({Kcc, "aes-128"})
1101
1102 The IV for the "aes" cipher in CBC mode for messages going from the
1103 server to the client (IVs) consists of 16 bytes calculated as
1104 follows:
1105
1106 IVs = MD5({Kcs, "aes-128"})
1107
1108 The IV is XOR'd with the first plaintext block before it is encrypted
1109 with "aes". Then for successive blocks, the previous ciphertext
1110 block is XOR'd with the current plaintext, before it is encrypted.
1111
1112 rc4 cipher state MUST NOT be reset before sending/receiving a next
1113 buffer of security encoded data.
1114
1115 The MAC block is a variable length padding prefix followed by 16
1116 bytes formatted as follows: the first 10 bytes of the HMAC-MD5 [RFC
1117 2104] of the message, a 2-byte message type number in network byte
1118 order with value 1, and the 4-byte sequence number in network byte
1119 order. If the blocksize of the chosen cipher is not 1 byte, the
1120 padding prefix is one or more octets each containing the number of
1121 padding bytes, such that total length of the encrypted part of the
1122 message is a multiple of the blocksize. The padding and first 10
1123 bytes of the MAC block are encrypted with the chosen cipher along
1124 with the message.
1125
1126 SEAL(Ki, Kc, SeqNum, msg) =
1127 {CIPHER(Kc, {msg, pad, HMAC(Ki, {SeqNum, msg})[0..9]}), 0x0001,
1128 SeqNum}
1129
1130 where CIPHER is the chosen cipher, Ki and Kc are Kic and Kcc for
1131 messages sent by the client and Kis and Kcs for those sent by the
1132 server. The sequence number (SeqNum) is an unsigned number
1133 initialized to zero after initial or subsequent authentication, and
1134
1135
1136
1137 Leach & Newman Expires: December 2003 [Page 19]
1138
1139
1140
1141
1142
1143 INTERNET DRAFT Digest SASL Mechanism June 2003
1144
1145
1146 incremented by one for each message sent/successfully verified.
1147 (Note, that there are two independent counters for sending and
1148 receiving.) The sequence number wraps around to 0 after 2**32-1.
1149
1150 Upon receipt, the message is decrypted, HMAC(Ki, {SeqNum, msg}) is
1151 computed and compared with the received value; the padding is
1152 verified. The message is discarded if the received and the
1153 calculated HMACs differ and/or the padding is invalid. See also
1154 section 3.8 for important information about MAC and padding
1155 verification. The receiver's sequence counter is then compared with
1156 the received SeqNum value; the message is discarded if they differ.
1157 The receiver's sequence counter is incremented if they match.
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197 Leach & Newman Expires: December 2003 [Page 20]
1198
1199
1200
1201
1202
1203 INTERNET DRAFT Digest SASL Mechanism June 2003
1204
1205
1206 3 Security Considerations
1207
1208 General SASL security considerations apply to this mechanism.
1209 "stringprep" and Unicode security considerations also apply.
1210
1211 Detailed discussion of other DIGEST-MD5 specific security issues is
1212 below.
1213
1214 3.1 Authentication of Clients using Digest Authentication
1215
1216 Digest Authentication does not provide a strong authentication
1217 mechanism, when compared to public key based mechanisms, for example.
1218 However, since it prevents chosen plaintext attacks, it is stronger
1219 than (e.g.) CRAM-MD5, which has been proposed for use with ACAP [RFC
1220 2244], POP and IMAP [RFC 2195]. It is intended to replace the much
1221 weaker and even more dangerous use of plaintext passwords; however,
1222 since it is still a password based mechanism it avoids some of the
1223 potential deployabilty issues with public-key, OTP or similar
1224 mechanisms.
1225
1226 Digest Authentication offers no confidentiality protection beyond
1227 protecting the actual password. All of the rest of the challenge and
1228 response are available to an eavesdropper, including the user's name
1229 and authentication realm.
1230
1231 3.2 Comparison of Digest with Plaintext Passwords
1232
1233 The greatest threat to the type of transactions for which these
1234 protocols are used is network snooping. This kind of transaction
1235 might involve, for example, online access to a mail service whose use
1236 is restricted to paying subscribers. With plaintext password
1237 authentication an eavesdropper can obtain the password of the user.
1238 This not only permits him to access anything in the database, but,
1239 often worse, will permit access to anything else the user protects
1240 with the same password.
1241
1242 3.3 Replay Attacks
1243
1244 Replay attacks are defeated if the client or the server chooses a
1245 fresh nonce for each authentication, as this specification requires.
1246
1247 As a security precaution, the server, when verifying a response from
1248 the client, must use the original server nonce ("nonce") it sent, not
1249 the one returned by the client in the response, as it might have been
1250 modified by an attacker.
1251
1252 To prevent some redirection attacks it is recommended that the server
1253 verifies that the "serv-type" part of the "digest-uri" matches the
1254
1255
1256
1257 Leach & Newman Expires: December 2003 [Page 21]
1258
1259
1260
1261
1262
1263 INTERNET DRAFT Digest SASL Mechanism June 2003
1264
1265
1266 service name and that the hostname/IP address belongs to the server.
1267
1268 3.4 Online dictionary attacks
1269
1270 If the attacker can eavesdrop, then it can test any overheard
1271 nonce/response pairs against a (potentially very large) list of
1272 common words. Such a list is usually much smaller than the total
1273 number of possible passwords. The cost of computing the response for
1274 each password on the list is paid once for each challenge.
1275
1276 The server can mitigate this attack by not allowing users to select
1277 passwords that are in a dictionary.
1278
1279 3.5 Offline dictionary attacks
1280
1281 If the attacker can choose the challenge, then it can precompute the
1282 possible responses to that challenge for a list of common words. Such
1283 a list is usually much smaller than the total number of possible
1284 passwords. The cost of computing the response for each password on
1285 the list is paid just once.
1286
1287 Offline dictionary attacks are defeated if the client chooses a fresh
1288 nonce for each authentication, as this specification requires.
1289
1290 3.6 Man in the Middle
1291
1292 Digest authentication is vulnerable to "man in the middle" (MITM)
1293 attacks. Clearly, a MITM would present all the problems of
1294 eavesdropping. But it also offers some additional opportunities to
1295 the attacker.
1296
1297 A possible man-in-the-middle attack would be to substitute a weaker
1298 qop scheme for the one(s) sent by the server; the server will not be
1299 able to detect this attack. For this reason, the client should always
1300 use the strongest scheme that it understands from the choices
1301 offered, and should never choose a scheme that does not meet its
1302 minimum requirements.
1303
1304 A man-in-the-middle attack may also make the client and the server
1305 that agreed to use confidentiality protection to use different (and
1306 possibly weaker) cipher's. This is because the chosen cipher is not
1307 used in the shared secret calculation.
1308
1309 3.7 Chosen plaintext attacks
1310
1311 A chosen plaintext attack is where a MITM or a malicious server can
1312 arbitrarily choose the challenge that the client will use to compute
1313 the response. The ability to choose the challenge is known to make
1314
1315
1316
1317 Leach & Newman Expires: December 2003 [Page 22]
1318
1319
1320
1321
1322
1323 INTERNET DRAFT Digest SASL Mechanism June 2003
1324
1325
1326 cryptanalysis much easier [MD5].
1327
1328 However, Digest does not permit the attack to choose the challenge as
1329 long as the client chooses a fresh nonce for each authentication, as
1330 this specification requires.
1331
1332 3.8 CBC Mode attacks
1333
1334 The following attack can be launched when the connection uses
1335 Confidentiality protection with ciphers in CBC mode. If bad padding
1336 is treated differently from bad MACs when decrypting a DIGEST-MD5
1337 buffer of security encoded data, the attacker may be able to launch
1338 Vaudenay's attack on padding.
1339
1340 An error logfile will suffice to launch the attack if it reveals the
1341 type of error -- even if file permissions prevent the attacker from
1342 actually reading the file (the file length increase cause by the
1343 attack is likely to reveal which of the two errors occured).
1344
1345 A different approach to distinguish these two error cases and launch
1346 the attack is to examine the timing of error responses: if the MAC
1347 verification is skipped when bad padding has been found, the error
1348 will appear quicker in the case of incorrect block cipher padding
1349 than in the case of an incorrect MAC.
1350
1351 A countermeasure is to compute a MAC of the plaintext anyway, even if
1352 the usual padding removal step fails because of incorrect padding, to
1353 obtain (nearly) uniform timing.
1354
1355 3.9 Spoofing by Counterfeit Servers
1356
1357 If a user can be led to believe that she is connecting to a host
1358 containing information protected by a password she knows, when in
1359 fact she is connecting to a hostile server, then the hostile server
1360 can obtain challenge/response pairs where it was able to partly
1361 choose the challenge. There is no known way that this can be
1362 exploited.
1363
1364 3.10 Storing passwords
1365
1366 Digest authentication requires that the authenticating agent (usually
1367 the server) store some data derived from the user's name and password
1368 in a "password file" associated with a given realm. Normally this
1369 might contain pairs consisting of username and H({ username-value,
1370 ":", realm-value, ":", passwd }), which is adequate to compute H(A1)
1371 as described above without directly exposing the user's password.
1372
1373 The security implications of this are that if this password file is
1374
1375
1376
1377 Leach & Newman Expires: December 2003 [Page 23]
1378
1379
1380
1381
1382
1383 INTERNET DRAFT Digest SASL Mechanism June 2003
1384
1385
1386 compromised, then an attacker gains immediate access to documents on
1387 the server using this realm. Unlike, say a standard UNIX password
1388 file, this information need not be decrypted in order to access
1389 documents in the server realm associated with this file. On the other
1390 hand, decryption, or more likely a brute force attack, would be
1391 necessary to obtain the user's password. This is the reason that the
1392 realm is part of the digested data stored in the password file. It
1393 means that if one Digest authentication password file is compromised,
1394 it does not automatically compromise others with the same username
1395 and password (though it does expose them to brute force attack).
1396
1397 There are two important security consequences of this. First the
1398 password file must be protected as if it contained plaintext
1399 passwords, because for the purpose of accessing documents in its
1400 realm, it effectively does.
1401
1402 A second consequence of this is that the realm string should be
1403 unique among all realms that any single user is likely to use. In
1404 particular a realm string should include the name of the host doing
1405 the authentication.
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437 Leach & Newman Expires: December 2003 [Page 24]
1438
1439
1440
1441
1442
1443 INTERNET DRAFT Digest SASL Mechanism June 2003
1444
1445
1446 3.11 Multiple realms
1447
1448 Use of multiple realms may mean both that compromise of a the
1449 security database for a single realm does not compromise all
1450 security, and that there are more things to protect in order to keep
1451 the whole system secure.
1452
1453 3.11 Summary
1454
1455 By modern cryptographic standards Digest Authentication is weak,
1456 compared to (say) public key based mechanisms. But for a large range
1457 of purposes it is valuable as a replacement for plaintext passwords.
1458 Its strength may vary depending on the implementation.
1459
1460
1461 4 Example
1462
1463 This example shows the use of the Digest SASL mechanism with the
1464 IMAP4 AUTHENTICATE command [RFC 3501].
1465
1466 In this example, "C:" and "S:" represent a line sent by the client or
1467 server respectively including a CRLF at the end. Linebreaks and
1468 indentation within a "C:" or "S:" are editorial and not part of the
1469 protocol. The password in this example was "secret". Note that the
1470 base64 encoding of the challenges and responses is part of the IMAP4
1471 AUTHENTICATE command, not part of the Digest specification itself.
1472
1473 S: * OK elwood.innosoft.com PMDF IMAP4rev1 V6.0-9
1474 C: c CAPABILITY
1475 S: * CAPABILITY IMAP4 IMAP4rev1 ACL LITERAL+ NAMESPACE QUOTA
1476 UIDPLUS AUTH=CRAM-MD5 AUTH=DIGEST-MD5 AUTH=PLAIN
1477 S: c OK Completed
1478 C: a AUTHENTICATE DIGEST-MD5
1479 S: + cmVhbG09ImVsd29vZC5pbm5vc29mdC5jb20iLG5vbmNlPSJPQTZNRzl0
1480 RVFHbTJoaCIscW9wPSJhdXRoIixhbGdvcml0aG09bWQ1LXNlc3MsY2hh
1481 cnNldD11dGYtOA==
1482 C: Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iY2hyaXMiLHJlYWxtPSJlbHdvb2
1483 QuaW5ub3NvZnQuY29tIixub25jZT0iT0E2TUc5dEVRR20yaGgiLG5jPTAw
1484 MDAwMDAxLGNub25jZT0iT0E2TUhYaDZWcVRyUmsiLGRpZ2VzdC11cmk9Im
1485 ltYXAvZWx3b29kLmlubm9zb2Z0LmNvbSIscmVzcG9uc2U9ZDM4OGRhZDkw
1486 ZDRiYmQ3NjBhMTUyMzIxZjIxNDNhZjcscW9wPWF1dGg=
1487 S: + cnNwYXV0aD1lYTQwZjYwMzM1YzQyN2I1NTI3Yjg0ZGJhYmNkZmZmZA==
1488 C:
1489 S: a OK User logged in
1490 ---
1491
1492 The base64-decoded version of the SASL exchange is:
1493
1494
1495
1496
1497 Leach & Newman Expires: December 2003 [Page 25]
1498
1499
1500
1501
1502
1503 INTERNET DRAFT Digest SASL Mechanism June 2003
1504
1505
1506 S: realm="elwood.innosoft.com",nonce="OA6MG9tEQGm2hh",qop="auth",
1507 algorithm=md5-sess,charset=utf-8
1508 C: charset=utf-8,username="chris",realm="elwood.innosoft.com",
1509 nonce="OA6MG9tEQGm2hh",nc=00000001,cnonce="OA6MHXh6VqTrRk",
1510 digest-uri="imap/elwood.innosoft.com",
1511 response=d388dad90d4bbd760a152321f2143af7,qop=auth
1512 S: rspauth=ea40f60335c427b5527b84dbabcdfffd
1513
1514 The password in this example was "secret".
1515
1516 This example shows the use of the Digest SASL mechanism with the
1517 ACAP, using the same notational conventions and password as in the
1518 previous example. Note that ACAP does not base64 encode and uses
1519 fewer round trips that IMAP4.
1520
1521 S: * ACAP (IMPLEMENTATION "Test ACAP server") (SASL "CRAM-MD5"
1522 "DIGEST-MD5" "PLAIN")
1523 C: a AUTHENTICATE "DIGEST-MD5"
1524 S: + {94}
1525 S: realm="elwood.innosoft.com",nonce="OA9BSXrbuRhWay",qop="auth",
1526 algorithm=md5-sess,charset=utf-8
1527 C: {206}
1528 C: charset=utf-8,username="chris",realm="elwood.innosoft.com",
1529 nonce="OA9BSXrbuRhWay",nc=00000001,cnonce="OA9BSuZWMSpW8m",
1530 digest-uri="acap/elwood.innosoft.com",
1531 response=6084c6db3fede7352c551284490fd0fc,qop=auth
1532 S: a OK (SASL {40}
1533 S: rspauth=2f0b3d7c3c2e486600ef710726aa2eae) "AUTHENTICATE
1534 Completed"
1535 ---
1536
1537 The server uses the values of all the directives, plus knowledge of
1538 the users password (or the hash of the user's name, server's realm
1539 and the user's password) to verify the computations above. If they
1540 check, then the user has authenticated.
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557 Leach & Newman Expires: December 2003 [Page 26]
1558
1559
1560
1561
1562
1563 INTERNET DRAFT Digest SASL Mechanism June 2003
1564
1565
1566 5 References
1567
1568 5.1 Normative references
1569
1570 [Digest] Franks, J., et al., "HTTP Authentication: Basic and Digest
1571 Access Authentication", RFC 2617, June 1999.
1572
1573 [ISO-8859] ISO-8859. International Standard--Information Processing--
1574 8-bit Single-Byte Coded Graphic Character Sets --
1575 Part 1: Latin alphabet No. 1, ISO-8859-1:1987.
1576 Part 2: Latin alphabet No. 2, ISO-8859-2, 1987.
1577 Part 3: Latin alphabet No. 3, ISO-8859-3, 1988.
1578 Part 4: Latin alphabet No. 4, ISO-8859-4, 1988.
1579 Part 5: Latin/Cyrillic alphabet, ISO-8859-5, 1988.
1580 Part 6: Latin/Arabic alphabet, ISO-8859-6, 1987.
1581 Part 7: Latin/Greek alphabet, ISO-8859-7, 1987.
1582 Part 8: Latin/Hebrew alphabet, ISO-8859-8, 1988.
1583 Part 9: Latin alphabet No. 5, ISO-8859-9, 1990.
1584
1585 [RFC 822] Crocker, D., "Standard for The Format of ARPA Internet
1586 Text Messages," STD 11, RFC 822, August 1982.
1587
1588 [RFC 1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
1589 April 1992.
1590
1591 [RFC 2052] Gulbrandsen, A. and P. Vixie, "A DNS RR for specifying the
1592 location of services (DNS SRV)", RFC 2052, October 1996.
1593
1594 [RFC 2104] Krawczyk, H., Bellare, M. and R. Canetti, "HMAC: Keyed-
1595 Hashing for Message Authentication", RFC 2104, February
1596 1997.
1597
1598 [RFC 2119] Bradner, S., "Key words for use in RFCs to Indicate
1599 Requirement Levels", BCP 14, RFC 2119, March 1997.
1600
1601 [RFC 2222] Myers, J., "Simple Authentication and Security Layer
1602 (SASL)", RFC 2222, October 1997.
1603
1604 [Stringprep] Hoffman, P., Blanchet, M., "Preparation of
1605 Internationalized Strings ("stringprep")", RFC 3454,
1606 December 2002.
1607
1608 [Unicode] The Unicode Consortium, "The Unicode Standard, Version
1609 3.2.0", defined by: The Unicode Standard, Version 3.0
1610 (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5),
1611 as amended by the Unicode Standard Annex #28: Unicode 3.2
1612 (http://www.unicode.org/reports/tr28/tr28-3.html).
1613
1614
1615
1616
1617 Leach & Newman Expires: December 2003 [Page 27]
1618
1619
1620
1621
1622
1623 INTERNET DRAFT Digest SASL Mechanism June 2003
1624
1625
1626 [UTF-8] Yergeau, "UTF-8, a transformation format of ISO 10646", RFC
1627 2279, Janyary 1998.
1628
1629 [USASCII] US-ASCII. Coded Character Set - 7-Bit American Standard
1630 Code for Information Interchange. Standard ANSI X3.4-1986,
1631 ANSI, 1986.
1632
1633 [SASLPrep] Zeilenga, K., "SASLprep: Stringprep profile for user names
1634 and passwords", Work in progress, draft-ietf-sasl-
1635 saslprep-XX.txt.
1636
1637 [RFC 2732] Hinden, R., Carpenter, B., Masinter, L., "Format for
1638 Literal IPv6 Addresses in URL's", RFC 2732, December 1999.
1639
1640 [RFC 2373] Hinden, R., Deering, S., "IP Version 6 Addressing
1641 Architecture", RFC 2373, July 1998.
1642
1643 [RFC 2396] Berners-Lee, T., Fielding, R., Masinter, L., "Uniform
1644 Resource Identifiers (URI): Generic Syntax", RFC 2396,
1645 August 1998.
1646
1647 [FIPS] National Institute of Standards and Technology, "DES Modes of
1648 Operation", http://www.itl.nist.gov/fipspubs/fip81.htm,
1649 December 1980.
1650
1651 [AES] Daemen, J., Rijmen, V., "The Rijndael Block Cipher",
1652 http://csrc.nist.gov/encryption/aes/rijndael/Rijndael.pdf,
1653 3rd September 1999.
1654
1655
1656 5.2 Informative references
1657
1658 [RFC 2195] Klensin, J., Catoe, R. and P. Krumviede, "IMAP/POP
1659 AUTHorize Extension for Simple Challenge/Response", RFC
1660 2195, September 1997.
1661
1662 [MD5] Kaliski, B.,Robshaw, M., "Message Authentication with MD5",
1663 CryptoBytes, Sping 1995, RSA Inc,
1664 (http://www.rsa.com/rsalabs/pubs/cryptobytes/spring95/md5.htm)
1665
1666 [RFC 2078] Linn, J., "Generic Security Service Application Program
1667 Interface, Version 2", RFC 2078, January 1997.
1668
1669 [RFC 3501] Crispin, M., "Internet Message Access Protocol - Version
1670 4rev1", RFC 3501, March 2003.
1671
1672 [RFC 2244] Newman, C., Myers, J., "ACAP -- Application Configuration
1673 Access Protocol", RFC 2244, November 1997.
1674
1675
1676
1677 Leach & Newman Expires: December 2003 [Page 28]
1678
1679
1680
1681
1682
1683 INTERNET DRAFT Digest SASL Mechanism June 2003
1684
1685
1686 [RFC 2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
1687 Masinter, L., Leach, P., Berners-Lee, T., "Hypertext
1688 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
1689
1690 [TLS-CBC] Moeller, B., "Security of CBC Ciphersuites in SSL/TLS:
1691 Problems and Countermeasures",
1692 http://www.openssl.org/~bodo/tls-cbc.txt.
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737 Leach & Newman Expires: December 2003 [Page 29]
1738
1739
1740
1741
1742
1743 INTERNET DRAFT Digest SASL Mechanism June 2003
1744
1745
1746 6 Authors' Addresses
1747
1748 Paul Leach
1749 Microsoft
1750 1 Microsoft Way
1751 Redmond, WA 98052, USA
1752
1753 EMail: paulle@microsoft.com
1754
1755
1756 Chris Newman
1757 Sun Microsystems
1758 1050 Lakes Drive
1759 West Covina, CA 91790, USA
1760
1761 EMail: Chris.Newman@Sun.COM
1762
1763
1764 Alexey Melnikov
1765 Isode
1766 28 Gloucester Road,
1767 Teddington, Middlesex, TW11 0NU, UK
1768
1769 Email: mel@isode.com
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797 Leach & Newman Expires: December 2003 [Page 30]
1798
1799
1800
1801
1802
1803 INTERNET DRAFT Digest SASL Mechanism June 2003
1804
1805
1806 7 ABNF
1807
1808 What follows is the definition of the notation as is used in the
1809 HTTP/1.1 specification [RFC 2616] and the HTTP authentication
1810 specification [Digest]; it is reproduced here for ease of reference.
1811 Since it is intended that a single Digest implementation can support
1812 both HTTP and SASL-based protocols, the same notation is used in both
1813 to facilitate comparison and prevention of unwanted differences.
1814 Since it is cut-and-paste from the HTTP specifications, not all
1815 productions may be used in this specification. It is also not quite
1816 legal ABNF; again, the errors were copied from the HTTP
1817 specifications.
1818
1819 7.1 Augmented BNF
1820
1821 All of the mechanisms specified in this document are described in
1822 both prose and an augmented Backus-Naur Form (BNF) similar to that
1823 used by RFC 822 [RFC 822]. Implementers will need to be familiar with
1824 the notation in order to understand this specification.
1825
1826 The augmented BNF includes the following constructs:
1827
1828 name = definition
1829 The name of a rule is simply the name itself (without any
1830 enclosing "<" and ">") and is separated from its definition by the
1831 equal "=" character. White space is only significant in that
1832 indentation of continuation lines is used to indicate a rule
1833 definition that spans more than one line. Certain basic rules are
1834 in uppercase, such as SP, LWS, HT, CRLF, DIGIT, ALPHA, etc. Angle
1835 brackets are used within definitions whenever their presence will
1836 facilitate discerning the use of rule names.
1837
1838 "literal"
1839 Quotation marks surround literal text. Unless stated otherwise,
1840 the text is case-insensitive.
1841
1842 rule1 | rule2
1843 Elements separated by a bar ("|") are alternatives, e.g., "yes |
1844 no" will accept yes or no.
1845
1846 (rule1 rule2)
1847 Elements enclosed in parentheses are treated as a single element.
1848 Thus, "(elem (foo | bar) elem)" allows the token sequences
1849 "elem foo elem" and "elem bar elem".
1850
1851 *rule
1852 The character "*" preceding an element indicates repetition. The
1853 full form is "<n>*<m>element" indicating at least <n> and at most
1854
1855
1856
1857 Leach & Newman Expires: December 2003 [Page 31]
1858
1859
1860
1861
1862
1863 INTERNET DRAFT Digest SASL Mechanism June 2003
1864
1865
1866 <m> occurrences of element. Default values are 0 and infinity so
1867 that "*(element)" allows any number, including zero; "1*element"
1868 requires at least one; and "1*2element" allows one or two.
1869
1870 [rule]
1871 Square brackets enclose optional elements; "[foo bar]" is
1872 equivalent to "*1(foo bar)".
1873
1874 N rule
1875 Specific repetition: "<n>(element)" is equivalent to
1876 "<n>*<n>(element)"; that is, exactly <n> occurrences of (element).
1877 Thus 2DIGIT is a 2-digit number, and 3ALPHA is a string of three
1878 alphabetic characters.
1879
1880 #rule
1881 A construct "#" is defined, similar to "*", for defining lists of
1882 elements. The full form is "<n>#<m>element" indicating at least
1883 <n> and at most <m> elements, each separated by one or more commas
1884 (",") and OPTIONAL linear white space (LWS). This makes the usual
1885 form of lists very easy; a rule such as
1886 ( *LWS element *( *LWS "," *LWS element ))
1887 can be shown as
1888 1#element
1889 Wherever this construct is used, null elements are allowed, but do
1890 not contribute to the count of elements present. That is,
1891 "(element), , (element) " is permitted, but counts as only two
1892 elements. Therefore, where at least one element is required, at
1893 least one non-null element MUST be present. Default values are 0
1894 and infinity so that "#element" allows any number, including zero;
1895 "1#element" requires at least one; and "1#2element" allows one or
1896 two.
1897
1898 ; comment
1899 A semi-colon, set off some distance to the right of rule text,
1900 starts a comment that continues to the end of line. This is a
1901 simple way of including useful notes in parallel with the
1902 specifications.
1903
1904 implied *LWS
1905 The grammar described by this specification is word-based. Except
1906 where noted otherwise, linear white space (LWS) can be included
1907 between any two adjacent words (token or quoted-string), and
1908 between adjacent words and separators, without changing the
1909 interpretation of a field. At least one delimiter (LWS and/or
1910 separators) MUST exist between any two tokens (for the definition
1911 of "token" below), since they would otherwise be interpreted as a
1912 single token.
1913
1914
1915
1916
1917 Leach & Newman Expires: December 2003 [Page 32]
1918
1919
1920
1921
1922
1923 INTERNET DRAFT Digest SASL Mechanism June 2003
1924
1925
1926 7.2 Basic Rules
1927
1928 The following rules are used throughout this specification to
1929 describe basic parsing constructs. The US-ASCII coded character set
1930 is defined by ANSI X3.4-1986 [USASCII].
1931
1932 OCTET = <any 8-bit character>
1933 CHAR = <any US-ASCII character (octets 0 - 127)>
1934 UPALPHA = <any US-ASCII uppercase letter "A".."Z">
1935 LOALPHA = <any US-ASCII lowercase letter "a".."z">
1936 ALPHA = UPALPHA | LOALPHA
1937 DIGIT = <any US-ASCII digit "0".."9">
1938 CTL = <any US-ASCII control character
1939 (octets 0 - 31) and DEL (127)>
1940 CR = <US-ASCII CR, carriage return (13)>
1941 LF = <US-ASCII LF, linefeed (10)>
1942 SP = <US-ASCII SP, space (32)>
1943 HT = <US-ASCII HT, horizontal-tab (9)>
1944 <"> = <US-ASCII double-quote mark (34)>
1945 TEXTCHAR = <any OCTET except CTLs, but including HT>
1946 CRLF = CR LF
1947
1948 All linear white space, including folding, has the same semantics as
1949 SP. A recipient MAY replace any linear white space with a single SP
1950 before interpreting the field value or forwarding the message
1951 downstream.
1952
1953 LWS = [CRLF] 1*( SP | HT )
1954
1955 The TEXT rule is only used for descriptive field contents and values
1956 that are not intended to be interpreted by the message parser. Words
1957 of TEXT contains characters either from ISO-8859-1 [ISO-8859]
1958 character set or UTF-8 [UTF-8].
1959
1960 TEXT = <any *OCTET except CTLs,
1961 but including LWS>
1962
1963 A CRLF is allowed in the definition of TEXT only as part of a header
1964 field continuation. It is expected that the folding LWS will be
1965 replaced with a single SP before interpretation of the TEXT value.
1966
1967 Hexadecimal numeric characters are used in several protocol elements.
1968
1969 HEX = "A" | "B" | "C" | "D" | "E" | "F"
1970 | "a" | "b" | "c" | "d" | "e" | "f" | DIGIT
1971
1972 Many HTTP/1.1 header field values consist of words separated by LWS
1973 or special characters. These special characters MUST be in a quoted
1974
1975
1976
1977 Leach & Newman Expires: December 2003 [Page 33]
1978
1979
1980
1981
1982
1983 INTERNET DRAFT Digest SASL Mechanism June 2003
1984
1985
1986 string to be used within a parameter value.
1987
1988 token = 1*TOKENCHAR
1989 separators = "(" | ")" | "<" | ">" | "@"
1990 | "," | ";" | ":" | "\" | <">
1991 | "/" | "[" | "]" | "?" | "="
1992 | "{" | "}" | SP | HT
1993 TOKENCHAR = <any CHAR except CTLs or separators>
1994
1995 A string of text is parsed as a single word if it is quoted using
1996 double-quote marks.
1997
1998 quoted-string = ( <"> qdstr-val <"> )
1999 qdstr-val = *( qdtext | quoted-pair )
2000 qdtext = <any TEXTCHAR except <"> and "\">
2001
2002 Note that LWS is NOT implicit between the double-quote marks (<">)
2003 surrounding a qdstr-val and the qdstr-val; any LWS will be considered
2004 part of the qdstr-val. This is also the case for quotation marks
2005 surrounding any other construct.
2006
2007 The backslash character ("\") MAY be used as a single-character
2008 quoting mechanism only within qdstr-val and comment constructs.
2009
2010 quoted-pair = "\" CHAR
2011
2012 The value of this construct is CHAR. Note that an effect of this rule
2013 is that backslash itself MUST be quoted.
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037 Leach & Newman Expires: December 2003 [Page 34]
2038
2039
2040
2041
2042
2043 INTERNET DRAFT Digest SASL Mechanism June 2003
2044
2045
2046 8 Sample Code
2047
2048 The sample implementation in [Digest] also applies to DIGEST-MD5.
2049
2050 The following code implements the conversion from UTF-8 to 8859-1 if
2051 necessary.
2052
2053 /* if the string is entirely in the 8859-1 subset of UTF-8, then
2054 * translate to 8859-1 prior to MD5
2055 */
2056 void MD5_UTF8_8859_1(MD5_CTX *ctx, const unsigned char *base,
2057 int len)
2058 {
2059 const unsigned char *scan, *end;
2060 unsigned char cbuf;
2061
2062 end = base + len;
2063 for (scan = base; scan < end; ++scan) {
2064 if (*scan > 0xC3) break; /* abort if outside 8859-1 */
2065 if (*scan >= 0xC0 && *scan <= 0xC3) {
2066 if (++scan == end || *scan < 0x80 || *scan > 0xBF)
2067 break;
2068 }
2069 }
2070 /* if we found a character outside 8859-1, don't alter string
2071 */
2072 if (scan < end) {
2073 MD5Update(ctx, base, len);
2074 return;
2075 }
2076
2077 /* convert to 8859-1 prior to applying hash
2078 */
2079 do {
2080 for (scan = base; scan < end && *scan < 0xC0; ++scan)
2081 ;
2082 if (scan != base) MD5Update(ctx, base, scan - base);
2083 if (scan + 1 >= end) break;
2084 cbuf = ((scan[0] & 0x3) << 6) | (scan[1] & 0x3f);
2085 MD5Update(ctx, &cbuf, 1);
2086 base = scan + 2;
2087 } while (base < end);
2088 }
2089
2090
2091
2092
2093
2094
2095
2096
2097 Leach & Newman Expires: December 2003 [Page 35]
2098
2099
2100
2101
2102
2103 INTERNET DRAFT Digest SASL Mechanism June 2003
2104
2105
2106 9 Interoperability considerations
2107
2108 9.1 Implementing DES cipher in CBC mode
2109
2110 Several cryptographic libraries (Ebones, OpenSSL) provide a convenience
2111 function des_cbc_encrypt for implementing DES cipher in CBC mode.
2112 There is a documented bug in this function: the function doesn't update
2113 IV before returning. If an implementation uses this function to implement
2114 DES cipher in CBC mode, it MUST update IV by copying the last 8 bytes of
2115 the des_cbc_encrypt's output to the IV buffer.
2116 Note that the function des_ede2_cbc_encrypt that may be used to implement
2117 3DES (in "two keys mode") in CBC mode works as expected.
2118
2119 Care must be taken when configuring the DES keys for most DES
2120 libraries. This specification gives 56 bits for the DES key (or 112
2121 bits for the 3DES key); libraries generally expect the key to be given
2122 in a 64 bit (128 bit for 3DES) form.
2123
2124 The following C function can be used to convert a 56 bit DES key into a
2125 form acceptable for the libraries. The low order bit in each byte
2126 would contain parity information and will be corrected by the library.
2127
2128 /* slide the first 7 bytes of 'inbuf' into the high seven bits of the
2129 first 8 bytes of 'keybuf'. 'keybuf' better be 8 bytes long or longer. */
2130 void slidebits(unsigned char *keybuf, unsigned char *inbuf)
2131 {
2132 keybuf[0] = inbuf[0];
2133 keybuf[1] = (inbuf[0]<<7) | (inbuf[1]>>1);
2134 keybuf[2] = (inbuf[1]<<6) | (inbuf[2]>>2);
2135 keybuf[3] = (inbuf[2]<<5) | (inbuf[3]>>3);
2136 keybuf[4] = (inbuf[3]<<4) | (inbuf[4]>>4);
2137 keybuf[5] = (inbuf[4]<<3) | (inbuf[5]>>5);
2138 keybuf[6] = (inbuf[5]<<2) | (inbuf[6]>>6);
2139 keybuf[7] = (inbuf[6]<<1);
2140 }
2141
2142 10 Acknowledgements
2143
2144 The following people had substantial contributions to the development
2145 and/or refinement of this document:
2146
2147 Lawrence Greenfield John Gardiner Myers Simon Josefsson RL Bob Morgan
2148 Jeff Hodges Claus Assmann Tony Hansen Sam Hartman
2149
2150 as well as other members of the SASL mailing list.
2151
2152 The text used is section 3.8 was taken from [TLS-CBC] by Bodo
2153 Moeller.
2154
2155
2156
2157 Leach & Newman Expires: December 2003 [Page 36]
2158
2159
2160
2161
2162
2163 INTERNET DRAFT Digest SASL Mechanism June 2003
2164
2165
2166 11 Full Copyright Statement
2167
2168 Copyright (C) The Internet Society (2003). All Rights Reserved.
2169
2170 This document and translations of it may be copied and furnished to
2171 others, and derivative works that comment on or otherwise explain it
2172 or assist in its implementation may be prepared, copied, published
2173 and distributed, in whole or in part, without restriction of any
2174 kind, provided that the above copyright notice and this paragraph are
2175 included on all such copies and derivative works. However, this
2176 document itself may not be modified in any way, such as by removing
2177 the copyright notice or references to the Internet Society or other
2178 Internet organizations, except as needed for the purpose of
2179 developing Internet standards in which case the procedures for
2180 copyrights defined in the Internet Standards process must be
2181 followed, or as required to translate it into languages other than
2182 English.
2183
2184 The limited permissions granted above are perpetual and will not be
2185 revoked by the Internet Society or its successors or assigns.
2186
2187 This document and the information contained herein is provided on an
2188 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
2189 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
2190 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
2191 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
2192 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
2193
2194 Acknowledgement
2195
2196 Funding for the RFC Editor function is currently provided by the
2197 Internet Society.
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217 Leach & Newman Expires: December 2003 [Page 37]
2218
2219
2220
2221
2222
2223 INTERNET DRAFT Digest SASL Mechanism June 2003
2224
2225
2226 Appendix A: Changes from 2831
2227
2228 1). Fixed various typos in formulas.
2229
2230 2). Dropped DES as mandatory to implement cipher (3DES is mandatory
2231 to implement).
2232
2233 3). Tighten ABNF. Fixed some bugs.
2234
2235 4). Clarified nc-value verification and which side is aborting
2236 exchange.
2237
2238 5). Added text saying that for interoperability
2239 username/password/realm MUST be prepared using the "SASLPrep" profile
2240 [SASLPrep] of the "stringprep" algorithm [StringPrep].
2241
2242 6). Clarified that unquoted version of the username, etc. used in A1
2243 calculation.
2244
2245 7). Various cleanup to References section. Split all references to
2246 Normative and Informative.
2247
2248 8). Added minimal and maximal limits on maxbuf. Clarified how to
2249 calculate max sender size.
2250
2251 9). Change ABNF for host to allow for IPv6 addresses. ABNF now
2252 references RFC 2373 and RFC 2396.
2253
2254 10). Added DES cipher interoperability section.
2255
2256 11). Added man-in-the-middle considerations for ciphers.
2257
2258 12). Clarified how sequence counters are modified.
2259
2260 13). Addition warnings about preventing reply/redirection attacks.
2261
2262 14). Specified that "charset" directive affects "realm" and doesn't
2263 affect
2264 "authzid".
2265
2266 15). Removed text that described that "authzid" is in Unicode in
2267 Normalization
2268 Form KC, encoded as UTF-8.
2269
2270 16). Clarified that rc4 state is not reset between two sent/received
2271 buffers
2272 of encoded data.
2273
2274
2275
2276
2277 Leach & Newman Expires: December 2003 [Page 38]
2278
2279
2280
2281
2282
2283 INTERNET DRAFT Digest SASL Mechanism June 2003
2284
2285
2286 17). Clarified that for DES/3DES the IV for the next buffer of
2287 encoded data is
2288 the last 8 bytes of the ciphertext.
2289
2290 18). Clarified how "maximal sender size" is calculated.
2291
2292 19). Prohibit an empty authzid.
2293
2294 20). Added AES cipher defined in "AES Ciphersuite for DIGEST-MD5 SASL
2295 mechanism"
2296 document (expired draft-ietf-sasl-digest-aes-00.txt).
2297
2298 21). Minor text clarifications.
2299
2300 Appendix B: Open Issues/ToDo List
2301
2302 1). The latest revision prohibits escaped characters in nonce/cnonce.
2303 This is different
2304 from HTTP Digest. Any objections?
2305
2306 2). Do we need/want a new stringprep profile for "realm"?
2307
2308 3). What to do about CBC mode attack that affects TLS document and
2309 DIGEST-MD5 as well?
2310
2311 One of the proposals is to drop DES/3DES ciphers and define a new one
2312 (e.g. AES) in such a way that is not susceptible to this kind of
2313 attack.
2314
2315 AES cipher has to be fixed to prevent this attack.
2316
2317 4). Add reference to CBC mode attack:
2318
2319 This problem is described in LASEC Memo "Password Interception in a
2320 SSL/TLS Channel" by Brice Canvel, published 2003-02-20:
2321 http://lasecwww.epfl.ch/memo_ssl.shtml
2322
2323 5). Normative vs. Informative references must be carefully rechecked.
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337 Leach & Newman Expires: December 2003 [Page 39]
2338
2339
0
1
2
3
4
5
6 INTERNET-DRAFT Kurt D. Zeilenga
7 Intended Category: Standards Track OpenLDAP Foundation
8 Expires in six months 27 October 2003
9
10
11 SASLprep: Stringprep profile for user names and passwords
12 <draft-ietf-sasl-saslprep-04.txt>
13
14
15 Status of Memo
16
17 This document is an Internet-Draft and is in full conformance with all
18 provisions of Section 10 of RFC 2026.
19
20 This document is intended to be, after appropriate review and
21 revision, submitted to the RFC Editor as a Standards Track document.
22 Distribution of this memo is unlimited. Technical discussion of this
23 document will take place on the IETF SASL mailing list
24 <ietf-sasl@imc.org>. Please send editorial comments directly to the
25 document editor <Kurt@OpenLDAP.org>.
26
27 Internet-Drafts are working documents of the Internet Engineering Task
28 Force (IETF), its areas, and its working groups. Note that other
29 groups may also distribute working documents as Internet-Drafts.
30 Internet-Drafts are draft documents valid for a maximum of six months
31 and may be updated, replaced, or obsoleted by other documents at any
32 time. It is inappropriate to use Internet-Drafts as reference
33 material or to cite them other than as ``work in progress.''
34
35 The list of current Internet-Drafts can be accessed at
36 <http://www.ietf.org/ietf/1id-abstracts.txt>. The list of
37 Internet-Draft Shadow Directories can be accessed at
38 <http://www.ietf.org/shadow.html>.
39
40 Copyright (C) The Internet Society (2003). All Rights Reserved.
41
42 Please see the Full Copyright section near the end of this document
43 for more information.
44
45
46 Abstract
47
48 This document describes how to prepare Unicode strings representing
49 user names and passwords for comparison. The document defines the
50 "SASLprep" profile of the "stringprep" algorithm to be used for both
51 user names and passwords. This profile is intended to be used by
52 Simple Authentication and Security Layer (SASL) mechanisms (such as
53 PLAIN, CRAM-MD5, and DIGEST-MD5) as well as other protocols exchanging
54
55
56
57 Zeilenga SASLprep [Page 1]
58
59 INTERNET-DRAFT draft-ietf-sasl-saslprep-04.txt 27 October 2003
60
61
62 user names and/or passwords.
63
64
65 1. Introduction
66
67 The use of simple user names and passwords in authentication and
68 authorization is pervasive on the Internet. To increase the
69 likelihood that user name and password input and comparison work in
70 ways that make sense for typical users throughout the world, this
71 document defines rules for preparing internationalized user names and
72 passwords for comparison. For simplicity and implementation ease, a
73 single algorithm is defined for both user names and passwords.
74
75 This document defines the "SASLprep" profile of the "stringprep"
76 algorithm [StringPrep].
77
78 The profile is designed for use in Simple Authentication and Security
79 Layer ([SASL]) mechanisms such as [PLAIN]. It may be applicable
80 elsewhere simple user names and passwords are used. This profile is
81 not intended to be used for arbitrary text. This profile is also not
82 intended to be used to prepare identity strings which are not simple
83 user names (e.g., e-mail addresses, domain names, distinguished
84 names).
85
86
87 2. The SASLprep profile
88
89 This section defines the "SASLprep" profile. This profile is intended
90 to be used to prepare strings representing simple user names and
91 passwords.
92
93 This profile uses Unicode 3.2, as defined in [StringPrep, A.1].
94
95 Character names in this document use the notation for code points and
96 names from the Unicode Standard [Unicode]. For example, the letter
97 "a" may be represented as either <U+0061> or <LATIN SMALL LETTER A>.
98 In the lists of mappings and the prohibited characters, the "U+" is
99 left off to make the lists easier to read. The comments for character
100 ranges are shown in square brackets (such as "[CONTROL CHARACTERS]")
101 and do not come from the standard.
102
103 Note: a glossary of terms used in Unicode can be found in [Glossary].
104 Information on the Unicode character encoding model can be found in
105 [CharModel].
106
107
108 2.1. Mapping
109
110
111
112
113 Zeilenga SASLprep [Page 2]
114
115 INTERNET-DRAFT draft-ietf-sasl-saslprep-04.txt 27 October 2003
116
117
118 This profile specifies:
119 - non-ASCII space characters [StringPrep, C.1.2] be mapped to SPACE
120 (U+0020), and
121
122 - the "commonly mapped to nothing" characters [StringPrep, B.1] be
123 mapped to nothing.
124
125
126
127 2.2. Normalization
128
129 This profile specifies using Unicode normalization form KC, as
130 described in Section 4 of [StringPrep].
131
132
133 2.3. Prohibited Output
134
135 This profile specifies the following characters:
136
137 - Non-ASCII space characters [StringPrep, C.1.2],
138 - ASCII control characters [StringPrep, C.2.1],
139 - Non-ASCII control characters [StringPrep, C.2.2],
140 - Private Use [StringPrep, C.3],
141 - Non-character code points [StringPrep, C.4],
142 - Surrogate code points [StringPrep, C.5],
143 - Inappropriate for plain text [StringPrep, C.6],
144 - Inappropriate for canonical representation [StringPrep, C.7],
145 - Change display properties or are deprecated [StringPrep, C.8], and
146 - Tagging characters [StringPrep, C.9].
147
148 are prohibited output.
149
150
151 2.4. Bidirectional characters
152
153 This profile specifies checking bidirectional strings as described in
154 [StringPrep, Section 6].
155
156
157 2.5. Unassigned Code Points
158
159 This profile specifies [StringPrep, A.1] table as its list of
160 unassigned code points.
161
162
163 3. Security Considerations
164
165 This profile is intended to used to prepare simple user names and
166
167
168
169 Zeilenga SASLprep [Page 3]
170
171 INTERNET-DRAFT draft-ietf-sasl-saslprep-04.txt 27 October 2003
172
173
174 passwords for comparison. It is not intended to be used for to
175 prepare identities which are not simple user names (e.g.,
176 distinguished names and domain names). Nor is the profile intended to
177 be used for simple user names which require different handling.
178 Protocols (or applications of those protocols) which have
179 application-specific identity forms and/or comparison algorithms
180 should use mechanisms specifically designed for these forms and
181 algorithms.
182
183 User names and passwords should be protected from eavesdropping.
184
185 General "stringprep" and Unicode security considerations apply. Both
186 are discussed in [StringPrep].
187
188
189 4. IANA Considerations
190
191 This document details the "SASLprep" profile of [StringPrep] protocol.
192 Upon Standards Action the profile should be registered in the
193 stringprep profile registry.
194
195 Name of this profile: SASLprep
196 RFC in which the profile is defined: This RFC
197 Indicator whether or not this is the newest version of the
198 profile: This is the first version of the SASPprep profile.
199
200
201 5. Acknowledgment
202
203 This document borrows text from "Preparation of Internationalized
204 Strings ('stringprep')" and "Nameprep: A Stringprep Profile for
205 Internationalized Domain Names", both by Paul Hoffman and Marc
206 Blanchet.
207
208 This document is a product of the IETF SASL WG.
209
210
211 6. Normative References
212
213 [StringPrep] Hoffman P. and M. Blanchet, "Preparation of
214 Internationalized Strings ('stringprep')",
215 draft-hoffman-rfc3454bis-xx.txt, a work in progress.
216
217 [SASL] Melnikov, A. (Editor), "Simple Authentication and
218 Security Layer (SASL)",
219 draft-ietf-sasl-rfc2222bis-xx.txt, a work in progress.
220
221 [Unicode] The Unicode Consortium, "The Unicode Standard, Version
222
223
224
225 Zeilenga SASLprep [Page 4]
226
227 INTERNET-DRAFT draft-ietf-sasl-saslprep-04.txt 27 October 2003
228
229
230 3.2.0" is defined by "The Unicode Standard, Version 3.0"
231 (Reading, MA, Addison-Wesley, 2000. ISBN 0-201-61633-5),
232 as amended by the "Unicode Standard Annex #27: Unicode
233 3.1" (http://www.unicode.org/reports/tr27/) and by the
234 "Unicode Standard Annex #28: Unicode 3.2"
235 (http://www.unicode.org/reports/tr28/).
236
237
238 7. Informative References
239
240 [Glossary] The Unicode Consortium, "Unicode Glossary",
241 <http://www.unicode.org/glossary/>.
242
243 [CharModel] Whistler, K. and M. Davis, "Unicode Technical Report
244 #17, Character Encoding Model", UTR17,
245 <http://www.unicode.org/unicode/reports/tr17/>, August
246 2000.
247
248 [CRAM-MD5] Nerenberg, L., "The CRAM-MD5 SASL Mechanism",
249 draft-ietf-sasl-crammd5-xx.txt, a work in progress.
250
251 [DIGEST-MD5] Leach, P., C. Newman, and A. Melnikov, "Using Digest
252 Authentication as a SASL Mechanism",
253 draft-ietf-sasl-rfc2831bis-xx.txt, a work in progress.
254
255 [PLAIN] Zeilenga, K. (Editor), "The Plain SASL Mechanism",
256 draft-ietf-sasl-plain-xx.txt, a work in progress.
257
258
259 8. Editor's Address
260
261 Kurt Zeilenga
262 OpenLDAP Foundation
263
264 Email: kurt@OpenLDAP.org
265
266
267 Intellectual Property Rights
268
269 The IETF takes no position regarding the validity or scope of any
270 intellectual property or other rights that might be claimed to pertain
271 to the implementation or use of the technology described in this
272 document or the extent to which any license under such rights might or
273 might not be available; neither does it represent that it has made any
274 effort to identify any such rights. Information on the IETF's
275 procedures with respect to rights in standards-track and
276 standards-related documentation can be found in BCP-11. Copies of
277 claims of rights made available for publication and any assurances of
278
279
280
281 Zeilenga SASLprep [Page 5]
282
283 INTERNET-DRAFT draft-ietf-sasl-saslprep-04.txt 27 October 2003
284
285
286 licenses to be made available, or the result of an attempt made to
287 obtain a general license or permission for the use of such proprietary
288 rights by implementors or users of this specification can be obtained
289 from the IETF Secretariat.
290
291 The IETF invites any interested party to bring to its attention any
292 copyrights, patents or patent applications, or other proprietary
293 rights which may cover technology that may be required to practice
294 this standard. Please address the information to the IETF Executive
295 Director.
296
297
298 Full Copyright
299
300 Copyright (C) The Internet Society (2003). All Rights Reserved.
301
302 This document and translations of it may be copied and furnished to
303 others, and derivative works that comment on or otherwise explain it
304 or assist in its implmentation may be prepared, copied, published and
305 distributed, in whole or in part, without restriction of any kind,
306 provided that the above copyright notice and this paragraph are
307 included on all such copies and derivative works. However, this
308 document itself may not be modified in any way, such as by removing
309 the copyright notice or references to the Internet Society or other
310 Internet organizations, except as needed for the purpose of
311 developing Internet standards in which case the procedures for
312 copyrights defined in the Internet Standards process must be followed,
313 or as required to translate it into languages other than English.
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337 Zeilenga SASLprep [Page 6]
338
0
1
2
3
4
5
6
7 Internet Draft K. Murchison
8 Category: Informational M. Crispin
9 Expires: March 2, 2004 28 August 2003
10
11
12 The LOGIN SASL Mechanism
13
14 <draft-murchison-sasl-login-00.txt>
15
16
17 Status of this Memo
18
19 This document is an Internet-Draft and is subject to all provisions
20 of Section 10 of RFC2026.
21
22 Internet-Drafts are working documents of the Internet Engineering
23 Task Force (IETF), its areas, and its working groups. Note that
24 other groups may also distribute working documents as
25 Internet-Drafts.
26
27 Internet-Drafts are draft documents valid for a maximum of six months
28 and may be updated, replaced, or obsoleted by other documents at any
29 time. It is inappropriate to use Internet-Drafts as reference
30 material or to cite them other than as "work in progress."
31
32 The list of current Internet-Drafts can be accessed at
33 http://www.ietf.org/1id-abstracts.html
34
35 The list of Internet-Draft Shadow Directories can be accessed at
36 http://www.ietf.org/shadow.html
37
38
39 Copyright Notice
40
41 Copyright (C) The Internet Society 2003. All Rights Reserved.
42
43
44 Abstract
45
46 This document documents the obsolete clear-text user/password Simple
47 Authentication and Security Layer (SASL) mechanism called the LOGIN
48 mechanism. The LOGIN mechanism was intended to be used, in
49 combination with data confidentiality services provided by a lower
50 layer, in protocols which lack a simple password authentication
51 command.
52
53
54
55
56
57
58 Expires: March 2, 2004 Murchison [Page 1]
59
60 Internet Draft LOGIN SASL Mechanism August 28, 2004
61
62
63
64 Conventions Used in the Document
65
66 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
67 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
68 document are to be interpreted as described in [KEYWORDS].
69
70
71 1. Background and Intended Usage
72
73 This document documents the obsolete LOGIN Simple Authentication and
74 Security Layer ([SASL]) mechanism which was in use in protocols with
75 no clear-text login command (e.g., [SMTP-AUTH]).
76
77 Note: The LOGIN SASL mechanism is obsoleted in favor of the PLAIN
78 SASL mechanism ([PLAIN]). The LOGIN mechanism is documented here
79 only for the purpose of backwards compatibility with legacy software.
80 Clients SHOULD implement the PLAIN SASL mechanism and use it whenever
81 offered by a server. The LOGIN SASL mechanism SHOULD NOT be used by
82 a client when other plaintext mechanisms are offered by a server.
83
84 The name associated with this mechanism is "LOGIN".
85
86 The LOGIN SASL mechanism does not provide a security layer. This
87 mechanism MUST NOT be used without adequate security protection as
88 the mechanism affords no integrity nor confidentiality protection
89 itself. The LOGIN SASL mechanism MUST NOT be advertised or used in
90 any configuration that prohibits the PLAIN mechanism or plaintext
91 LOGIN (or USER/PASS) command that sends passwords in the clear.
92
93
94 2. LOGIN SASL Mechanism
95
96 The authorization identity is the same string as the "username" in
97 the traditional (non-SASL) LOGIN or USER commands; the authorization
98 authenticator is the same string as the traditional "password". The
99 authentication identity is the same as the authorization identity in
100 this mechanism.
101
102 Only US-ASCII printable characters SHOULD be used in the username and
103 password to permit maximal interoperability. If non-US-ASCII
104 characters are used in a username, they MUST use UTF-8. Passwords
105 MAY contain arbitrary binary data excluding NUL, CR and LF
106 characters. However, if a password is supplied to the client as a
107 sequence of characters (e.g., a password dialog box), those
108 characters MUST be encoded as UTF-8.
109
110 The username MUST be less than 64 characters in length.
111
112
113
114 Expires: March 2, 2004 Murchison [Page 2]
115
116 Internet Draft LOGIN SASL Mechanism August 28, 2004
117
118
119 2.1. Client side of authentication protocol exchange
120
121 The client expects the server to issue a challenge. The client then
122 responds with the authorization identity. The client then expects
123 the server to issue a second challenge. The client then responds
124 with the authorization authenticator. The contents of both
125 challenges SHOULD be ignored.
126
127
128 2.2. Server side of authentication protocol exchange
129
130 The server issues the string "User Name" in challenge, and receives a
131 client response. This response is recorded as the authorization
132 identity. The server then issues the string "Password" in challenge,
133 and receives a client response. This response is recorded as the
134 authorization authenticator. The server must verify that the
135 authorization authenticator permits login as the authorization
136 identity.
137
138 Note: There is at least one widely deployed client which requires
139 that the challenge strings transmitted by the server be "Username:"
140 and "Password:" respectively. For this reason, server
141 implementations MAY send these challenge strings instead of those
142 listed above.
143
144
145 2.3. Example
146
147 This example shows the use of the LOGIN mechanism with the SMTP AUTH
148 command [SMTP-AUTH] under the protection of SMTP STARTTLS [SMTP-TLS].
149 The user name is "tim" and the password is "tanstaaftanstaaf". The
150 base64 encoding of the challenges and responses is part of the SMTP
151 AUTH command, not part of the LOGIN specification itself. "C:" and
152 "S:" indicate lines sent by the client and server respectively.
153
154 S: 220 smtp.example.com ESMTP server ready
155 C: EHLO test.example.com
156 S: 250-smtp.example.com
157 S: 250-STARTTLS
158 S: 250 AUTH CRAM-MD5
159 C: STARTTLS
160 S: 220 Ready to start TLS
161 <TLS negotiation, further commands are under TLS layer>
162 C: EHLO test.example.com
163 S: 250-smtp.example.com
164 S: 250 AUTH LOGIN CRAM-MD5
165 C: AUTH LOGIN
166 S: 334 VXNlciBOYW1lAA==
167
168
169
170 Expires: March 2, 2004 Murchison [Page 3]
171
172 Internet Draft LOGIN SASL Mechanism August 28, 2004
173
174
175 C: dGlt
176 S: 334 UGFzc3dvcmQA
177 C: dGFuc3RhYWZ0YW5zdGFhZg==
178 S: 235 Authentication successful.
179
180
181 3.
182 Security Considerations
183
184 The LOGIN mechanism relies upon an underlying encryption layer or
185 other secure channel for security. When used without an encryption
186 layer or secure channel, it is vulnerable to a common network
187 eavesdropping attack. Therefore the LOGIN mechanism MUST NOT be
188 advertised or used in any configuration that prohibits the PLAIN
189 mechanism or a plaintext LOGIN (or USER/PASS) command that sends
190 passwords in the clear.
191
192
193 4.
194 IANA Considerations
195
196 The registration for the LOGIN SASL mechanism follows:
197
198 SASL mechanism name: LOGIN
199 Security Considerations: See section 3 of this memo
200 Published specification: this memo
201 Person & email address to contact for futher information:
202 See section 7 of this memo
203 Intended usage: OBSOLETE
204 Owner/Change controller: See section 7 of this memo
205
206
207 5.
208 References
209
210
211 5.1.
212 Normative References
213
214
215 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
216 Requirement Levels", Harvard University, RFC 2119, March 1997.
217
218
219 [SASL] Melnikov, A., Ed., "Simple Authentication and Security Layer
220 (SASL)", Isode, draft-ietf-sasl-rfc2222bis-xx.txt, Work In
221 Progress.
222
223
224
225
226 Expires: March 2, 2004 Murchison [Page 4]
227
228 Internet Draft LOGIN SASL Mechanism August 28, 2004
229
230
231 5.2. Informative References
232
233
234 [PLAIN] Zeilenga, Kurt D., Ed., "The Plain SASL Mechanism",
235 OpenLDAP Foundation, draft-ietf-sasl-plain-xx.txt, Work In
236 Progress.
237
238
239 [SMTP-AUTH] Myers, J., "SMTP Service Extension for Authentication",
240 Netscape Communications, RFC 2554, March 1999.
241
242
243 [SMTP-TLS] Hoffman, P., "SMTP Service Extension for Secure SMTP
244 over Transport Layer Security", Internet Mail Consortium, RFC
245 3207, February 2002.
246
247
248
249 6. Acknowledgments
250
251 Thanks to Rob Siemborski for his input and feedback on this document.
252
253
254 7.
255 Author's Address
256
257 Kenneth Murchison
258 Oceana Matrix Ltd.
259 21 Princeton Place
260 Orchard Park, NY 14127
261
262 Phone: (716) 662-8973
263
264 EMail: ken@oceana.com
265
266
267
268
269 Mark R. Crispin
270 Networks and Distributed Computing
271 University of Washington
272 4545 15th Avenue NE
273 Seattle, WA 98105-4527
274
275 Phone: (206) 543-5762
276
277 EMail: MRC@CAC.Washington.EDU
278
279
280
281
282 Expires: March 2, 2004 Murchison [Page 5]
283
284 Internet Draft LOGIN SASL Mechanism August 28, 2004
285
286
287 8.
288 Intellectual Property Considerations
289
290 The IETF takes no position regarding the validity or scope of any
291 intellectual property or other rights that might be claimed to
292 pertain to the implementation or use of the technology described in
293 this document or the extent to which any license under such rights
294 might or might not be available; neither does it represent that it has
295 made any effort to identify any such rights. Information on the
296 IETF's procedures with respect to rights in standards-track and
297 standards-related documentation can be found in BCP-11. Copies of
298 claims of rights made available for publication and any assurances of
299 licenses to be made available, or the result of an attempt made to
300 obtain a general license or permission for the use of such proprietary
301 rights by implementors or users of this specification can be obtained
302 from the IETF Secretariat.
303
304 The IETF invites any interested party to bring to its attention any
305 copyrights, patents or patent applications, or other proprietary
306 rights which may cover technology that may be required to practice
307 this standard. Please address the information to the IETF Executive
308 Director.
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338 Expires: March 2, 2004 Murchison [Page 6]
339
340 Internet Draft LOGIN SASL Mechanism August 28, 2004
341
342
343 9.
344 Full Copyright Statement
345
346 Copyright (C) The Internet Society 2003. All Rights Reserved.
347
348 This document and translations of it may be copied and furnished to
349 others, and derivative works that comment on or otherwise explain it
350 or assist in its implmentation may be prepared, copied, published and
351 distributed, in whole or in part, without restriction of any kind,
352 provided that the above copyright notice and this paragraph are
353 included on all such copies and derivative works. However, this
354 document itself may not be modified in any way, such as by removing
355 the copyright notice or references to the Internet Society or other
356 Internet organizations, except as needed for the purpose of
357 developing Internet standards in which case the procedures for
358 copyrights defined in the Internet Standards process must be followed,
359 or as required to translate it into languages other than English.
360
361 The limited permissions granted above are perpetual and will not be
362 revoked by the Internet Society or its successors or assigns.
363
364 This document and the information contained herein is provided on an
365 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET
366 ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
367 INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
368 INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
369 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394 Expires: March 2, 2004 Murchison [Page 7]
395
0
1
2
3
4
5
6 Network Working Group C. Newman
7 Internet Draft: SASL C API Innosoft
8 Document: draft-newman-sasl-c-api-01.txt A. Melnikov
9 MessagingDirect
10 February 2003
11 Expires in six months
12
13
14 Simple Authentication and Security Layer C API
15
16
17 Status of this memo
18
19 This document is an Internet-Draft and is in full conformance with
20 all provisions of Section 10 of RFC2026 [RFC2026].
21
22 Internet-Drafts are working documents of the Internet Engineering
23 Task Force (IETF), its areas, and its working groups. Note that other
24 groups may also distribute working documents as Internet-Drafts.
25
26 Internet-Drafts are draft documents valid for a maximum of six months
27 and may be updated, replaced, or obsoleted by other documents at any
28 time. It is inappropriate to use Internet-Drafts as reference
29 material or to cite them other than as "work in progress."
30
31 The list of current Internet-Drafts can be accessed at
32 http://www.ietf.org/ietf/1id-abstracts.txt
33
34 The list of Internet-Draft Shadow Directories can be accessed at
35 http://www.ietf.org/shadow.html.
36
37 Abstract
38
39 Almost every protocol needs authentication. However, there does not
40 exist an authentication mechanism suitable for all organizations, nor
41 is it likely that a small fixed set of authentication mechanisms will
42 remain suitable. SASL [SASL] provides the on-the-wire framework for
43 authentication (and a security layer) which separates the design of
44 authentication mechanisms from the protocols in which they're used.
45
46 The SASL protocol model suggests a software architecture where
47 application protocols call a generic API to authenticate which in
48 turn calls a generic plug-in interface for extensible authentication
49 modules. This memo documents the API used in one implementation of
50 this architecture in the hope that it will be useful to others. An
51 associated memo documenting the plug-in interface is forthcoming.
52
53 1. Conventions Used in this Memo
54
55
56
57 Newman et al. Expires: August 2003 FORMFEED[Page 1]
58
59
60
61
62
63 INTERNET DRAFT SASL C API February 2003
64
65
66 The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
67 in this document are to be interpreted as defined in "Key words for
68 use in RFCs to Indicate Requirement Levels" [KEYWORDS].
69
70 This assumes familiarity the SASL [SASL] specification.
71
72 1.1. Concepts
73
74 The following concepts are necessary to understand this
75 specification.
76
77 realm
78 A realm is a name (usually a domain-style name) associated with a
79 set of users on a server. One realm may span multiple servers.
80 Alternatively, a single server may have multiple realms. Thus
81 there may be multiple users with the username "chris" on the same
82 server, each in a different realm. Some authentication mechanisms
83 have a special field for the realm (e.g., DIGEST-MD5). For other
84 mechanisms, a realm can be specified by the client by using the
85 syntax "username@realm" in the username field.
86
87 service
88 A service is a basic function provided by one or more protocols.
89 The GSSAPI service name [GSSAPI] registry is available at:
90
91 <http://www.iana.org/numbers.html#G>
92
93 This registry is used by SASL and the SASL API. The service name
94 may be used for service-specific passwords for advanced users, or
95 advanced authentication mechanisms may restrict the services a
96 given server may offer.
97
98
99 virtual domain
100 When a single server has multiple realms and there is a DNS server
101 entry for each realm pointing to the same server IP address, then
102 those realms are "virtual domains". Virtual domains are extremely
103 popular with web hosting services and are becoming more popular
104 with POP mail services. The key to providing virtual domain sup-
105 port is that the client informs the server of the domain it
106 believes it is speaking to either through a special protocol ele-
107 ment or by using a username of the form "user@realm".
108
109
110 2. Overview of the SASL C API
111
112 The SASL API is initialized once at process startup. The
113 sasl_server_init() and sasl_client_init() functions provide basic
114
115
116
117 Newman et al. Expires: August 2003 FORMFEED[Page 2]
118
119
120
121
122
123 INTERNET DRAFT SASL C API February 2003
124
125
126 initialization.
127
128 When a network connection occurs where SASL will be used, a connec-
129 tion-specific context is created for authentication with
130 sasl_client_new() or sasl_server_new(). The API implementation must
131 support multi-threaded servers and clients by creating the connection
132 context in a thread-safe fashion permitting multiple contexts in a
133 given process. At this point, the caller may adjust security policy
134 for the context, and the set of mechanisms which are enabled is
135 determined by requirements from the configuration or by the caller.
136
137 The server end of the API may request a list of enabled authentica-
138 tion mechanisms either in general or for a specific user. The client
139 may either select a single mechanism or request a list from the
140 server (if the SASL profile for the protocol in question supports
141 that) and pass the list to the API for automated mechanism selection
142 by configured policy.
143
144 The SASL exchange begins with sasl_client_start() which determines if
145 one of the desired mechanisms is available on the client and may gen-
146 erate an initial client response. The client then sends the appro-
147 priate protocol message to initiate the SASL exchange that the server
148 passes to sasl_server_start().
149
150 The SASL exchange continues with calls to sasl_client_step() and
151 sasl_server_step(), until the server indicates completion or the
152 client cancels the exchange.
153
154 The server queries the user name and user realm resulting from the
155 exchange with the sasl_getprop() routine.
156
157 A connection context is released with sasl_dispose() and process ter-
158 mination is indicated with sasl_done().
159
160 There are a number of utility functions and customization functions
161 available in the API for additional services.
162
163 Note, that all functions described in this documen can be implemented
164 as macroses, so an application using this API MUST NOT assume that
165 they are functions.
166
167 An application or library trying to use SASL API described in this
168 document must include "sasl.h" include file.
169
170 3. Basic SASL API Routines
171
172 This section describes the types and functions likely to be used by
173 every caller of the SASL API.
174
175
176
177 Newman et al. Expires: August 2003 FORMFEED[Page 3]
178
179
180
181
182
183 INTERNET DRAFT SASL C API February 2003
184
185
186 3.1. Basic SASL API Data Structures
187
188 The following datastructures are basic to the SASL API.
189
190 3.1.1. sasl_callback_t
191
192 The sasl_callback_t structure is used for the caller of the SASL API
193 to provide services to both the core SASL API and SASL plug-ins via
194 callbacks. The most important callback is the "getopt" callback (see
195 section 3.3.3) which is used to retrieve security policy option set-
196 tings from the caller's preferences.
197
198 typedef struct sasl_callback {
199 unsigned long id;
200 int (*proc)();
201 void *context;
202 } sasl_callback_t;
203
204 id is the label for the callback (XXX IANA registry needed), proc is
205 a function pointer whose exact type is determined by the id, and con-
206 text is a context variable which will be passed to the callback (usu-
207 ally as the first argument). The last callback in the list of call-
208 backs is indicated with an id of SASL_CB_LIST_END.
209
210 If proc is NULL, this means that the application doesn't want to
211 specify a corresponding callback, but would provide the necessary
212 data via interaction. See also section 3.1.4.
213
214 3.1.2. sasl_secret_t
215
216 The sasl_secret_t structure is used to hold text or binary passwords
217 for the client API.
218
219 typedef struct sasl_secret {
220 unsigned long len;
221 unsigned char data[1];
222 } sasl_secret_t;
223
224 The len field holds the length of the password, while the data field
225 holds the actual data. The structure is variable sized: enough space
226 must be reserved after the data field to hold the desired password.
227 An additional that binary passwords are permitted to contain '\0'
228 characters.
229
230 3.1.3. sasl_conn_t
231
232 The sasl_conn_t data type is an opaque data type which reflects the
233 SASL context for a single server connection. Only one SASL API call
234
235
236
237 Newman et al. Expires: August 2003 FORMFEED[Page 4]
238
239
240
241
242
243 INTERNET DRAFT SASL C API February 2003
244
245
246 using a given sasl_conn_t as an argument may be active at a time.
247 However, each sasl_conn_t is independent and thus the SASL API may be
248 used in a true multi-processor multi-threaded environment.
249
250 3.1.4. sasl_interact_t
251
252 The sasl_interact_t structure is used by sasl_client_start and
253 sasl_client_step to request certain information from the application,
254 when the application did not provide corresponding callbacks. For
255 example, an application may choose to present a single dialog to the
256 user in order to collect all required information interactively.
257
258 typedef struct sasl_interact {
259 unsigned long id;
260 const char *challenge;
261 const char *prompt;
262 const char *defresult;
263 const void *result;
264 unsigned len;
265 } sasl_interact_t;
266
267 The id field holds the value of the callback ID. The prompt field
268 contains a string that should be presented to the user. If non-NULL,
269 challenge is a NUL-terminated string that will allow the user to pre-
270 sent a specific credential when prompted. This is different from the
271 prompt in that the prompt is more like a label for a text box (for
272 example "Response:" while challenge is a string that tells the user
273 what specifically is required by the response (for example, an OTP
274 challenge string). The defresult field contains a default value, if
275 any. Upon return from sasl_client_* the "result" field points to the
276 defresult. The client must present the information in the challenge
277 and the prompt to the user and store the result and its length in the
278 result and the len fields respectively.
279
280 For example, SASL_CB_PASS interaction may contain the following
281 information:
282 id - SASL_CB_PASS
283 challenge - NULL
284 prompt - "Password:"
285 defresult - NULL (no default).
286
287 3.2. Basic SASL API Client Routines
288
289 This section discusses the functions likely to be used by every
290 client caller of the SASL API.
291
292 3.2.1. sasl_client_init function
293
294
295
296
297 Newman et al. Expires: August 2003 FORMFEED[Page 5]
298
299
300
301
302
303 INTERNET DRAFT SASL C API February 2003
304
305
306 Arguments:
307 sasl_callback_t *callbacks
308
309 Results:
310 SASL_OK -- Success
311 SASL_NOMEM -- Not enough memory
312 SASL_BADVERS -- Mechanism version mismatch
313 SASL_BADPARAM -- Error in config file
314
315 This function initializes the client routines for the SASL API.
316
317 The callbacks argument is the default list of callbacks (see sec-
318 tion 3.1.1 for definition of sasl_callback_t structure) and SHOULD
319 include the sasl_getopt_t callback (see section 3.3.3). The call-
320 backs may be NULL. On success, SASL_OK is returned, and on fail-
321 ure a SASL C API error code such as the ones listed above is
322 returned. This function may be called a second time to change the
323 default callbacks used for new connections, but the first call
324 must be made in a single-threaded environment. The data refer-
325 enced by the sasl_callback_t structure must persist until
326 sasl_done() is called.
327
328 3.2.2. sasl_client_new function
329
330 Arguments:
331 const char *service,
332 const char *server_name,
333 const char *iplocalport,
334 const char *ipremoteport,
335 const sasl_callback_t *prompt_supp,
336 unsigned int flags,
337 sasl_conn_t **pconn
338
339 Results:
340 SASL_OK -- Success
341 SASL_NOTINIT -- SASL API not initialized
342 SASL_NOMECH -- No mechanisms available
343 SASL_NOMEM -- Not enough memory
344
345 This function creates a client connection context variable. As
346 long as each thread uses its own connection context, the SASL C
347 API is thread-safe.
348
349 The service argument is an IANA registered GSSAPI service element
350 as defined in section 1.1. It MUST NOT be NULL.
351
352 The server_name is the host name or IP address of the server to
353 which the client is connecting. NULL may be used for server_name,
354
355
356
357 Newman et al. Expires: August 2003 FORMFEED[Page 6]
358
359
360
361
362
363 INTERNET DRAFT SASL C API February 2003
364
365
366 but may result in advanced mechanisms such as Kerberos being
367 unavailable.
368
369 The iplocalport is the string with the client IPv4/IPv6 address,
370 followed by ":" and than by port number. An IPv6 address must be
371 enclosed in "[" and "]". NULL may be used for iplocalport, but may
372 result in mechanisms requiring IP address being unavailable.
373
374 The ipremoteport is the string with the server IPv4/IPv6 address,
375 followed by ":" and than by port number. An IPv6 address must be
376 enclosed in "[" and "]". NULL may be used for ipremoteport, but
377 may result in mechanisms requiring IP address being unavailable.
378
379 User input to the SASL C API may be provided in two ways: either
380 by supplying callbacks (prompt_supp) to this function, or by using
381 an interaction model with the sasl_client_start/sasl_client_step
382 functions. Callbacks are more convenient to obtain information
383 programmatically, such as pulling authentication information
384 directly from a configuration file. Interactions are more conve-
385 nient if one wants to get all the data in parallel, for example by
386 displaying a single dialog box instead of a separate popup for
387 authentication name, authorization, password, etc.
388
389 The prompt_supp is a list of supported user prompting callbacks
390 discussed in the section 3.1.1. The prompt_supp argument MAY be
391 NULL, which means that interactions (i.e. prompt_need parameter to
392 sasl_client_start (see 3.2.3) and sasl_client_step (see 3.2.4))
393 are used instead of callbacks. If prompt_supp is NULL, the
394 prompt_need argument to sasl_client_start (see 3.2.3) and
395 sasl_client_step (see 3.2.4) MUST NOT be NULL.
396
397 The flags argument represents client-supported security flags.
398 The only values currently supported are SASL_SECURITY_LAYER to
399 indicate the client supports the SASL security layer, or 0 to
400 indicate it doesn't.
401
402 The pconn argument is set to point to the newly created connection
403 context. The sasl_conn_t type is opaque to the calling applica-
404 tion.
405
406 3.2.3. sasl_client_start function
407
408
409
410
411
412
413
414
415
416
417 Newman et al. Expires: August 2003 FORMFEED[Page 7]
418
419
420
421
422
423 INTERNET DRAFT SASL C API February 2003
424
425
426 Arguments:
427 sasl_conn_t *conn,
428 const char *mechlist,
429 sasl_interact_t **prompt_need,
430 const char **clientout,
431 unsigned int *clientoutlen,
432 const char **mech
433
434 Results:
435 SASL_NOTINIT -- SASL API not initialized
436 SASL_BADPARAM -- conn or mechlist is NULL
437 SASL_NOMECH -- No matching mechanisms available
438 SASL_NOMEM -- Not enough memory
439 SASL_INTERACT -- User interaction needed to continue
440 (see prompt_need description below)
441 SASL_OK -- Success
442
443 This selects an authentication mechanism to use and optionally
444 generates an initial client response.
445
446 The conn argument is the connection context from sasl_client_new.
447
448 The mechlist argument is a '\0' terminated string containing one
449 or more SASL mechanism names. All characters in the string that
450 are not permitted in a SASL mechanism name [SASL] are ignored
451 except for the purposes of delimiting mechanism names (this per-
452 mits passing direct results from many protocol capability lists
453 unparsed). Unknown mechanism names are ignored (although
454 SASL_NOMECH is returned if no known mechanisms are found). Mecha-
455 nisms are tried in an implementation-dependent order. Implementa-
456 tions SHOULD try to use the most secure mechanism possible, within
457 the constraints specified by the application (e.g. SSF value).
458
459 For applications which support interactions, the prompt_need argu-
460 ment should initially point to a NULL pointer. If the selected
461 mechanism needs information from the user (for example, username
462 or password), then prompt_need will be set to point to an array of
463 sasl_interact_t structures (terminated by an entry with id equal
464 to SASL_CB_LIST_END), and sasl_client_start will return
465 SASL_INTERACT. After that the client must fill in the requested
466 information and call this function again with the same parameters.
467
468 Applications that do not support interactions MUST pass NULL for
469 prompt_need.
470
471 The clientout and clientoutlen parameters are set to the initial
472 client response, if any. If a protocol's SASL profile uses base64
473 encoding, this represents the data prior to the encoding (see
474
475
476
477 Newman et al. Expires: August 2003 FORMFEED[Page 8]
478
479
480
481
482
483 INTERNET DRAFT SASL C API February 2003
484
485
486 sasl_encode64). If a protocol's SASL profile doesn't include an
487 optional initial client response, then these may be NULL and 0
488 respectively. The memory used by clientout is interally managed by
489 the SASL API and may be overwritten on the next call to
490 sasl_client_step or a call to sasl_dispose.
491
492 The mech argument is set to point to a '\0' terminated string
493 specifying the mechanism actually selected using all uppercase
494 letters. It may be NULL if the client does not care which mecha-
495 nism was selected from mechlist.
496
497 If sasl_client_start is called a second time using the same con-
498 nection context, it will discard any cached information (e.g., the
499 username and password) and restart the exchange from the begin-
500 ning. <<???>>
501
502 3.2.4. sasl_client_step function
503
504 Arguments:
505 sasl_conn_t *conn,
506 const char *serverin,
507 unsigned int serverinlen,
508 sasl_interact_t **prompt_need,
509 const char **clientout,
510 unsigned int *clientoutlen
511
512 Results:
513 SASL_NOTINIT -- SASL API not initialized
514 SASL_NOMECH -- sasl_client_start not called
515 SASL_BADPROT -- server protocol incorrect/cancelled
516 SASL_BADSERV -- server failed mutual auth
517 SASL_INTERACT -- user interaction needed
518 SASL_OK -- success
519
520 This routine performs one step in an authentication sequence.
521
522 The conn argument must be a connection context created by
523 sasl_client_new and used in a previous call to sasl_client_start.
524
525 The serverin and serverinlen parameters hold the SASL octet string
526 received from the server. Note that for those SASL profiles which
527 base64 encode the exchange, this is the result after the removal
528 of the base64 encoding (see the sasl_decode64 routine below). The
529 serverin MUST have a terminating NUL character not counted by
530 serverinlen
531
532 The prompt_need argument is the same as for sasl_client_start.
533
534
535
536
537 Newman et al. Expires: August 2003 FORMFEED[Page 9]
538
539
540
541
542
543 INTERNET DRAFT SASL C API February 2003
544
545
546 The clientout and clientoutlen parameters hold the SASL octet
547 string to encode (if necessary) and send to the server.
548
549 3.3. Basic SASL API Callback Routines
550
551 This section describes the basic callback functions needed for a
552 simple client implementation. See the definition of sasl_call-
553 back_t in section 3.1.1 for a description of the basic callback
554 structure.
555
556 3.3.1. sasl_getsimple_t
557
558 Arguments:
559 void *context,
560 int id,
561 const char **result,
562 unsigned *len
563
564 Results:
565 SASL_OK -- success
566 SASL_FAIL -- error
567
568 This callback is used by the SASL API to request a simple constant
569 string from the application. This is used with id SASL_CB_USER
570 for the username, SASL_CB_AUTHNAME for the authentication name (if
571 different), and SASL_CB_LANGUAGE for a comma separated list of RFC
572 1766 language tags.
573
574 The context is the context variable from the sasl_callback_t
575 structure, the id is the id from the sasl_callback_t structure,
576 and the callback is expected to set the result to a constant
577 string and the len to the length of that string. The result and
578 len parameters are never NULL.
579
580 3.3.2. sasl_getsecret_t
581
582 Arguments:
583 sasl_conn_t *conn,
584 void *context,
585 int id,
586 sasl_secret_t **psecret
587
588 Results:
589 SASL_OK -- success
590 SASL_FAIL -- error
591
592 This callback is expected to create, prompt or locate a secret and
593 set it in the connection context with sasl_setprop. The conn
594
595
596
597 Newman et al. Expires: August 2003 FORMFEED[Page 10]
598
599
600
601
602
603 INTERNET DRAFT SASL C API February 2003
604
605
606 argument is the connection context, the context and id parameters
607 are from the sasl_callback_t structure. The id SASL_CB_PASS is
608 used to request a clear text password.
609
610 3.3.3. sasl_getopt_t
611
612 Arguments:
613 void *context,
614 const char *plugin_name,
615 const char *option,
616 const char **result,
617 unsigned int *len
618
619 Results:
620 SASL_OK -- success
621 SASL_FAIL -- error
622
623 This callback is used by the SASL API to read options from the
624 application. This allows a SASL configuration to be encapsulated
625 in the caller's configuration system. Configuration items may be
626 mechanism-specific and are arbitrary strings. If the application
627 does not provide a sasl_getopt_t callback, then the API MAY obtain
628 configuration information from other sources, for example from a
629 config file.
630
631 The context is the context variable from the sasl_callback_t
632 structure, the plugin_name is the name of plugin (or NULL), the
633 option is the option name, and the callback is expected to set the
634 result to a string valid till next call to sasl_getopt_t in the
635 same thread and the len to the length of that string. The result
636 and len parameters are never NULL. If the name of plugin is NULL,
637 a general SASL option is requested, otherwise a plugin specific
638 version.
639
640 3.4. Basic SASL C API Utility Routines
641
642 This section describes utility functions provided as part of the
643 SASL API which may be used both by clients and servers.
644
645 3.4.1. sasl_decode64 function
646
647
648
649
650
651
652
653
654
655
656
657 Newman et al. Expires: August 2003 FORMFEED[Page 11]
658
659
660
661
662
663 INTERNET DRAFT SASL C API February 2003
664
665
666 Arguments:
667 const char *in,
668 unsigned int inlen,
669 char *out,
670 unsigned int outmax,
671 unsigned int *outlen
672
673 Results:
674 SASL_BUFOVER -- output buffer too small
675 SASL_BADPROT -- invalid base64 string
676 SASL_OK -- successful decode
677
678 This utility routine converts a base64 string of length inlen
679 pointed by in into an octet string. It is useful for SASL profiles
680 which use base64 such as the IMAP [IMAP4] and POP [POP-AUTH] pro-
681 files. The output is copied to the buffer specified by the out
682 parameter. It is NUL terminated and the length of the output is
683 placed in the outlen parameter if outlen is non-NULL. The lenght
684 doesn't include the terminating NUL character.
685
686 When the size of the output buffer, as specified by outmax, is too
687 small, the function returns SASL_BUFOVER error code and the
688 required length is stored in the outlen parameter if it is not
689 NULL.
690
691 The function may also return SASL_BADPROT error code when it
692 encounters an invalid base64 character.
693
694 3.4.2. sasl_encode64 function
695
696 Arguments:
697 const char *in,
698 unsigned int inlen,
699 char *out,
700 unsigned int outmax,
701 unsigned int *outlen
702
703 Results:
704 SASL_BUFOVER -- output buffer too small
705 SASL_OK -- successful decode
706
707 This utility routine converts an octet string of length inlen
708 pointed by in into a base64 string. It is useful for SASL profiles
709 which use base64 such as the IMAP [IMAP4] and POP [POP-AUTH] pro-
710 files.
711
712 The output is copied to the buffer specified by the out parameter.
713 It is NUL terminated and the length of the output is placed in the
714
715
716
717 Newman et al. Expires: August 2003 FORMFEED[Page 12]
718
719
720
721
722
723 INTERNET DRAFT SASL C API February 2003
724
725
726 outlen parameter if outlen is non-NULL. The lenght doesn't include
727 the terminating NUL character.
728
729 When the size of the output buffer, as specified by outmax, is too
730 small, the function returns SASL_BUFOVER error code and the
731 required length is stored in the outlen parameter if it is not
732 NULL.
733
734 3.4.3. sasl_errstring function
735
736 Arguments:
737 int saslerr,
738 const char *langlist,
739 const char **outlang
740
741 Results:
742 const char *
743
744 This converts a SASL error number into a constant string. The
745 second argument MAY be NULL for the default language, or a comma-
746 separated list of RFC 1766 language tags. The final parameter is
747 set to the RFC 1766 language tag of the string returned which will
748 be "i-default" if no matching language is found. The strings are
749 UTF-8. This requires no context so it may be used for the result
750 of an sasl_*_init or sasl_*_new result code.
751
752 3.4.4. sasl_errdetail function
753
754 Arguments:
755 sasl_conn_t *conn
756
757 Results:
758 const char *
759
760 This converts the last SASL error code that occured on a connec-
761 tion to UTF8 string. It uses the SASL_CB_LANGUAGE callback (see
762 section 3.3.1) to determine the language to use. It may return
763 more detailed information than sasl_errstring does.
764
765 3.4.5. sasl_seterror function
766
767
768
769
770
771
772
773
774
775
776
777 Newman et al. Expires: August 2003 FORMFEED[Page 13]
778
779
780
781
782
783 INTERNET DRAFT SASL C API February 2003
784
785
786 Arguments:
787 sasl_conn_t *conn
788 unsigned flags,
789 const char *fmt,
790 ...
791
792 Results:
793 none
794
795 This function sets sets the error string which will be returned by
796 sasl_errdetail. It uses syslog()-style formatting (i.e. printf-
797 style with %m as the string form of an errno error).
798
799 Messages should be sensitive to the current language setting. If
800 there is no SASL_CB_LANGUAGE callback for the connection, text
801 MUST be in US-ASCII. Otherwise UTF-8 is used and use of RFC 2482
802 for mixed-language text is encouraged.
803
804 <<This will also trigger a call to the SASL logging callback (if
805 any) with a level of SASL_LOG_FAIL unless the SASL_NOLOG flag is
806 set.>>
807
808 This function may be used by server callbacks.
809
810 If conn is NULL, the function does nothing.
811
812 3.4.6. sasl_erasebuffer function
813
814 Arguments:
815 char *buf,
816 unsigned len
817
818 Results:
819 none
820
821 This function fills the buffer buf of the lenght len with '\0'
822 characters. The function may be used to clear from memory sensi-
823 tive informations, like passwords.
824
825 3.5. Basic SASL C API Server Routines
826
827 This section describes the basic routines for a server implementa-
828 tion of a SASL profile.
829
830 3.5.1. sasl_server_init function
831
832
833
834
835
836
837 Newman et al. Expires: August 2003 FORMFEED[Page 14]
838
839
840
841
842
843 INTERNET DRAFT SASL C API February 2003
844
845
846 Arguments:
847 const sasl_callback_t *callbacks,
848 const char *appname
849
850 Results:
851 SASL_BADPARAM -- error in config file
852 SASL_NOMEM -- out of memory
853 SASL_BADVERS -- Plug-in version mismatch
854 SASL_OK -- success
855
856 This function initializes the server routines for the SASL C API.
857
858 The callbacks argument is the default list of callbacks (see sec-
859 tion 3.1.1 for definition of sasl_callback_t structure) and SHOULD
860 include the sasl_getopt_t callback (see section 3.3.3). The call-
861 backs may be NULL. The appname argument is the name of the calling
862 application and may be used by server plug-ins for logging. On
863 success, SASL_OK is returned, and on failure a SASL C API error
864 code is returned. This function may be called a second time to
865 change the default callbacks, but the first call must be made in a
866 single-threaded environment. The data referenced by the
867 sasl_callback_t structure must persist until sasl_done() is
868 called.
869
870 appname specifies the application name. SASL API may use it, for
871 example, for logging or to read an application specific configura-
872 tion. A library must pass NULL as appname. appname can be also be
873 set with sasl_setprop function, and can be queried with sasl_get-
874 prop. <<Specify option name here>>
875
876 3.5.2. sasl_server_new function
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897 Newman et al. Expires: August 2003 FORMFEED[Page 15]
898
899
900
901
902
903 INTERNET DRAFT SASL C API February 2003
904
905
906 Arguments:
907 const char *service,
908 const char *serverFQDN,
909 const char *user_realm,
910 const char *iplocalport,
911 const char *ipremoteport,
912 const sasl_callback_t *callbacks,
913 unsigned int flags,
914 sasl_conn_t **pconn
915
916 Results:
917 SASL_OK -- success
918 SASL_NOTINIT -- SASL API not initialized
919 SASL_BADPARAM -- Invalid parameter supplied
920 SASL_NOMECH -- No mechanisms available
921 SASL_NOMEM -- Not enough memory
922
923 This function creates a server connection context variable. As
924 long as each thread uses its own connection context, the SASL C
925 API is thread-safe.
926
927 The service argument is an IANA registered GSSAPI service element
928 as defined in section 1.1. It MUST NOT be NULL.
929
930 The serverFQDN is the fully qualified name of the server. It MUST
931 NOT be NULL.
932
933 The user_realm specifies the default realm. A realm defines a set
934 of users on the system for systems which support multiple user
935 communities ("realms"). If user_realm is NULL, the value of
936 serverFQDN is used as the default realm.
937
938 The iplocalport is the string with the server IPv4/IPv6 address,
939 followed by ":" and than by port number. An IPv6 address must be
940 enclosed in "[" and "]". NULL may be used for iplocalport, but may
941 result in mechanisms requiring IP address being unavailable.
942
943 The ipremoteport is the string with the client IPv4/IPv6 address,
944 followed by ":" and than by port number. An IPv6 address must be
945 enclosed in "[" and "]". NULL may be used for ipremoteport, but
946 may result in mechanisms requiring IP address being unavailable.
947
948 The callbacks argument is a set of server callbacks which may
949 include a connection-specific sasl_getopt_t and/or an authoriza-
950 tion routine.
951
952 The flags argument represents server-supported security flags. The
953 only values currently supported are SASL_SECURITY_LAYER to
954
955
956
957 Newman et al. Expires: August 2003 FORMFEED[Page 16]
958
959
960
961
962
963 INTERNET DRAFT SASL C API February 2003
964
965
966 indicate the server supports the SASL security layer, or 0 to
967 indicate it doesn't.
968
969 The pconn argument is set to point to the newly created connection
970 context.
971
972 3.5.3. sasl_server_start function
973
974 Arguments:
975 sasl_conn_t *conn,
976 const char *mech,
977 const char *clientin,
978 insigned int clientinlen,
979 const char **serverout,
980 unsigned int *serveroutlen
981
982 Results:
983 SASL_CONTINUE -- Another authentication step required
984 SASL_OK -- Authentication Complete
985 SASL_NOTINIT -- SASL API not initialized
986 SASL_BADPARAM -- Invalid parameter supplied
987 SASL_BADPROT -- Client protocol error
988 SASL_NOMECH -- Mechanism not supported
989 SASL_NOVERIFY -- User exists, but no verifier exists for
990 the mechanism
991 SASL_TRANS -- A password transition is needed to use mechanism
992
993 This begins an authentication exchange and is called after the
994 client sends the initial authentication command. The mech argu-
995 ment is the mechanism name the client is requesting. If the
996 client includes an optional initial-response, it is passed in the
997 clientin and clientinlen fields. Otherwise NULL and 0 are passed
998 for those arguments. The serverout and serveroutlen are filled in
999 with the server response, if any. If SASL_CONTINUE is returned,
1000 the server will need to wait for another client message and call
1001 sasl_server_step. If SASL_OK is returned, the authentication is
1002 completed successfully, although server out data may be supplied.
1003
1004 3.5.4. sasl_server_step function
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017 Newman et al. Expires: August 2003 FORMFEED[Page 17]
1018
1019
1020
1021
1022
1023 INTERNET DRAFT SASL C API February 2003
1024
1025
1026 Arguments:
1027 sasl_conn_t *conn,
1028 const char *clientin,
1029 insigned int clientinlen,
1030 const char **serverout,
1031 unsigned int *serveroutlen
1032
1033 Results:
1034 SASL_CONTINUE -- Another authentication step required
1035 SASL_OK -- Authentication Complete
1036 SASL_NOTINIT -- SASL API not initialized
1037 SASL_NOMECH -- sasl_server_start not called
1038 SASL_BADPARAM -- Invalid parameter supplied
1039 SASL_BADPROT -- Client protocol error
1040 SASL_NOVERIFY -- User exists, but no verifier exists for
1041 the mechanism
1042 SASL_TRANS -- A password transition is needed to use mechanism
1043
1044 This routine performs one step in an authentication sequence.
1045
1046 The conn argument must be a connection context created by
1047 sasl_server_new and used in a previous call to sasl_server_start.
1048
1049 The clientin and clientinlen parameters hold the SASL octet string
1050 received from the client. Note that for those SASL profiles which
1051 base64 encode the exchange, this is the result after the removal
1052 of the base64 encoding (see the sasl_decode64 routine). The cli-
1053 entin MUST have a terminating NUL character not counted by
1054 serverinlen.
1055
1056 The serverout and serveroutlen parameters hold the SASL octet
1057 string to encode (if necessary) and send to the client. If
1058 SASL_CONTINUE is returned, the server will need to wait for
1059 another client message and call sasl_server_step. If SASL_OK is
1060 returned, the authentication is completed successfully, although
1061 server out data may be supplied.
1062
1063 3.6. Common SASL API Routines
1064
1065 This section describes the routines that are common to both
1066 clients and servers.
1067
1068 3.6.1. sasl_listmech function
1069
1070
1071
1072
1073
1074
1075
1076
1077 Newman et al. Expires: August 2003 FORMFEED[Page 18]
1078
1079
1080
1081
1082
1083 INTERNET DRAFT SASL C API February 2003
1084
1085
1086 Arguments:
1087 sasl_conn_t *conn,
1088 const char *user,
1089 const char *prefix,
1090 const char *sep,
1091 const char *suffix,
1092 char **result,
1093 unsigned int *plen,
1094 unsigned *pcount
1095
1096 Results:
1097 SASL_OK -- Success
1098 SASL_NOMEM -- Not enough memory
1099 SASL_NOMECH -- No enabled mechanisms
1100
1101 This returns a list of enabled SASL mechanisms in a NUL-terminated
1102 string. The list is constructed by placing the prefix string at
1103 the beginning, placing the sep string between any pair of mecha-
1104 nisms and placing the suffix string at the end.
1105
1106 When calling this function plen and pcount MAY be NULL.
1107
1108 This function returns the list of client side SASL mechanisms, if
1109 the conn was created by sasl_client_new and the list of server
1110 side mechanisms, if the conn was created by sasl_server_new. The
1111 list returned by this function must persist till a next call to
1112 sasl_free_listmech or sasl_listmech.
1113
1114 3.6.2. sasl_free_listmech function
1115
1116 Arguments:
1117 sasl_conn_t *conn,
1118 char **result
1119
1120 Results:
1121 none
1122
1123 This disposes of the result string returned by sasl_listmech.
1124
1125 3.6.3. sasl_setprop function
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137 Newman et al. Expires: August 2003 FORMFEED[Page 19]
1138
1139
1140
1141
1142
1143 INTERNET DRAFT SASL C API February 2003
1144
1145
1146 Arguments:
1147 sasl_conn_t *conn,
1148 int propnum,
1149 const void *value
1150
1151 Results:
1152 SASL_OK -- property set
1153 SASL_BADPARAM -- invalid propnum or value
1154 SASL_NOMEM -- not enough memory to perform operation
1155
1156 This sets a property in a connection context. Commonly used prop-
1157 erties with their descriptions are listed below:
1158
1159 SASL_SSF_EXTERNAL
1160
1161 Security layer strength factor (SSF) -- an unsigned integer usable
1162 by the caller to specify approximate security layer strength
1163 desired. It roughly corresponds to the effective key length for
1164 encryption, e.g.
1165 0 = no protection
1166 1 = integrity protection only >1 = key lenght of the cipher
1167
1168 SASL_SSF_EXTERNAL property denotes SSF of the external security
1169 layer (e.g. provided by TLS). The value parameter points to
1170 sasl_ssf_t, that is described as follows:
1171
1172 typedef unsigned sasl_ssf_t;
1173
1174
1175
1176 SASL_SEC_PROPS
1177
1178 The value parameter for SASL_SEC_PROPS points to sasl_secu-
1179 rity_properties_t structure defined below. A particular implemen-
1180 tation may extend it with additional fields.
1181
1182 typedef struct sasl_security_properties
1183 {
1184 sasl_ssf_t min_ssf;
1185 sasl_ssf_t max_ssf;
1186
1187 unsigned maxbufsize;
1188
1189 /* bitfield for attacks to protect against */
1190 unsigned security_flags;
1191 } sasl_security_properties_t;
1192
1193 The min_ssf and the max_ssf define the minimal and the maximal
1194
1195
1196
1197 Newman et al. Expires: August 2003 FORMFEED[Page 20]
1198
1199
1200
1201
1202
1203 INTERNET DRAFT SASL C API February 2003
1204
1205
1206 acceptable SSF.
1207
1208 The maxbufsize specifies the biggest buffer size that the
1209 client/server is able to decode. 0 means that security layer is
1210 not supported.
1211
1212 The security_flags is a bitmask of the various security flags
1213 described below:
1214
1215 SASL_SEC_NOPLAINTEXT -- don't permit mechanisms susceptible to simple
1216 passive attack (e.g., PLAIN, LOGIN)
1217 SASL_SEC_NOACTIVE -- protection from active (non-dictionary) attacks
1218 during authentication exchange.
1219 Authenticates server.
1220 SASL_SEC_NODICTIONARY -- don't permit mechanisms susceptible to passive
1221 dictionary attack
1222 SASL_SEC_FORWARD_SECRECY -- require forward secrecy between sessions
1223 (breaking one won't help break next)
1224 SASL_SEC_NOANONYMOUS -- don't permit mechanisms that allow anonymous login
1225 SASL_SEC_PASS_CREDENTIALS -- require mechanisms which pass client
1226 credentials, and allow mechanisms which can pass
1227 credentials to do so
1228 SASL_SEC_MUTUAL_AUTH -- require mechanisms which provide mutual
1229 authentication
1230
1231 SASL_AUTH_EXTERNAL
1232
1233 The value parameter for SASL_AUTH_EXTERNAL property points to the
1234 external authentication ID as provided by external authentication
1235 method, e.g. TLS, PPP or IPSec.
1236
1237 3.6.4. sasl_getprop function
1238
1239 Arguments:
1240 sasl_conn_t *conn,
1241 int propnum,
1242 const void **pvalue
1243
1244 Results:
1245 SASL_OK -- Success
1246 SASL_NOTDONE -- Authentication exchange must complete prior to
1247 retrieving this attribute
1248 SASL_BADPARAM -- bad property number
1249
1250 This requests a pointer to a constant property available through
1251 the SASL API. The most common use by servers is to get the
1252 SASL_USERNAME property which returns the authorization identity
1253 (user to login as) from the SASL mechanism as a UTF-8 string in
1254
1255
1256
1257 Newman et al. Expires: August 2003 FORMFEED[Page 21]
1258
1259
1260
1261
1262
1263 INTERNET DRAFT SASL C API February 2003
1264
1265
1266 the pvalue parameter. Additional properties are listed in section
1267 6.
1268
1269 3.6.5. sasl_dispose function
1270
1271 Arguments:
1272 sasl_conn_t **pconn
1273
1274 Results:
1275 none
1276
1277 This function disposes of the connection state created with
1278 sasl_client_new or sasl_server_new, and sets the pointer to NULL.
1279 If the pconn is already NULL the function does nothing.
1280
1281 3.6.6. sasl_done function
1282
1283 Arguments:
1284 none
1285
1286 Results:
1287 none
1288
1289 A SASL application that is finished with the SASL API must call
1290 this function. This function frees any memory allocated by the
1291 SASL library or any other library state. After this call most of
1292 the SASL API function will again return the SASL_NOTINIT error
1293 code.
1294
1295 There must be a call to sasl_done for every successful call to
1296 sasl_server_init or sasl_client_init made. Only the final
1297 sasl_done does the actual cleanup; the preceding calls simply
1298 decrement an internal reference count.
1299
1300 Connection states MUST be disposed of with sasl_dispose before
1301 calling this function.
1302
1303 4. SASL Security Layer Routines
1304
1305 This section describes the routines need to support a security
1306 layer.
1307
1308 4.1. sasl_encode function
1309
1310
1311
1312
1313
1314
1315
1316
1317 Newman et al. Expires: August 2003 FORMFEED[Page 22]
1318
1319
1320
1321
1322
1323 INTERNET DRAFT SASL C API February 2003
1324
1325
1326 Arguments:
1327 sasl_conn_t *conn,
1328 const char *input,
1329 unsigned int inputlen,
1330 const char **output,
1331 unsigned int *outputlen
1332
1333 Results:
1334 SASL_OK -- Success (returns input if no layer negotiated)
1335 SASL_NOTDONE -- Security layer negotiation not finished
1336 SASL_BADPARAM -- inputlen is greater than the SASL_MAXOUTBUF property
1337
1338 This function encodes a block of data for transmission using secu-
1339 rity layer (if any). The output and outputlen are filled in with
1340 the encoded data and its length respectively. If there is no secu-
1341 rity layer the input buffer is returned in the output. Otherwise,
1342 the output is only valid until a next call to sasl_encode or
1343 sasl_dispose.
1344
1345 4.1. sasl_decode function
1346
1347 Arguments:
1348 sasl_conn_t *conn,
1349 const char *input,
1350 unsigned int inputlen,
1351 const char **output,
1352 unsigned int *outputlen
1353
1354 Results:
1355 SASL_OK -- Success (returns input if no layer negotiated)
1356 SASL_NOTDONE -- Security layer negotiation not finished
1357 SASL_BADMAC -- Bad message integrity check
1358
1359 This function decodes a block of data received using security
1360 layer (if any). The output and outputlen are filled in with the
1361 decoded data and its length respectively. If there is no security
1362 layer the input buffer is returned in the output. Otherwise, the
1363 output is only valid until a next call to sasl_decode or sasl_dis-
1364 pose.
1365
1366 5. Advanced SASL API Routines
1367
1368 This section describes the less frequently used functions avail-
1369 able in the SASL API.
1370
1371 5.1. Additional Initialization Routines
1372
1373 5.1.1. sasl_set_mutex function
1374
1375
1376
1377 Newman et al. Expires: August 2003 FORMFEED[Page 23]
1378
1379
1380
1381
1382
1383 INTERNET DRAFT SASL C API February 2003
1384
1385
1386 Arguments:
1387 sasl_mutex_alloc_t *mutex_alloc,
1388 sasl_mutex_lock_t *mutex_lock,
1389 sasl_mutex_unlock_t *mutex_unlock,
1390 sasl_mutex_free_t *mutex_free
1391
1392 Results:
1393 None
1394
1395 The sasl_set_mutex call sets the callbacks which the SASL API and
1396 plug-ins will use whenever exclusive access to a process shared
1397 resource is needed. A single-threaded client or server need not
1398 call this. The types are designed to be compatible with the LDAP
1399 API [LDAP-API]:
1400
1401 typedef void *sasl_mutex_alloc_t(void);
1402
1403 On success, this returns a pointer to an allocated and initialized
1404 mutex structure. On failure, it returns NULL.
1405
1406 typedef int sasl_mutex_lock_t(void *mutex);
1407
1408 This will block the current thread until it is possible to get an
1409 exclusive lock on a mutex allocated by the mutex_alloc callback.
1410 On success it returns 0, on failure due to deadlock or bad parame-
1411 ter, it returns -1.
1412
1413 typedef int sasl_mutex_unlock_t(void *mutex);
1414
1415 This releases a lock on a mutex allocated by the mutex_alloc call-
1416 back. On success it returns 0, on failure due to an already
1417 unlocked mutex, or bad parameter, it returns -1.
1418
1419 typedef void sasl_mutex_free_t(void *mutex);
1420
1421 This disposes of a mutex allocated by mutex_alloc.
1422
1423 5.1.2. sasl_set_alloc function
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437 Newman et al. Expires: August 2003 FORMFEED[Page 24]
1438
1439
1440
1441
1442
1443 INTERNET DRAFT SASL C API February 2003
1444
1445
1446 Arguments:
1447 sasl_malloc_t *malloc,
1448 sasl_calloc_t *calloc,
1449 sasl_realloc_t *realloc,
1450 sasl_free_t *free
1451
1452 Results:
1453 None
1454
1455 This sets the memory allocation functions which the SASL API will
1456 use. The SASL API will use its own routines (usually the standard
1457 C library) if these are not set.
1458
1459 typedef void *sasl_malloc_t(unsigned long mem_size);
1460
1461 This allocates memory mem_size bytes of memory. The memory is not
1462 initialized to any particular value. It returns NULL on a fail-
1463 ure, or when mem_size is 0.
1464
1465 typedef void *sasl_calloc_t(unsigned long elem_size,
1466 unsigned long num_elem);
1467
1468 This allocates elem_size * num_elem bytes of memory. The memory
1469 is initialized to 0. It returns NULL on a failure or when either
1470 elem_size and/or num_elem is 0.
1471
1472 typedef void *sasl_realloc_t(void *mem_ptr, unsigned long
1473 new_size);
1474
1475 This changes the size of a memory block previously allocated by
1476 malloc or calloc, and returns a pointer to the new location (which
1477 may be different from mem_ptr). If mem_ptr is NULL, it is identi-
1478 cal to the malloc function.
1479
1480 It returns NULL on a failure or when new_size is 0. On failure the
1481 original block is unchanged. When new_size is 0 the function works
1482 as the free function.
1483
1484 typedef void sasl_free_t(void *mem_ptr);
1485
1486 This releases the memory in mem_ptr that was allocated by the mal-
1487 loc or the calloc or resized by the realloc. If mem_ptr is NULL,
1488 the function does nothing and returns immediately. The contents of
1489 the memory may be altered by this call.
1490
1491 6. Additional Properties
1492
1493 <<To be completed>>
1494
1495
1496
1497 Newman et al. Expires: August 2003 FORMFEED[Page 25]
1498
1499
1500
1501
1502
1503 INTERNET DRAFT SASL C API February 2003
1504
1505
1506 SASL_SSF -- security layer security strength factor,
1507 if 0, call to sasl_encode, sasl_decode unnecessary
1508 SASL_MAXOUTBUF -- security layer max output buf unsigned
1509 SASL_DEFUSERREALM -- default realm passed to sasl_server_new or set with
1510 sasl_setprop
1511 SASL_GETOPTCTX -- context for getopt callback
1512 SASL_CALLBACK -- current callback function list
1513 SASL_IPLOCALPORT -- iplocalport string passed to sasl_server_new/
1514 sasl_client_new
1515 SASL_IPREMOTEPORT -- ipremoteport string passed to sasl_server_new/
1516 sasl_client_new
1517 SASL_SERVICE -- service passed to sasl_*_new
1518 SASL_SERVERFQDN -- serverFQDN passed to sasl_*_new
1519 SASL_AUTHSOURCE -- name of the active plugin, if any
1520 SASL_MECHNAME -- active SASL mechanism name, if any
1521 SASL_AUTHUSER -- authentication/admin user (authorization id?)
1522
1523 7. References
1524
1525 [IMAP4] Crispin, M., "Internet Message Access Protocol - Version
1526 4rev1", RFC 2060, University of Washington, December 1996.
1527
1528 [KEYWORDS] Bradner, "Key words for use in RFCs to Indicate
1529 Requirement Levels", RFC 2119, Harvard University, March 1997.
1530
1531 [POP3] Myers, J., Rose, M., "Post Office Protocol - Version 3",
1532 RFC 1939, Carnegie Mellon, Dover Beach Consulting, Inc., May 1996.
1533
1534 [POP-AUTH] Myers, "POP3 AUTHentication command", RFC 1734,
1535 Carnegie Mellon, December 1994.
1536
1537 [SASL] Myers, "Simple Authentication and Security Layer (SASL)",
1538 RFC 2222, Netscape Communications, October 1997.
1539
1540 [GSSAPI]
1541
1542 8. Acknowledgements
1543
1544 The editor would like to thank Rob Siemborski and Ken Murchison
1545 for providing useful feedback and suggestions.
1546
1547 9. Author's and Editor's Addresses
1548
1549
1550 Author:
1551
1552 Chris Newman
1553 Innosoft International, Inc.
1554
1555
1556
1557 Newman et al. Expires: August 2003 FORMFEED[Page 26]
1558
1559
1560
1561
1562
1563 INTERNET DRAFT SASL C API February 2003
1564
1565
1566 1050 Lakes Drive
1567 West Covina, CA 91790 USA
1568
1569 Email: chris.newman@innosoft.com
1570
1571
1572 Editor:
1573
1574 Alexey Melnikov
1575 ACI WorldWide/MessagingDirect
1576 59 Clarendon Road
1577 Watford, Hertfordshire, WD17 1FQ, UK
1578
1579 Email: mel@messagingdirect.com
1580
1581
1582 10. Full Copyright Statement
1583
1584 Copyright (C) The Internet Society (2003). All Rights Reserved.
1585
1586 This document and translations of it may be copied and furnished to
1587 others, and derivative works that comment on or otherwise explain it
1588 or assist in its implementation may be prepared, copied, published
1589 and distributed, in whole or in part, without restriction of any
1590 kind, provided that the above copyright notice and this paragraph are
1591 included on all such copies and derivative works. However, this doc-
1592 ument itself may not be modified in any way, such as by removing the
1593 copyright notice or references to the Internet Society or other
1594 Internet organizations, except as needed for the purpose of develop-
1595 ing Internet standards in which case the procedures for copyrights
1596 defined in the Internet Standards process must be followed, or as
1597 required to translate it into languages other than English.
1598
1599 The limited permissions granted above are perpetual and will not be
1600 revoked by the Internet Society or its successors or assigns.
1601
1602 This document and the information contained herein is provided on an
1603 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
1604 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
1605 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
1606 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MER-
1607 CHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
1608
1609 Acknowledgement
1610
1611 Funding for the RFC Editor function is currently provided by the
1612 Internet Society.
1613
1614
1615
1616
1617 Newman et al. Expires: August 2003 FORMFEED[Page 27]
1618
1619
1620
1621
1622
1623 INTERNET DRAFT SASL C API February 2003
1624
1625
1626 A. Appendix A -- Design Goals
1627
1628 The design goals of the SASL C API are as follows:
1629
1630
1631 o To be simple and practical to use.
1632
1633 o To provide related utility services in addition to core SASL func-
1634 tionality.
1635
1636 o To be reasonably extensible.
1637
1638 o To be suitable for use in a multi-threaded server or client.
1639
1640 o To avoid dependancies on a specific memory allocation system, thread
1641 package or network model.
1642
1643 o To be an independent service rather than a new layer.
1644
1645
1646 B. SASL API Index
1647
1648 <<To be completed>>
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677 Newman et al. Expires: August 2003 FORMFEED[Page 28]
1678
1679
1680
0
1
2
3
4
5
6 Network Working Group C. Newman
7 Internet Draft: PASSDSS-3DES-1 SASL Mechanism Innosoft
8 Document: draft-newman-sasl-passdss-01.txt March 1998
9 Expires in six months
10
11
12 DSS Secured Password Authentication Mechanism
13
14
15 Status of this memo
16
17 This document is an Internet-Draft. Internet-Drafts are working
18 documents of the Internet Engineering Task Force (IETF), its areas,
19 and its working groups. Note that other groups may also distribute
20 working documents as Internet-Drafts.
21
22 Internet-Drafts are draft documents valid for a maximum of six
23 months and may be updated, replaced, or obsoleted by other
24 documents at any time. It is inappropriate to use Internet-Drafts
25 as reference material or to cite them other than as "work in
26 progress."
27
28 To view the entire list of current Internet-Drafts, please check
29 the "1id-abstracts.txt" listing contained in the Internet-Drafts
30 Shadow Directories on ftp.is.co.za (Africa), ftp.nordu.net
31 (Europe), munnari.oz.au (Pacific Rim), ds.internic.net (US East
32 Coast), or ftp.isi.edu (US West Coast).
33
34
35 Abstract
36
37 Some system administrators are faced with a choice between
38 deploying a new authentication infrastructure or sending
39 unencrypted passwords in the clear over the Internet. Deploying a
40 new authentication infrastructure often involves modifying
41 operating system services or keeping parallel authentication
42 databases up to date and is thus unacceptable to many
43 administrators.
44
45 Solutions which encrypt the entire session are often crippled with
46 weak keys (due to government restrictions) which are unsuitable for
47 passwords. In addition, such solutions often reduce performance of
48 the entire session to an unacceptable level. This specification
49 defines a SASL [SASL] mechanism which is compatible with existing
50 password-based authentication databases and does not require a
51 security layer for the remainder of the session.
52
53 [NOTE: Public discussion of this mechanism may take place on the
54
55
56
57 Newman [Page 1]
58
59 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
60
61
62 ietf-sasl@imc.org mailing list with a subscription address of
63 ietf-sasl-request@imc.org. Private comments may be sent to the
64 author].
65
66 1. How to Read This Document
67
68 This document is intended primarily for a programmer. If
69 successful, it should be possible for a competent programmer to
70 write a client implementation using this specification, the SASL
71 [SASL] specification, an understanding of how to generate random
72 numbers [RANDOM], a description or implementation of the DES and
73 SHA1 [SHA1] algorithms and a multi-precision integer math library.
74 A cryptographic library or a copy of "Applied Cryptography"
75 [SCHNEIER] or similar reference is helpful for any implementation
76 and necessary for server DSS key generation.
77
78 The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
79 in this document are to be interpreted as defined in "Key words for
80 use in RFCs to Indicate Requirement Levels" [KEYWORDS].
81
82 1.1. Data Types Used in this Document
83
84 A list of data types used in this document follows. Note that the
85 majority of this section is copied from the secure shell
86 specification [SSH-ARCH].
87
88 octet A basic 8-bit unit of data.
89
90 uint32 A 32-bit unsigned integer. Stored as four octets in
91 network byte order (also known as big endian or most
92 significant byte [MSB] first). For example, the decimal
93 value 699921578 (hexadecimal 29b7f4aa) is represented with
94 the hexadecimal octet sequence 29 b7 f4 aa.
95
96 string A string is a length-prefixed octet string. The length is
97 represented as a uint32 with the data immediately
98 following. A length of 0 indicates an empty string. The
99 string MAY contain NUL or 8-bit octets. When used to
100 represent textual strings, the characters are interpreted
101 in UTF-8 [UTF-8]. Other character encoding schemes MUST
102 NOT be used.
103
104 mpint Represents multiple precision integers in two's complement
105 format, stored as a string, most significant octet first.
106 Negative numbers have one in the most significant bit of
107 the first octet of the string data. If the most significant
108 bit would be set for a positive number, the number MUST be
109 preceded by a zero byte. Unnecessary leading zero or 255
110
111
112
113 Newman [Page 2]
114
115 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
116
117
118 bytes MUST NOT be included. The value zero MUST be stored
119 as a string with zero bytes of data.
120
121 By convention, a number that is used in modular
122 computations in the field of integers mod n SHOULD be
123 represented in the range 0 <= x < n.
124
125 Examples:
126
127 value (hex) representation (hex)
128 -----------------------------------------------------------
129 0 00 00 00 00
130 9a378f9b2e332a7 00 00 00 08 09 a3 78 f9 b2 e3 32 a7
131 80 00 00 00 02 00 80
132 -1234 00 00 00 02 ed cc
133 -deadbeef 00 00 00 05 ff 21 52 41 11
134
135 1.2. Glossary
136
137 This section includes some acronyms used in this document.
138
139 DES The U.S. Government Data Encryption Standard is a symmetric
140 encryption algorithm introduced in 1975 which uses a 56 bit
141 key. The algorithm is documented in [SCHNEIER].
142
143 DSA The U.S. Government Digital Signature Algorithm standard. A
144 public key signature algorithm available for unrestricted use
145 without a license.
146
147 DSS The U.S. Government Digital Signature Standard [DSS] which
148 employs the DSA algorithm.
149
150 HMAC A hash-based message authentication code [HMAC] summarized in
151 Appendix A.4. Test cases are available in [HMAC-TEST].
152
153 SHA The Secure Hash Algorithm (version 1) which is part of the DSS
154 standard.
155
156 triple-DES
157 Use of the DES algorithm three times in an encrypt-decrypt-
158 encrypt mode with three independent keys as described in
159 appendix A.3.
160
161 2. Overview
162
163 This section includes a brief discussion of design goals, intended
164 use and an overview for this SASL mechanism. An overview of some
165 of the algorithms used is in Appendix A.
166
167
168
169 Newman [Page 3]
170
171 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
172
173
174 2.1. Design Goals
175
176 The ideal authentication mechanism would be simple, fast, fully
177 secure, freely distributable without restrictions and backwards
178 compatible with deployed back-end authentication databases.
179 Unfortunately, it is not possible to achieve all these goals so
180 priorities and tradeoffs are necessary. This mechanism has
181 compatibility with deployed back-end authentication databases and
182 protection from passive and active attacks on the underlying
183 connection as primary design goals. Simplicity and unrestricted
184 binary distribution are secondary design goals.
185
186 Backwards compatibility is achieved by using plain-text
187 passphrases. Protection from passive and active attacks is
188 achieved by using public and symmetric key technology to encrypt
189 the passphrase and optionally protect the remainder of the session.
190 Some simplicity is achieved by avoiding complicated public key
191 certification issues and formats as well as making the SASL session
192 security layer and certification by the client optional.
193 Unrestricted binary distribution is hopefully achieved by using
194 unencumbered algorithms and making the SASL privacy layer optional.
195
196 2.2. Intended Use
197
198 This is intended as a plug-and-play mechanism for services layered
199 on top of deployed passphrase-based back-end authentication
200 databases. When no security layer is implemented it can be added
201 to a SASL-based protocol without modifying or substituting network
202 read and write APIs. When the optional session privacy protection
203 is omitted, the author speculates that it may be possible to make a
204 binary implementation which would be exportable from the United
205 States.
206
207 For cases where simplicity, speed or unrestricted source code
208 distribution is more desirable than backwards compatibility or
209 security, a mechanism such as CRAM-MD5 [CRAM-MD5] or SCRAM [SCRAM]
210 is preferred.
211
212 The optional SASL integrity and privacy protection is provided as a
213 simple alternative to full service security layers such as TLS
214 [TLS] or Secure Shell [SSH-ARCH]. However, there are many
215 advantages to full service security layers such as compression,
216 faster symmetric cipher options, and the ability to leverage other
217 public key infrastructures. An implementation which supports TLS
218 may have no incentive to support SASL security layers at all. The
219 complexity verses functionality tradeoff is significant enough that
220 these mechanisms do not compete.
221
222
223
224
225 Newman [Page 4]
226
227 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
228
229
230 2.3. Mechanism Overview
231
232 The PASSDSS-3DES-1 mechanism uses three components to perform a
233 secure authentication against a legacy passphrase database.
234
235 In order to protect against active attacks, a DSS public key in a
236 format compatible with Secure Shell [SSH-TRANS] is used to
237 authenticate the server to the client. The client is presumed to
238 have the server's public key or a SHA-1 hash thereof stored locally
239 in a secure database. If the client is willing to risk exposure to
240 active attacks, it may skip the public key certification step
241 altogether or do a one-time initialization of its local database,
242 perhaps with user interaction.
243
244 In addition to the DSS public key, a Diffie-Hellman key exchange is
245 used to generate a key for encrypting the passphrase. The
246 "PASSDSS-3DES-1" variant of this mechanism uses the same fixed
247 Diffie-Hellman group used by Secure Shell's diffie-hellman-group1-
248 sha1 key exchange [SSH-TRANS]. If more groups are necessary, they
249 will be assigned to mechanism variants "PASSDSS-3DES-2" and so
250 forth.
251
252 Finally, the triple-DES algorithm is used to encrypt the client's
253 passphrase and send it to the server.
254
255 2.4. Message Format Overview
256
257 This section provides a quick overview of the format of the
258 messages. The formal definition of the syntax for these messages
259 is in section 6. A detailed discussion of their implementation on
260 clients and servers is in sections 3 and 4 respectively.
261
262 First message from client to server:
263 string azname ; the user name to login as, may be empty if
264 same as authentication name
265 string authname ; the authentication name
266 mpint X ; Diffie-Hellman parameter X
267
268 The challenge from server to client is as follows:
269 uint32 pklength ; length of SSH-style DSA server public key
270 string "ssh-dss" ; constant string "ssh-dss" (lower case)
271 mpint p ; DSA public key parameters
272 mpint q
273 mpint g
274 mpint y
275 mpint Y ; Diffie-Hellman parameter Y
276 OCTET ssecmask ; SASL security layers offered
277 3 OCTET sbuflen ; maximum server security layer block size
278
279
280
281 Newman [Page 5]
282
283 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
284
285
286 uint32 siglength ; length of SSH-style dss signature
287 string "ssh-dss" ; constant string "ssh-dss" (lower case)
288 mpint r ; DSA signature parameters
289 mpint s
290
291 The client then sends the following message encrypted with
292 triple-DES:
293 OCTET csecmask ; SASL security layer selection
294 3 OCTET cbuflen ; maximum client block size
295 string passphrase ; the user's passphrase
296 20 OCTET cli-hmac ; a client HMAC-SHA-1 signature
297
298 3. Client Implementation of PASSDSS-3DES-1
299
300 This section includes a step-by-step guide for client implementors.
301 Although section 6 contains the formal definition of the syntax and
302 is the authoritative reference in case of errors here, this section
303 should be sufficient to build a correct implementation.
304
305 The SASL mechanism name is "PASSDSS-3DES-1".
306
307 The value of n used for the Diffie-Hellman exchange is as follows
308 (represented as an unsigned hexadecimal integer):
309
310 FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1
311 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD
312 EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245
313 E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED
314 EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381
315 FFFFFFFF FFFFFFFF.
316
317 When represented as an "mpint", this would have a prefix of
318 "0000008100." The value of g is 2. This group was taken from the
319 ISAKMP/Oakley specification, and was originally generated by
320 Richard Schroeppel at the University of Arizona. Properties of
321 this prime are described in [Orm96].
322
323 The client begins by doing the following:
324
325 (A) Generate the Diffie-Hellman private value "x". This should be
326 less than (n - 1)/2. The number of bits of entropy to use in "x"
327 is an important decision, as shorter lengths will be less secure
328 and longer lengths will noticeably reduce performance. At the time
329 this was written, 192 bits of entropy [RANDOM] is probably
330 sufficient. For more information on this topic, see [SHORT-EXP].
331
332
333
334
335
336
337 Newman [Page 6]
338
339 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
340
341
342 (B) Compute the Diffie-Hellman public value "X" as follows. If X
343 has a value of 0, repeat step (A).
344 x
345 X = 2 mod n
346
347 The client then sends the following three pieces of information to
348 the server:
349
350 (1) An authorization identity represented as a string. When the
351 empty string is used, this defaults to the authentication identity.
352 This is used by system administrators or proxy servers to login
353 with a different user identity.
354
355 (2) An authentication identity represented as a string. This is
356 the identity whose passphrase will be used.
357
358 (3) The "X" result from step (B) represented as an mpint.
359
360 The server responds by sending a message containing the following
361 information:
362
363 (4) An "ssh-dss" public key compatible with Secure Shell, including
364 the 32-bit length prefix in network byte order, the Secure Shell
365 string "ssh-dss" and mpints for "p", "q", "g" and "y" (see Appendix
366 A.1).
367
368 (5) The mpint "Y" as defined for the Diffie-Hellman key exchange
369 (see Appendix A.2).
370
371 (6) A single octet bit mask representing the security layers
372 available in the same format used by the KERBEROS_V4 mechanism
373 [SASL]. Bit 0 (value 1) indicates it is permissible to have no
374 security layer. Bit 1 (value 2) indicates integrity protection is
375 permissible. Bit 2 (value 4) indicates privacy protection for the
376 rest of the session is available. The remaining bits are reserved
377 for future use.
378
379 (7) A three octet unsigned integer in network byte order
380 representing the maximum cipher-text buffer size the server is able
381 to receive. If this is less than 32, it indicates that a SASL
382 security layer is not supported.
383
384 (8) A DSA signature, including a 32-bit length, the Secure Shell
385 string "ssh-dss" and mpints for "r" and "s".
386
387 The client then does the following:
388
389 (C) Verify that "Y" is between 1 and n - 1 inclusive. If "Y" is
390
391
392
393 Newman [Page 7]
394
395 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
396
397
398 outside this range, the client MUST cancel the authentication.
399
400 (D) Verify that the public key from step (4) belongs to the server.
401 This can be done either with a database of SSH public keys or with
402 a database of SHA1 hashes of such public keys. If the client does
403 not have a matching entry for the server or does not have a public
404 key database, it MAY skip this step although it SHOULD alert the
405 user that the connection is susceptible to active attacks if it
406 does so. It MAY also record the public key (or SHA1 hash thereof)
407 in its database with permission from the user.
408
409 (E) Compute the Diffie-Hellman key K as follows. It may be
410 necessary to mask timing attacks [TIMING].
411 x
412 K = Y mod n
413
414 (F) Create a buffer containing data from steps (1) through (7) in
415 order immediately followed by K represented as an mpint.
416
417 (G) Compute the SHA1 hash of the buffer from (F). This produces a
418 20 octet result.
419
420 (H) If the public key from step (4) was not certified, this step
421 MAY be skipped. Otherwise, verify that the DSS signature is a
422 signature of (G). This computation is done as defined in appendix
423 A.1 where the output of step (G) represents the message "m" (note
424 that this results in SHA1 being applied twice).
425
426 (I) Compute the following 20-octet values. K represents the output
427 of step (E) in mpint format. H represents the output of step (G).
428 The || symbol represents string concatenation. "A" represents a
429 single octet containing the US-ASCII value of capital letter A.
430 cs-encryption-iv = SHA1( K || "A" || H )
431 sc-encryption-iv = SHA1( K || "B" || H )
432 cs-encryption-key-1 = SHA1( K || "C" || H )
433 cs-encryption-key-2 = SHA1( K || cs-encryption-key-1 )
434 cs-encryption-key = cs-encryption-key-1 || cs-encryption-key-2
435 sc-encryption-key-1 = SHA1( K || "D" || H )
436 sc-encryption-key-2 = SHA1( K || sc-encryption-key-1 )
437 sc-encryption-key = sc-encryption-key-1 || sc-encryption-key-2
438 cs-integrity-key = SHA1( K || "E" || H )
439 sc-integrity-key = SHA1( K || "F" || H )
440
441 (J) Create a buffer beginning with a bit mask for the selected
442 security layer (it MUST be one offered in 6) followed by three
443 octets representing the maximum cipher-text buffer size (at least
444 32) the client can accept in network byte order. This is followed
445 by a string containing the passphrase. Note that integrity
446
447
448
449 Newman [Page 8]
450
451 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
452
453
454 protection is pointless unless the public key was certified in
455 step (D) and the signature was verified in step (H).
456
457 (K) Create a buffer containing items (1) through (7) immediately
458 followed by the first four octets of (J).
459
460 (L) Compute HMAC-SHA-1 with (K) as the data and the cs-integrity-
461 key from step (I) as the key. This produces a 20 octet result. A
462 summary of the HMAC-SHA-1 algorithm [HMAC] is in appendix A.4.
463
464 (M) Create a buffer containing (J) followed by (L) followed by an
465 arbitrary number of zero octets as necessary to reach the block
466 size of DES and conceal the passphrase length from an eavesdropper.
467
468 (N) Apply the triple-DES algorithm to (M) with the first 8 octets
469 of cs-encryption-iv from step (I) as the initialization vector and
470 the first 24 octets of cs-encryption-key as the key. If optional
471 privacy protection is negotiated on, the triple-DES state is not
472 reset.
473
474 The client then sends a message to the server containing the
475 following:
476
477 (9) The output of step (N).
478
479 If a SASL security layer is negotiated on, the following steps are
480 used when sending a message:
481
482 (O) Create a buffer containing a uint32 client packet number
483 (starting from 0) immediately followed by the cs-integrity-key from
484 step (I).
485
486 (P) Compute HMAC-SHA-1 with (O) as the key and the data to transmit
487 as the data.
488
489 (Q) Create a buffer containing the data to transmit followed by the
490 20-octet output of (P). If privacy was negotiated on, this is
491 followed by zero to seven padding octets followed by one more octet
492 indicating the number of padding octets. The total size MUST be a
493 multiple of the DES block size.
494
495 (R) The result of step (Q) is encrypted with triple-DES if privacy
496 was negotiated and is sent prefixed by a uint32 length, as required
497 by SASL.
498
499 If a SASL security layer was negotiated on, the following steps are
500 taken when receiving a message:
501
502
503
504
505 Newman [Page 9]
506
507 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
508
509
510 (S) If privacy was negotiated on, the message is decrypted using
511 triple-DES with the first 24 octets of sc-encryption-key as the
512 key. The value of the last octet plus one indicates the number of
513 octets to ignore at the end of the output. The sc-encryption-iv is
514 used to initialize triple-DES state the first time this is done.
515
516 (T) Create a buffer containing a uint32 server packet number
517 (starting from 0) immediately followed by the sc-integrity-key.
518
519 (U) Compute HMAC-SHA-1 with (T) as the key over the portion of the
520 data excluding the 20 octet signature and any encryption padding.
521 If this is the same as the 20 octet signature, then the data is not
522 corrupted.
523
524 4. Server Implementation of PASSDSS-3DES-1
525
526 The section includes a step-by-step guide for server implementors.
527 It is intended to be read in conjunction with section 3.
528
529 The server MUST have a persistent DSS-SSH public key. Mechanisms
530 for generating such keys are described in [SCHNEIER] and [DSS].
531
532 IMPORTANT NOTE: The server MUST be able to process any message from
533 the client, including messages of any size, messages with invalid
534 content and messages with NULs in the middle of strings. When
535 input is illegal, the server MUST gracefully reject authentication
536 or in extreme cases gracefully terminate the connection.
537 Particular care to avoid buffer overruns is important if the user
538 name or passphrase strings are copied.
539
540 The server performs the following computations prior to or during
541 the connection by the client:
542
543 (a) Select a random number k less than (p - 1)/2. It is important
544 to generate a good random number [RANDOM].
545
546 (b) Compute signature component "r" as follows:
547 k
548 r = (g mod p) mod q
549
550 (c) Optionally pre-compute the group inverse of k, mod q and the
551 value xr.
552
553 (d) Select a random Diffie-Hellman private key y less than (n -
554 1)/2. Follow the same guidance as in (A) above.
555
556
557
558
559
560
561 Newman [Page 10]
562
563 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
564
565
566 (e) Compute the Diffie-Hellman public value Y as follows. If Y has
567 a value of 0, repeat step (d) above.
568 y
569 Y = 2 mod n
570
571 (f) Verify that the value X from the client is between 1 and (n -
572 1). If it isn't, fail the authentication.
573
574 (g) Compute the Diffie-Hellman shared key K as follows. It may be
575 necessary to mask timing attacks [TIMING].
576 y
577 K = X mod n
578
579 (h) Create a buffer containing items (1) through (7) above followed
580 by K represented as an mpint.
581
582 (i) Compute the SHA-1 hash of the buffer from (h). This produces a
583 20 octet result.
584
585 (j) Generate a DSS signature of (i). The signature is made up of
586 "r" from step (b) and the result following computation (partially
587 completed in step c):
588 -1
589 s = (k (SHA1(h) + xr)) mod q
590
591 (k) Create a buffer containing items (4) through (8) and send it to
592 the client.
593
594 (l) Perform the computations as described in step (I) where K is
595 the result of step (g) in mpint format and H is the result of step
596 (i).
597
598 (m) Decrypt message (9) from the client using triple-DES with cs-
599 encryption-iv as the initialization vector and the first 24 octets
600 of cs-encryption-key as the key.
601
602 (n) Verify the passphrase from the output of step (m) against the
603 authentication database. Fail the authentication if verification
604 fails.
605
606 (o) Verify that the selected security layer is permitted and the
607 cipher text buffer size is at least 32. If not, fail the
608 authentication.
609
610 (p) Create a buffer containing steps (1) through (7) followed by
611 the first four octets of the result from (m).
612
613 (q) Compute the HMAC-SHA-1 of (p) with cs-integrity-key as the key.
614
615
616
617 Newman [Page 11]
618
619 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
620
621
622 This produces a 20-octet result.
623
624 (r) Compare the output of (q) with the 20 octet signature after the
625 passphrase in the output of (m). If they don't match, fail the
626 authentication.
627
628 If a SASL security layer is negotiated on, sending and receiving
629 procedures are similar to steps (O)-(U), with client and server
630 roles exchanged (and thus sc-* values and cs-* value exchanged).
631 Note that triple-DES state from step (m) is not reset.
632
633 5. Example
634
635 The following is an example of the PASSDSS-3DES-1 mechanism using
636 the IMAP [IMAP4] profile of SASL. Note that base64 encoding and
637 the lack of an initial client response with the first command are
638 characteristics of the IMAP profile of SASL and not characteristics
639 of SASL or this mechanism.
640
641 In this example, "C:" represents lines sent from the client to the
642 server and "S:" represents lines sent from the server to the
643 client. The wrapped lines are for editorial clarity -- there are
644 no actual newlines in the middle of the messages.
645
646 C: a001 AUTHENTICATE PASSDSS-3DES-1
647 S: +
648 C: AAAAAAAAAAVjaHJpcwAAAIEAhuVbMxdLxrAQVyUWbAp+X09h6QmZ2Jebz
649 H7YhtcbQyLbB9AGi1eIdojZYtAuVeE+PYkKUANLHI9XzWSFliIGMeUvBc
650 bflHr+s9tZ5/5YZh9blb33km3tUYVKyB5XP530bDn+lY1lAv6tXHKZPrx
651 b0zPhc+JGgpWGlmT5k9vx2Wk=
652 S: + AAAA8gAAAAdzc2gtZHNzAAAAQQDPVlO6nFefrq6fA/dQKIoNj75Jjpp
653 kVv3DkyILABCox2dMql0bnO48rHFuo167y6oukT/ocKupIw6bgKmdofgd
654 AAAAFQDRpB6FrxemUGRuLjY/oiH/Qef14QAAAEEAkVr9rOlB58k5XoqmP
655 NYTrVGZKWbCPcYtaL92ANxgWyjyRo49+m0+fHPNhNibQoLddEZF8lHPKW
656 gb7z7qz0QMdgAAAEARcIEiMz5jTZo8COf2njL3BTWRND5NGAgZY7s1YOm
657 2BfjVyf1/MkOiQMiXeonrsfMc0sWQGgpRYRtJWpe56cc2AAAAgQDoV5Uk
658 bcy3Gjf16MZwPLlJlvmjpSNv2dSSApoddd4+BgZr01zyt7hzb0yRruaN5
659 fG43DbJLkk7mtL1Hw8aYXBMQQzrPpHtx+anpCDoN2jlersCGFY2cnjxTf
660 HqY139ohA8vVXYpapeXxKXR4//Ib/ApTGmwlOeIikKDrBmEGX/JgEAAAA
661 AAAA8AAAAB3NzaC1kc3MAAAAVAI7j3HG8HyjCOxaGFOUTwZqe0xSHAAAA
662 FHSqU41vPHTCRTqmxNFwXqazPlJH
663 C: Obp6vQ83q1O/OnQDifZB1rWOci9LaSck8VxNB4UAFhRI56BAs4XPLqOWI
664 CoB3LYZ
665 S: a001 OK Authentication Completed
666
667 The following private values were used in this example. These
668 values are all represented as an mpint in hexadecimal (msb first).
669
670
671
672
673 Newman [Page 12]
674
675 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
676
677
678 The client private Diffie-Hellman "x" value:
679
680 00000018 666E35B4 3BF4BF2B 40E31359 7A5D3AD0 61FD4F6F 736A6114
681
682 The server private Diffie-Hellman "y" value:
683
684 00000018 587BDFD6 800D101C 8E82E233 3B5A07AA DB87B8F1 68DC194D
685
686 The Diffie-Hellman shared secret:
687
688 00000080 3B46D3A8 D2163930 1C33D9FE EAFA528D F4B881CF DF906A03
689 33249A88 42547FF6 49FDC149 1A5084B1 B425A105 CE571283 AC61D896
690 AF8F7AF7 F95643F3 00A91E57 BCB8CFD7 77A25CBD 35F59A9E 59E98BEA
691 EA866339 7F0F9AA0 2F0F335C 8C6AAFF7 76BDB668 DF4D51AF 5B4FB807
692 81A70901 F478FB86 BF42055C BAF46094 EC72E98A
693
694 The DSA private key value (the public key is in the exchange):
695
696 00000014 252BCBFA 5634D706 6ED43128 972E181E 66BF9C30
697
698 The SHA-1 hash value used to compute the keys:
699
700 26 75 97 06 EB FE E3 69 C9 03 7D 49 64 19 D5 D2 97 66 E8 CE
701
702 6. Formal Syntax of PASSDSS-3DES-1 Messages
703
704 This is the formal syntactic definition of the client and server
705 messages. This uses ABNF [ABNF] notation including the core rules.
706 The first three rules define the formal exchange. The later rules
707 define the elements of the exchange.
708
709 client-msg-1 = [azname] authname diffie-hellman-X
710
711 server-msg-1 = dss-public-key diffie-hellman-Y
712 ssecmask sbuflen dss-signature
713
714 client-msg-2 = client-blob
715
716
717 authname = string
718 ;; interpreted as UTF-8 [UTF-8]
719
720 azname = string
721 ;; interpreted as UTF-8 [UTF-8]
722
723 cbuflen = 3OCTET
724 ;; Big endian binary unsigned integer
725 ;; max length of client read buffer
726
727
728
729 Newman [Page 13]
730
731 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
732
733
734 cli-hmac = 20OCTET
735
736 client-blob = 8*OCTET
737 ;; encrypted version of client-encrypted
738
739 client-encrypted = csecmask cbuflen passphrase cli-hmac *NUL
740 ;; MUST be multiple of DES block size
741
742 csecmask = OCTET
743 ;; client selected protection layer
744
745 diffie-hellman-X = mpint
746
747 diffie-hellman-Y = mpint
748
749 dss-g = mpint
750
751 dss-p = mpint
752
753 dss-public-key = length NUL NUL NUL %x07 "ssh-dss"
754 dss-p dss-q dss-g dss-y
755 ;; length is total length of remainder
756 ;; as defined in [SSH-TRANS]
757
758 dss-q = mpint
759
760 dss-r = mpint
761
762 dss-signature = length NUL NUL NUL %x07 "ssh-dss"
763 dss-r dss-s
764 ;; length is total length of remainder
765
766 dss-s = mpint
767
768 dss-y = mpint
769
770 length = 4OCTET
771 ;; binary number, big endian format (MSB first)
772
773 mpint = length *OCTET
774 ;; length specifies number of octets
775 ;; see section 1 for detailed mpint definition
776
777 passphrase = string
778 ;; At least 64 octets MUST be supported
779
780
781
782
783
784
785 Newman [Page 14]
786
787 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
788
789
790 sbuflen = 3OCTET
791 ;; Big endian binary unsigned integer
792 ;; max length of server read buffer
793
794 ssecmask = OCTET
795 ;; server protection layer mask
796
797 string = length *OCTET
798 ;; the length determines the number of octets
799 ;; OCTETs are interpreted as UTF-8
800
801 NUL = %x00 ;; US-ASCII NUL character
802
803 7. Security Considerations
804
805 Security considerations are discussed throughout this memo.
806
807 This mechanism supplies the server with the plain-text passphrase,
808 so the server gains the ability to masquerade as the user to any
809 other services which share the same passphrase.
810
811 If the public key certification step is skipped, then an active
812 attacker can gain the client's passphrase and thus the ability to
813 masquerade as the user to any other services which share the same
814 passphrase. Negotiating a security layer will fail to provide
815 protection from an active attacker in this case.
816
817 If no security layer is negotiated, the rest of the protocol
818 session is subject to active and passive attacks.
819
820 If an integrity-only layer is negotiated, the rest of the protocol
821 is subject to passive eavesdropping.
822
823 The quality of this mechanism depends on the quality of the random
824 number generator used. See [RANDOM] for more information.
825
826 8. Multinational Considerations
827
828 As remote access is a crucial service, users are encouraged to
829 restrict user names and passphrases to the US-ASCII character set.
830 However, if characters outside the US-ASCII character set are used
831 in user names and passphrases, then they are interpreted according
832 to UTF-8 [UTF-8] and it is a protocol error to include any octet
833 sequences not legal for UTF-8. Servers are encouraged to enforce
834 this restriction to discourage clients from using non-interoperable
835 local character sets in this context.
836
837
838
839
840
841 Newman [Page 15]
842
843 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
844
845
846 9. Intellectual Property Issues and Acknowledgments
847
848 David Kravitz holds U.S. Patent #5,231,668 on the DSA algorithm.
849 NIST has made this patent available world-wide on a royalty-free
850 basis.
851
852 Diffie-Hellman was first published in 1976 [DIFFIE-HELLMAN]. U.S.
853 Patent #4,200,770 granted April 1980 has expired. Canada Patent
854 #1,121,480 was granted April 6, 1982 and may still apply at this
855 time.
856
857 DES is covered under U.S. Patent #3,962,539 granted June 1978,
858 which has expired.
859
860 The majority of the constructions in this specification were copied
861 from the Secure Shell specifications [SSH-ARCH, SSH-TRANS].
862 Additional information is paraphrased from "Applied Cryptography"
863 [SCHNEIER].
864
865 10. References
866
867 [ABNF] Crocker, Overell, "Augmented BNF for Syntax Specifications:
868 ABNF", RFC 2234, Internet Mail Consortium, Demon Internet Ltd,
869 November 1997.
870
871 [CRAM-MD5] Klensin, Catoe, Krumviede, "IMAP/POP AUTHorize Extension
872 for Simple Challenge/Response", RFC 2195, MCI, September 1997.
873
874 [DIFFIE-HELLMAN] Diffie, W., Hellman, M.E., "Privacy and
875 Authentication: An introduction to Cryptography," Proceedings of
876 the IEEE, v. 67, n. 3, March 1979, pp. 397-427.
877
878 [DSS] National Institute of Standards and Technology, "Digital
879 Signature Standard," NIST FIPS PUB 186, U.S. Department of
880 Commerce, May 1994.
881
882 [HMAC] Krawczyk, Bellare, Canetti, "HMAC: Keyed-Hashing for Message
883 Authentication", RFC 2104, IBM, UCSD, February 1997.
884
885 [HMAC-TEST] Cheng, Glenn, "Test Cases for HMAC-MD5 and HMAC-SHA-1",
886 RFC 2202, IBM, NIST, September 1997.
887
888 [IMAP4] Crispin, M., "Internet Message Access Protocol - Version
889 4rev1", RFC 2060, University of Washington, December 1996.
890
891 [KEYWORDS] Bradner, "Key words for use in RFCs to Indicate
892 Requirement Levels", RFC 2119, Harvard University, March 1997.
893
894
895
896
897 Newman [Page 16]
898
899 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
900
901
902 [Orm96] Orman, H., "The Oakley Key Determination Protocol", version
903 1, TR97-92, Department of Computer Science Technical Report,
904 University of Arizona.
905
906 [RANDOM] Eastlake, Crocker, Schiller, "Randomness Recommendations
907 for Security", RFC 1750, DEC, Cybercash, MIT, December 1994.
908
909 [SASL] Myers, "Simple Authentication and Security Layer (SASL)",
910 RFC 2222, Netscape Communications, October 1997.
911
912 [SCHNEIER] Schneier, B., "Applied Cryptography: Protocols,
913 Algorithms and Source Code in C," John Wiley and Sons, Inc., 1996.
914
915 [SCRAM] Newman, "Salted Challenge Response Authentication Mechanism
916 (SCRAM)", work in progress, January 1998.
917
918 [SHA1] NIST FIPS PUB 180-1, "Secure Hash Standard," National
919 Institute of Standards and Technology, U.S. Department of Commerce,
920 April 1995.
921
922 [SHORT-EXP] van Oorschot, P., Wiener, M., "On Diffie-Hellman Key
923 Agreement with Short Exponents", Advances in Cryptography --
924 EUROCRYPT Springer-Verlag, ISBN 3-540-61186-X, pp. 332-343.
925
926 [SSH-ARCH] Ylonen, Kivinen, Saarinen, "SSH Protocol Architecture",
927 Work in progress, SSH, October 1997.
928
929 [SSH-TRANS] Ylonen, Kivinen, Saarinen, "SSH Transport Layer
930 Protocol", Work in progress, SSH, October 1997.
931
932 [TIMING] Kocher, P., "Timing Attacks on Implementations of Diffie-
933 Hellman, RSA, DSS and Other Systems", Advances in Cryptography --
934 CRYPTO '96 Proceedings, Lecture Notes in Computer Science, Vol
935 1109, Springer-Verlag, ISBN 3-540-61512-1, pp. 104-113.
936
937 [TLS] Dierks, Allen, "The TLS Protocol Version 1.0", Work in
938 progress.
939
940 [UTF8] Yergeau, "UTF-8, a transformation format of ISO 10646",
941 RFC 2279, Alis Technologies, January 1998.
942
943
944
945
946
947
948
949
950
951
952
953 Newman [Page 17]
954
955 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
956
957
958 11. Author's Address
959
960 Chris Newman
961 Innosoft International, Inc.
962 1050 Lakes Drive
963 West Covina, CA 91790 USA
964
965 Email: chris.newman@innosoft.com
966
967 Appendix A. Algorithm Overview
968
969 This section provides a quick overview of the algorithms used. For
970 a full understanding, the reader is encouraged to read "Applied
971 Cryptography" [SCHNEIER]. The follow descriptions are paraphrased
972 from that source.
973
974 Note that an overview of the DES algorithm is not included as
975 publicly available implementations and descriptions are very
976 common.
977
978 Appendix A.1. DSA Algorithm
979
980 The DSA algorithm is a public key algorithm which can be used to
981 sign messages such that the source can be verified using a public
982 key. The algorithm has the following parameters:
983
984 p is a prime number L bits long. Implementations MUST support L
985 between 512 and 1024 bits.
986
987 q is a 160-bit prime factor of (p - 1).
988
989 (p - 1)/q
990 g = h mod p where h is any number less than p - 1 such
991
992 (p - 1)/q
993 that h is greater than 1.
994
995 x is a number less than q and represents the private key.
996
997 x
998 y = g mod p and represents the public key.
999
1000 To sign a message m, the client generates a random number k less
1001 than q and computes:
1002
1003 k
1004 r = (g mod p) mod q
1005
1006
1007
1008
1009 Newman [Page 18]
1010
1011 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
1012
1013
1014 -1
1015 s = (k (SHA1(m) + xr)) mod q
1016
1017 The signature is represented as r and s, and is verified as
1018 follows:
1019
1020 -1
1021 w = s mod q
1022
1023 u1 = (SHA1(m) * w) mod q
1024
1025 u2 = (rw) mod q
1026
1027 u1 u2
1028 v = ((g * y ) mod p) mod q
1029
1030 If v = r then the signature is verified.
1031
1032 Appendix A.2. Diffie-Hellman Algorithm
1033
1034 The Diffie-Hellman algorithm is a key-exchange algorithm. It
1035 allows two ends of a communications channel to establish a shared
1036 secret which a passive eavesdropper can not easily determine. This
1037 key can then be used in a symmetric algorithm such as triple-DES.
1038 The two ends have a prior agreement on two numbers:
1039
1040 n a large prime number
1041
1042 g a primitive mod n.
1043
1044 The client chooses a random large integer x and computes:
1045
1046 x
1047 X = g mod n
1048
1049 and sends X to the server. The server chooses a random large
1050 integer y and computes:
1051
1052 y
1053 Y = g mod n
1054
1055 y
1056 K = X mod n
1057
1058 The server sends Y to the client. The client computes:
1059
1060 x
1061 K = Y mod n
1062
1063
1064
1065 Newman [Page 19]
1066
1067 Internet Draft PASSDSS-3DES-1 SASL Mechanism March 1998
1068
1069
1070 At this point, the client and server share the same secret K.
1071
1072 Appendix A.3. Triple-DES Algorithm in EDE/outer-CBC Mode
1073
1074 The DES algorithm uses an 8 octet (64 bit) key of which 56 bits are
1075 significant. The triple-DES EDE algorithm uses a 24 octet (192
1076 bit) key of which roughly 112 bits are significant see [SCHNEIER]
1077 for more details. The "EDE" refers to encrypt-decrypt-encrypt, and
1078 the "CBC" refers to cipher-block-chaining where each cipher block
1079 affects future cipher blocks. If E() is the DES encryption
1080 function, D() is the DES decryption function, C is a cipher text
1081 block and P is a plain-text block, then triple-DES EDE in CBC mode
1082 with outer chaining is:
1083
1084 C = E (D (E (P XOR C )))
1085 i K3 K2 K1 i i-1
1086
1087 NOTE: C is the initialization vector
1088 0
1089
1090 and the decryption function is:
1091
1092 P = C XOR D (E (D (C )))
1093 i i-1 K3 K2 K1 i
1094
1095 K1 is the first 8 octets of the triple-DES key, K2 is the second 8
1096 octets and K3 is the final 8 octets.
1097
1098 Appendix A.4. HMAC-SHA-1 Keyed hash function
1099
1100 HMAC-SHA-1 uses the SHA-1 hash function to create a keyed hash
1101 function suitable for use as an integrity protection function. A
1102 more complete description is in [HMAC]. A brief summary of the
1103 algorithm follows:
1104
1105 (A) If the key is longer than 64 octets, it is run through the
1106 SHA-1 function to produce a 20 octet key.
1107
1108 (B) The key is exclusive-ored with a 64 octet buffer filled with
1109 the octet value 0x36.
1110
1111 (C) SHA-1 is computed over (B) followed by the input text.
1112
1113 (D) The key is exclusive-ored with a 64 octet buffer filled with
1114 the octet value 0x5C.
1115
1116 (E) SHA-1 is computed over (D) followed by the output of (C).
1117
1118
1119
1120
1121 Newman [Page 20]
147147 <TR>
148148 <TD>sasldb_path</TD><TD>sasldb plugin</TD>
149149 <TD>Path to sasldb file</TD><TD><tt>/etc/sasldb2</tt> (system dependant)</TD>
150 </TR>
151 <TR>
152 <TD>sasldb_mapsize</TD><TD>sasldb with LMDB</TD>
153 <TD>Size of the memory map used by the DB. This is also the maximum possible
154 size of the database, so it must be set to a value large enough to contain
155 all the desired user records.</TD>
156 <TD>1048576 bytes</TD>
157 </TR>
158 <TR>
159 <TD>sasldb_maxreaders</TD><TD>sasldb with LMDB</TD>
160 <TD>Maximum number of threads (or processes) that may concurrently read the
161 database.</TD>
162 <TD>126</TD>
163 </TR>
150164 <TR>
151165 <TD>sql_engine</TD><TD>SQL plugin</TD>
152166 <TD>Name of SQL engine to use (possible values: 'mysql', 'pgsql', 'sqlite', 'sqlite3').</TD>
341355
342356 </p>
343357
358 <h2>Notes on sasldb with LMDB</h2>
359
360 <p>
361 </p>
362
363 <p>The OpenLDAP LMDB library is an extremely compact, extremely high performance
364 B+tree database. The code for it is available in the regular OpenLDAP source
365 distributions and it is distributed under the terms of the OpenLDAP Public License.</p>
366
367 <p>Full documentation, plus papers and presentations are available on
368 <a href="symas.com/mdb/">the LMDB page</a>.</p>
369
344370 <hr>
345371 Back to the <A href=index.html>index</a>
346372
0 <html><head>
1 <title>Building and Using Cyrus SASL on OS/390</title>
2 <!-- $Id: os390.html,v 1.1 2002/09/06 16:07:35 rjs3 Exp $ -->
3 </head>
4 <body>
5 <h1>Cyrus SASLv2 on OS/390</h1><p>
6
7 Cyrus SASLv2 can be made to build on OS/390 with some minimal changes. Here
8 are the suggestions provided by Howard Chu of the OpenLDAP project
9 (<i><a href=mailto:hyc@highlandsun.com>hyc@highlandsun.com</a></i>).
10
11 <hr>
12
13 Cyrus SASL must be compiled in ASCII mode. This can be accomplished with
14 a special invocation of c89. For ease of use, you can use a shell script
15 ("acc" is a good name) and set the environment variable CC = acc before
16 configuring anything. The shell script is simple:<pre>
17 #! /bin/sh
18 exec /bin/c89 -Wc,CONVLIT\(ISO8859-1\) -Wc,LANGLVL\(EXTENDED\) -D__LIBASCII $*<br></pre>
19 To build the source, you'll need to set these environment variables, at a minimum: <pre>
20 _C89_CCMODE=1
21 CC=acc
22 CPP="c89 -E"
23 LD=c89
24 CPPFLAGS=-D_ALL_SOURCE
25 </pre>
26 That should allow you to run configure and get a coherent build environment. Before you type "make" from the top level though, do this:
27 <pre>
28 cd include
29 make CC=c89
30 </pre>
31 In the include directory is a small program that generates an md5global.h
32 header file. This file must be generated in native EBCDIC. If you just
33 typed make from the top level, the program and header file would be
34 generated in ASCII, with an ASCII filename, which would be very confusing
35 and not very useful.
36 <p>
37 In my initial tests I was able to use SASL/EXTERNAL to perform X.509-based
38 authentication with slapd. I have subsequently tested the DIGEST-MD5
39 mechanism, using OpenLDAP's slapd for storage of the secrets. It worked
40 without any trouble. Note, I configured sasl --with-dblib=none to prevent
41 it from trying to use its own sasldb. This is simply because I haven't had
42 the time to fix the EBCDIC/ASCII dependencies in the rest of the SASL
43 library. Run as-is with a real database backend, the sasldb would try to
44 create ASCII-named database files, which would be very unpleasant. The
45 required fixes are trivial, but they are also numerous, and it is a very
46 time-consuming task to track down all the dependencies.
47 <p>
48 Note that this minimal-effort port of SASL will probably only work in the
49 context of OpenLDAP (though it may work with other special-case auxprop plugins).
50 No effort has been made to fix the ASCII filenames in
51 the library, this SASL library will be unable to create/parse/handle
52 native config files or database files. This is why I've only tested it
53 using secrets stored in slapd, and why I only tried SASL/EXTERNAL at
54 first. (EXTERNAL has no config parameters, and is part of libsasl2 itself,
55 so it doesn't need to be dynamically loaded from anywhere.)
0
1
2
3
4
5
6 Network Working Group R. Rivest
7 Request for Comments: 1321 MIT Laboratory for Computer Science
8 and RSA Data Security, Inc.
9 April 1992
10
11
12 The MD5 Message-Digest Algorithm
13
14 Status of this Memo
15
16 This memo provides information for the Internet community. It does
17 not specify an Internet standard. Distribution of this memo is
18 unlimited.
19
20 Acknowlegements
21
22 We would like to thank Don Coppersmith, Burt Kaliski, Ralph Merkle,
23 David Chaum, and Noam Nisan for numerous helpful comments and
24 suggestions.
25
26 Table of Contents
27
28 1. Executive Summary 1
29 2. Terminology and Notation 2
30 3. MD5 Algorithm Description 3
31 4. Summary 6
32 5. Differences Between MD4 and MD5 6
33 References 7
34 APPENDIX A - Reference Implementation 7
35 Security Considerations 21
36 Author's Address 21
37
38 1. Executive Summary
39
40 This document describes the MD5 message-digest algorithm. The
41 algorithm takes as input a message of arbitrary length and produces
42 as output a 128-bit "fingerprint" or "message digest" of the input.
43 It is conjectured that it is computationally infeasible to produce
44 two messages having the same message digest, or to produce any
45 message having a given prespecified target message digest. The MD5
46 algorithm is intended for digital signature applications, where a
47 large file must be "compressed" in a secure manner before being
48 encrypted with a private (secret) key under a public-key cryptosystem
49 such as RSA.
50
51
52
53
54
55
56
57 Rivest [Page 1]
58
59 RFC 1321 MD5 Message-Digest Algorithm April 1992
60
61
62 The MD5 algorithm is designed to be quite fast on 32-bit machines. In
63 addition, the MD5 algorithm does not require any large substitution
64 tables; the algorithm can be coded quite compactly.
65
66 The MD5 algorithm is an extension of the MD4 message-digest algorithm
67 1,2]. MD5 is slightly slower than MD4, but is more "conservative" in
68 design. MD5 was designed because it was felt that MD4 was perhaps
69 being adopted for use more quickly than justified by the existing
70 critical review; because MD4 was designed to be exceptionally fast,
71 it is "at the edge" in terms of risking successful cryptanalytic
72 attack. MD5 backs off a bit, giving up a little in speed for a much
73 greater likelihood of ultimate security. It incorporates some
74 suggestions made by various reviewers, and contains additional
75 optimizations. The MD5 algorithm is being placed in the public domain
76 for review and possible adoption as a standard.
77
78 For OSI-based applications, MD5's object identifier is
79
80 md5 OBJECT IDENTIFIER ::=
81 iso(1) member-body(2) US(840) rsadsi(113549) digestAlgorithm(2) 5}
82
83 In the X.509 type AlgorithmIdentifier [3], the parameters for MD5
84 should have type NULL.
85
86 2. Terminology and Notation
87
88 In this document a "word" is a 32-bit quantity and a "byte" is an
89 eight-bit quantity. A sequence of bits can be interpreted in a
90 natural manner as a sequence of bytes, where each consecutive group
91 of eight bits is interpreted as a byte with the high-order (most
92 significant) bit of each byte listed first. Similarly, a sequence of
93 bytes can be interpreted as a sequence of 32-bit words, where each
94 consecutive group of four bytes is interpreted as a word with the
95 low-order (least significant) byte given first.
96
97 Let x_i denote "x sub i". If the subscript is an expression, we
98 surround it in braces, as in x_{i+1}. Similarly, we use ^ for
99 superscripts (exponentiation), so that x^i denotes x to the i-th
100 power.
101
102 Let the symbol "+" denote addition of words (i.e., modulo-2^32
103 addition). Let X <<< s denote the 32-bit value obtained by circularly
104 shifting (rotating) X left by s bit positions. Let not(X) denote the
105 bit-wise complement of X, and let X v Y denote the bit-wise OR of X
106 and Y. Let X xor Y denote the bit-wise XOR of X and Y, and let XY
107 denote the bit-wise AND of X and Y.
108
109
110
111
112
113 Rivest [Page 2]
114
115 RFC 1321 MD5 Message-Digest Algorithm April 1992
116
117
118 3. MD5 Algorithm Description
119
120 We begin by supposing that we have a b-bit message as input, and that
121 we wish to find its message digest. Here b is an arbitrary
122 nonnegative integer; b may be zero, it need not be a multiple of
123 eight, and it may be arbitrarily large. We imagine the bits of the
124 message written down as follows:
125
126 m_0 m_1 ... m_{b-1}
127
128 The following five steps are performed to compute the message digest
129 of the message.
130
131 3.1 Step 1. Append Padding Bits
132
133 The message is "padded" (extended) so that its length (in bits) is
134 congruent to 448, modulo 512. That is, the message is extended so
135 that it is just 64 bits shy of being a multiple of 512 bits long.
136 Padding is always performed, even if the length of the message is
137 already congruent to 448, modulo 512.
138
139 Padding is performed as follows: a single "1" bit is appended to the
140 message, and then "0" bits are appended so that the length in bits of
141 the padded message becomes congruent to 448, modulo 512. In all, at
142 least one bit and at most 512 bits are appended.
143
144 3.2 Step 2. Append Length
145
146 A 64-bit representation of b (the length of the message before the
147 padding bits were added) is appended to the result of the previous
148 step. In the unlikely event that b is greater than 2^64, then only
149 the low-order 64 bits of b are used. (These bits are appended as two
150 32-bit words and appended low-order word first in accordance with the
151 previous conventions.)
152
153 At this point the resulting message (after padding with bits and with
154 b) has a length that is an exact multiple of 512 bits. Equivalently,
155 this message has a length that is an exact multiple of 16 (32-bit)
156 words. Let M[0 ... N-1] denote the words of the resulting message,
157 where N is a multiple of 16.
158
159 3.3 Step 3. Initialize MD Buffer
160
161 A four-word buffer (A,B,C,D) is used to compute the message digest.
162 Here each of A, B, C, D is a 32-bit register. These registers are
163 initialized to the following values in hexadecimal, low-order bytes
164 first):
165
166
167
168
169 Rivest [Page 3]
170
171 RFC 1321 MD5 Message-Digest Algorithm April 1992
172
173
174 word A: 01 23 45 67
175 word B: 89 ab cd ef
176 word C: fe dc ba 98
177 word D: 76 54 32 10
178
179 3.4 Step 4. Process Message in 16-Word Blocks
180
181 We first define four auxiliary functions that each take as input
182 three 32-bit words and produce as output one 32-bit word.
183
184 F(X,Y,Z) = XY v not(X) Z
185 G(X,Y,Z) = XZ v Y not(Z)
186 H(X,Y,Z) = X xor Y xor Z
187 I(X,Y,Z) = Y xor (X v not(Z))
188
189 In each bit position F acts as a conditional: if X then Y else Z.
190 The function F could have been defined using + instead of v since XY
191 and not(X)Z will never have 1's in the same bit position.) It is
192 interesting to note that if the bits of X, Y, and Z are independent
193 and unbiased, the each bit of F(X,Y,Z) will be independent and
194 unbiased.
195
196 The functions G, H, and I are similar to the function F, in that they
197 act in "bitwise parallel" to produce their output from the bits of X,
198 Y, and Z, in such a manner that if the corresponding bits of X, Y,
199 and Z are independent and unbiased, then each bit of G(X,Y,Z),
200 H(X,Y,Z), and I(X,Y,Z) will be independent and unbiased. Note that
201 the function H is the bit-wise "xor" or "parity" function of its
202 inputs.
203
204 This step uses a 64-element table T[1 ... 64] constructed from the
205 sine function. Let T[i] denote the i-th element of the table, which
206 is equal to the integer part of 4294967296 times abs(sin(i)), where i
207 is in radians. The elements of the table are given in the appendix.
208
209 Do the following:
210
211 /* Process each 16-word block. */
212 For i = 0 to N/16-1 do
213
214 /* Copy block i into X. */
215 For j = 0 to 15 do
216 Set X[j] to M[i*16+j].
217 end /* of loop on j */
218
219 /* Save A as AA, B as BB, C as CC, and D as DD. */
220 AA = A
221 BB = B
222
223
224
225 Rivest [Page 4]
226
227 RFC 1321 MD5 Message-Digest Algorithm April 1992
228
229
230 CC = C
231 DD = D
232
233 /* Round 1. */
234 /* Let [abcd k s i] denote the operation
235 a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */
236 /* Do the following 16 operations. */
237 [ABCD 0 7 1] [DABC 1 12 2] [CDAB 2 17 3] [BCDA 3 22 4]
238 [ABCD 4 7 5] [DABC 5 12 6] [CDAB 6 17 7] [BCDA 7 22 8]
239 [ABCD 8 7 9] [DABC 9 12 10] [CDAB 10 17 11] [BCDA 11 22 12]
240 [ABCD 12 7 13] [DABC 13 12 14] [CDAB 14 17 15] [BCDA 15 22 16]
241
242 /* Round 2. */
243 /* Let [abcd k s i] denote the operation
244 a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */
245 /* Do the following 16 operations. */
246 [ABCD 1 5 17] [DABC 6 9 18] [CDAB 11 14 19] [BCDA 0 20 20]
247 [ABCD 5 5 21] [DABC 10 9 22] [CDAB 15 14 23] [BCDA 4 20 24]
248 [ABCD 9 5 25] [DABC 14 9 26] [CDAB 3 14 27] [BCDA 8 20 28]
249 [ABCD 13 5 29] [DABC 2 9 30] [CDAB 7 14 31] [BCDA 12 20 32]
250
251 /* Round 3. */
252 /* Let [abcd k s t] denote the operation
253 a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */
254 /* Do the following 16 operations. */
255 [ABCD 5 4 33] [DABC 8 11 34] [CDAB 11 16 35] [BCDA 14 23 36]
256 [ABCD 1 4 37] [DABC 4 11 38] [CDAB 7 16 39] [BCDA 10 23 40]
257 [ABCD 13 4 41] [DABC 0 11 42] [CDAB 3 16 43] [BCDA 6 23 44]
258 [ABCD 9 4 45] [DABC 12 11 46] [CDAB 15 16 47] [BCDA 2 23 48]
259
260 /* Round 4. */
261 /* Let [abcd k s t] denote the operation
262 a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */
263 /* Do the following 16 operations. */
264 [ABCD 0 6 49] [DABC 7 10 50] [CDAB 14 15 51] [BCDA 5 21 52]
265 [ABCD 12 6 53] [DABC 3 10 54] [CDAB 10 15 55] [BCDA 1 21 56]
266 [ABCD 8 6 57] [DABC 15 10 58] [CDAB 6 15 59] [BCDA 13 21 60]
267 [ABCD 4 6 61] [DABC 11 10 62] [CDAB 2 15 63] [BCDA 9 21 64]
268
269 /* Then perform the following additions. (That is increment each
270 of the four registers by the value it had before this block
271 was started.) */
272 A = A + AA
273 B = B + BB
274 C = C + CC
275 D = D + DD
276
277 end /* of loop on i */
278
279
280
281 Rivest [Page 5]
282
283 RFC 1321 MD5 Message-Digest Algorithm April 1992
284
285
286 3.5 Step 5. Output
287
288 The message digest produced as output is A, B, C, D. That is, we
289 begin with the low-order byte of A, and end with the high-order byte
290 of D.
291
292 This completes the description of MD5. A reference implementation in
293 C is given in the appendix.
294
295 4. Summary
296
297 The MD5 message-digest algorithm is simple to implement, and provides
298 a "fingerprint" or message digest of a message of arbitrary length.
299 It is conjectured that the difficulty of coming up with two messages
300 having the same message digest is on the order of 2^64 operations,
301 and that the difficulty of coming up with any message having a given
302 message digest is on the order of 2^128 operations. The MD5 algorithm
303 has been carefully scrutinized for weaknesses. It is, however, a
304 relatively new algorithm and further security analysis is of course
305 justified, as is the case with any new proposal of this sort.
306
307 5. Differences Between MD4 and MD5
308
309 The following are the differences between MD4 and MD5:
310
311 1. A fourth round has been added.
312
313 2. Each step now has a unique additive constant.
314
315 3. The function g in round 2 was changed from (XY v XZ v YZ) to
316 (XZ v Y not(Z)) to make g less symmetric.
317
318 4. Each step now adds in the result of the previous step. This
319 promotes a faster "avalanche effect".
320
321 5. The order in which input words are accessed in rounds 2 and
322 3 is changed, to make these patterns less like each other.
323
324 6. The shift amounts in each round have been approximately
325 optimized, to yield a faster "avalanche effect." The shifts in
326 different rounds are distinct.
327
328
329
330
331
332
333
334
335
336
337 Rivest [Page 6]
338
339 RFC 1321 MD5 Message-Digest Algorithm April 1992
340
341
342 References
343
344 [1] Rivest, R., "The MD4 Message Digest Algorithm", RFC 1320, MIT and
345 RSA Data Security, Inc., April 1992.
346
347 [2] Rivest, R., "The MD4 message digest algorithm", in A.J. Menezes
348 and S.A. Vanstone, editors, Advances in Cryptology - CRYPTO '90
349 Proceedings, pages 303-311, Springer-Verlag, 1991.
350
351 [3] CCITT Recommendation X.509 (1988), "The Directory -
352 Authentication Framework."
353
354 APPENDIX A - Reference Implementation
355
356 This appendix contains the following files taken from RSAREF: A
357 Cryptographic Toolkit for Privacy-Enhanced Mail:
358
359 global.h -- global header file
360
361 md5.h -- header file for MD5
362
363 md5c.c -- source code for MD5
364
365 For more information on RSAREF, send email to <rsaref@rsa.com>.
366
367 The appendix also includes the following file:
368
369 mddriver.c -- test driver for MD2, MD4 and MD5
370
371 The driver compiles for MD5 by default but can compile for MD2 or MD4
372 if the symbol MD is defined on the C compiler command line as 2 or 4.
373
374 The implementation is portable and should work on many different
375 plaforms. However, it is not difficult to optimize the implementation
376 on particular platforms, an exercise left to the reader. For example,
377 on "little-endian" platforms where the lowest-addressed byte in a 32-
378 bit word is the least significant and there are no alignment
379 restrictions, the call to Decode in MD5Transform can be replaced with
380 a typecast.
381
382 A.1 global.h
383
384 /* GLOBAL.H - RSAREF types and constants
385 */
386
387 /* PROTOTYPES should be set to one if and only if the compiler supports
388 function argument prototyping.
389 The following makes PROTOTYPES default to 0 if it has not already
390
391
392
393 Rivest [Page 7]
394
395 RFC 1321 MD5 Message-Digest Algorithm April 1992
396
397
398 been defined with C compiler flags.
399 */
400 #ifndef PROTOTYPES
401 #define PROTOTYPES 0
402 #endif
403
404 /* POINTER defines a generic pointer type */
405 typedef unsigned char *POINTER;
406
407 /* UINT2 defines a two byte word */
408 typedef unsigned short int UINT2;
409
410 /* UINT4 defines a four byte word */
411 typedef unsigned long int UINT4;
412
413 /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
414 If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
415 returns an empty list.
416 */
417 #if PROTOTYPES
418 #define PROTO_LIST(list) list
419 #else
420 #define PROTO_LIST(list) ()
421 #endif
422
423 A.2 md5.h
424
425 /* MD5.H - header file for MD5C.C
426 */
427
428 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
429 rights reserved.
430
431 License to copy and use this software is granted provided that it
432 is identified as the "RSA Data Security, Inc. MD5 Message-Digest
433 Algorithm" in all material mentioning or referencing this software
434 or this function.
435
436 License is also granted to make and use derivative works provided
437 that such works are identified as "derived from the RSA Data
438 Security, Inc. MD5 Message-Digest Algorithm" in all material
439 mentioning or referencing the derived work.
440
441 RSA Data Security, Inc. makes no representations concerning either
442 the merchantability of this software or the suitability of this
443 software for any particular purpose. It is provided "as is"
444 without express or implied warranty of any kind.
445
446
447
448
449 Rivest [Page 8]
450
451 RFC 1321 MD5 Message-Digest Algorithm April 1992
452
453
454 These notices must be retained in any copies of any part of this
455 documentation and/or software.
456 */
457
458 /* MD5 context. */
459 typedef struct {
460 UINT4 state[4]; /* state (ABCD) */
461 UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
462 unsigned char buffer[64]; /* input buffer */
463 } MD5_CTX;
464
465 void MD5Init PROTO_LIST ((MD5_CTX *));
466 void MD5Update PROTO_LIST
467 ((MD5_CTX *, unsigned char *, unsigned int));
468 void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
469
470 A.3 md5c.c
471
472 /* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
473 */
474
475 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
476 rights reserved.
477
478 License to copy and use this software is granted provided that it
479 is identified as the "RSA Data Security, Inc. MD5 Message-Digest
480 Algorithm" in all material mentioning or referencing this software
481 or this function.
482
483 License is also granted to make and use derivative works provided
484 that such works are identified as "derived from the RSA Data
485 Security, Inc. MD5 Message-Digest Algorithm" in all material
486 mentioning or referencing the derived work.
487
488 RSA Data Security, Inc. makes no representations concerning either
489 the merchantability of this software or the suitability of this
490 software for any particular purpose. It is provided "as is"
491 without express or implied warranty of any kind.
492
493 These notices must be retained in any copies of any part of this
494 documentation and/or software.
495 */
496
497 #include "global.h"
498 #include "md5.h"
499
500 /* Constants for MD5Transform routine.
501 */
502
503
504
505 Rivest [Page 9]
506
507 RFC 1321 MD5 Message-Digest Algorithm April 1992
508
509
510 #define S11 7
511 #define S12 12
512 #define S13 17
513 #define S14 22
514 #define S21 5
515 #define S22 9
516 #define S23 14
517 #define S24 20
518 #define S31 4
519 #define S32 11
520 #define S33 16
521 #define S34 23
522 #define S41 6
523 #define S42 10
524 #define S43 15
525 #define S44 21
526
527 static void MD5Transform PROTO_LIST ((UINT4 [4], unsigned char [64]));
528 static void Encode PROTO_LIST
529 ((unsigned char *, UINT4 *, unsigned int));
530 static void Decode PROTO_LIST
531 ((UINT4 *, unsigned char *, unsigned int));
532 static void MD5_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int));
533 static void MD5_memset PROTO_LIST ((POINTER, int, unsigned int));
534
535 static unsigned char PADDING[64] = {
536 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
537 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
538 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
539 };
540
541 /* F, G, H and I are basic MD5 functions.
542 */
543 #define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
544 #define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
545 #define H(x, y, z) ((x) ^ (y) ^ (z))
546 #define I(x, y, z) ((y) ^ ((x) | (~z)))
547
548 /* ROTATE_LEFT rotates x left n bits.
549 */
550 #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
551
552 /* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
553 Rotation is separate from addition to prevent recomputation.
554 */
555 #define FF(a, b, c, d, x, s, ac) { \
556 (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
557 (a) = ROTATE_LEFT ((a), (s)); \
558
559
560
561 Rivest [Page 10]
562
563 RFC 1321 MD5 Message-Digest Algorithm April 1992
564
565
566 (a) += (b); \
567 }
568 #define GG(a, b, c, d, x, s, ac) { \
569 (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
570 (a) = ROTATE_LEFT ((a), (s)); \
571 (a) += (b); \
572 }
573 #define HH(a, b, c, d, x, s, ac) { \
574 (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
575 (a) = ROTATE_LEFT ((a), (s)); \
576 (a) += (b); \
577 }
578 #define II(a, b, c, d, x, s, ac) { \
579 (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
580 (a) = ROTATE_LEFT ((a), (s)); \
581 (a) += (b); \
582 }
583
584 /* MD5 initialization. Begins an MD5 operation, writing a new context.
585 */
586 void MD5Init (context)
587 MD5_CTX *context; /* context */
588 {
589 context->count[0] = context->count[1] = 0;
590 /* Load magic initialization constants.
591 */
592 context->state[0] = 0x67452301;
593 context->state[1] = 0xefcdab89;
594 context->state[2] = 0x98badcfe;
595 context->state[3] = 0x10325476;
596 }
597
598 /* MD5 block update operation. Continues an MD5 message-digest
599 operation, processing another message block, and updating the
600 context.
601 */
602 void MD5Update (context, input, inputLen)
603 MD5_CTX *context; /* context */
604 unsigned char *input; /* input block */
605 unsigned int inputLen; /* length of input block */
606 {
607 unsigned int i, index, partLen;
608
609 /* Compute number of bytes mod 64 */
610 index = (unsigned int)((context->count[0] >> 3) & 0x3F);
611
612 /* Update number of bits */
613 if ((context->count[0] += ((UINT4)inputLen << 3))
614
615
616
617 Rivest [Page 11]
618
619 RFC 1321 MD5 Message-Digest Algorithm April 1992
620
621
622 < ((UINT4)inputLen << 3))
623 context->count[1]++;
624 context->count[1] += ((UINT4)inputLen >> 29);
625
626 partLen = 64 - index;
627
628 /* Transform as many times as possible.
629 */
630 if (inputLen >= partLen) {
631 MD5_memcpy
632 ((POINTER)&context->buffer[index], (POINTER)input, partLen);
633 MD5Transform (context->state, context->buffer);
634
635 for (i = partLen; i + 63 < inputLen; i += 64)
636 MD5Transform (context->state, &input[i]);
637
638 index = 0;
639 }
640 else
641 i = 0;
642
643 /* Buffer remaining input */
644 MD5_memcpy
645 ((POINTER)&context->buffer[index], (POINTER)&input[i],
646 inputLen-i);
647 }
648
649 /* MD5 finalization. Ends an MD5 message-digest operation, writing the
650 the message digest and zeroizing the context.
651 */
652 void MD5Final (digest, context)
653 unsigned char digest[16]; /* message digest */
654 MD5_CTX *context; /* context */
655 {
656 unsigned char bits[8];
657 unsigned int index, padLen;
658
659 /* Save number of bits */
660 Encode (bits, context->count, 8);
661
662 /* Pad out to 56 mod 64.
663 */
664 index = (unsigned int)((context->count[0] >> 3) & 0x3f);
665 padLen = (index < 56) ? (56 - index) : (120 - index);
666 MD5Update (context, PADDING, padLen);
667
668 /* Append length (before padding) */
669 MD5Update (context, bits, 8);
670
671
672
673 Rivest [Page 12]
674
675 RFC 1321 MD5 Message-Digest Algorithm April 1992
676
677
678 /* Store state in digest */
679 Encode (digest, context->state, 16);
680
681 /* Zeroize sensitive information.
682 */
683 MD5_memset ((POINTER)context, 0, sizeof (*context));
684 }
685
686 /* MD5 basic transformation. Transforms state based on block.
687 */
688 static void MD5Transform (state, block)
689 UINT4 state[4];
690 unsigned char block[64];
691 {
692 UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
693
694 Decode (x, block, 64);
695
696 /* Round 1 */
697 FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
698 FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
699 FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
700 FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
701 FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
702 FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
703 FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
704 FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
705 FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
706 FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
707 FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
708 FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
709 FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
710 FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
711 FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
712 FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
713
714 /* Round 2 */
715 GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
716 GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
717 GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
718 GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
719 GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
720 GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */
721 GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
722 GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
723 GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
724 GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
725 GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
726
727
728
729 Rivest [Page 13]
730
731 RFC 1321 MD5 Message-Digest Algorithm April 1992
732
733
734 GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
735 GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
736 GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
737 GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
738 GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
739
740 /* Round 3 */
741 HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
742 HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
743 HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
744 HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
745 HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
746 HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
747 HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
748 HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
749 HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
750 HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
751 HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
752 HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
753 HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
754 HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
755 HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
756 HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
757
758 /* Round 4 */
759 II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
760 II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
761 II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
762 II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
763 II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
764 II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
765 II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
766 II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
767 II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
768 II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
769 II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
770 II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
771 II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
772 II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
773 II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
774 II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
775
776 state[0] += a;
777 state[1] += b;
778 state[2] += c;
779 state[3] += d;
780
781 /* Zeroize sensitive information.
782
783
784
785 Rivest [Page 14]
786
787 RFC 1321 MD5 Message-Digest Algorithm April 1992
788
789
790 */
791 MD5_memset ((POINTER)x, 0, sizeof (x));
792 }
793
794 /* Encodes input (UINT4) into output (unsigned char). Assumes len is
795 a multiple of 4.
796 */
797 static void Encode (output, input, len)
798 unsigned char *output;
799 UINT4 *input;
800 unsigned int len;
801 {
802 unsigned int i, j;
803
804 for (i = 0, j = 0; j < len; i++, j += 4) {
805 output[j] = (unsigned char)(input[i] & 0xff);
806 output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
807 output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
808 output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
809 }
810 }
811
812 /* Decodes input (unsigned char) into output (UINT4). Assumes len is
813 a multiple of 4.
814 */
815 static void Decode (output, input, len)
816 UINT4 *output;
817 unsigned char *input;
818 unsigned int len;
819 {
820 unsigned int i, j;
821
822 for (i = 0, j = 0; j < len; i++, j += 4)
823 output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
824 (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
825 }
826
827 /* Note: Replace "for loop" with standard memcpy if possible.
828 */
829
830 static void MD5_memcpy (output, input, len)
831 POINTER output;
832 POINTER input;
833 unsigned int len;
834 {
835 unsigned int i;
836
837 for (i = 0; i < len; i++)
838
839
840
841 Rivest [Page 15]
842
843 RFC 1321 MD5 Message-Digest Algorithm April 1992
844
845
846 output[i] = input[i];
847 }
848
849 /* Note: Replace "for loop" with standard memset if possible.
850 */
851 static void MD5_memset (output, value, len)
852 POINTER output;
853 int value;
854 unsigned int len;
855 {
856 unsigned int i;
857
858 for (i = 0; i < len; i++)
859 ((char *)output)[i] = (char)value;
860 }
861
862 A.4 mddriver.c
863
864 /* MDDRIVER.C - test driver for MD2, MD4 and MD5
865 */
866
867 /* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
868 rights reserved.
869
870 RSA Data Security, Inc. makes no representations concerning either
871 the merchantability of this software or the suitability of this
872 software for any particular purpose. It is provided "as is"
873 without express or implied warranty of any kind.
874
875 These notices must be retained in any copies of any part of this
876 documentation and/or software.
877 */
878
879 /* The following makes MD default to MD5 if it has not already been
880 defined with C compiler flags.
881 */
882 #ifndef MD
883 #define MD MD5
884 #endif
885
886 #include <stdio.h>
887 #include <time.h>
888 #include <string.h>
889 #include "global.h"
890 #if MD == 2
891 #include "md2.h"
892 #endif
893 #if MD == 4
894
895
896
897 Rivest [Page 16]
898
899 RFC 1321 MD5 Message-Digest Algorithm April 1992
900
901
902 #include "md4.h"
903 #endif
904 #if MD == 5
905 #include "md5.h"
906 #endif
907
908 /* Length of test block, number of test blocks.
909 */
910 #define TEST_BLOCK_LEN 1000
911 #define TEST_BLOCK_COUNT 1000
912
913 static void MDString PROTO_LIST ((char *));
914 static void MDTimeTrial PROTO_LIST ((void));
915 static void MDTestSuite PROTO_LIST ((void));
916 static void MDFile PROTO_LIST ((char *));
917 static void MDFilter PROTO_LIST ((void));
918 static void MDPrint PROTO_LIST ((unsigned char [16]));
919
920 #if MD == 2
921 #define MD_CTX MD2_CTX
922 #define MDInit MD2Init
923 #define MDUpdate MD2Update
924 #define MDFinal MD2Final
925 #endif
926 #if MD == 4
927 #define MD_CTX MD4_CTX
928 #define MDInit MD4Init
929 #define MDUpdate MD4Update
930 #define MDFinal MD4Final
931 #endif
932 #if MD == 5
933 #define MD_CTX MD5_CTX
934 #define MDInit MD5Init
935 #define MDUpdate MD5Update
936 #define MDFinal MD5Final
937 #endif
938
939 /* Main driver.
940
941 Arguments (may be any combination):
942 -sstring - digests string
943 -t - runs time trial
944 -x - runs test script
945 filename - digests file
946 (none) - digests standard input
947 */
948 int main (argc, argv)
949 int argc;
950
951
952
953 Rivest [Page 17]
954
955 RFC 1321 MD5 Message-Digest Algorithm April 1992
956
957
958 char *argv[];
959 {
960 int i;
961
962 if (argc > 1)
963 for (i = 1; i < argc; i++)
964 if (argv[i][0] == '-' && argv[i][1] == 's')
965 MDString (argv[i] + 2);
966 else if (strcmp (argv[i], "-t") == 0)
967 MDTimeTrial ();
968 else if (strcmp (argv[i], "-x") == 0)
969 MDTestSuite ();
970 else
971 MDFile (argv[i]);
972 else
973 MDFilter ();
974
975 return (0);
976 }
977
978 /* Digests a string and prints the result.
979 */
980 static void MDString (string)
981 char *string;
982 {
983 MD_CTX context;
984 unsigned char digest[16];
985 unsigned int len = strlen (string);
986
987 MDInit (&context);
988 MDUpdate (&context, string, len);
989 MDFinal (digest, &context);
990
991 printf ("MD%d (\"%s\") = ", MD, string);
992 MDPrint (digest);
993 printf ("\n");
994 }
995
996 /* Measures the time to digest TEST_BLOCK_COUNT TEST_BLOCK_LEN-byte
997 blocks.
998 */
999 static void MDTimeTrial ()
1000 {
1001 MD_CTX context;
1002 time_t endTime, startTime;
1003 unsigned char block[TEST_BLOCK_LEN], digest[16];
1004 unsigned int i;
1005
1006
1007
1008
1009 Rivest [Page 18]
1010
1011 RFC 1321 MD5 Message-Digest Algorithm April 1992
1012
1013
1014 printf
1015 ("MD%d time trial. Digesting %d %d-byte blocks ...", MD,
1016 TEST_BLOCK_LEN, TEST_BLOCK_COUNT);
1017
1018 /* Initialize block */
1019 for (i = 0; i < TEST_BLOCK_LEN; i++)
1020 block[i] = (unsigned char)(i & 0xff);
1021
1022 /* Start timer */
1023 time (&startTime);
1024
1025 /* Digest blocks */
1026 MDInit (&context);
1027 for (i = 0; i < TEST_BLOCK_COUNT; i++)
1028 MDUpdate (&context, block, TEST_BLOCK_LEN);
1029 MDFinal (digest, &context);
1030
1031 /* Stop timer */
1032 time (&endTime);
1033
1034 printf (" done\n");
1035 printf ("Digest = ");
1036 MDPrint (digest);
1037 printf ("\nTime = %ld seconds\n", (long)(endTime-startTime));
1038 printf
1039 ("Speed = %ld bytes/second\n",
1040 (long)TEST_BLOCK_LEN * (long)TEST_BLOCK_COUNT/(endTime-startTime));
1041 }
1042
1043 /* Digests a reference suite of strings and prints the results.
1044 */
1045 static void MDTestSuite ()
1046 {
1047 printf ("MD%d test suite:\n", MD);
1048
1049 MDString ("");
1050 MDString ("a");
1051 MDString ("abc");
1052 MDString ("message digest");
1053 MDString ("abcdefghijklmnopqrstuvwxyz");
1054 MDString
1055 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
1056 MDString
1057 ("1234567890123456789012345678901234567890\
1058 1234567890123456789012345678901234567890");
1059 }
1060
1061 /* Digests a file and prints the result.
1062
1063
1064
1065 Rivest [Page 19]
1066
1067 RFC 1321 MD5 Message-Digest Algorithm April 1992
1068
1069
1070 */
1071 static void MDFile (filename)
1072 char *filename;
1073 {
1074 FILE *file;
1075 MD_CTX context;
1076 int len;
1077 unsigned char buffer[1024], digest[16];
1078
1079 if ((file = fopen (filename, "rb")) == NULL)
1080 printf ("%s can't be opened\n", filename);
1081
1082 else {
1083 MDInit (&context);
1084 while (len = fread (buffer, 1, 1024, file))
1085 MDUpdate (&context, buffer, len);
1086 MDFinal (digest, &context);
1087
1088 fclose (file);
1089
1090 printf ("MD%d (%s) = ", MD, filename);
1091 MDPrint (digest);
1092 printf ("\n");
1093 }
1094 }
1095
1096 /* Digests the standard input and prints the result.
1097 */
1098 static void MDFilter ()
1099 {
1100 MD_CTX context;
1101 int len;
1102 unsigned char buffer[16], digest[16];
1103
1104 MDInit (&context);
1105 while (len = fread (buffer, 1, 16, stdin))
1106 MDUpdate (&context, buffer, len);
1107 MDFinal (digest, &context);
1108
1109 MDPrint (digest);
1110 printf ("\n");
1111 }
1112
1113 /* Prints a message digest in hexadecimal.
1114 */
1115 static void MDPrint (digest)
1116 unsigned char digest[16];
1117 {
1118
1119
1120
1121 Rivest [Page 20]
1122
1123 RFC 1321 MD5 Message-Digest Algorithm April 1992
1124
1125
1126 unsigned int i;
1127
1128 for (i = 0; i < 16; i++)
1129 printf ("%02x", digest[i]);
1130 }
1131
1132 A.5 Test suite
1133
1134 The MD5 test suite (driver option "-x") should print the following
1135 results:
1136
1137 MD5 test suite:
1138 MD5 ("") = d41d8cd98f00b204e9800998ecf8427e
1139 MD5 ("a") = 0cc175b9c0f1b6a831c399e269772661
1140 MD5 ("abc") = 900150983cd24fb0d6963f7d28e17f72
1141 MD5 ("message digest") = f96b697d7cb7938d525a2f31aaf161d0
1142 MD5 ("abcdefghijklmnopqrstuvwxyz") = c3fcd3d76192e4007dfb496cca67e13b
1143 MD5 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") =
1144 d174ab98d277d9f5a5611c2c9f419d9f
1145 MD5 ("123456789012345678901234567890123456789012345678901234567890123456
1146 78901234567890") = 57edf4a22be3c955ac49da2e2107b67a
1147
1148 Security Considerations
1149
1150 The level of security discussed in this memo is considered to be
1151 sufficient for implementing very high security hybrid digital-
1152 signature schemes based on MD5 and a public-key cryptosystem.
1153
1154 Author's Address
1155
1156 Ronald L. Rivest
1157 Massachusetts Institute of Technology
1158 Laboratory for Computer Science
1159 NE43-324
1160 545 Technology Square
1161 Cambridge, MA 02139-1986
1162
1163 Phone: (617) 253-5880
1164 EMail: rivest@theory.lcs.mit.edu
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177 Rivest [Page 21]
1178
0
1
2
3
4
5
6 Network Working Group J. Myers
7 Request for Comments: 1939 Carnegie Mellon
8 STD: 53 M. Rose
9 Obsoletes: 1725 Dover Beach Consulting, Inc.
10 Category: Standards Track May 1996
11
12
13 Post Office Protocol - Version 3
14
15 Status of this Memo
16
17 This document specifies an Internet standards track protocol for the
18 Internet community, and requests discussion and suggestions for
19 improvements. Please refer to the current edition of the "Internet
20 Official Protocol Standards" (STD 1) for the standardization state
21 and status of this protocol. Distribution of this memo is unlimited.
22
23 Table of Contents
24
25 1. Introduction ................................................ 2
26 2. A Short Digression .......................................... 2
27 3. Basic Operation ............................................. 3
28 4. The AUTHORIZATION State ..................................... 4
29 QUIT Command ................................................ 5
30 5. The TRANSACTION State ....................................... 5
31 STAT Command ................................................ 6
32 LIST Command ................................................ 6
33 RETR Command ................................................ 8
34 DELE Command ................................................ 8
35 NOOP Command ................................................ 9
36 RSET Command ................................................ 9
37 6. The UPDATE State ............................................ 10
38 QUIT Command ................................................ 10
39 7. Optional POP3 Commands ...................................... 11
40 TOP Command ................................................. 11
41 UIDL Command ................................................ 12
42 USER Command ................................................ 13
43 PASS Command ................................................ 14
44 APOP Command ................................................ 15
45 8. Scaling and Operational Considerations ...................... 16
46 9. POP3 Command Summary ........................................ 18
47 10. Example POP3 Session ....................................... 19
48 11. Message Format ............................................. 19
49 12. References ................................................. 20
50 13. Security Considerations .................................... 20
51 14. Acknowledgements ........................................... 20
52 15. Authors' Addresses ......................................... 21
53 Appendix A. Differences from RFC 1725 .......................... 22
54
55
56
57 Myers & Rose Standards Track [Page 1]
58
59 RFC 1939 POP3 May 1996
60
61
62 Appendix B. Command Index ...................................... 23
63
64 1. Introduction
65
66 On certain types of smaller nodes in the Internet it is often
67 impractical to maintain a message transport system (MTS). For
68 example, a workstation may not have sufficient resources (cycles,
69 disk space) in order to permit a SMTP server [RFC821] and associated
70 local mail delivery system to be kept resident and continuously
71 running. Similarly, it may be expensive (or impossible) to keep a
72 personal computer interconnected to an IP-style network for long
73 amounts of time (the node is lacking the resource known as
74 "connectivity").
75
76 Despite this, it is often very useful to be able to manage mail on
77 these smaller nodes, and they often support a user agent (UA) to aid
78 the tasks of mail handling. To solve this problem, a node which can
79 support an MTS entity offers a maildrop service to these less endowed
80 nodes. The Post Office Protocol - Version 3 (POP3) is intended to
81 permit a workstation to dynamically access a maildrop on a server
82 host in a useful fashion. Usually, this means that the POP3 protocol
83 is used to allow a workstation to retrieve mail that the server is
84 holding for it.
85
86 POP3 is not intended to provide extensive manipulation operations of
87 mail on the server; normally, mail is downloaded and then deleted. A
88 more advanced (and complex) protocol, IMAP4, is discussed in
89 [RFC1730].
90
91 For the remainder of this memo, the term "client host" refers to a
92 host making use of the POP3 service, while the term "server host"
93 refers to a host which offers the POP3 service.
94
95 2. A Short Digression
96
97 This memo does not specify how a client host enters mail into the
98 transport system, although a method consistent with the philosophy of
99 this memo is presented here:
100
101 When the user agent on a client host wishes to enter a message
102 into the transport system, it establishes an SMTP connection to
103 its relay host and sends all mail to it. This relay host could
104 be, but need not be, the POP3 server host for the client host. Of
105 course, the relay host must accept mail for delivery to arbitrary
106 recipient addresses, that functionality is not required of all
107 SMTP servers.
108
109
110
111
112
113 Myers & Rose Standards Track [Page 2]
114
115 RFC 1939 POP3 May 1996
116
117
118 3. Basic Operation
119
120 Initially, the server host starts the POP3 service by listening on
121 TCP port 110. When a client host wishes to make use of the service,
122 it establishes a TCP connection with the server host. When the
123 connection is established, the POP3 server sends a greeting. The
124 client and POP3 server then exchange commands and responses
125 (respectively) until the connection is closed or aborted.
126
127 Commands in the POP3 consist of a case-insensitive keyword, possibly
128 followed by one or more arguments. All commands are terminated by a
129 CRLF pair. Keywords and arguments consist of printable ASCII
130 characters. Keywords and arguments are each separated by a single
131 SPACE character. Keywords are three or four characters long. Each
132 argument may be up to 40 characters long.
133
134 Responses in the POP3 consist of a status indicator and a keyword
135 possibly followed by additional information. All responses are
136 terminated by a CRLF pair. Responses may be up to 512 characters
137 long, including the terminating CRLF. There are currently two status
138 indicators: positive ("+OK") and negative ("-ERR"). Servers MUST
139 send the "+OK" and "-ERR" in upper case.
140
141 Responses to certain commands are multi-line. In these cases, which
142 are clearly indicated below, after sending the first line of the
143 response and a CRLF, any additional lines are sent, each terminated
144 by a CRLF pair. When all lines of the response have been sent, a
145 final line is sent, consisting of a termination octet (decimal code
146 046, ".") and a CRLF pair. If any line of the multi-line response
147 begins with the termination octet, the line is "byte-stuffed" by
148 pre-pending the termination octet to that line of the response.
149 Hence a multi-line response is terminated with the five octets
150 "CRLF.CRLF". When examining a multi-line response, the client checks
151 to see if the line begins with the termination octet. If so and if
152 octets other than CRLF follow, the first octet of the line (the
153 termination octet) is stripped away. If so and if CRLF immediately
154 follows the termination character, then the response from the POP
155 server is ended and the line containing ".CRLF" is not considered
156 part of the multi-line response.
157
158 A POP3 session progresses through a number of states during its
159 lifetime. Once the TCP connection has been opened and the POP3
160 server has sent the greeting, the session enters the AUTHORIZATION
161 state. In this state, the client must identify itself to the POP3
162 server. Once the client has successfully done this, the server
163 acquires resources associated with the client's maildrop, and the
164 session enters the TRANSACTION state. In this state, the client
165 requests actions on the part of the POP3 server. When the client has
166
167
168
169 Myers & Rose Standards Track [Page 3]
170
171 RFC 1939 POP3 May 1996
172
173
174 issued the QUIT command, the session enters the UPDATE state. In
175 this state, the POP3 server releases any resources acquired during
176 the TRANSACTION state and says goodbye. The TCP connection is then
177 closed.
178
179 A server MUST respond to an unrecognized, unimplemented, or
180 syntactically invalid command by responding with a negative status
181 indicator. A server MUST respond to a command issued when the
182 session is in an incorrect state by responding with a negative status
183 indicator. There is no general method for a client to distinguish
184 between a server which does not implement an optional command and a
185 server which is unwilling or unable to process the command.
186
187 A POP3 server MAY have an inactivity autologout timer. Such a timer
188 MUST be of at least 10 minutes' duration. The receipt of any command
189 from the client during that interval should suffice to reset the
190 autologout timer. When the timer expires, the session does NOT enter
191 the UPDATE state--the server should close the TCP connection without
192 removing any messages or sending any response to the client.
193
194 4. The AUTHORIZATION State
195
196 Once the TCP connection has been opened by a POP3 client, the POP3
197 server issues a one line greeting. This can be any positive
198 response. An example might be:
199
200 S: +OK POP3 server ready
201
202 The POP3 session is now in the AUTHORIZATION state. The client must
203 now identify and authenticate itself to the POP3 server. Two
204 possible mechanisms for doing this are described in this document,
205 the USER and PASS command combination and the APOP command. Both
206 mechanisms are described later in this document. Additional
207 authentication mechanisms are described in [RFC1734]. While there is
208 no single authentication mechanism that is required of all POP3
209 servers, a POP3 server must of course support at least one
210 authentication mechanism.
211
212 Once the POP3 server has determined through the use of any
213 authentication command that the client should be given access to the
214 appropriate maildrop, the POP3 server then acquires an exclusive-
215 access lock on the maildrop, as necessary to prevent messages from
216 being modified or removed before the session enters the UPDATE state.
217 If the lock is successfully acquired, the POP3 server responds with a
218 positive status indicator. The POP3 session now enters the
219 TRANSACTION state, with no messages marked as deleted. If the
220 maildrop cannot be opened for some reason (for example, a lock can
221 not be acquired, the client is denied access to the appropriate
222
223
224
225 Myers & Rose Standards Track [Page 4]
226
227 RFC 1939 POP3 May 1996
228
229
230 maildrop, or the maildrop cannot be parsed), the POP3 server responds
231 with a negative status indicator. (If a lock was acquired but the
232 POP3 server intends to respond with a negative status indicator, the
233 POP3 server must release the lock prior to rejecting the command.)
234 After returning a negative status indicator, the server may close the
235 connection. If the server does not close the connection, the client
236 may either issue a new authentication command and start again, or the
237 client may issue the QUIT command.
238
239 After the POP3 server has opened the maildrop, it assigns a message-
240 number to each message, and notes the size of each message in octets.
241 The first message in the maildrop is assigned a message-number of
242 "1", the second is assigned "2", and so on, so that the nth message
243 in a maildrop is assigned a message-number of "n". In POP3 commands
244 and responses, all message-numbers and message sizes are expressed in
245 base-10 (i.e., decimal).
246
247 Here is the summary for the QUIT command when used in the
248 AUTHORIZATION state:
249
250 QUIT
251
252 Arguments: none
253
254 Restrictions: none
255
256 Possible Responses:
257 +OK
258
259 Examples:
260 C: QUIT
261 S: +OK dewey POP3 server signing off
262
263 5. The TRANSACTION State
264
265 Once the client has successfully identified itself to the POP3 server
266 and the POP3 server has locked and opened the appropriate maildrop,
267 the POP3 session is now in the TRANSACTION state. The client may now
268 issue any of the following POP3 commands repeatedly. After each
269 command, the POP3 server issues a response. Eventually, the client
270 issues the QUIT command and the POP3 session enters the UPDATE state.
271
272
273
274
275
276
277
278
279
280
281 Myers & Rose Standards Track [Page 5]
282
283 RFC 1939 POP3 May 1996
284
285
286 Here are the POP3 commands valid in the TRANSACTION state:
287
288 STAT
289
290 Arguments: none
291
292 Restrictions:
293 may only be given in the TRANSACTION state
294
295 Discussion:
296 The POP3 server issues a positive response with a line
297 containing information for the maildrop. This line is
298 called a "drop listing" for that maildrop.
299
300 In order to simplify parsing, all POP3 servers are
301 required to use a certain format for drop listings. The
302 positive response consists of "+OK" followed by a single
303 space, the number of messages in the maildrop, a single
304 space, and the size of the maildrop in octets. This memo
305 makes no requirement on what follows the maildrop size.
306 Minimal implementations should just end that line of the
307 response with a CRLF pair. More advanced implementations
308 may include other information.
309
310 NOTE: This memo STRONGLY discourages implementations
311 from supplying additional information in the drop
312 listing. Other, optional, facilities are discussed
313 later on which permit the client to parse the messages
314 in the maildrop.
315
316 Note that messages marked as deleted are not counted in
317 either total.
318
319 Possible Responses:
320 +OK nn mm
321
322 Examples:
323 C: STAT
324 S: +OK 2 320
325
326
327 LIST [msg]
328
329 Arguments:
330 a message-number (optional), which, if present, may NOT
331 refer to a message marked as deleted
332
333
334
335
336
337 Myers & Rose Standards Track [Page 6]
338
339 RFC 1939 POP3 May 1996
340
341
342 Restrictions:
343 may only be given in the TRANSACTION state
344
345 Discussion:
346 If an argument was given and the POP3 server issues a
347 positive response with a line containing information for
348 that message. This line is called a "scan listing" for
349 that message.
350
351 If no argument was given and the POP3 server issues a
352 positive response, then the response given is multi-line.
353 After the initial +OK, for each message in the maildrop,
354 the POP3 server responds with a line containing
355 information for that message. This line is also called a
356 "scan listing" for that message. If there are no
357 messages in the maildrop, then the POP3 server responds
358 with no scan listings--it issues a positive response
359 followed by a line containing a termination octet and a
360 CRLF pair.
361
362 In order to simplify parsing, all POP3 servers are
363 required to use a certain format for scan listings. A
364 scan listing consists of the message-number of the
365 message, followed by a single space and the exact size of
366 the message in octets. Methods for calculating the exact
367 size of the message are described in the "Message Format"
368 section below. This memo makes no requirement on what
369 follows the message size in the scan listing. Minimal
370 implementations should just end that line of the response
371 with a CRLF pair. More advanced implementations may
372 include other information, as parsed from the message.
373
374 NOTE: This memo STRONGLY discourages implementations
375 from supplying additional information in the scan
376 listing. Other, optional, facilities are discussed
377 later on which permit the client to parse the messages
378 in the maildrop.
379
380 Note that messages marked as deleted are not listed.
381
382 Possible Responses:
383 +OK scan listing follows
384 -ERR no such message
385
386 Examples:
387 C: LIST
388 S: +OK 2 messages (320 octets)
389 S: 1 120
390
391
392
393 Myers & Rose Standards Track [Page 7]
394
395 RFC 1939 POP3 May 1996
396
397
398 S: 2 200
399 S: .
400 ...
401 C: LIST 2
402 S: +OK 2 200
403 ...
404 C: LIST 3
405 S: -ERR no such message, only 2 messages in maildrop
406
407
408 RETR msg
409
410 Arguments:
411 a message-number (required) which may NOT refer to a
412 message marked as deleted
413
414 Restrictions:
415 may only be given in the TRANSACTION state
416
417 Discussion:
418 If the POP3 server issues a positive response, then the
419 response given is multi-line. After the initial +OK, the
420 POP3 server sends the message corresponding to the given
421 message-number, being careful to byte-stuff the termination
422 character (as with all multi-line responses).
423
424 Possible Responses:
425 +OK message follows
426 -ERR no such message
427
428 Examples:
429 C: RETR 1
430 S: +OK 120 octets
431 S: <the POP3 server sends the entire message here>
432 S: .
433
434
435 DELE msg
436
437 Arguments:
438 a message-number (required) which may NOT refer to a
439 message marked as deleted
440
441 Restrictions:
442 may only be given in the TRANSACTION state
443
444
445
446
447
448
449 Myers & Rose Standards Track [Page 8]
450
451 RFC 1939 POP3 May 1996
452
453
454 Discussion:
455 The POP3 server marks the message as deleted. Any future
456 reference to the message-number associated with the message
457 in a POP3 command generates an error. The POP3 server does
458 not actually delete the message until the POP3 session
459 enters the UPDATE state.
460
461 Possible Responses:
462 +OK message deleted
463 -ERR no such message
464
465 Examples:
466 C: DELE 1
467 S: +OK message 1 deleted
468 ...
469 C: DELE 2
470 S: -ERR message 2 already deleted
471
472
473 NOOP
474
475 Arguments: none
476
477 Restrictions:
478 may only be given in the TRANSACTION state
479
480 Discussion:
481 The POP3 server does nothing, it merely replies with a
482 positive response.
483
484 Possible Responses:
485 +OK
486
487 Examples:
488 C: NOOP
489 S: +OK
490
491
492 RSET
493
494 Arguments: none
495
496 Restrictions:
497 may only be given in the TRANSACTION state
498
499 Discussion:
500 If any messages have been marked as deleted by the POP3
501 server, they are unmarked. The POP3 server then replies
502
503
504
505 Myers & Rose Standards Track [Page 9]
506
507 RFC 1939 POP3 May 1996
508
509
510 with a positive response.
511
512 Possible Responses:
513 +OK
514
515 Examples:
516 C: RSET
517 S: +OK maildrop has 2 messages (320 octets)
518
519 6. The UPDATE State
520
521 When the client issues the QUIT command from the TRANSACTION state,
522 the POP3 session enters the UPDATE state. (Note that if the client
523 issues the QUIT command from the AUTHORIZATION state, the POP3
524 session terminates but does NOT enter the UPDATE state.)
525
526 If a session terminates for some reason other than a client-issued
527 QUIT command, the POP3 session does NOT enter the UPDATE state and
528 MUST not remove any messages from the maildrop.
529
530 QUIT
531
532 Arguments: none
533
534 Restrictions: none
535
536 Discussion:
537 The POP3 server removes all messages marked as deleted
538 from the maildrop and replies as to the status of this
539 operation. If there is an error, such as a resource
540 shortage, encountered while removing messages, the
541 maildrop may result in having some or none of the messages
542 marked as deleted be removed. In no case may the server
543 remove any messages not marked as deleted.
544
545 Whether the removal was successful or not, the server
546 then releases any exclusive-access lock on the maildrop
547 and closes the TCP connection.
548
549 Possible Responses:
550 +OK
551 -ERR some deleted messages not removed
552
553 Examples:
554 C: QUIT
555 S: +OK dewey POP3 server signing off (maildrop empty)
556 ...
557 C: QUIT
558
559
560
561 Myers & Rose Standards Track [Page 10]
562
563 RFC 1939 POP3 May 1996
564
565
566 S: +OK dewey POP3 server signing off (2 messages left)
567 ...
568
569 7. Optional POP3 Commands
570
571 The POP3 commands discussed above must be supported by all minimal
572 implementations of POP3 servers.
573
574 The optional POP3 commands described below permit a POP3 client
575 greater freedom in message handling, while preserving a simple POP3
576 server implementation.
577
578 NOTE: This memo STRONGLY encourages implementations to support
579 these commands in lieu of developing augmented drop and scan
580 listings. In short, the philosophy of this memo is to put
581 intelligence in the part of the POP3 client and not the POP3
582 server.
583
584 TOP msg n
585
586 Arguments:
587 a message-number (required) which may NOT refer to to a
588 message marked as deleted, and a non-negative number
589 of lines (required)
590
591 Restrictions:
592 may only be given in the TRANSACTION state
593
594 Discussion:
595 If the POP3 server issues a positive response, then the
596 response given is multi-line. After the initial +OK, the
597 POP3 server sends the headers of the message, the blank
598 line separating the headers from the body, and then the
599 number of lines of the indicated message's body, being
600 careful to byte-stuff the termination character (as with
601 all multi-line responses).
602
603 Note that if the number of lines requested by the POP3
604 client is greater than than the number of lines in the
605 body, then the POP3 server sends the entire message.
606
607 Possible Responses:
608 +OK top of message follows
609 -ERR no such message
610
611 Examples:
612 C: TOP 1 10
613 S: +OK
614
615
616
617 Myers & Rose Standards Track [Page 11]
618
619 RFC 1939 POP3 May 1996
620
621
622 S: <the POP3 server sends the headers of the
623 message, a blank line, and the first 10 lines
624 of the body of the message>
625 S: .
626 ...
627 C: TOP 100 3
628 S: -ERR no such message
629
630
631 UIDL [msg]
632
633 Arguments:
634 a message-number (optional), which, if present, may NOT
635 refer to a message marked as deleted
636
637 Restrictions:
638 may only be given in the TRANSACTION state.
639
640 Discussion:
641 If an argument was given and the POP3 server issues a positive
642 response with a line containing information for that message.
643 This line is called a "unique-id listing" for that message.
644
645 If no argument was given and the POP3 server issues a positive
646 response, then the response given is multi-line. After the
647 initial +OK, for each message in the maildrop, the POP3 server
648 responds with a line containing information for that message.
649 This line is called a "unique-id listing" for that message.
650
651 In order to simplify parsing, all POP3 servers are required to
652 use a certain format for unique-id listings. A unique-id
653 listing consists of the message-number of the message,
654 followed by a single space and the unique-id of the message.
655 No information follows the unique-id in the unique-id listing.
656
657 The unique-id of a message is an arbitrary server-determined
658 string, consisting of one to 70 characters in the range 0x21
659 to 0x7E, which uniquely identifies a message within a
660 maildrop and which persists across sessions. This
661 persistence is required even if a session ends without
662 entering the UPDATE state. The server should never reuse an
663 unique-id in a given maildrop, for as long as the entity
664 using the unique-id exists.
665
666 Note that messages marked as deleted are not listed.
667
668 While it is generally preferable for server implementations
669 to store arbitrarily assigned unique-ids in the maildrop,
670
671
672
673 Myers & Rose Standards Track [Page 12]
674
675 RFC 1939 POP3 May 1996
676
677
678 this specification is intended to permit unique-ids to be
679 calculated as a hash of the message. Clients should be able
680 to handle a situation where two identical copies of a
681 message in a maildrop have the same unique-id.
682
683 Possible Responses:
684 +OK unique-id listing follows
685 -ERR no such message
686
687 Examples:
688 C: UIDL
689 S: +OK
690 S: 1 whqtswO00WBw418f9t5JxYwZ
691 S: 2 QhdPYR:00WBw1Ph7x7
692 S: .
693 ...
694 C: UIDL 2
695 S: +OK 2 QhdPYR:00WBw1Ph7x7
696 ...
697 C: UIDL 3
698 S: -ERR no such message, only 2 messages in maildrop
699
700
701 USER name
702
703 Arguments:
704 a string identifying a mailbox (required), which is of
705 significance ONLY to the server
706
707 Restrictions:
708 may only be given in the AUTHORIZATION state after the POP3
709 greeting or after an unsuccessful USER or PASS command
710
711 Discussion:
712 To authenticate using the USER and PASS command
713 combination, the client must first issue the USER
714 command. If the POP3 server responds with a positive
715 status indicator ("+OK"), then the client may issue
716 either the PASS command to complete the authentication,
717 or the QUIT command to terminate the POP3 session. If
718 the POP3 server responds with a negative status indicator
719 ("-ERR") to the USER command, then the client may either
720 issue a new authentication command or may issue the QUIT
721 command.
722
723 The server may return a positive response even though no
724 such mailbox exists. The server may return a negative
725 response if mailbox exists, but does not permit plaintext
726
727
728
729 Myers & Rose Standards Track [Page 13]
730
731 RFC 1939 POP3 May 1996
732
733
734 password authentication.
735
736 Possible Responses:
737 +OK name is a valid mailbox
738 -ERR never heard of mailbox name
739
740 Examples:
741 C: USER frated
742 S: -ERR sorry, no mailbox for frated here
743 ...
744 C: USER mrose
745 S: +OK mrose is a real hoopy frood
746
747
748 PASS string
749
750 Arguments:
751 a server/mailbox-specific password (required)
752
753 Restrictions:
754 may only be given in the AUTHORIZATION state immediately
755 after a successful USER command
756
757 Discussion:
758 When the client issues the PASS command, the POP3 server
759 uses the argument pair from the USER and PASS commands to
760 determine if the client should be given access to the
761 appropriate maildrop.
762
763 Since the PASS command has exactly one argument, a POP3
764 server may treat spaces in the argument as part of the
765 password, instead of as argument separators.
766
767 Possible Responses:
768 +OK maildrop locked and ready
769 -ERR invalid password
770 -ERR unable to lock maildrop
771
772 Examples:
773 C: USER mrose
774 S: +OK mrose is a real hoopy frood
775 C: PASS secret
776 S: -ERR maildrop already locked
777 ...
778 C: USER mrose
779 S: +OK mrose is a real hoopy frood
780 C: PASS secret
781 S: +OK mrose's maildrop has 2 messages (320 octets)
782
783
784
785 Myers & Rose Standards Track [Page 14]
786
787 RFC 1939 POP3 May 1996
788
789
790 APOP name digest
791
792 Arguments:
793 a string identifying a mailbox and a MD5 digest string
794 (both required)
795
796 Restrictions:
797 may only be given in the AUTHORIZATION state after the POP3
798 greeting or after an unsuccessful USER or PASS command
799
800 Discussion:
801 Normally, each POP3 session starts with a USER/PASS
802 exchange. This results in a server/user-id specific
803 password being sent in the clear on the network. For
804 intermittent use of POP3, this may not introduce a sizable
805 risk. However, many POP3 client implementations connect to
806 the POP3 server on a regular basis -- to check for new
807 mail. Further the interval of session initiation may be on
808 the order of five minutes. Hence, the risk of password
809 capture is greatly enhanced.
810
811 An alternate method of authentication is required which
812 provides for both origin authentication and replay
813 protection, but which does not involve sending a password
814 in the clear over the network. The APOP command provides
815 this functionality.
816
817 A POP3 server which implements the APOP command will
818 include a timestamp in its banner greeting. The syntax of
819 the timestamp corresponds to the `msg-id' in [RFC822], and
820 MUST be different each time the POP3 server issues a banner
821 greeting. For example, on a UNIX implementation in which a
822 separate UNIX process is used for each instance of a POP3
823 server, the syntax of the timestamp might be:
824
825 <process-ID.clock@hostname>
826
827 where `process-ID' is the decimal value of the process's
828 PID, clock is the decimal value of the system clock, and
829 hostname is the fully-qualified domain-name corresponding
830 to the host where the POP3 server is running.
831
832 The POP3 client makes note of this timestamp, and then
833 issues the APOP command. The `name' parameter has
834 identical semantics to the `name' parameter of the USER
835 command. The `digest' parameter is calculated by applying
836 the MD5 algorithm [RFC1321] to a string consisting of the
837 timestamp (including angle-brackets) followed by a shared
838
839
840
841 Myers & Rose Standards Track [Page 15]
842
843 RFC 1939 POP3 May 1996
844
845
846 secret. This shared secret is a string known only to the
847 POP3 client and server. Great care should be taken to
848 prevent unauthorized disclosure of the secret, as knowledge
849 of the secret will allow any entity to successfully
850 masquerade as the named user. The `digest' parameter
851 itself is a 16-octet value which is sent in hexadecimal
852 format, using lower-case ASCII characters.
853
854 When the POP3 server receives the APOP command, it verifies
855 the digest provided. If the digest is correct, the POP3
856 server issues a positive response, and the POP3 session
857 enters the TRANSACTION state. Otherwise, a negative
858 response is issued and the POP3 session remains in the
859 AUTHORIZATION state.
860
861 Note that as the length of the shared secret increases, so
862 does the difficulty of deriving it. As such, shared
863 secrets should be long strings (considerably longer than
864 the 8-character example shown below).
865
866 Possible Responses:
867 +OK maildrop locked and ready
868 -ERR permission denied
869
870 Examples:
871 S: +OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>
872 C: APOP mrose c4c9334bac560ecc979e58001b3e22fb
873 S: +OK maildrop has 1 message (369 octets)
874
875 In this example, the shared secret is the string `tan-
876 staaf'. Hence, the MD5 algorithm is applied to the string
877
878 <1896.697170952@dbc.mtview.ca.us>tanstaaf
879
880 which produces a digest value of
881
882 c4c9334bac560ecc979e58001b3e22fb
883
884 8. Scaling and Operational Considerations
885
886 Since some of the optional features described above were added to the
887 POP3 protocol, experience has accumulated in using them in large-
888 scale commercial post office operations where most of the users are
889 unrelated to each other. In these situations and others, users and
890 vendors of POP3 clients have discovered that the combination of using
891 the UIDL command and not issuing the DELE command can provide a weak
892 version of the "maildrop as semi-permanent repository" functionality
893 normally associated with IMAP. Of course the other capabilities of
894
895
896
897 Myers & Rose Standards Track [Page 16]
898
899 RFC 1939 POP3 May 1996
900
901
902 IMAP, such as polling an existing connection for newly arrived
903 messages and supporting multiple folders on the server, are not
904 present in POP3.
905
906 When these facilities are used in this way by casual users, there has
907 been a tendency for already-read messages to accumulate on the server
908 without bound. This is clearly an undesirable behavior pattern from
909 the standpoint of the server operator. This situation is aggravated
910 by the fact that the limited capabilities of the POP3 do not permit
911 efficient handling of maildrops which have hundreds or thousands of
912 messages.
913
914 Consequently, it is recommended that operators of large-scale multi-
915 user servers, especially ones in which the user's only access to the
916 maildrop is via POP3, consider such options as:
917
918 * Imposing a per-user maildrop storage quota or the like.
919
920 A disadvantage to this option is that accumulation of messages may
921 result in the user's inability to receive new ones into the
922 maildrop. Sites which choose this option should be sure to inform
923 users of impending or current exhaustion of quota, perhaps by
924 inserting an appropriate message into the user's maildrop.
925
926 * Enforce a site policy regarding mail retention on the server.
927
928 Sites are free to establish local policy regarding the storage and
929 retention of messages on the server, both read and unread. For
930 example, a site might delete unread messages from the server after
931 60 days and delete read messages after 7 days. Such message
932 deletions are outside the scope of the POP3 protocol and are not
933 considered a protocol violation.
934
935 Server operators enforcing message deletion policies should take
936 care to make all users aware of the policies in force.
937
938 Clients must not assume that a site policy will automate message
939 deletions, and should continue to explicitly delete messages using
940 the DELE command when appropriate.
941
942 It should be noted that enforcing site message deletion policies
943 may be confusing to the user community, since their POP3 client
944 may contain configuration options to leave mail on the server
945 which will not in fact be supported by the server.
946
947 One special case of a site policy is that messages may only be
948 downloaded once from the server, and are deleted after this has
949 been accomplished. This could be implemented in POP3 server
950
951
952
953 Myers & Rose Standards Track [Page 17]
954
955 RFC 1939 POP3 May 1996
956
957
958 software by the following mechanism: "following a POP3 login by a
959 client which was ended by a QUIT, delete all messages downloaded
960 during the session with the RETR command". It is important not to
961 delete messages in the event of abnormal connection termination
962 (ie, if no QUIT was received from the client) because the client
963 may not have successfully received or stored the messages.
964 Servers implementing a download-and-delete policy may also wish to
965 disable or limit the optional TOP command, since it could be used
966 as an alternate mechanism to download entire messages.
967
968 9. POP3 Command Summary
969
970 Minimal POP3 Commands:
971
972 USER name valid in the AUTHORIZATION state
973 PASS string
974 QUIT
975
976 STAT valid in the TRANSACTION state
977 LIST [msg]
978 RETR msg
979 DELE msg
980 NOOP
981 RSET
982 QUIT
983
984 Optional POP3 Commands:
985
986 APOP name digest valid in the AUTHORIZATION state
987
988 TOP msg n valid in the TRANSACTION state
989 UIDL [msg]
990
991 POP3 Replies:
992
993 +OK
994 -ERR
995
996 Note that with the exception of the STAT, LIST, and UIDL commands,
997 the reply given by the POP3 server to any command is significant
998 only to "+OK" and "-ERR". Any text occurring after this reply
999 may be ignored by the client.
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009 Myers & Rose Standards Track [Page 18]
1010
1011 RFC 1939 POP3 May 1996
1012
1013
1014 10. Example POP3 Session
1015
1016 S: <wait for connection on TCP port 110>
1017 C: <open connection>
1018 S: +OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>
1019 C: APOP mrose c4c9334bac560ecc979e58001b3e22fb
1020 S: +OK mrose's maildrop has 2 messages (320 octets)
1021 C: STAT
1022 S: +OK 2 320
1023 C: LIST
1024 S: +OK 2 messages (320 octets)
1025 S: 1 120
1026 S: 2 200
1027 S: .
1028 C: RETR 1
1029 S: +OK 120 octets
1030 S: <the POP3 server sends message 1>
1031 S: .
1032 C: DELE 1
1033 S: +OK message 1 deleted
1034 C: RETR 2
1035 S: +OK 200 octets
1036 S: <the POP3 server sends message 2>
1037 S: .
1038 C: DELE 2
1039 S: +OK message 2 deleted
1040 C: QUIT
1041 S: +OK dewey POP3 server signing off (maildrop empty)
1042 C: <close connection>
1043 S: <wait for next connection>
1044
1045 11. Message Format
1046
1047 All messages transmitted during a POP3 session are assumed to conform
1048 to the standard for the format of Internet text messages [RFC822].
1049
1050 It is important to note that the octet count for a message on the
1051 server host may differ from the octet count assigned to that message
1052 due to local conventions for designating end-of-line. Usually,
1053 during the AUTHORIZATION state of the POP3 session, the POP3 server
1054 can calculate the size of each message in octets when it opens the
1055 maildrop. For example, if the POP3 server host internally represents
1056 end-of-line as a single character, then the POP3 server simply counts
1057 each occurrence of this character in a message as two octets. Note
1058 that lines in the message which start with the termination octet need
1059 not (and must not) be counted twice, since the POP3 client will
1060 remove all byte-stuffed termination characters when it receives a
1061 multi-line response.
1062
1063
1064
1065 Myers & Rose Standards Track [Page 19]
1066
1067 RFC 1939 POP3 May 1996
1068
1069
1070 12. References
1071
1072 [RFC821] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC
1073 821, USC/Information Sciences Institute, August 1982.
1074
1075 [RFC822] Crocker, D., "Standard for the Format of ARPA-Internet Text
1076 Messages", STD 11, RFC 822, University of Delaware, August 1982.
1077
1078 [RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
1079 MIT Laboratory for Computer Science, April 1992.
1080
1081 [RFC1730] Crispin, M., "Internet Message Access Protocol - Version
1082 4", RFC 1730, University of Washington, December 1994.
1083
1084 [RFC1734] Myers, J., "POP3 AUTHentication command", RFC 1734,
1085 Carnegie Mellon, December 1994.
1086
1087 13. Security Considerations
1088
1089 It is conjectured that use of the APOP command provides origin
1090 identification and replay protection for a POP3 session.
1091 Accordingly, a POP3 server which implements both the PASS and APOP
1092 commands should not allow both methods of access for a given user;
1093 that is, for a given mailbox name, either the USER/PASS command
1094 sequence or the APOP command is allowed, but not both.
1095
1096 Further, note that as the length of the shared secret increases, so
1097 does the difficulty of deriving it.
1098
1099 Servers that answer -ERR to the USER command are giving potential
1100 attackers clues about which names are valid.
1101
1102 Use of the PASS command sends passwords in the clear over the
1103 network.
1104
1105 Use of the RETR and TOP commands sends mail in the clear over the
1106 network.
1107
1108 Otherwise, security issues are not discussed in this memo.
1109
1110 14. Acknowledgements
1111
1112 The POP family has a long and checkered history. Although primarily
1113 a minor revision to RFC 1460, POP3 is based on the ideas presented in
1114 RFCs 918, 937, and 1081.
1115
1116 In addition, Alfred Grimstad, Keith McCloghrie, and Neil Ostroff
1117 provided significant comments on the APOP command.
1118
1119
1120
1121 Myers & Rose Standards Track [Page 20]
1122
1123 RFC 1939 POP3 May 1996
1124
1125
1126 15. Authors' Addresses
1127
1128 John G. Myers
1129 Carnegie-Mellon University
1130 5000 Forbes Ave
1131 Pittsburgh, PA 15213
1132
1133 EMail: jgm+@cmu.edu
1134
1135
1136 Marshall T. Rose
1137 Dover Beach Consulting, Inc.
1138 420 Whisman Court
1139 Mountain View, CA 94043-2186
1140
1141 EMail: mrose@dbc.mtview.ca.us
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177 Myers & Rose Standards Track [Page 21]
1178
1179 RFC 1939 POP3 May 1996
1180
1181
1182 Appendix A. Differences from RFC 1725
1183
1184 This memo is a revision to RFC 1725, a Draft Standard. It makes the
1185 following changes from that document:
1186
1187 - clarifies that command keywords are case insensitive.
1188
1189 - specifies that servers must send "+OK" and "-ERR" in
1190 upper case.
1191
1192 - specifies that the initial greeting is a positive response,
1193 instead of any string which should be a positive response.
1194
1195 - clarifies behavior for unimplemented commands.
1196
1197 - makes the USER and PASS commands optional.
1198
1199 - clarified the set of possible responses to the USER command.
1200
1201 - reverses the order of the examples in the USER and PASS
1202 commands, to reduce confusion.
1203
1204 - clarifies that the PASS command may only be given immediately
1205 after a successful USER command.
1206
1207 - clarified the persistence requirements of UIDs and added some
1208 implementation notes.
1209
1210 - specifies a UID length limitation of one to 70 octets.
1211
1212 - specifies a status indicator length limitation
1213 of 512 octets, including the CRLF.
1214
1215 - clarifies that LIST with no arguments on an empty mailbox
1216 returns success.
1217
1218 - adds a reference from the LIST command to the Message Format
1219 section
1220
1221 - clarifies the behavior of QUIT upon failure
1222
1223 - clarifies the security section to not imply the use of the
1224 USER command with the APOP command.
1225
1226 - adds references to RFCs 1730 and 1734
1227
1228 - clarifies the method by which a UA may enter mail into the
1229 transport system.
1230
1231
1232
1233 Myers & Rose Standards Track [Page 22]
1234
1235 RFC 1939 POP3 May 1996
1236
1237
1238 - clarifies that the second argument to the TOP command is a
1239 number of lines.
1240
1241 - changes the suggestion in the Security Considerations section
1242 for a server to not accept both PASS and APOP for a given user
1243 from a "must" to a "should".
1244
1245 - adds a section on scaling and operational considerations
1246
1247 Appendix B. Command Index
1248
1249 APOP ....................................................... 15
1250 DELE ....................................................... 8
1251 LIST ....................................................... 6
1252 NOOP ....................................................... 9
1253 PASS ....................................................... 14
1254 QUIT ....................................................... 5
1255 QUIT ....................................................... 10
1256 RETR ....................................................... 8
1257 RSET ....................................................... 9
1258 STAT ....................................................... 6
1259 TOP ........................................................ 11
1260 UIDL ....................................................... 12
1261 USER ....................................................... 13
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289 Myers & Rose Standards Track [Page 23]
1290
0
1
2
3
4
5
6 Network Working Group H. Krawczyk
7 Request for Comments: 2104 IBM
8 Category: Informational M. Bellare
9 UCSD
10 R. Canetti
11 IBM
12 February 1997
13
14
15 HMAC: Keyed-Hashing for Message Authentication
16
17 Status of This Memo
18
19 This memo provides information for the Internet community. This memo
20 does not specify an Internet standard of any kind. Distribution of
21 this memo is unlimited.
22
23 Abstract
24
25 This document describes HMAC, a mechanism for message authentication
26 using cryptographic hash functions. HMAC can be used with any
27 iterative cryptographic hash function, e.g., MD5, SHA-1, in
28 combination with a secret shared key. The cryptographic strength of
29 HMAC depends on the properties of the underlying hash function.
30
31 1. Introduction
32
33 Providing a way to check the integrity of information transmitted
34 over or stored in an unreliable medium is a prime necessity in the
35 world of open computing and communications. Mechanisms that provide
36 such integrity check based on a secret key are usually called
37 "message authentication codes" (MAC). Typically, message
38 authentication codes are used between two parties that share a secret
39 key in order to validate information transmitted between these
40 parties. In this document we present such a MAC mechanism based on
41 cryptographic hash functions. This mechanism, called HMAC, is based
42 on work by the authors [BCK1] where the construction is presented and
43 cryptographically analyzed. We refer to that work for the details on
44 the rationale and security analysis of HMAC, and its comparison to
45 other keyed-hash methods.
46
47
48
49
50
51
52
53
54
55
56
57 Krawczyk, et. al. Informational [Page 1]
58
59 RFC 2104 HMAC February 1997
60
61
62 HMAC can be used in combination with any iterated cryptographic hash
63 function. MD5 and SHA-1 are examples of such hash functions. HMAC
64 also uses a secret key for calculation and verification of the
65 message authentication values. The main goals behind this
66 construction are
67
68 * To use, without modifications, available hash functions.
69 In particular, hash functions that perform well in software,
70 and for which code is freely and widely available.
71
72 * To preserve the original performance of the hash function without
73 incurring a significant degradation.
74
75 * To use and handle keys in a simple way.
76
77 * To have a well understood cryptographic analysis of the strength of
78 the authentication mechanism based on reasonable assumptions on the
79 underlying hash function.
80
81 * To allow for easy replaceability of the underlying hash function in
82 case that faster or more secure hash functions are found or
83 required.
84
85 This document specifies HMAC using a generic cryptographic hash
86 function (denoted by H). Specific instantiations of HMAC need to
87 define a particular hash function. Current candidates for such hash
88 functions include SHA-1 [SHA], MD5 [MD5], RIPEMD-128/160 [RIPEMD].
89 These different realizations of HMAC will be denoted by HMAC-SHA1,
90 HMAC-MD5, HMAC-RIPEMD, etc.
91
92 Note: To the date of writing of this document MD5 and SHA-1 are the
93 most widely used cryptographic hash functions. MD5 has been recently
94 shown to be vulnerable to collision search attacks [Dobb]. This
95 attack and other currently known weaknesses of MD5 do not compromise
96 the use of MD5 within HMAC as specified in this document (see
97 [Dobb]); however, SHA-1 appears to be a cryptographically stronger
98 function. To this date, MD5 can be considered for use in HMAC for
99 applications where the superior performance of MD5 is critical. In
100 any case, implementers and users need to be aware of possible
101 cryptanalytic developments regarding any of these cryptographic hash
102 functions, and the eventual need to replace the underlying hash
103 function. (See section 6 for more information on the security of
104 HMAC.)
105
106
107
108
109
110
111
112
113 Krawczyk, et. al. Informational [Page 2]
114
115 RFC 2104 HMAC February 1997
116
117
118 2. Definition of HMAC
119
120 The definition of HMAC requires a cryptographic hash function, which
121 we denote by H, and a secret key K. We assume H to be a cryptographic
122 hash function where data is hashed by iterating a basic compression
123 function on blocks of data. We denote by B the byte-length of such
124 blocks (B=64 for all the above mentioned examples of hash functions),
125 and by L the byte-length of hash outputs (L=16 for MD5, L=20 for
126 SHA-1). The authentication key K can be of any length up to B, the
127 block length of the hash function. Applications that use keys longer
128 than B bytes will first hash the key using H and then use the
129 resultant L byte string as the actual key to HMAC. In any case the
130 minimal recommended length for K is L bytes (as the hash output
131 length). See section 3 for more information on keys.
132
133 We define two fixed and different strings ipad and opad as follows
134 (the 'i' and 'o' are mnemonics for inner and outer):
135
136 ipad = the byte 0x36 repeated B times
137 opad = the byte 0x5C repeated B times.
138
139 To compute HMAC over the data `text' we perform
140
141 H(K XOR opad, H(K XOR ipad, text))
142
143 Namely,
144
145 (1) append zeros to the end of K to create a B byte string
146 (e.g., if K is of length 20 bytes and B=64, then K will be
147 appended with 44 zero bytes 0x00)
148 (2) XOR (bitwise exclusive-OR) the B byte string computed in step
149 (1) with ipad
150 (3) append the stream of data 'text' to the B byte string resulting
151 from step (2)
152 (4) apply H to the stream generated in step (3)
153 (5) XOR (bitwise exclusive-OR) the B byte string computed in
154 step (1) with opad
155 (6) append the H result from step (4) to the B byte string
156 resulting from step (5)
157 (7) apply H to the stream generated in step (6) and output
158 the result
159
160 For illustration purposes, sample code based on MD5 is provided as an
161 appendix.
162
163
164
165
166
167
168
169 Krawczyk, et. al. Informational [Page 3]
170
171 RFC 2104 HMAC February 1997
172
173
174 3. Keys
175
176 The key for HMAC can be of any length (keys longer than B bytes are
177 first hashed using H). However, less than L bytes is strongly
178 discouraged as it would decrease the security strength of the
179 function. Keys longer than L bytes are acceptable but the extra
180 length would not significantly increase the function strength. (A
181 longer key may be advisable if the randomness of the key is
182 considered weak.)
183
184 Keys need to be chosen at random (or using a cryptographically strong
185 pseudo-random generator seeded with a random seed), and periodically
186 refreshed. (Current attacks do not indicate a specific recommended
187 frequency for key changes as these attacks are practically
188 infeasible. However, periodic key refreshment is a fundamental
189 security practice that helps against potential weaknesses of the
190 function and keys, and limits the damage of an exposed key.)
191
192 4. Implementation Note
193
194 HMAC is defined in such a way that the underlying hash function H can
195 be used with no modification to its code. In particular, it uses the
196 function H with the pre-defined initial value IV (a fixed value
197 specified by each iterative hash function to initialize its
198 compression function). However, if desired, a performance
199 improvement can be achieved at the cost of (possibly) modifying the
200 code of H to support variable IVs.
201
202 The idea is that the intermediate results of the compression function
203 on the B-byte blocks (K XOR ipad) and (K XOR opad) can be precomputed
204 only once at the time of generation of the key K, or before its first
205 use. These intermediate results are stored and then used to
206 initialize the IV of H each time that a message needs to be
207 authenticated. This method saves, for each authenticated message,
208 the application of the compression function of H on two B-byte blocks
209 (i.e., on (K XOR ipad) and (K XOR opad)). Such a savings may be
210 significant when authenticating short streams of data. We stress
211 that the stored intermediate values need to be treated and protected
212 the same as secret keys.
213
214 Choosing to implement HMAC in the above way is a decision of the
215 local implementation and has no effect on inter-operability.
216
217
218
219
220
221
222
223
224
225 Krawczyk, et. al. Informational [Page 4]
226
227 RFC 2104 HMAC February 1997
228
229
230 5. Truncated output
231
232 A well-known practice with message authentication codes is to
233 truncate the output of the MAC and output only part of the bits
234 (e.g., [MM, ANSI]). Preneel and van Oorschot [PV] show some
235 analytical advantages of truncating the output of hash-based MAC
236 functions. The results in this area are not absolute as for the
237 overall security advantages of truncation. It has advantages (less
238 information on the hash result available to an attacker) and
239 disadvantages (less bits to predict for the attacker). Applications
240 of HMAC can choose to truncate the output of HMAC by outputting the t
241 leftmost bits of the HMAC computation for some parameter t (namely,
242 the computation is carried in the normal way as defined in section 2
243 above but the end result is truncated to t bits). We recommend that
244 the output length t be not less than half the length of the hash
245 output (to match the birthday attack bound) and not less than 80 bits
246 (a suitable lower bound on the number of bits that need to be
247 predicted by an attacker). We propose denoting a realization of HMAC
248 that uses a hash function H with t bits of output as HMAC-H-t. For
249 example, HMAC-SHA1-80 denotes HMAC computed using the SHA-1 function
250 and with the output truncated to 80 bits. (If the parameter t is not
251 specified, e.g. HMAC-MD5, then it is assumed that all the bits of the
252 hash are output.)
253
254 6. Security
255
256 The security of the message authentication mechanism presented here
257 depends on cryptographic properties of the hash function H: the
258 resistance to collision finding (limited to the case where the
259 initial value is secret and random, and where the output of the
260 function is not explicitly available to the attacker), and the
261 message authentication property of the compression function of H when
262 applied to single blocks (in HMAC these blocks are partially unknown
263 to an attacker as they contain the result of the inner H computation
264 and, in particular, cannot be fully chosen by the attacker).
265
266 These properties, and actually stronger ones, are commonly assumed
267 for hash functions of the kind used with HMAC. In particular, a hash
268 function for which the above properties do not hold would become
269 unsuitable for most (probably, all) cryptographic applications,
270 including alternative message authentication schemes based on such
271 functions. (For a complete analysis and rationale of the HMAC
272 function the reader is referred to [BCK1].)
273
274
275
276
277
278
279
280
281 Krawczyk, et. al. Informational [Page 5]
282
283 RFC 2104 HMAC February 1997
284
285
286 Given the limited confidence gained so far as for the cryptographic
287 strength of candidate hash functions, it is important to observe the
288 following two properties of the HMAC construction and its secure use
289 for message authentication:
290
291 1. The construction is independent of the details of the particular
292 hash function H in use and then the latter can be replaced by any
293 other secure (iterative) cryptographic hash function.
294
295 2. Message authentication, as opposed to encryption, has a
296 "transient" effect. A published breaking of a message authentication
297 scheme would lead to the replacement of that scheme, but would have
298 no adversarial effect on information authenticated in the past. This
299 is in sharp contrast with encryption, where information encrypted
300 today may suffer from exposure in the future if, and when, the
301 encryption algorithm is broken.
302
303 The strongest attack known against HMAC is based on the frequency of
304 collisions for the hash function H ("birthday attack") [PV,BCK2], and
305 is totally impractical for minimally reasonable hash functions.
306
307 As an example, if we consider a hash function like MD5 where the
308 output length equals L=16 bytes (128 bits) the attacker needs to
309 acquire the correct message authentication tags computed (with the
310 _same_ secret key K!) on about 2**64 known plaintexts. This would
311 require the processing of at least 2**64 blocks under H, an
312 impossible task in any realistic scenario (for a block length of 64
313 bytes this would take 250,000 years in a continuous 1Gbps link, and
314 without changing the secret key K during all this time). This attack
315 could become realistic only if serious flaws in the collision
316 behavior of the function H are discovered (e.g. collisions found
317 after 2**30 messages). Such a discovery would determine the immediate
318 replacement of the function H (the effects of such failure would be
319 far more severe for the traditional uses of H in the context of
320 digital signatures, public key certificates, etc.).
321
322 Note: this attack needs to be strongly contrasted with regular
323 collision attacks on cryptographic hash functions where no secret key
324 is involved and where 2**64 off-line parallelizable (!) operations
325 suffice to find collisions. The latter attack is approaching
326 feasibility [VW] while the birthday attack on HMAC is totally
327 impractical. (In the above examples, if one uses a hash function
328 with, say, 160 bit of output then 2**64 should be replaced by 2**80.)
329
330
331
332
333
334
335
336
337 Krawczyk, et. al. Informational [Page 6]
338
339 RFC 2104 HMAC February 1997
340
341
342 A correct implementation of the above construction, the choice of
343 random (or cryptographically pseudorandom) keys, a secure key
344 exchange mechanism, frequent key refreshments, and good secrecy
345 protection of keys are all essential ingredients for the security of
346 the integrity verification mechanism provided by HMAC.
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393 Krawczyk, et. al. Informational [Page 7]
394
395 RFC 2104 HMAC February 1997
396
397
398 Appendix -- Sample Code
399
400 For the sake of illustration we provide the following sample code for
401 the implementation of HMAC-MD5 as well as some corresponding test
402 vectors (the code is based on MD5 code as described in [MD5]).
403
404 /*
405 ** Function: hmac_md5
406 */
407
408 void
409 hmac_md5(text, text_len, key, key_len, digest)
410 unsigned char* text; /* pointer to data stream */
411 int text_len; /* length of data stream */
412 unsigned char* key; /* pointer to authentication key */
413 int key_len; /* length of authentication key */
414 caddr_t digest; /* caller digest to be filled in */
415
416 {
417 MD5_CTX context;
418 unsigned char k_ipad[65]; /* inner padding -
419 * key XORd with ipad
420 */
421 unsigned char k_opad[65]; /* outer padding -
422 * key XORd with opad
423 */
424 unsigned char tk[16];
425 int i;
426 /* if key is longer than 64 bytes reset it to key=MD5(key) */
427 if (key_len > 64) {
428
429 MD5_CTX tctx;
430
431 MD5Init(&tctx);
432 MD5Update(&tctx, key, key_len);
433 MD5Final(tk, &tctx);
434
435 key = tk;
436 key_len = 16;
437 }
438
439 /*
440 * the HMAC_MD5 transform looks like:
441 *
442 * MD5(K XOR opad, MD5(K XOR ipad, text))
443 *
444 * where K is an n byte key
445 * ipad is the byte 0x36 repeated 64 times
446
447
448
449 Krawczyk, et. al. Informational [Page 8]
450
451 RFC 2104 HMAC February 1997
452
453
454 * opad is the byte 0x5c repeated 64 times
455 * and text is the data being protected
456 */
457
458 /* start out by storing key in pads */
459 bzero( k_ipad, sizeof k_ipad);
460 bzero( k_opad, sizeof k_opad);
461 bcopy( key, k_ipad, key_len);
462 bcopy( key, k_opad, key_len);
463
464 /* XOR key with ipad and opad values */
465 for (i=0; i<64; i++) {
466 k_ipad[i] ^= 0x36;
467 k_opad[i] ^= 0x5c;
468 }
469 /*
470 * perform inner MD5
471 */
472 MD5Init(&context); /* init context for 1st
473 * pass */
474 MD5Update(&context, k_ipad, 64) /* start with inner pad */
475 MD5Update(&context, text, text_len); /* then text of datagram */
476 MD5Final(digest, &context); /* finish up 1st pass */
477 /*
478 * perform outer MD5
479 */
480 MD5Init(&context); /* init context for 2nd
481 * pass */
482 MD5Update(&context, k_opad, 64); /* start with outer pad */
483 MD5Update(&context, digest, 16); /* then results of 1st
484 * hash */
485 MD5Final(digest, &context); /* finish up 2nd pass */
486 }
487
488 Test Vectors (Trailing '\0' of a character string not included in test):
489
490 key = 0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
491 key_len = 16 bytes
492 data = "Hi There"
493 data_len = 8 bytes
494 digest = 0x9294727a3638bb1c13f48ef8158bfc9d
495
496 key = "Jefe"
497 data = "what do ya want for nothing?"
498 data_len = 28 bytes
499 digest = 0x750c783e6ab0b503eaa86e310a5db738
500
501 key = 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
502
503
504
505 Krawczyk, et. al. Informational [Page 9]
506
507 RFC 2104 HMAC February 1997
508
509
510 key_len 16 bytes
511 data = 0xDDDDDDDDDDDDDDDDDDDD...
512 ..DDDDDDDDDDDDDDDDDDDD...
513 ..DDDDDDDDDDDDDDDDDDDD...
514 ..DDDDDDDDDDDDDDDDDDDD...
515 ..DDDDDDDDDDDDDDDDDDDD
516 data_len = 50 bytes
517 digest = 0x56be34521d144c88dbb8c733f0e8b3f6
518
519 Acknowledgments
520
521 Pau-Chen Cheng, Jeff Kraemer, and Michael Oehler, have provided
522 useful comments on early drafts, and ran the first interoperability
523 tests of this specification. Jeff and Pau-Chen kindly provided the
524 sample code and test vectors that appear in the appendix. Burt
525 Kaliski, Bart Preneel, Matt Robshaw, Adi Shamir, and Paul van
526 Oorschot have provided useful comments and suggestions during the
527 investigation of the HMAC construction.
528
529 References
530
531 [ANSI] ANSI X9.9, "American National Standard for Financial
532 Institution Message Authentication (Wholesale)," American
533 Bankers Association, 1981. Revised 1986.
534
535 [Atk] Atkinson, R., "IP Authentication Header", RFC 1826, August
536 1995.
537
538 [BCK1] M. Bellare, R. Canetti, and H. Krawczyk,
539 "Keyed Hash Functions and Message Authentication",
540 Proceedings of Crypto'96, LNCS 1109, pp. 1-15.
541 (http://www.research.ibm.com/security/keyed-md5.html)
542
543 [BCK2] M. Bellare, R. Canetti, and H. Krawczyk,
544 "Pseudorandom Functions Revisited: The Cascade Construction",
545 Proceedings of FOCS'96.
546
547 [Dobb] H. Dobbertin, "The Status of MD5 After a Recent Attack",
548 RSA Labs' CryptoBytes, Vol. 2 No. 2, Summer 1996.
549 http://www.rsa.com/rsalabs/pubs/cryptobytes.html
550
551 [PV] B. Preneel and P. van Oorschot, "Building fast MACs from hash
552 functions", Advances in Cryptology -- CRYPTO'95 Proceedings,
553 Lecture Notes in Computer Science, Springer-Verlag Vol.963,
554 1995, pp. 1-14.
555
556 [MD5] Rivest, R., "The MD5 Message-Digest Algorithm",
557 RFC 1321, April 1992.
558
559
560
561 Krawczyk, et. al. Informational [Page 10]
562
563 RFC 2104 HMAC February 1997
564
565
566 [MM] Meyer, S. and Matyas, S.M., Cryptography, New York Wiley,
567 1982.
568
569 [RIPEMD] H. Dobbertin, A. Bosselaers, and B. Preneel, "RIPEMD-160: A
570 strengthened version of RIPEMD", Fast Software Encryption,
571 LNCS Vol 1039, pp. 71-82.
572 ftp://ftp.esat.kuleuven.ac.be/pub/COSIC/bosselae/ripemd/.
573
574 [SHA] NIST, FIPS PUB 180-1: Secure Hash Standard, April 1995.
575
576 [Tsu] G. Tsudik, "Message authentication with one-way hash
577 functions", In Proceedings of Infocom'92, May 1992.
578 (Also in "Access Control and Policy Enforcement in
579 Internetworks", Ph.D. Dissertation, Computer Science
580 Department, University of Southern California, April 1991.)
581
582 [VW] P. van Oorschot and M. Wiener, "Parallel Collision
583 Search with Applications to Hash Functions and Discrete
584 Logarithms", Proceedings of the 2nd ACM Conf. Computer and
585 Communications Security, Fairfax, VA, November 1994.
586
587 Authors' Addresses
588
589 Hugo Krawczyk
590 IBM T.J. Watson Research Center
591 P.O.Box 704
592 Yorktown Heights, NY 10598
593
594 EMail: hugo@watson.ibm.com
595
596 Mihir Bellare
597 Dept of Computer Science and Engineering
598 Mail Code 0114
599 University of California at San Diego
600 9500 Gilman Drive
601 La Jolla, CA 92093
602
603 EMail: mihir@cs.ucsd.edu
604
605 Ran Canetti
606 IBM T.J. Watson Research Center
607 P.O.Box 704
608 Yorktown Heights, NY 10598
609
610 EMail: canetti@watson.ibm.com
611
612
613
614
615
616
617 Krawczyk, et. al. Informational [Page 11]
618
0
1
2
3
4
5
6 Network Working Group J. Klensin
7 Request for Comments: 2195 R. Catoe
8 Category: Standards Track P. Krumviede
9 Obsoletes: 2095 MCI
10 September 1997
11
12
13 IMAP/POP AUTHorize Extension for Simple Challenge/Response
14
15 Status of this Memo
16
17 This document specifies an Internet standards track protocol for the
18 Internet community, and requests discussion and suggestions for
19 improvements. Please refer to the current edition of the "Internet
20 Official Protocol Standards" (STD 1) for the standardization state
21 and status of this protocol. Distribution of this memo is unlimited.
22
23 Abstract
24
25 While IMAP4 supports a number of strong authentication mechanisms as
26 described in RFC 1731, it lacks any mechanism that neither passes
27 cleartext, reusable passwords across the network nor requires either
28 a significant security infrastructure or that the mail server update
29 a mail-system-wide user authentication file on each mail access.
30 This specification provides a simple challenge-response
31 authentication protocol that is suitable for use with IMAP4. Since
32 it utilizes Keyed-MD5 digests and does not require that the secret be
33 stored in the clear on the server, it may also constitute an
34 improvement on APOP for POP3 use as specified in RFC 1734.
35
36 1. Introduction
37
38 Existing Proposed Standards specify an AUTHENTICATE mechanism for the
39 IMAP4 protocol [IMAP, IMAP-AUTH] and a parallel AUTH mechanism for
40 the POP3 protocol [POP3-AUTH]. The AUTHENTICATE mechanism is
41 intended to be extensible; the four methods specified in [IMAP-AUTH]
42 are all fairly powerful and require some security infrastructure to
43 support. The base POP3 specification [POP3] also contains a
44 lightweight challenge-response mechanism called APOP. APOP is
45 associated with most of the risks associated with such protocols: in
46 particular, it requires that both the client and server machines have
47 access to the shared secret in cleartext form. CRAM offers a method
48 for avoiding such cleartext storage while retaining the algorithmic
49 simplicity of APOP in using only MD5, though in a "keyed" method.
50
51
52
53
54
55
56
57 Klensin, Catoe & Krumviede Standards Track [Page 1]
58
59 RFC 2195 IMAP/POP AUTHorize Extension September 1997
60
61
62 At present, IMAP [IMAP] lacks any facility corresponding to APOP.
63 The only alternative to the strong mechanisms identified in [IMAP-
64 AUTH] is a presumably cleartext username and password, supported
65 through the LOGIN command in [IMAP]. This document describes a
66 simple challenge-response mechanism, similar to APOP and PPP CHAP
67 [PPP], that can be used with IMAP (and, in principle, with POP3).
68
69 This mechanism also has the advantage over some possible alternatives
70 of not requiring that the server maintain information about email
71 "logins" on a per-login basis. While mechanisms that do require such
72 per-login history records may offer enhanced security, protocols such
73 as IMAP, which may have several connections between a given client
74 and server open more or less simultaneous, may make their
75 implementation particularly challenging.
76
77 2. Challenge-Response Authentication Mechanism (CRAM)
78
79 The authentication type associated with CRAM is "CRAM-MD5".
80
81 The data encoded in the first ready response contains an
82 presumptively arbitrary string of random digits, a timestamp, and the
83 fully-qualified primary host name of the server. The syntax of the
84 unencoded form must correspond to that of an RFC 822 'msg-id'
85 [RFC822] as described in [POP3].
86
87 The client makes note of the data and then responds with a string
88 consisting of the user name, a space, and a 'digest'. The latter is
89 computed by applying the keyed MD5 algorithm from [KEYED-MD5] where
90 the key is a shared secret and the digested text is the timestamp
91 (including angle-brackets).
92
93 This shared secret is a string known only to the client and server.
94 The `digest' parameter itself is a 16-octet value which is sent in
95 hexadecimal format, using lower-case ASCII characters.
96
97 When the server receives this client response, it verifies the digest
98 provided. If the digest is correct, the server should consider the
99 client authenticated and respond appropriately.
100
101 Keyed MD5 is chosen for this application because of the greater
102 security imparted to authentication of short messages. In addition,
103 the use of the techniques described in [KEYED-MD5] for precomputation
104 of intermediate results make it possible to avoid explicit cleartext
105 storage of the shared secret on the server system by instead storing
106 the intermediate results which are known as "contexts".
107
108
109
110
111
112
113 Klensin, Catoe & Krumviede Standards Track [Page 2]
114
115 RFC 2195 IMAP/POP AUTHorize Extension September 1997
116
117
118 CRAM does not support a protection mechanism.
119
120 Example:
121
122 The examples in this document show the use of the CRAM mechanism with
123 the IMAP4 AUTHENTICATE command [IMAP-AUTH]. The base64 encoding of
124 the challenges and responses is part of the IMAP4 AUTHENTICATE
125 command, not part of the CRAM specification itself.
126
127 S: * OK IMAP4 Server
128 C: A0001 AUTHENTICATE CRAM-MD5
129 S: + PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2UucmVzdG9uLm1jaS5uZXQ+
130 C: dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw
131 S: A0001 OK CRAM authentication successful
132
133 In this example, the shared secret is the string
134 'tanstaaftanstaaf'. Hence, the Keyed MD5 digest is produced by
135 calculating
136
137 MD5((tanstaaftanstaaf XOR opad),
138 MD5((tanstaaftanstaaf XOR ipad),
139 <1896.697170952@postoffice.reston.mci.net>))
140
141 where ipad and opad are as defined in the keyed-MD5 Work in
142 Progress [KEYED-MD5] and the string shown in the challenge is the
143 base64 encoding of <1896.697170952@postoffice.reston.mci.net>. The
144 shared secret is null-padded to a length of 64 bytes. If the
145 shared secret is longer than 64 bytes, the MD5 digest of the
146 shared secret is used as a 16 byte input to the keyed MD5
147 calculation.
148
149 This produces a digest value (in hexadecimal) of
150
151 b913a602c7eda7a495b4e6e7334d3890
152
153 The user name is then prepended to it, forming
154
155 tim b913a602c7eda7a495b4e6e7334d3890
156
157 Which is then base64 encoded to meet the requirements of the IMAP4
158 AUTHENTICATE command (or the similar POP3 AUTH command), yielding
159
160 dGltIGI5MTNhNjAyYzdlZGE3YTQ5NWI0ZTZlNzMzNGQzODkw
161
162
163
164
165
166
167
168
169 Klensin, Catoe & Krumviede Standards Track [Page 3]
170
171 RFC 2195 IMAP/POP AUTHorize Extension September 1997
172
173
174 3. References
175
176 [CHAP] Lloyd, B., and W. Simpson, "PPP Authentication Protocols",
177 RFC 1334, October 1992.
178
179 [IMAP] Crispin, M., "Internet Message Access Protocol - Version
180 4rev1", RFC 2060, University of Washington, December 1996.
181
182 [IMAP-AUTH] Myers, J., "IMAP4 Authentication Mechanisms",
183 RFC 1731, Carnegie Mellon, December 1994.
184
185 [KEYED-MD5] Krawczyk, Bellare, Canetti, "HMAC: Keyed-Hashing for
186 Message Authentication", RFC 2104, February 1997.
187
188 [MD5] Rivest, R., "The MD5 Message Digest Algorithm",
189 RFC 1321, MIT Laboratory for Computer Science, April 1992.
190
191 [POP3] Myers, J., and M. Rose, "Post Office Protocol - Version 3",
192 STD 53, RFC 1939, Carnegie Mellon, May 1996.
193
194 [POP3-AUTH] Myers, J., "POP3 AUTHentication command", RFC 1734,
195 Carnegie Mellon, December, 1994.
196
197 4. Security Considerations
198
199 It is conjectured that use of the CRAM authentication mechanism
200 provides origin identification and replay protection for a session.
201 Accordingly, a server that implements both a cleartext password
202 command and this authentication type should not allow both methods of
203 access for a given user.
204
205 While the saving, on the server, of "contexts" (see section 2) is
206 marginally better than saving the shared secrets in cleartext as is
207 required by CHAP [CHAP] and APOP [POP3], it is not sufficient to
208 protect the secrets if the server itself is compromised.
209 Consequently, servers that store the secrets or contexts must both be
210 protected to a level appropriate to the potential information value
211 in user mailboxes and identities.
212
213 As the length of the shared secret increases, so does the difficulty
214 of deriving it.
215
216 While there are now suggestions in the literature that the use of MD5
217 and keyed MD5 in authentication procedures probably has a limited
218 effective lifetime, the technique is now widely deployed and widely
219 understood. It is believed that this general understanding may
220 assist with the rapid replacement, by CRAM-MD5, of the current uses
221 of permanent cleartext passwords in IMAP. This document has been
222
223
224
225 Klensin, Catoe & Krumviede Standards Track [Page 4]
226
227 RFC 2195 IMAP/POP AUTHorize Extension September 1997
228
229
230 deliberately written to permit easy upgrading to use SHA (or whatever
231 alternatives emerge) when they are considered to be widely available
232 and adequately safe.
233
234 Even with the use of CRAM, users are still vulnerable to active
235 attacks. An example of an increasingly common active attack is 'TCP
236 Session Hijacking' as described in CERT Advisory CA-95:01 [CERT95].
237
238 See section 1 above for additional discussion.
239
240 5. Acknowledgements
241
242 This memo borrows ideas and some text liberally from [POP3] and
243 [RFC-1731] and thanks are due the authors of those documents. Ran
244 Atkinson made a number of valuable technical and editorial
245 contributions to the document.
246
247 6. Authors' Addresses
248
249 John C. Klensin
250 MCI Telecommunications
251 800 Boylston St, 7th floor
252 Boston, MA 02199
253 USA
254
255 EMail: klensin@mci.net
256 Phone: +1 617 960 1011
257
258 Randy Catoe
259 MCI Telecommunications
260 2100 Reston Parkway
261 Reston, VA 22091
262 USA
263
264 EMail: randy@mci.net
265 Phone: +1 703 715 7366
266
267 Paul Krumviede
268 MCI Telecommunications
269 2100 Reston Parkway
270 Reston, VA 22091
271 USA
272
273 EMail: paul@mci.net
274 Phone: +1 703 715 7251
275
276
277
278
279
280
281 Klensin, Catoe & Krumviede Standards Track [Page 5]
282
0
1
2
3
4
5
6 Network Working Group J. Myers
7 Request for Comments: 2222 Netscape Communications
8 Category: Standards Track October 1997
9
10
11 Simple Authentication and Security Layer (SASL)
12
13 Status of this Memo
14
15 This document specifies an Internet standards track protocol for the
16 Internet community, and requests discussion and suggestions for
17 improvements. Please refer to the current edition of the "Internet
18 Official Protocol Standards" (STD 1) for the standardization state
19 and status of this protocol. Distribution of this memo is unlimited.
20
21 Copyright Notice
22
23 Copyright (C) The Internet Society (1997). All Rights Reserved.
24
25 Table of Contents
26
27 1. Abstract .............................................. 2
28 2. Organization of this Document ......................... 2
29 2.1. How to Read This Document ............................. 2
30 2.2. Conventions Used in this Document ..................... 2
31 2.3. Examples .............................................. 3
32 3. Introduction and Overview ............................. 3
33 4. Profiling requirements ................................ 4
34 5. Specific issues ....................................... 5
35 5.1. Client sends data first ............................... 5
36 5.2. Server returns success with additional data ........... 5
37 5.3. Multiple authentications .............................. 5
38 6. Registration procedures ............................... 6
39 6.1. Comments on SASL mechanism registrations .............. 6
40 6.2. Location of Registered SASL Mechanism List ............ 6
41 6.3. Change Control ........................................ 7
42 6.4. Registration Template ................................. 7
43 7. Mechanism definitions ................................. 8
44 7.1. Kerberos version 4 mechanism .......................... 8
45 7.2. GSSAPI mechanism ...................................... 9
46 7.2.1 Client side of authentication protocol exchange ....... 9
47 7.2.2 Server side of authentication protocol exchange ....... 10
48 7.2.3 Security layer ........................................ 11
49 7.3. S/Key mechanism ....................................... 11
50 7.4. External mechanism .................................... 12
51 8. References ............................................ 13
52 9. Security Considerations ............................... 13
53 10. Author's Address ...................................... 14
54
55
56
57 Myers Standards Track [Page 1]
58
59 RFC 2222 SASL October 1997
60
61
62 Appendix A. Relation of SASL to Transport Security .......... 15
63 Full Copyright Statement .................................... 16
64
65 1. Abstract
66
67 This document describes a method for adding authentication support to
68 connection-based protocols. To use this specification, a protocol
69 includes a command for identifying and authenticating a user to a
70 server and for optionally negotiating protection of subsequent
71 protocol interactions. If its use is negotiated, a security layer is
72 inserted between the protocol and the connection. This document
73 describes how a protocol specifies such a command, defines several
74 mechanisms for use by the command, and defines the protocol used for
75 carrying a negotiated security layer over the connection.
76
77 2. Organization of this Document
78
79 2.1. How to Read This Document
80
81 This document is written to serve two different audiences, protocol
82 designers using this specification to support authentication in their
83 protocol, and implementors of clients or servers for those protocols
84 using this specification.
85
86 The sections "Introduction and Overview", "Profiling requirements",
87 and "Security Considerations" cover issues that protocol designers
88 need to understand and address in profiling this specification for
89 use in a specific protocol.
90
91 Implementors of a protocol using this specification need the
92 protocol-specific profiling information in addition to the
93 information in this document.
94
95 2.2. Conventions Used in this Document
96
97 In examples, "C:" and "S:" indicate lines sent by the client and
98 server respectively.
99
100 The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
101 in this document are to be interpreted as defined in "Key words for
102 use in RFCs to Indicate Requirement Levels" [RFC 2119].
103
104
105
106
107
108
109
110
111
112
113 Myers Standards Track [Page 2]
114
115 RFC 2222 SASL October 1997
116
117
118 2.3. Examples
119
120 Examples in this document are for the IMAP profile [RFC 2060] of this
121 specification. The base64 encoding of challenges and responses, as
122 well as the "+ " preceding the responses are part of the IMAP4
123 profile, not part of the SASL specification itself.
124
125 3. Introduction and Overview
126
127 The Simple Authentication and Security Layer (SASL) is a method for
128 adding authentication support to connection-based protocols. To use
129 this specification, a protocol includes a command for identifying and
130 authenticating a user to a server and for optionally negotiating a
131 security layer for subsequent protocol interactions.
132
133 The command has a required argument identifying a SASL mechanism.
134 SASL mechanisms are named by strings, from 1 to 20 characters in
135 length, consisting of upper-case letters, digits, hyphens, and/or
136 underscores. SASL mechanism names must be registered with the IANA.
137 Procedures for registering new SASL mechanisms are given in the
138 section "Registration procedures"
139
140 If a server supports the requested mechanism, it initiates an
141 authentication protocol exchange. This consists of a series of
142 server challenges and client responses that are specific to the
143 requested mechanism. The challenges and responses are defined by the
144 mechanisms as binary tokens of arbitrary length. The protocol's
145 profile then specifies how these binary tokens are then encoded for
146 transfer over the connection.
147
148 After receiving the authentication command or any client response, a
149 server may issue a challenge, indicate failure, or indicate
150 completion. The protocol's profile specifies how the server
151 indicates which of the above it is doing.
152
153 After receiving a challenge, a client may issue a response or abort
154 the exchange. The protocol's profile specifies how the client
155 indicates which of the above it is doing.
156
157 During the authentication protocol exchange, the mechanism performs
158 authentication, transmits an authorization identity (frequently known
159 as a userid) from the client to server, and negotiates the use of a
160 mechanism-specific security layer. If the use of a security layer is
161 agreed upon, then the mechanism must also define or negotiate the
162 maximum cipher-text buffer size that each side is able to receive.
163
164
165
166
167
168
169 Myers Standards Track [Page 3]
170
171 RFC 2222 SASL October 1997
172
173
174 The transmitted authorization identity may be different than the
175 identity in the client's authentication credentials. This permits
176 agents such as proxy servers to authenticate using their own
177 credentials, yet request the access privileges of the identity for
178 which they are proxying. With any mechanism, transmitting an
179 authorization identity of the empty string directs the server to
180 derive an authorization identity from the client's authentication
181 credentials.
182
183 If use of a security layer is negotiated, it is applied to all
184 subsequent data sent over the connection. The security layer takes
185 effect immediately following the last response of the authentication
186 exchange for data sent by the client and the completion indication
187 for data sent by the server. Once the security layer is in effect,
188 the protocol stream is processed by the security layer into buffers
189 of cipher-text. Each buffer is transferred over the connection as a
190 stream of octets prepended with a four octet field in network byte
191 order that represents the length of the following buffer. The length
192 of the cipher-text buffer must be no larger than the maximum size
193 that was defined or negotiated by the other side.
194
195 4. Profiling requirements
196
197 In order to use this specification, a protocol definition must supply
198 the following information:
199
200 1. A service name, to be selected from the IANA registry of "service"
201 elements for the GSSAPI host-based service name form [RFC 2078].
202
203 2. A definition of the command to initiate the authentication
204 protocol exchange. This command must have as a parameter the
205 mechanism name being selected by the client.
206
207 The command SHOULD have an optional parameter giving an initial
208 response. This optional parameter allows the client to avoid a
209 round trip when using a mechanism which is defined to have the
210 client send data first. When this initial response is sent by the
211 client and the selected mechanism is defined to have the server
212 start with an initial challenge, the command fails. See section
213 5.1 of this document for further information.
214
215 3. A definition of the method by which the authentication protocol
216 exchange is carried out, including how the challenges and
217 responses are encoded, how the server indicates completion or
218 failure of the exchange, how the client aborts an exchange, and
219 how the exchange method interacts with any line length limits in
220 the protocol.
221
222
223
224
225 Myers Standards Track [Page 4]
226
227 RFC 2222 SASL October 1997
228
229
230 4. Identification of the octet where any negotiated security layer
231 starts to take effect, in both directions.
232
233 5. A specification of how the authorization identity passed from the
234 client to the server is to be interpreted.
235
236 5. Specific issues
237
238 5.1. Client sends data first
239
240 Some mechanisms specify that the first data sent in the
241 authentication protocol exchange is from the client to the server.
242
243 If a protocol's profile permits the command which initiates an
244 authentication protocol exchange to contain an initial client
245 response, this parameter SHOULD be used with such mechanisms.
246
247 If the initial client response parameter is not given, or if a
248 protocol's profile does not permit the command which initiates an
249 authentication protocol exchange to contain an initial client
250 response, then the server issues a challenge with no data. The
251 client's response to this challenge is then used as the initial
252 client response. (The server then proceeds to send the next
253 challenge, indicates completion, or indicates failure.)
254
255 5.2. Server returns success with additional data
256
257 Some mechanisms may specify that server challenge data be sent to the
258 client along with an indication of successful completion of the
259 exchange. This data would, for example, authenticate the server to
260 the client.
261
262 If a protocol's profile does not permit this server challenge to be
263 returned with a success indication, then the server issues the server
264 challenge without an indication of successful completion. The client
265 then responds with no data. After receiving this empty response, the
266 server then indicates successful completion.
267
268 5.3. Multiple authentications
269
270 Unless otherwise stated by the protocol's profile, only one
271 successful SASL negotiation may occur in a protocol session. In this
272 case, once an authentication protocol exchange has successfully
273 completed, further attempts to initiate an authentication protocol
274 exchange fail.
275
276
277
278
279
280
281 Myers Standards Track [Page 5]
282
283 RFC 2222 SASL October 1997
284
285
286 In the case that a profile explicitly permits multiple successful
287 SASL negotiations to occur, then in no case may multiple security
288 layers be simultaneously in effect. If a security layer is in effect
289 and a subsequent SASL negotiation selects no security layer, the
290 original security layer remains in effect. If a security layer is in
291 effect and a subsequent SASL negotiation selects a second security
292 layer, then the second security layer replaces the first.
293
294 6. Registration procedures
295
296 Registration of a SASL mechanism is done by filling in the template
297 in section 6.4 and sending it in to iana@isi.edu. IANA has the right
298 to reject obviously bogus registrations, but will perform no review
299 of clams made in the registration form.
300
301 There is no naming convention for SASL mechanisms; any name that
302 conforms to the syntax of a SASL mechanism name can be registered.
303
304 While the registration procedures do not require it, authors of SASL
305 mechanisms are encouraged to seek community review and comment
306 whenever that is feasible. Authors may seek community review by
307 posting a specification of their proposed mechanism as an internet-
308 draft. SASL mechanisms intended for widespread use should be
309 standardized through the normal IETF process, when appropriate.
310
311 6.1. Comments on SASL mechanism registrations
312
313 Comments on registered SASL mechanisms should first be sent to the
314 "owner" of the mechanism. Submitters of comments may, after a
315 reasonable attempt to contact the owner, request IANA to attach their
316 comment to the SASL mechanism registration itself. If IANA approves
317 of this the comment will be made accessible in conjunction with the
318 SASL mechanism registration itself.
319
320 6.2. Location of Registered SASL Mechanism List
321
322 SASL mechanism registrations will be posted in the anonymous FTP
323 directory "ftp://ftp.isi.edu/in-notes/iana/assignments/sasl-
324 mechanisms/" and all registered SASL mechanisms will be listed in the
325 periodically issued "Assigned Numbers" RFC [currently STD 2, RFC
326 1700]. The SASL mechanism description and other supporting material
327 may also be published as an Informational RFC by sending it to "rfc-
328 editor@isi.edu" (please follow the instructions to RFC authors [RFC
329 2223]).
330
331
332
333
334
335
336
337 Myers Standards Track [Page 6]
338
339 RFC 2222 SASL October 1997
340
341
342 6.3. Change Control
343
344 Once a SASL mechanism registration has been published by IANA, the
345 author may request a change to its definition. The change request
346 follows the same procedure as the registration request.
347
348 The owner of a SASL mechanism may pass responsibility for the SASL
349 mechanism to another person or agency by informing IANA; this can be
350 done without discussion or review.
351
352 The IESG may reassign responsibility for a SASL mechanism. The most
353 common case of this will be to enable changes to be made to
354 mechanisms where the author of the registration has died, moved out
355 of contact or is otherwise unable to make changes that are important
356 to the community.
357
358 SASL mechanism registrations may not be deleted; mechanisms which are
359 no longer believed appropriate for use can be declared OBSOLETE by a
360 change to their "intended use" field; such SASL mechanisms will be
361 clearly marked in the lists published by IANA.
362
363 The IESG is considered to be the owner of all SASL mechanisms which
364 are on the IETF standards track.
365
366 6.4. Registration Template
367
368 To: iana@iana.org
369 Subject: Registration of SASL mechanism X
370
371 SASL mechanism name:
372
373 Security considerations:
374
375 Published specification (optional, recommended):
376
377 Person & email address to contact for further information:
378
379 Intended usage:
380
381 (One of COMMON, LIMITED USE or OBSOLETE)
382
383 Author/Change controller:
384
385 (Any other information that the author deems interesting may be
386 added below this line.)
387
388
389
390
391
392
393 Myers Standards Track [Page 7]
394
395 RFC 2222 SASL October 1997
396
397
398 7. Mechanism definitions
399
400 The following mechanisms are hereby defined.
401
402 7.1. Kerberos version 4 mechanism
403
404 The mechanism name associated with Kerberos version 4 is
405 "KERBEROS_V4".
406
407 The first challenge consists of a random 32-bit number in network
408 byte order. The client responds with a Kerberos ticket and an
409 authenticator for the principal "service.hostname@realm", where
410 "service" is the service name specified in the protocol's profile,
411 "hostname" is the first component of the host name of the server with
412 all letters in lower case, and where "realm" is the Kerberos realm of
413 the server. The encrypted checksum field included within the
414 Kerberos authenticator contains the server provided challenge in
415 network byte order.
416
417 Upon decrypting and verifying the ticket and authenticator, the
418 server verifies that the contained checksum field equals the original
419 server provided random 32-bit number. Should the verification be
420 successful, the server must add one to the checksum and construct 8
421 octets of data, with the first four octets containing the incremented
422 checksum in network byte order, the fifth octet containing a bit-mask
423 specifying the security layers supported by the server, and the sixth
424 through eighth octets containing, in network byte order, the maximum
425 cipher-text buffer size the server is able to receive. The server
426 must encrypt using DES ECB mode the 8 octets of data in the session
427 key and issue that encrypted data in a second challenge. The client
428 considers the server authenticated if the first four octets of the
429 un-encrypted data is equal to one plus the checksum it previously
430 sent.
431
432 The client must construct data with the first four octets containing
433 the original server-issued checksum in network byte order, the fifth
434 octet containing the bit-mask specifying the selected security layer,
435 the sixth through eighth octets containing in network byte order the
436 maximum cipher-text buffer size the client is able to receive, and
437 the following octets containing the authorization identity. The
438 client must then append from one to eight zero-valued octets so that
439 the length of the data is a multiple of eight octets. The client must
440 then encrypt using DES PCBC mode the data with the session key and
441 respond with the encrypted data. The server decrypts the data and
442 verifies the contained checksum. The server must verify that the
443 principal identified in the Kerberos ticket is authorized to connect
444 as that authorization identity. After this verification, the
445 authentication process is complete.
446
447
448
449 Myers Standards Track [Page 8]
450
451 RFC 2222 SASL October 1997
452
453
454 The security layers and their corresponding bit-masks are as follows:
455
456 1 No security layer
457 2 Integrity (krb_mk_safe) protection
458 4 Privacy (krb_mk_priv) protection
459
460 Other bit-masks may be defined in the future; bits which are not
461 understood must be negotiated off.
462
463 EXAMPLE: The following are two Kerberos version 4 login scenarios to
464 the IMAP4 protocol (note that the line breaks in the sample
465 authenticators are for editorial clarity and are not in real
466 authenticators)
467
468 S: * OK IMAP4 Server
469 C: A001 AUTHENTICATE KERBEROS_V4
470 S: + AmFYig==
471 C: BAcAQU5EUkVXLkNNVS5FRFUAOCAsho84kLN3/IJmrMG+25a4DT
472 +nZImJjnTNHJUtxAA+o0KPKfHEcAFs9a3CL5Oebe/ydHJUwYFd
473 WwuQ1MWiy6IesKvjL5rL9WjXUb9MwT9bpObYLGOKi1Qh
474 S: + or//EoAADZI=
475 C: DiAF5A4gA+oOIALuBkAAmw==
476 S: A001 OK Kerberos V4 authentication successful
477
478
479 S: * OK IMAP4 Server
480 C: A001 AUTHENTICATE KERBEROS_V4
481 S: + gcfgCA==
482 C: BAcAQU5EUkVXLkNNVS5FRFUAOCAsho84kLN3/IJmrMG+25a4DT
483 +nZImJjnTNHJUtxAA+o0KPKfHEcAFs9a3CL5Oebe/ydHJUwYFd
484 WwuQ1MWiy6IesKvjL5rL9WjXUb9MwT9bpObYLGOKi1Qh
485 S: A001 NO Kerberos V4 authentication failed
486
487 7.2. GSSAPI mechanism
488
489 The mechanism name associated with all mechanisms employing the
490 GSSAPI [RFC 2078] is "GSSAPI".
491
492 7.2.1 Client side of authentication protocol exchange
493
494 The client calls GSS_Init_sec_context, passing in 0 for
495 input_context_handle (initially) and a targ_name equal to output_name
496 from GSS_Import_Name called with input_name_type of
497 GSS_C_NT_HOSTBASED_SERVICE and input_name_string of
498 "service@hostname" where "service" is the service name specified in
499 the protocol's profile, and "hostname" is the fully qualified host
500 name of the server. The client then responds with the resulting
501 output_token. If GSS_Init_sec_context returns GSS_S_CONTINUE_NEEDED,
502
503
504
505 Myers Standards Track [Page 9]
506
507 RFC 2222 SASL October 1997
508
509
510 then the client should expect the server to issue a token in a
511 subsequent challenge. The client must pass the token to another call
512 to GSS_Init_sec_context, repeating the actions in this paragraph.
513
514 When GSS_Init_sec_context returns GSS_S_COMPLETE, the client takes
515 the following actions: If the last call to GSS_Init_sec_context
516 returned an output_token, then the client responds with the
517 output_token, otherwise the client responds with no data. The client
518 should then expect the server to issue a token in a subsequent
519 challenge. The client passes this token to GSS_Unwrap and interprets
520 the first octet of resulting cleartext as a bit-mask specifying the
521 security layers supported by the server and the second through fourth
522 octets as the maximum size output_message to send to the server. The
523 client then constructs data, with the first octet containing the
524 bit-mask specifying the selected security layer, the second through
525 fourth octets containing in network byte order the maximum size
526 output_message the client is able to receive, and the remaining
527 octets containing the authorization identity. The client passes the
528 data to GSS_Wrap with conf_flag set to FALSE, and responds with the
529 generated output_message. The client can then consider the server
530 authenticated.
531
532 7.2.2 Server side of authentication protocol exchange
533
534 The server passes the initial client response to
535 GSS_Accept_sec_context as input_token, setting input_context_handle
536 to 0 (initially). If GSS_Accept_sec_context returns
537 GSS_S_CONTINUE_NEEDED, the server returns the generated output_token
538 to the client in challenge and passes the resulting response to
539 another call to GSS_Accept_sec_context, repeating the actions in this
540 paragraph.
541
542 When GSS_Accept_sec_context returns GSS_S_COMPLETE, the client takes
543 the following actions: If the last call to GSS_Accept_sec_context
544 returned an output_token, the server returns it to the client in a
545 challenge and expects a reply from the client with no data. Whether
546 or not an output_token was returned (and after receipt of any
547 response from the client to such an output_token), the server then
548 constructs 4 octets of data, with the first octet containing a bit-
549 mask specifying the security layers supported by the server and the
550 second through fourth octets containing in network byte order the
551 maximum size output_token the server is able to receive. The server
552 must then pass the plaintext to GSS_Wrap with conf_flag set to FALSE
553 and issue the generated output_message to the client in a challenge.
554 The server must then pass the resulting response to GSS_Unwrap and
555 interpret the first octet of resulting cleartext as the bit-mask for
556 the selected security layer, the second through fourth octets as the
557 maximum size output_message to send to the client, and the remaining
558
559
560
561 Myers Standards Track [Page 10]
562
563 RFC 2222 SASL October 1997
564
565
566 octets as the authorization identity. The server must verify that
567 the src_name is authorized to authenticate as the authorization
568 identity. After these verifications, the authentication process is
569 complete.
570
571 7.2.3 Security layer
572
573 The security layers and their corresponding bit-masks are as follows:
574
575 1 No security layer
576 2 Integrity protection.
577 Sender calls GSS_Wrap with conf_flag set to FALSE
578 4 Privacy protection.
579 Sender calls GSS_Wrap with conf_flag set to TRUE
580
581 Other bit-masks may be defined in the future; bits which are not
582 understood must be negotiated off.
583
584 7.3. S/Key mechanism
585
586 The mechanism name associated with S/Key [RFC 1760] using the MD4
587 digest algorithm is "SKEY".
588
589 The client sends an initial response with the authorization identity.
590
591 The server then issues a challenge which contains the decimal
592 sequence number followed by a single space and the seed string for
593 the indicated authorization identity. The client responds with the
594 one-time-password, as either a 64-bit value in network byte order or
595 encoded in the "six English words" format.
596
597 The server must verify the one-time-password. After this
598 verification, the authentication process is complete.
599
600 S/Key authentication does not provide for any security layers.
601
602 EXAMPLE: The following are two S/Key login scenarios in the IMAP4
603 protocol.
604
605 S: * OK IMAP4 Server
606 C: A001 AUTHENTICATE SKEY
607 S: +
608 C: bW9yZ2Fu
609 S: + OTUgUWE1ODMwOA==
610 C: Rk9VUiBNQU5OIFNPT04gRklSIFZBUlkgTUFTSA==
611 S: A001 OK S/Key authentication successful
612
613
614
615
616
617 Myers Standards Track [Page 11]
618
619 RFC 2222 SASL October 1997
620
621
622 S: * OK IMAP4 Server
623 C: A001 AUTHENTICATE SKEY
624 S: +
625 C: c21pdGg=
626 S: + OTUgUWE1ODMwOA==
627 C: BsAY3g4gBNo=
628 S: A001 NO S/Key authentication failed
629
630 The following is an S/Key login scenario in an IMAP4-like protocol
631 which has an optional "initial response" argument to the AUTHENTICATE
632 command.
633
634 S: * OK IMAP4-Like Server
635 C: A001 AUTHENTICATE SKEY bW9yZ2Fu
636 S: + OTUgUWE1ODMwOA==
637 C: Rk9VUiBNQU5OIFNPT04gRklSIFZBUlkgTUFTSA==
638 S: A001 OK S/Key authentication successful
639
640 7.4. External mechanism
641
642 The mechanism name associated with external authentication is
643 "EXTERNAL".
644
645 The client sends an initial response with the authorization identity.
646
647 The server uses information, external to SASL, to determine whether
648 the client is authorized to authenticate as the authorization
649 identity. If the client is so authorized, the server indicates
650 successful completion of the authentication exchange; otherwise the
651 server indicates failure.
652
653 The system providing this external information may be, for example,
654 IPsec or TLS.
655
656 If the client sends the empty string as the authorization identity
657 (thus requesting the authorization identity be derived from the
658 client's authentication credentials), the authorization identity is
659 to be derived from authentication credentials which exist in the
660 system which is providing the external authentication.
661
662
663
664
665
666
667
668
669
670
671
672
673 Myers Standards Track [Page 12]
674
675 RFC 2222 SASL October 1997
676
677
678 8. References
679
680 [RFC 2060] Crispin, M., "Internet Message Access Protocol - Version
681 4rev1", RFC 2060, December 1996.
682
683 [RFC 2078] Linn, J., "Generic Security Service Application Program
684 Interface, Version 2", RFC 2078, January 1997.
685
686 [RFC 2119] Bradner, S., "Key words for use in RFCs to Indicate
687 Requirement Levels", RFC 2119, March 1997.
688
689 [RFC 2223] Postel, J., and J. Reynolds, "Instructions to RFC
690 Authors", RFC 2223, October 1997.
691
692 [RFC 1760] Haller, N., "The S/Key One-Time Password System", RFC
693 1760, February 1995.
694
695 [RFC 1700] Reynolds, J., and J. Postel, "Assigned Numbers", STD 2,
696 RFC 1700, October 1994.
697
698 9. Security Considerations
699
700 Security issues are discussed throughout this memo.
701
702 The mechanisms that support integrity protection are designed such
703 that the negotiation of the security layer and authorization identity
704 is integrity protected. When the client selects a security layer
705 with at least integrity protection, this protects against an active
706 attacker hijacking the connection and modifying the authentication
707 exchange to negotiate a plaintext connection.
708
709 When a server or client supports multiple authentication mechanisms,
710 each of which has a different security strength, it is possible for
711 an active attacker to cause a party to use the least secure mechanism
712 supported. To protect against this sort of attack, a client or
713 server which supports mechanisms of different strengths should have a
714 configurable minimum strength that it will use. It is not sufficient
715 for this minimum strength check to only be on the server, since an
716 active attacker can change which mechanisms the client sees as being
717 supported, causing the client to send authentication credentials for
718 its weakest supported mechanism.
719
720
721
722
723
724
725
726
727
728
729 Myers Standards Track [Page 13]
730
731 RFC 2222 SASL October 1997
732
733
734 The client's selection of a SASL mechanism is done in the clear and
735 may be modified by an active attacker. It is important for any new
736 SASL mechanisms to be designed such that an active attacker cannot
737 obtain an authentication with weaker security properties by modifying
738 the SASL mechanism name and/or the challenges and responses.
739
740 Any protocol interactions prior to authentication are performed in
741 the clear and may be modified by an active attacker. In the case
742 where a client selects integrity protection, it is important that any
743 security-sensitive protocol negotiations be performed after
744 authentication is complete. Protocols should be designed such that
745 negotiations performed prior to authentication should be either
746 ignored or revalidated once authentication is complete.
747
748 10. Author's Address
749
750 John G. Myers
751 Netscape Communications
752 501 E. Middlefield Road
753 Mail Stop MV-029
754 Mountain View, CA 94043-4042
755
756 EMail: jgmyers@netscape.com
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785 Myers Standards Track [Page 14]
786
787 RFC 2222 SASL October 1997
788
789
790 Appendix A. Relation of SASL to Transport Security
791
792 Questions have been raised about the relationship between SASL and
793 various services (such as IPsec and TLS) which provide a secured
794 connection.
795
796 Two of the key features of SASL are:
797
798 1. The separation of the authorization identity from the identity in
799 the client's credentials. This permits agents such as proxy
800 servers to authenticate using their own credentials, yet request
801 the access privileges of the identity for which they are proxying.
802
803 2. Upon successful completion of an authentication exchange, the
804 server knows the authorization identity the client wishes to use.
805 This allows servers to move to a "user is authenticated" state in
806 the protocol.
807
808 These features are extremely important to some application protocols,
809 yet Transport Security services do not always provide them. To
810 define SASL mechanisms based on these services would be a very messy
811 task, as the framing of these services would be redundant with the
812 framing of SASL and some method of providing these important SASL
813 features would have to be devised.
814
815 Sometimes it is desired to enable within an existing connection the
816 use of a security service which does not fit the SASL model. (TLS is
817 an example of such a service.) This can be done by adding a command,
818 for example "STARTTLS", to the protocol. Such a command is outside
819 the scope of SASL, and should be different from the command which
820 starts a SASL authentication protocol exchange.
821
822 In certain situations, it is reasonable to use SASL underneath one of
823 these Transport Security services. The transport service would
824 secure the connection, either service would authenticate the client,
825 and SASL would negotiate the authorization identity. The SASL
826 negotiation would be what moves the protocol from "unauthenticated"
827 to "authenticated" state. The "EXTERNAL" SASL mechanism is
828 explicitly intended to handle the case where the transport service
829 secures the connection and authenticates the client and SASL
830 negotiates the authorization identity.
831
832 When using SASL underneath a sufficiently strong Transport Security
833 service, a SASL security layer would most likely be redundant. The
834 client and server would thus probably want to negotiate off the use
835 of a SASL security layer.
836
837
838
839
840
841 Myers Standards Track [Page 15]
842
843 RFC 2222 SASL October 1997
844
845
846 Full Copyright Statement
847
848 Copyright (C) The Internet Society (1997). All Rights Reserved.
849
850 This document and translations of it may be copied and furnished to
851 others, and derivative works that comment on or otherwise explain it
852 or assist in its implmentation may be prepared, copied, published
853 andand distributed, in whole or in part, without restriction of any
854 kind, provided that the above copyright notice and this paragraph are
855 included on all such copies and derivative works. However, this
856 document itself may not be modified in any way, such as by removing
857 the copyright notice or references to the Internet Society or other
858 Internet organizations, except as needed for the purpose of
859 developing Internet standards in which case the procedures for
860 copyrights defined in the Internet Standards process must be
861 followed, or as required to translate it into languages other than
862 English.
863
864 The limited permissions granted above are perpetual and will not be
865 revoked by the Internet Society or its successors or assigns.
866
867 This document and the information contained herein is provided on an
868 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
869 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
870 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
871 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
872 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897 Myers Standards Track [Page 16]
898
0
1
2
3
4
5
6 Network Working Group C. Metz
7 Request for Comments: 2243 The Inner Net
8 Category: Standards Track November 1997
9
10
11
12
13 OTP Extended Responses
14
15
16 Status of this Memo
17
18 This document specifies an Internet standards track protocol for the
19 Internet community, and requests discussion and suggestions for
20 improvements. Please refer to the current edition of the "Internet
21 Official Protocol Standards" (STD 1) for the standardization state
22 and status of this protocol. Distribution of this memo is unlimited.
23
24 Copyright Notice
25
26 Copyright (C) The Internet Society (1997). All Rights Reserved.
27
28 Abstract
29
30 This document provides a specification for a type of response to an
31 OTP [RFC 1938] challenge that carries explicit indication of the
32 response's encoding. Codings for the two mandatory OTP data formats
33 using this new type of response are presented.
34
35 This document also provides a specification for a response that
36 allows an OTP generator to request that a server re-initialize a
37 sequence and change parameters such as the secret pass phrase.
38
39 1. Conventions, Terms, and Notation
40
41 This document specifies the data formats and software behaviors
42 needed to use OTP extended responses. The data formats are described
43 three ways: using an ad-hoc UNIX manual page style syntax, using
44 augmented BNF described in sections two and three of RFC 822, and by
45 examples. Should there be any conflict between these descriptions,
46 the augmented BNF takes precedence. The software behaviors are
47 described in words, and specific behavior compliance requirements are
48 itemized using the requirements terminology (specifically, the words
49 MUST, SHOULD, and MAY) defined in RFC 2119.
50
51
52
53
54
55
56
57 Metz Standards Track [Page 1]
58
59 RFC 2243 OTP Extended Responses November 1997
60
61
62 2. Extended Challenges and Extended Responses
63
64 This document builds on the protocol and terminology specified in RFC
65 1938 and assumes that you have already read this document and
66 understand its contents.
67
68 An extended challenge is a single line of printable text terminated
69 by either a new line sequence appropriate for the context of its use
70 (e.g., ASCII CR followed by ASCII LF) or a whitespace character. It
71 contains a standard OTP challenge, a whitespace character, and a list
72 that generators use to determine which extended responses are
73 supported by a server.
74
75 An extended response is a single line of printable text terminated by
76 a new line sequence appropriate for the context of its use. It
77 contains two or more tokens that are separated with a single colon
78 (':') character. The first token contains a type specifier that
79 indicates the format of the rest of the response. The tokens that
80 follow are argument data for the OTP extended response. At least one
81 token of data MUST be present.
82
83 2.1. Syntax
84
85 In UNIX manual page like syntax, the general form of an extended
86 challenge could be described as:
87
88 <standard OTP challenge> ext[,<extension set id>[, ...]]
89
90 And the general form of an extended response could be described as:
91
92 <type-specifier>:<arg1>[:<arg2>[:...]]
93
94 In augmented BNF syntax, the syntax of the general form of an
95 extended challenge and an extended response is:
96
97 extended-challenge = otp-challenge 1*LWSP-char capability-list
98 (NL / *LWSP-char)
99 otp-challenge = <a standard OTP challenge>
100 capability-list = "ext" *("," extension-set-id)
101 extension-set-id = *<any CHAR except LWSP, CTLs, or ",">
102 extended-response = type 1*(":" argument) NL
103 type = token
104 argument = token
105 token = 1*<any CHAR except ":" and CTLs>
106 NL = <new line sequence appropriate for the context
107 in which OTP is being used>
108
109
110
111
112
113 Metz Standards Track [Page 2]
114
115 RFC 2243 OTP Extended Responses November 1997
116
117
118 An example of an extended challenge indicating support for OTP
119 extended responses and for a mythical response set "foo" is:
120
121 otp-md5 123 mi1234 ext,foo
122
123 An example of an extended response using a mythical type named "foo"
124 is:
125
126 foo:some data:some more data:12345
127
128 2.2. Requirements
129
130 A server compliant with this specification:
131
132 1. MUST be able to receive and parse the general form of an
133 extended response
134 2. MUST be able to receive, parse, and correctly process all
135 extended responses specified in this document
136 3. MUST process the type field in a case-insensitive manner
137 4. MUST reject any authentication attempt using an extended
138 response if it does not support that type of response
139 5. SHOULD provide an appropriate indication to the generator
140 if the response was rejected because of (4)
141 6. MUST limit the length of the input reasonably
142 7. MUST accept otherwise arbitrary amounts of whitespace
143 wherever a response allows it
144 8. MUST be able to receive and correctly process standard OTP
145 responses
146
147 A generator compliant with this specification:
148
149 1. MUST be able to generate standard OTP responses
150 2. MUST use standard responses unless an extended challenge
151 has been received for the particular server AND seed
152 3. MUST generate the type field in lower case
153 4. MUST NOT send a response type for which the server has not
154 indicated support through an extended challenge
155
156 Extension set identifiers and extension type identifiers named with
157 the prefix "x-" are reserved for private use among mutually
158 consenting implementations. Implementations that do not recognise a
159 particular "x-" extension MUST ignore that extension. This means that
160 all "x-" extensions are likely to be non-interoperable with other
161 extensions. Careful consideration should be given to the possibility
162 of a server interacting with with a generator implementation which,
163 although it recognizes a given "x-" extension, uses it for a
164 different purpose. All of the remaining extension namespace is
165 reserved to IANA, which will only officially assign the extension
166
167
168
169 Metz Standards Track [Page 3]
170
171 RFC 2243 OTP Extended Responses November 1997
172
173
174 into this namespace after the IESG approves of such an assignment.
175 During the lifetime of the OTP WG, it is recommended that the IESG
176 consult with the OTP WG prior to approving such an assignment.
177
178 3. The "hex" and "word" Responses
179
180 There exists a very rare case in which a standard OTP response could
181 be a valid coding in both the hexadecimal and six-word formats. An
182 example of this is the response "ABE ACE ADA ADD BAD A." The
183 solution to this problem mandated by the OTP specification is that
184 compliant servers MUST attempt to parse and verify a standard
185 response in both hexadecimal and six-word formats and must consider
186 the authentication successful if either succeeds.
187
188 This problem can be solved easily using extended responses. The "hex"
189 response and the "word" response are two response types that encode
190 an OTP in an extended response that explicitly describes the
191 encoding. These responses start with a type label of "hex" for a
192 hexadecimal OTP and "word" for a six-word coded OTP. These responses
193 contain one argument field that contains a standard OTP response
194 coded in the indicated format.
195
196 3.1. Syntax
197
198 In UNIX manual page like syntax, the format of these responses could
199 be described as:
200
201 hex:<hexadecimal number>
202 word:<six dictionary words>
203
204 In augmented BNF syntax and with the definitions already provided,
205 the syntax of these responses is:
206
207 hex-response = "hex:" hex-64bit NL
208 hex-64bit = 16(hex-char *LWSP-char)
209 hex-char = ("A" / "B" / "C" / "D" / "E" / "F" /
210 "a" / "b" / "c" / "d" / "e" / "f" /
211 "0" / "1" / "2" / "3" / "4" / "5" /
212 "6" / "7" / "8" / "9")
213
214 word-response = "word:" word-64bit NL
215 word-64bit = 6(otp-word 1*LWSP-char)
216 otp-word = <any valid word in the standard OTP coding
217 dictionary>
218
219
220
221
222
223
224
225 Metz Standards Track [Page 4]
226
227 RFC 2243 OTP Extended Responses November 1997
228
229
230 Examples of these responses are:
231
232 hex:8720 33d4 6202 9172
233 word:VAST SAUL TAKE SODA SUCH BOLT
234
235 3.2. Requirements
236
237 A server compliant with this specification:
238
239 1. MUST process all arguments in a case-insensitive manner
240
241 A generator compliant with this specification:
242
243 1. SHOULD generate otp-word tokens in upper case with single
244 spaces separating them
245 2. SHOULD generate hexadecimal numbers using only lower case
246 for letters
247
248 4. The "init-hex" and "init-word" Responses
249
250 The OTP specification requires that implementations provide a means
251 for a client to re-initialize or change its OTP information with a
252 server but does not require any specific protocol for doing it.
253 Implementations that support the OTP extended responses described in
254 this document MUST support the response with the "init-hex" and
255 "init-word" type specifiers, which provide a standard way for a
256 client to re-initialize its OTP information with a server. This
257 response is intended to be used only by automated clients. Because of
258 this, the recommended form of this response uses the hexadecimal
259 encoding for binary data. It is possible for a user to type an "init-
260 hex" or "init-word" response.
261
262 4.1. Syntax
263
264 In UNIX manual page like syntax, the format of these responses could
265 be described as:
266
267 init-hex:<current-OTP>:<new-params>:<new-OTP>
268 init-word:<current-OTP>:<new-params>:<new-OTP>
269
270 In augmented BNF syntax and with the definitions already provided,
271 the syntax of the "init-hex" response is:
272
273 init-hex-response = "init-hex:" current-OTP ":" new-params ":"
274 new-OTP NL
275
276 current-OTP = hex-64bit
277 new-OTP = hex-64bit
278
279
280
281 Metz Standards Track [Page 5]
282
283 RFC 2243 OTP Extended Responses November 1997
284
285
286 new-params = algorithm SPACE sequence-number SPACE seed
287 algorithm = "md4" / "md5" / "sha1"
288 sequence-number = 4*3DIGIT
289 seed = 16*1(ALPHA / DIGIT)
290
291 In augmented BNF syntax and with the definitions already provided,
292 the syntax of the "init-word" response is:
293
294 init-word-response = "init-word:" current-OTP ":" new-params ":"
295 new-OTP NL
296
297 current-OTP = word-64bit
298 new-OTP = word-64bit
299
300 new-params = algorithm SPACE sequence-number SPACE seed
301 algorithm = "md4" / "md5" / "sha1"
302 sequence-number = 4*3DIGIT
303 seed = 16*1(ALPHA / DIGIT)
304
305 Note that all appropriate fields for the "init-hex" response MUST be
306 hexadecimally coded and that all appropriate fields for the "init-
307 word" response MUST be six-word coded.
308
309 Examples of these responses are:
310
311 init-hex:f6bd 6b33 89b8 7203:md5 499 ke6118:23d1 b253 5ae0 2b7e
312 init-hex:c9b2 12bb 6425 5a0f:md5 499 ke0986:fd17 cef1 b4df 093e
313
314 init-word:MOOD SOFT POP COMB BOLO LIFE:md5 499 ke1235:
315 ARTY WEAR TAD RUG HALO GIVE
316 init-word:END KERN BALM NICK EROS WAVY:md5 499 ke1235:
317 BABY FAIN OILY NIL TIDY DADE
318
319 (Note that all of these responses are one line. Due to their length,
320 they had to be split into multiple lines in order to be included
321 here. These responses MUST NOT span more than one line in actual use)
322
323 4.2. Description of Fields
324
325 The current-OTP field contains the (RFC 1938) response to the OTP
326 challenge. The new-params field contains the parameters for the
327 client's new requested challenge and the new-OTP field contains a
328 response to that challenge. If the re-initialization is successful, a
329 server MUST store the new OTP in its database as the last successful
330 OTP received and the sequence number in the next challenge presented
331 by the server MUST be one less than the sequence number specified in
332 the new-params field.
333
334
335
336
337 Metz Standards Track [Page 6]
338
339 RFC 2243 OTP Extended Responses November 1997
340
341
342 The new-params field is hashed as a string the same way that a seed
343 or secret pass phrase would be. All other field values are hashed in
344 their uncoded binary forms, in network byte order and without any
345 padding.
346
347 4.3. Requirements
348
349 A server compliant with this specification:
350
351 1. SHOULD NOT allow a user to use the same value for their
352 seed and secret pass phrase.
353 2. MUST disable all OTP access to any principal whose
354 sequence number would be less than one
355 3. MUST decrement the sequence number if a reinitialization
356 response includes a valid current-OTP, but the server is
357 unable to successfully process the new-params or new-OTP for
358 any reason.
359
360 A generator compliant with this specification:
361
362 1. SHOULD NOT allow a user to use the same value for their
363 seed and secret pass phrase
364 2. MUST take specific steps to prevent infinite loops of
365 re-initialization attempts in case of failure
366 3. SHOULD provide the user with some indication that the
367 re-initialization is taking place
368 4. SHOULD NOT do a re-initialization without the user's
369 permission, either for that specific instance or as a
370 configuration option
371 5. SHOULD NOT retry a failed re-initialization without a user's
372 permission
373 6. SHOULD warn the user if the sequence number falls below ten
374 7. MUST refuse to generate OTPs with a sequence number below one
375
376 5. Security Considerations
377
378 All of the security considerations for the OTP system also apply to
379 the OTP system with extended responses.
380
381 These extended responses, like OTP itself, do not protect the user
382 against active attacks. The IPsec Authentication Header (RFC-1826)
383 (or another technique with at least as much strength as IPsec AH)
384 SHOULD be used to protect against such attacks.
385
386 The consequences of a successful active attack on the re-
387 initialization response may be more severe than simply hijacking a
388 single session. An attacker could substitute his own response for
389
390
391
392
393 Metz Standards Track [Page 7]
394
395 RFC 2243 OTP Extended Responses November 1997
396
397
398 that of a legitimate user. The attacker may then be able to use the
399 OTP system to authenticate himself as the user at will (at least
400 until detected).
401
402 Failure to implement server requirement 3 in section 4.3 opens an
403 implementation to an attack based on replay of the current-OTP part
404 of the response.
405
406 6. Acknowledgments
407
408 Like RFC 1938, the protocol described in this document was created by
409 contributors in the IETF OTP working group. Specific contributions
410 were made by Neil Haller, who provided input on the overall design
411 requirements of a re-initialization protocol, Denis Pinkas, who
412 suggested several modifications to the originally proposed re-
413 initialization protocol, and Phil Servita, who opened the debate with
414 the first real protocol proposal and provided lots of specific input
415 on the design of this and earlier protocols. The extensions to the
416 OTP challenge were suggested by Chris Newman and John Valdes.
417
418 Randall Atkinson and Ted T'so also contributed their views to
419 discussions about details of the protocol extensions in this
420 document.
421
422 References
423
424 [RFC 822] Crocker, D., "Standard for the Format of ARPA Internet
425 Text Messages," RFC 822, August 1982.
426
427 [RFC 1825] Atkinson, R., "Security Architecture for the Internet
428 Protocol," RFC 1825, August 1995.
429
430 [RFC 1938] Haller, N. and C. Metz, "A One-Time Password System,"
431 RFC 1938, May 1996.
432
433 [RFC 2119] Bradner, S., "Key words for use in RFCs to
434 Indicate Requirement Level," RFC 2119,
435 March 1997.
436
437 Author's Address
438
439 Craig Metz
440 The Inner Net
441 Box 10314-1936
442 Blacksburg, VA 24062-0314
443 (DSN) 354-8590
444 cmetz@inner.net
445
446
447
448
449 Metz Standards Track [Page 8]
450
451 RFC 2243 OTP Extended Responses November 1997
452
453
454 Appendix: Reference Responses
455
456 The following responses were generated by a development version of
457 the One-Time Passwords in Everything (OPIE) implementation of this
458 specification.
459
460 All of these are responses to the challenge:
461
462 otp-md5 499 ke1234 ext
463
464 Note that the re-initialization responses use the same secret pass
465 phrase for new and current and a new seed of "ke1235". Also, these
466 responses have been split for formatting purposes into multiple
467 lines; they MUST NOT be multiple lines in actual use.
468
469 The secret pass phrase for these responses is:
470
471 This is a test.
472
473 The OTP standard hexadecimal response is:
474
475 5bf0 75d9 959d 036f
476
477 The OTP standard six-word response is:
478
479 BOND FOGY DRAB NE RISE MART
480
481 The OTP extended "hex" response is:
482
483 hex:5Bf0 75d9 959d 036f
484
485 The OTP extended "word" response is:
486
487 word:BOND FOGY DRAB NE RISE MART
488
489 The OTP extended "init-hex" response is:
490
491 init-hex:5bf0 75d9 959d 036f:md5 499 ke1235:3712 dcb4 aa53 16c1
492
493 The OTP extended "init-word" response is:
494
495 init-word:BOND FOGY DRAB NE RISE MART:md5 499 ke1235: RED HERD
496 NOW BEAN PA BURG
497
498
499
500
501
502
503
504
505 Metz Standards Track [Page 9]
506
507 RFC 2243 OTP Extended Responses November 1997
508
509
510 Full Copyright Statement
511
512 Copyright (C) The Internet Society (1997). All Rights Reserved.
513
514 This document and translations of it may be copied and furnished to
515 others, and derivative works that comment on or otherwise explain it
516 or assist in its implementation may be prepared, copied, published
517 and distributed, in whole or in part, without restriction of any
518 kind, provided that the above copyright notice and this paragraph are
519 included on all such copies and derivative works. However, this
520 document itself may not be modified in any way, such as by removing
521 the copyright notice or references to the Internet Society or other
522 Internet organizations, except as needed for the purpose of
523 developing Internet standards in which case the procedures for
524 copyrights defined in the Internet Standards process must be
525 followed, or as required to translate it into languages other than
526 English.
527
528 The limited permissions granted above are perpetual and will not be
529 revoked by the Internet Society or its successors or assigns.
530
531 This document and the information contained herein is provided on an
532 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
533 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
534 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
535 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
536 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561 Metz Standards Track [Page 10]
562
0
1
2
3
4
5
6 Network Working Group C. Newman
7 Request for Comments: 2245 Innosoft
8 Category: Standards Track November 1997
9
10
11 Anonymous SASL Mechanism
12
13 Status of this Memo
14
15 This document specifies an Internet standards track protocol for the
16 Internet community, and requests discussion and suggestions for
17 improvements. Please refer to the current edition of the "Internet
18 Official Protocol Standards" (STD 1) for the standardization state
19 and status of this protocol. Distribution of this memo is unlimited.
20
21 Copyright Notice
22
23 Copyright (C) The Internet Society (1997). All Rights Reserved.
24
25 Abstract
26
27 It is common practice on the Internet to permit anonymous access to
28 various services. Traditionally, this has been done with a plain
29 text password mechanism using "anonymous" as the user name and
30 optional trace information, such as an email address, as the
31 password. As plaintext login commands are not permitted in new IETF
32 protocols, a new way to provide anonymous login is needed within the
33 context of the SASL [SASL] framework.
34
35 1. Conventions Used in this Document
36
37 The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
38 in this document are to be interpreted as defined in "Key words for
39 use in RFCs to Indicate Requirement Levels" [KEYWORDS].
40
41 2. Anonymous SASL mechanism
42
43 The mechanism name associated with anonymous access is "ANONYMOUS".
44 The mechanism consists of a single message from the client to the
45 server. The client sends optional trace information in the form of a
46 human readable string. The trace information should take one of
47 three forms: an Internet email address, an opaque string which does
48 not contain the '@' character and can be interpreted by the system
49 administrator of the client's domain, or nothing. For privacy
50 reasons, an Internet email address should only be used with
51 permission from the user.
52
53
54
55
56
57 Newman Standards Track [Page 1]
58
59 RFC 2245 Anonymous SASL Mechanism November 1997
60
61
62 A server which permits anonymous access will announce support for the
63 ANONYMOUS mechanism, and allow anyone to log in using that mechanism,
64 usually with restricted access.
65
66 The formal grammar for the client message using Augmented BNF [ABNF]
67 follows.
68
69 message = [email / token]
70
71 TCHAR = %x20-3F / %x41-7E
72 ;; any printable US-ASCII character except '@'
73
74 email = addr-spec
75 ;; as defined in [IMAIL], except with no free
76 ;; insertion of linear-white-space, and the
77 ;; local-part MUST either be entirely enclosed in
78 ;; quotes or entirely unquoted
79
80 token = 1*255TCHAR
81
82 3. Example
83
84
85 Here is a sample anonymous login between an IMAP client and server.
86 In this example, "C:" and "S:" indicate lines sent by the client and
87 server respectively. If such lines are wrapped without a new "C:" or
88 "S:" label, then the wrapping is for editorial clarity and is not
89 part of the command.
90
91 Note that this example uses the IMAP profile [IMAP4] of SASL. The
92 base64 encoding of challenges and responses, as well as the "+ "
93 preceding the responses are part of the IMAP4 profile, not part of
94 SASL itself. Newer profiles of SASL will include the client message
95 with the AUTHENTICATE command itself so the extra round trip below
96 (the server response with an empty "+ ") can be eliminated.
97
98 In this example, the user's opaque identification token is "sirhc".
99
100 S: * OK IMAP4 server ready
101 C: A001 CAPABILITY
102 S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=CRAM-MD5 AUTH=ANONYMOUS
103 S: A001 OK done
104 C: A002 AUTHENTICATE ANONYMOUS
105 S: +
106 C: c2lyaGM=
107 S: A003 OK Welcome, trace information has been logged.
108
109
110
111
112
113 Newman Standards Track [Page 2]
114
115 RFC 2245 Anonymous SASL Mechanism November 1997
116
117
118 4. Security Considerations
119
120 The anonymous mechanism grants access to information by anyone. For
121 this reason it should be disabled by default so the administrator can
122 make an explicit decision to enable it.
123
124 If the anonymous user has any write privileges, a denial of service
125 attack is possible by filling up all available space. This can be
126 prevented by disabling all write access by anonymous users.
127
128 If anonymous users have read and write access to the same area, the
129 server can be used as a communication mechanism to anonymously
130 exchange information. Servers which accept anonymous submissions
131 should implement the common "drop box" model which forbids anonymous
132 read access to the area where anonymous submissions are accepted.
133
134 If the anonymous user can run many expensive operations (e.g., an
135 IMAP SEARCH BODY command), this could enable a denial of service
136 attack. Servers are encouraged to limit the number of anonymous
137 users and reduce their priority or limit their resource usage.
138
139 If there is no idle timeout for the anonymous user and there is a
140 limit on the number of anonymous users, a denial of service attack is
141 enabled. Servers should implement an idle timeout for anonymous
142 users.
143
144 The trace information is not authenticated so it can be falsified.
145 This can be used as an attempt to get someone else in trouble for
146 access to questionable information. Administrators trying to trace
147 abuse need to realize this information may be falsified.
148
149 A client which uses the user's correct email address as trace
150 information without explicit permission may violate that user's
151 privacy. Information about who accesses an anonymous archive on a
152 sensitive subject (e.g., sexual abuse) has strong privacy needs.
153 Clients should not send the email address without explicit permission
154 of the user and should offer the option of supplying no trace token
155 -- thus only exposing the source IP address and time. Anonymous
156 proxy servers could enhance this privacy, but would have to consider
157 the resulting potential denial of service attacks.
158
159 Anonymous connections are susceptible to man in the middle attacks
160 which view or alter the data transferred. Clients and servers are
161 encouraged to support external integrity and encryption mechanisms.
162
163 Protocols which fail to require an explicit anonymous login are more
164 susceptible to break-ins given certain common implementation
165 techniques. Specifically, Unix servers which offer user login may
166
167
168
169 Newman Standards Track [Page 3]
170
171 RFC 2245 Anonymous SASL Mechanism November 1997
172
173
174 initially start up as root and switch to the appropriate user id
175 after an explicit login command. Normally such servers refuse all
176 data access commands prior to explicit login and may enter a
177 restricted security environment (e.g., the Unix chroot function) for
178 anonymous users. If anonymous access is not explicitly requested,
179 the entire data access machinery is exposed to external security
180 attacks without the chance for explicit protective measures.
181 Protocols which offer restricted data access should not allow
182 anonymous data access without an explicit login step.
183
184 5. References
185
186 [ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax
187 Specifications: ABNF", RFC 2234, November 1997.
188
189 [IMAIL] Crocker, D., "Standard for the Format of Arpa Internet Text
190 Messages", STD 11, RFC 822, August 1982.
191
192 [IMAP4] Crispin, M., "Internet Message Access Protocol - Version
193 4rev1", RFC 2060, December 1996.
194
195 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
196 Requirement Levels", RFC 2119, March 1997.
197
198 [SASL] Myers, J., "Simple Authentication and Security Layer (SASL)",
199 RFC 2222, October 1997.
200
201 6. Author's Address
202
203 Chris Newman
204 Innosoft International, Inc.
205 1050 Lakes Drive
206 West Covina, CA 91790 USA
207
208 Email: chris.newman@innosoft.com
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225 Newman Standards Track [Page 4]
226
227 RFC 2245 Anonymous SASL Mechanism November 1997
228
229
230 7. Full Copyright Statement
231
232 Copyright (C) The Internet Society (1997). All Rights Reserved.
233
234 This document and translations of it may be copied and furnished to
235 others, and derivative works that comment on or otherwise explain it
236 or assist in its implementation may be prepared, copied, published
237 and distributed, in whole or in part, without restriction of any
238 kind, provided that the above copyright notice and this paragraph are
239 included on all such copies and derivative works. However, this
240 document itself may not be modified in any way, such as by removing
241 the copyright notice or references to the Internet Society or other
242 Internet organizations, except as needed for the purpose of
243 developing Internet standards in which case the procedures for
244 copyrights defined in the Internet Standards process must be
245 followed, or as required to translate it into languages other than
246 English.
247
248 The limited permissions granted above are perpetual and will not be
249 revoked by the Internet Society or its successors or assigns.
250
251 This document and the information contained herein is provided on an
252 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
253 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
254 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
255 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
256 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281 Newman Standards Track [Page 5]
282
0
1
2
3
4
5
6 Network Working Group N. Haller
7 Request for Comments: 2289 Bellcore
8 Obsoletes: 1938 C. Metz
9 Category: Standards Track Kaman Sciences Corporation
10 P. Nesser
11 Nesser & Nesser Consulting
12 M. Straw
13 Bellcore
14 February 1998
15
16
17 A One-Time Password System
18
19 Status of this Memo
20
21 This document specifies an Internet standards track protocol for the
22 Internet community, and requests discussion and suggestions for
23 improvements. Please refer to the current edition of the "Internet
24 Official Protocol Standards" (STD 1) for the standardization state
25 and status of this protocol. Distribution of this memo is unlimited.
26
27 Copyright Notice
28
29 Copyright (C) The Internet Society (1998). All Rights Reserved.
30
31 1.0 ABSTRACT
32
33 This document describes a one-time password authentication system
34 (OTP). The system provides authentication for system access (login)
35 and other applications requiring authentication that is secure
36 against passive attacks based on replaying captured reusable
37 passwords. OTP evolved from the S/KEY (S/KEY is a trademark of
38 Bellcore) One-Time Password System that was released by Bellcore and
39 is described in references [3] and [5].
40
41 2.0 OVERVIEW
42
43 One form of attack on networked computing systems is eavesdropping on
44 network connections to obtain authentication information such as the
45 login IDs and passwords of legitimate users. Once this information is
46 captured, it can be used at a later time to gain access to the
47 system. One-time password systems are designed to counter this type
48 of attack, called a "replay attack" [4].
49
50 The authentication system described in this document uses a secret
51 pass-phrase to generate a sequence of one-time (single use)
52 passwords. With this system, the user's secret pass-phrase never
53 needs to cross the network at any time such as during authentication
54
55
56
57 Haller Standards Track [Page 1]
58
59 RFC 2289 A One-Time Password System February 1998
60
61
62 or during pass-phrase changes. Thus, it is not vulnerable to replay
63 attacks. Added security is provided by the property that no secret
64 information need be stored on any system, including the server being
65 protected.
66
67 The OTP system protects against external passive attacks against the
68 authentication subsystem. It does not prevent a network eavesdropper
69 from gaining access to private information and does not provide
70 protection against either "social engineering" or active attacks [9].
71
72 3.0 INTRODUCTION
73
74 There are two entities in the operation of the OTP one-time password
75 system. The generator must produce the appropriate one-time password
76 from the user's secret pass-phrase and from information provided in
77 the challenge from the server. The server must send a challenge that
78 includes the appropriate generation parameters to the generator, must
79 verify the one-time password received, must store the last valid
80 one-time password it received, and must store the corresponding one-
81 time password sequence number. The server must also facilitate the
82 changing of the user's secret pass-phrase in a secure manner.
83
84 The OTP system generator passes the user's secret pass-phrase, along
85 with a seed received from the server as part of the challenge,
86 through multiple iterations of a secure hash function to produce a
87 one-time password. After each successful authentication, the number
88 of secure hash function iterations is reduced by one. Thus, a unique
89 sequence of passwords is generated. The server verifies the one-time
90 password received from the generator by computing the secure hash
91 function once and comparing the result with the previously accepted
92 one-time password. This technique was first suggested by Leslie
93 Lamport [1].
94
95 4.0 REQUIREMENTS TERMINOLOGY
96
97 In this document, the words that are used to define the significance
98 of each particular requirement are usually capitalized. These words
99 are:
100
101 - MUST
102
103 This word or the adjective "REQUIRED" means that the item is an
104 absolute requirement of the specification.
105
106
107
108
109
110
111
112
113 Haller Standards Track [Page 2]
114
115 RFC 2289 A One-Time Password System February 1998
116
117
118 - SHOULD
119
120 This word or the adjective "RECOMMENDED" means that there might
121 exist valid reasons in particular circumstances to ignore this
122 item, but the full implications should be understood and the case
123 carefully weighed before taking a different course.
124
125 - MAY
126
127 This word or the adjective "OPTIONAL" means that this item is
128 truly optional. One vendor might choose to include the item
129 because a particular marketplace requires it or because it
130 enhances the product, for example; another vendor may omit the
131 same item.
132
133 5.0 SECURE HASH FUNCTION
134
135 The security of the OTP system is based on the non-invertability of a
136 secure hash function. Such a function must be tractable to compute in
137 the forward direction, but computationally infeasible to invert.
138
139 The interfaces are currently defined for three such hash algorithms,
140 MD4 [2] and MD5 [6] by Ronald Rivest, and SHA [7] by NIST. All
141 conforming implementations of both server and generators MUST support
142 MD5. They SHOULD support SHA and MAY also support MD4. Clearly, the
143 generator and server must use the same algorithm in order to
144 interoperate. Other hash algorithms may be specified for use with
145 this system by publishing the appropriate interfaces.
146
147 The secure hash algorithms listed above have the property that they
148 accept an input that is arbitrarily long and produce a fixed size
149 output. The OTP system folds this output to 64 bits using the
150 algorithms in the Appendix A. 64 bits is also the length of the one-
151 time passwords. This is believed to be long enough to be secure and
152 short enough to be entered manually (see below, Form of Output) when
153 necessary.
154
155 6.0 GENERATION OF ONE-TIME PASSWORDS
156
157 This section describes the generation of the one-time passwords.
158 This process consists of an initial step in which all inputs are
159 combined, a computation step where the secure hash function is
160 applied a specified number of times, and an output function where the
161 64 bit one-time password is converted to a human readable form.
162
163 Appendix C contains examples of the outputs given a collection of
164 inputs. It provides implementors with a means of verification the
165 use of these algorithms.
166
167
168
169 Haller Standards Track [Page 3]
170
171 RFC 2289 A One-Time Password System February 1998
172
173
174 Initial Step
175
176 In principle, the user's secret pass-phrase may be of any length. To
177 reduce the risk from techniques such as exhaustive search or
178 dictionary attacks, character string pass-phrases MUST contain at
179 least 10 characters (see Form of Inputs below). All implementations
180 MUST support a pass-phrases of at least 63 characters. The secret
181 pass-phrase is frequently, but is not required to be, textual
182 information provided by a user.
183
184 In this step, the pass phrase is concatenated with a seed that is
185 transmitted from the server in clear text. This non-secret seed
186 allows clients to use the same secret pass-phrase on multiple
187 machines (using different seeds) and to safely recycle their secret
188 pass-phrases by changing the seed.
189
190 The result of the concatenation is passed through the secure hash
191 function and then is reduced to 64 bits using one of the function
192 dependent algorithms shown in Appendix A.
193
194 Computation Step
195
196 A sequence of one-time passwords is produced by applying the secure
197 hash function multiple times to the output of the initial step
198 (called S). That is, the first one-time password to be used is
199 produced by passing S through the secure hash function a number of
200 times (N) specified by the user. The next one-time password to be
201 used is generated by passing S though the secure hash function N-1
202 times. An eavesdropper who has monitored the transmission of a one-
203 time password would not be able to generate the next required
204 password because doing so would mean inverting the hash function.
205
206 Form of Inputs
207
208 The secret pass-phrase is seen only by the OTP generator. To allow
209 interchangeability of generators, all generators MUST support a
210 secret pass-phrase of 10 to 63 characters. Implementations MAY
211 support a longer pass-phrase, but such implementations risk the loss
212 of interchangeability with implementations supporting only the
213 minimum.
214
215 The seed MUST consist of purely alphanumeric characters and MUST be
216 of one to 16 characters in length. The seed is a string of characters
217 that MUST not contain any blanks and SHOULD consist of strictly
218 alphanumeric characters from the ISO-646 Invariant Code Set. The
219 seed MUST be case insensitive and MUST be internally converted to
220 lower case before it is processed.
221
222
223
224
225 Haller Standards Track [Page 4]
226
227 RFC 2289 A One-Time Password System February 1998
228
229
230 The sequence number and seed together constitute a larger unit of
231 data called the challenge. The challenge gives the generator the
232 parameters it needs to calculate the correct one-time password from
233 the secret pass-phrase. The challenge MUST be in a standard syntax so
234 that automated generators can recognize the challenge in context and
235 extract these parameters. The syntax of the challenge is:
236
237 otp-<algorithm identifier> <sequence integer> <seed>
238
239 The three tokens MUST be separated by a white space (defined as any
240 number of spaces and/or tabs) and the entire challenge string MUST be
241 terminated with either a space or a new line. The string "otp-" MUST
242 be in lower case. The algorithm identifier is case sensitive (the
243 existing identifiers are all lower case), and the seed is case
244 insensitive and converted before use to lower case. If additional
245 algorithms are defined, appropriate identifiers (short, but not
246 limited to three or four characters) must be defined. The currently
247 defined algorithm identifiers are:
248
249 md4 MD4 Message Digest
250 md5 MD5 Message Digest
251 sha1 NIST Secure Hash Algorithm Revision 1
252
253 An example of an OTP challenge is: otp-md5 487 dog2
254
255 Form of Output
256
257 The one-time password generated by the above procedure is 64 bits in
258 length. Entering a 64 bit number is a difficult and error prone
259 process. Some generators insert this password into the input stream
260 and some others make it available for system "cut and paste." Still
261 other arrangements require the one-time password to be entered
262 manually. The OTP system is designed to facilitate this manual entry
263 without impeding automatic methods. The one-time password therefore
264 MAY be converted to, and all servers MUST be capable of accepting it
265 as, a sequence of six short (1 to 4 letter) easily typed words that
266 only use characters from ISO-646 IVCS. Each word is chosen from a
267 dictionary of 2048 words; at 11 bits per word, all one-time passwords
268 may be encoded.
269
270 The two extra bits in this encoding are used to store a checksum.
271 The 64 bits of key are broken down into pairs of bits, then these
272 pairs are summed together. The two least significant bits of this sum
273 are encoded in the last two bits of the six word sequence with the
274 least significant bit of the sum as the last bit encoded. All OTP
275 generators MUST calculate this checksum and all OTP servers MUST
276 verify this checksum explicitly as part of the operation of decoding
277 this representation of the one-time password.
278
279
280
281 Haller Standards Track [Page 5]
282
283 RFC 2289 A One-Time Password System February 1998
284
285
286 Generators that produce the six-word format MUST present the words in
287 upper case with single spaces used as separators. All servers MUST
288 accept six-word format without regard to case and white space used as
289 a separator. The two lines below represent the same one-time
290 password. The first is valid as output from a generator and as input
291 a server, the second is valid only as human input to a server.
292
293 OUST COAT FOAL MUG BEAK TOTE
294 oust coat foal mug beak tote
295
296 Interoperability requires that all OTP servers and generators use
297 the same dictionary. The standard dictionary was originally
298 specified in the "S/KEY One Time Password System" that is described
299 in RFC 1760 [5]. This dictionary is included in this document as
300 Appendix D.
301
302 To facilitate the implementation of smaller generators, hexadecimal
303 output is an acceptable alternative for the presentation of the
304 one-time password. All implementations of the server software MUST
305 accept case-insensitive hexadecimal as well as six-word format. The
306 hexadecimal digits may be separated by white space so servers are
307 REQUIRED to ignore all white space. If the representation is
308 partitioned by white space, leading zeros must be retained.
309 Examples of hexadecimal format are:
310
311 Representation Value
312
313 3503785b369cda8b 0x3503785b369cda8b
314 e5cc a1b8 7c13 096b 0xe5cca1b87c13096b
315 C7 48 90 F4 27 7B A1 CF 0xc74890f4277ba1cf
316 47 9 A68 28 4C 9D 0 1BC 0x479a68284c9d01bc
317
318 In addition to accepting six-word and hexadecimal encodings of the
319 64 bit one-time password, servers SHOULD accept the alternate
320 dictionary encoding described in Appendix B. The six words in this
321 encoding MUST not overlap the set of words in the standard
322 dictionary. To avoid ambiguity with the hexadecimal representation,
323 words in the alternate dictionary MUST not be comprised solely of
324 the letters A-F. Decoding words thus encoded does not require any
325 knowledge of the alternative dictionary used so the acceptance of
326 any alternate dictionary implies the acceptance of all alternate
327 dictionaries. Words in the alternative dictionaries are case
328 sensitive. Generators and servers MUST preserve the case in the
329 processing of these words.
330
331 In summary, all conforming servers MUST accept six-word input that
332 uses the Standard Dictionary (RFC 1760 and Appendix D), MUST accept
333 hexadecimal encoding, and SHOULD accept six-word input that uses the
334
335
336
337 Haller Standards Track [Page 6]
338
339 RFC 2289 A One-Time Password System February 1998
340
341
342 Alternative Dictionary technique (Appendix B). As there is a remote
343 possibility that a hexadecimal encoding of a one-time password will
344 look like a valid six-word standard dictionary encoding, all
345 implementations MUST use the following scheme. If a six-word
346 encoded one-time password is valid, it is accepted. Otherwise, if
347 the one-time password can be interpreted as hexadecimal, and with
348 that decoding it is valid, then it is accepted.
349
350 7.0 VERIFICATION OF ONE-TIME PASSWORDS
351
352 An application on the server system that requires OTP authentication
353 is expected to issue an OTP challenge as described above. Given the
354 parameters from this challenge and the secret pass-phrase, the
355 generator can compute (or lookup) the one-time password that is
356 passed to the server to be verified.
357
358 The server system has a database containing, for each user, the
359 one-time password from the last successful authentication or the
360 first OTP of a newly initialized sequence. To authenticate the user,
361 the server decodes the one-time password received from the generator
362 into a 64-bit key and then runs this key through the secure hash
363 function once. If the result of this operation matches the stored
364 previous OTP, the authentication is successful and the accepted
365 one-time password is stored for future use.
366
367 8.0 PASS-PHRASE CHANGES
368
369 Because the number of hash function applications executed by the
370 generator decreases by one each time, at some point the user must
371 reinitialize the system or be unable to authenticate.
372
373 Although some installations may not permit users to initialize
374 remotely, implementations MUST provide a means to do so that does
375 not reveal the user's secret pass-phrase. One way is to provide a
376 means to reinitialize the sequence through explicit specification
377 of the first one-time password.
378
379 When the sequence of one-time passwords is reinitialized,
380 implementations MUST verify that the seed or the pass-phrase is
381 changed. Installations SHOULD discourage any operation that sends
382 the secret pass-phrase over a network in clear-text as such practice
383 defeats the concept of a one-time password.
384
385 Implementations MAY use the following technique for
386 [re]initialization:
387
388
389
390
391
392
393 Haller Standards Track [Page 7]
394
395 RFC 2289 A One-Time Password System February 1998
396
397
398 o The user picks a new seed and hash count (default values may
399 be offered). The user provides these, along with the
400 corresponding generated one-time password, to the host system.
401
402 o The user MAY also provide the corresponding generated one
403 time password for count-1 as an error check.
404
405 o The user SHOULD provide the generated one-time password for
406 the old seed and old hash count to protect an idle terminal
407 or workstation (this implies that when the count is 1, the
408 user can login but cannot then change the seed or count).
409
410 In the future a specific protocol may be defined for
411 reinitialization that will permit smooth and possibly automated
412 interoperation of all hosts and generators.
413
414 9.0 PROTECTION AGAINST RACE ATTACK
415
416 All conforming server implementations MUST protect against the race
417 condition described in this section. A defense against this attack
418 is outlined; implementations MAY use this approach or MAY select an
419 alternative defense.
420
421 It is possible for an attacker to listen to most of a one-time
422 password, guess the remainder, and then race the legitimate user to
423 complete the authentication. Multiple guesses against the last word
424 of the six-word format are likely to succeed.
425
426 One possible defense is to prevent a user from starting multiple
427 simultaneous authentication sessions. This means that once the
428 legitimate user has initiated authentication, an attacker would be
429 blocked until the first authentication process has completed. In
430 this approach, a timeout is necessary to thwart a denial of service
431 attack.
432
433 10.0 SECURITY CONSIDERATIONS
434
435 This entire document discusses an authentication system that
436 improves security by limiting the danger of eavesdropping/replay
437 attacks that have been used against simple password systems [4].
438
439 The use of the OTP system only provides protections against passive
440 eavesdropping/replay attacks. It does not provide for the privacy
441 of transmitted data, and it does not provide protection against
442 active attacks such as session hijacking that are known to be
443 present in the current Internet [9]. The use of IP Security
444 (IPsec), see [10], [11], and [12] is recommended to protect against
445 TCP session hijacking.
446
447
448
449 Haller Standards Track [Page 8]
450
451 RFC 2289 A One-Time Password System February 1998
452
453
454 The success of the OTP system to protect host systems is dependent
455 on the non-invertability of the secure hash functions used. To our
456 knowledge, none of the hash algorithms have been broken, but it is
457 generally believed [6] that MD4 is not as strong as MD5. If a
458 server supports multiple hash algorithms, it is only as secure as
459 the weakest algorithm.
460
461 11.0 ACKNOWLEDGMENTS
462
463 The idea behind OTP authentication was first proposed by Leslie
464 Lamport [1]. Bellcore's S/KEY system, from which OTP is derived, was
465 proposed by Phil Karn, who also wrote most of the Bellcore reference
466 implementation.
467
468 12.0 REFERENCES
469
470 [1] Leslie Lamport, "Password Authentication with Insecure
471 Communication", Communications of the ACM 24.11 (November
472 1981), 770-772
473
474 [2] Rivest, R., "The MD4 Message-Digest Algorithm", RFC 1320,
475 April 1992.
476
477 [3] Neil Haller, "The S/KEY One-Time Password System", Proceedings
478 of the ISOC Symposium on Network and Distributed System
479 Security, February 1994, San Diego, CA
480
481 [4] Haller, N., and R. Atkinson, "On Internet Authentication",
482 RFC 1704, October 1994.
483
484 [5] Haller, N., "The S/KEY One-Time Password System",
485 RFC 1760, February 1995.
486
487 [6] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
488 April 1992.
489
490 [7] National Institute of Standards and Technology (NIST),
491 "Announcing the Secure Hash Standard", FIPS 180-1, U.S.
492 Department of Commerce, April 1995.
493
494 [8] International Standard - Information Processing -- ISO 7-bit
495 coded character set for information interchange (Invariant Code
496 Set), ISO-646, International Standards Organization, Geneva,
497 Switzerland, 1983
498
499
500
501
502
503
504
505 Haller Standards Track [Page 9]
506
507 RFC 2289 A One-Time Password System February 1998
508
509
510 [9] Computer Emergency Response Team (CERT), "IP Spoofing and
511 Hijacked Terminal Connections", CA-95:01, January 1995.
512 Available via anonymous ftp from info.cert.org in
513 /pub/cert_advisories.
514
515 [10] Atkinson, R., "Security Architecture for the Internet Protocol",
516 RFC 1825, August 1995.
517
518 [11] Atkinson, R., "IP Authentication Header", RFC 1826, August
519 1995.
520
521 [12] Atkinson, R., "IP Encapsulating Security Payload (ESP)", RFC
522 1827, August 1995.
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561 Haller Standards Track [Page 10]
562
563 RFC 2289 A One-Time Password System February 1998
564
565
566 13.0 AUTHORS' ADDRESSES
567
568 Neil Haller
569 Bellcore
570 MCC 1C-265B
571 445 South Street
572 Morristown, NJ, 07960-6438, USA
573
574 Phone: +1 201 829-4478
575 Fax: +1 201 829-2504
576 EMail: nmh@bellcore.com
577
578
579 Craig Metz
580 Kaman Sciences Corporation
581 For NRL Code 5544
582 4555 Overlook Avenue, S.W.
583 Washington, DC, 20375-5337, USA
584
585 Phone: +1 202 404-7122
586 Fax: +1 202 404-7942
587 EMail: cmetz@cs.nrl.navy.mil
588
589
590 Philip J. Nesser II
591 Nesser & Nesser Consulting
592 13501 100th Ave NE
593 Suite 5202
594 Kirkland, WA 98034, USA
595
596 Phone: +1 206 481 4303
597 EMail: pjnesser@martigny.ai.mit.edu
598
599
600 Mike Straw
601 Bellcore
602 RRC 1A-225
603 445 Hoes Lane
604 Piscataway, NJ 08854-4182
605
606 Phone: +1 908 699-5212
607 EMail: mess@bellcore.com
608
609
610
611
612
613
614
615
616
617 Haller Standards Track [Page 11]
618
619 RFC 2289 A One-Time Password System February 1998
620
621
622 Appendix A - Interfaces to Secure Hash Algorithms
623
624 Original interoperability tests provided valuable insights into the
625 subtle problems which occur when converting protocol specifications
626 into running code. In particular, the manipulation of bit ordered
627 data is dependent on the architecture of the hardware, specifically
628 the way in which a computer stores multi-byte data. The method is
629 typically called big or little "endian." A big endian machine stores
630 data with the most significant byte first, while a little endian
631 machine stores the least significant byte first. Thus, on a big
632 endian machine data is stored left to right, while little endian
633 machines store data right to left.
634
635 For example, the four byte value 0x11AABBCC is stored in a big endian
636 machine as the following series of four bytes, "0x11", "0xAA",
637 "0xBB", and "0xCC", while on a little endian machine the value would
638 be stored as "0xCC", "0xBB", "0xAA", and "0x11".
639
640 For historical reasons, and to promote interoperability with existing
641 implementations, it was decided that ALL hashes incorporated into the
642 OTP protocol MUST store the output of their hash function in LITTLE
643 ENDIAN format BEFORE the bit folding to 64 bits occurs. This is done
644 in the implementations of MD4 and MD5 (see references [2] and [6]),
645 while it must be explicitly done for the implementation of SHA1 (see
646 reference [7]).
647
648 Any future hash functions implemented into the OTP protocol SHOULD
649 provide a similar reference fragment of code to allow independent
650 implementations to operate successfully.
651
652
653 MD4 Message Digest (see reference [2])
654
655 MD4_CTX md;
656 unsigned char result[16];
657
658 strcpy(buf, seed); /* seed must be in lower case */
659 strcat(buf, passwd);
660 MD4Init(&md);
661 MD4Update(&md, (unsigned char *)buf, strlen(buf));
662 MD4Final(result, &md);
663
664 /* Fold the 128 bit result to 64 bits */
665 for (i = 0; i < 8; i++)
666 result[i] ^= result[i+8];
667
668
669
670
671
672
673 Haller Standards Track [Page 12]
674
675 RFC 2289 A One-Time Password System February 1998
676
677
678 MD5 Message Digest (see reference [6])
679
680 MD5_CTX md;
681 unsigned char result[16];
682 strcpy(buf, seed); /* seed must be in lower case */
683 strcat(buf, passwd);
684 MD5Init(&md);
685 MD5Update(&md, (unsigned char *)buf, strlen(buf));
686 MD5Final(result, &md);
687
688 /* Fold the 128 bit result to 64 bits */
689 for (i = 0; i < 8; i++)
690 result[i] ^= result[i+8];
691
692
693 SHA Secure Hash Algorithm (see reference [7])
694
695 SHA_INFO sha;
696 unsigned char result[16];
697 strcpy(buf, seed); /* seed must be in lower case */
698 strcat(buf, passwd);
699 sha_init(&sha);
700 sha_update(&sha, (unsigned char *)buf, strlen(buf));
701 sha_final(&sha); /* NOTE: no result buffer */
702
703 /* Fold the 160 bit result to 64 bits */
704 sha.digest[0] ^= sha.digest[2];
705 sha.digest[1] ^= sha.digest[3];
706 sha.digest[0] ^= sha.digest[4];
707
708 /*
709 * copy the resulting 64 bits to the result buffer in little endian
710 * fashion (analogous to the way MD4Final() and MD5Final() do).
711 */
712 for (i = 0, j = 0; j < 8; i++, j += 4)
713 {
714 result[j] = (unsigned char)(sha.digest[i] & 0xff);
715 result[j+1] = (unsigned char)((sha.digest[i] >> 8) & 0xff);
716 result[j+2] = (unsigned char)((sha.digest[i] >> 16) & 0xff);
717 result[j+3] = (unsigned char)((sha.digest[i] >> 24) & 0xff);
718 }
719
720
721
722
723
724
725
726
727
728
729 Haller Standards Track [Page 13]
730
731 RFC 2289 A One-Time Password System February 1998
732
733
734 Appendix B - Alternative Dictionary Algorithm
735
736 The purpose of alternative dictionary encoding of the OTP one-time
737 password is to allow the use of language specific or friendly words.
738 As case translation is not always well defined, the alternative
739 dictionary encoding is case sensitive. Servers SHOULD accept this
740 encoding in addition to the standard 6-word and hexadecimal
741 encodings.
742
743
744 GENERATOR ENCODING USING AN ALTERNATE DICTIONARY
745
746 The standard 6-word encoding uses the placement of a word in the
747 dictionary to represent an 11-bit number. The 64-bit one-time
748 password can then be represented by six words.
749
750 An alternative dictionary of 2048 words may be created such that
751 each word W and position of the word in the dictionary N obey the
752 relationship:
753
754 alg( W ) % 2048 == N
755 where
756 alg is the hash algorithm used (e.g. MD4, MD5, SHA1).
757
758 In addition, no words in the standard dictionary may be chosen.
759
760 The generator expands the 64-bit one-time password to 66 bits by
761 computing parity as with the standard 6-word encoding. The six 11-
762 bit numbers are then converted to words using the dictionary that
763 was created such that the above relationship holds.
764
765 SERVER DECODING OF ALTERNATE DICTIONARY ONE-TIME PASSWORDS
766
767 The server accepting alternative dictionary encoding converts each
768 word to an 11-bit number using the above encoding. These numbers
769 are then used in the same way as the decoded standard dictionary
770 words to form the 66-bit one-time password.
771
772 The server does not need to have access to the alternate dictionary
773 that was used to create the one-time password it is authenticating.
774 This is because the decoding from word to 11-bit number does not
775 make any use of the dictionary. As a result of the independence of
776 the dictionary, a server accepting one alternate dictionary accept
777 all alternate dictionaries.
778
779
780
781
782
783
784
785 Haller Standards Track [Page 14]
786
787 RFC 2289 A One-Time Password System February 1998
788
789
790 Appendix C - OTP Verification Examples
791
792 This appendix provides a series of inputs and correct outputs for all
793 three of the defined OTP cryptographic hashes, specifically MD4, MD5,
794 and SHA1. This document is intended to be used by developers for
795 interoperability checks when creating generators or servers. Output
796 is provided in both hexadecimal notation and the six word encoding
797 documented in Appendix D.
798
799 GENERAL CHECKS
800
801 Note that the output given for these checks is not intended to be
802 taken literally, but describes the type of action that should be
803 taken.
804
805 Pass Phrase Length
806
807 Input:
808 Pass Phrase: Too_short
809 Seed: iamvalid
810 Count: 99
811 Hash: ANY
812 Output:
813 ERROR: Pass Phrase too short
814
815 Input:
816 Pass Phrase:
817 1234567890123456789012345678901234567890123456789012345678901234
818 Seed: iamvalid
819 Count: 99
820 Hash: ANY
821 Output:
822 WARNING: Pass Phrase longer than the recommended maximum length of
823 63
824
825 Seed Values
826
827 Input:
828 Pass Phrase: A_Valid_Pass_Phrase
829 Seed: Length_Okay
830 Count: 99
831 Hash: ANY
832 Output:
833 ERROR: Seed must be purely alphanumeric
834
835 Input:
836 Pass Phrase: A_Valid_Pass_Phrase
837 Seed: LengthOfSeventeen
838
839
840
841 Haller Standards Track [Page 15]
842
843 RFC 2289 A One-Time Password System February 1998
844
845
846 Count: 99
847 Hash: ANY
848
849 Output:
850 ERROR: Seed must be between 1 and 16 characters in length
851
852 Input:
853 Pass Phrase: A_Valid_Pass_Phrase
854 Seed: A Seed
855 Count: 99
856 Hash: ANY
857 Output:
858 ERROR: Seed must not contain any spaces
859
860 Parity Calculations
861
862 Input:
863 Pass Phrase: A_Valid_Pass_Phrase
864 Seed: AValidSeed
865 Count: 99
866 Hash: MD5
867 Output:
868 Hex: 85c43ee03857765b
869 Six Word(CORRECT): FOWL KID MASH DEAD DUAL OAF
870 Six Word(INCORRECT PARITY): FOWL KID MASH DEAD DUAL NUT
871 Six Word(INCORRECT PARITY): FOWL KID MASH DEAD DUAL O
872 Six Word(INCORRECT PARITY): FOWL KID MASH DEAD DUAL OAK
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897 Haller Standards Track [Page 16]
898
899 RFC 2289 A One-Time Password System February 1998
900
901
902 MD4 ENCODINGS
903
904 Pass Phrase Seed Cnt Hex Six Word Format
905 ========================================================================
906 This is a test. TeSt 0 D185 4218 EBBB 0B51
907 ROME MUG FRED SCAN LIVE LACE
908 This is a test. TeSt 1 6347 3EF0 1CD0 B444
909 CARD SAD MINI RYE COL KIN
910 This is a test. TeSt 99 C5E6 1277 6E6C 237A
911 NOTE OUT IBIS SINK NAVE MODE
912 AbCdEfGhIjK alpha1 0 5007 6F47 EB1A DE4E
913 AWAY SEN ROOK SALT LICE MAP
914 AbCdEfGhIjK alpha1 1 65D2 0D19 49B5 F7AB
915 CHEW GRIM WU HANG BUCK SAID
916 AbCdEfGhIjK alpha1 99 D150 C82C CE6F 62D1
917 ROIL FREE COG HUNK WAIT COCA
918 OTP's are good correct 0 849C 79D4 F6F5 5388
919 FOOL STEM DONE TOOL BECK NILE
920 OTP's are good correct 1 8C09 92FB 2508 47B1
921 GIST AMOS MOOT AIDS FOOD SEEM
922 OTP's are good correct 99 3F3B F4B4 145F D74B
923 TAG SLOW NOV MIN WOOL KENO
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953 Haller Standards Track [Page 17]
954
955 RFC 2289 A One-Time Password System February 1998
956
957
958 MD5 ENCODINGS
959
960 Pass Phrase Seed Cnt Hex Six Word Format
961 ========================================================================
962 This is a test. TeSt 0 9E87 6134 D904 99DD
963 INCH SEA ANNE LONG AHEM TOUR
964 This is a test. TeSt 1 7965 E054 36F5 029F
965 EASE OIL FUM CURE AWRY AVIS
966 This is a test. TeSt 99 50FE 1962 C496 5880
967 BAIL TUFT BITS GANG CHEF THY
968 AbCdEfGhIjK alpha1 0 8706 6DD9 644B F206
969 FULL PEW DOWN ONCE MORT ARC
970 AbCdEfGhIjK alpha1 1 7CD3 4C10 40AD D14B
971 FACT HOOF AT FIST SITE KENT
972 AbCdEfGhIjK alpha1 99 5AA3 7A81 F212 146C
973 BODE HOP JAKE STOW JUT RAP
974 OTP's are good correct 0 F205 7539 43DE 4CF9
975 ULAN NEW ARMY FUSE SUIT EYED
976 OTP's are good correct 1 DDCD AC95 6F23 4937
977 SKIM CULT LOB SLAM POE HOWL
978 OTP's are good correct 99 B203 E28F A525 BE47
979 LONG IVY JULY AJAR BOND LEE
980
981
982 SHA1 ENCODINGS
983
984 Pass Phrase Seed Cnt Hex Six Word Format
985 ========================================================================
986 This is a test. TeSt 0 BB9E 6AE1 979D 8FF4
987 MILT VARY MAST OK SEES WENT
988 This is a test. TeSt 1 63D9 3663 9734 385B
989 CART OTTO HIVE ODE VAT NUT
990 This is a test. TeSt 99 87FE C776 8B73 CCF9
991 GAFF WAIT SKID GIG SKY EYED
992 AbCdEfGhIjK alpha1 0 AD85 F658 EBE3 83C9
993 LEST OR HEEL SCOT ROB SUIT
994 AbCdEfGhIjK alpha1 1 D07C E229 B5CF 119B
995 RITE TAKE GELD COST TUNE RECK
996 AbCdEfGhIjK alpha1 99 27BC 7103 5AAF 3DC6
997 MAY STAR TIN LYON VEDA STAN
998 OTP's are good correct 0 D51F 3E99 BF8E 6F0B
999 RUST WELT KICK FELL TAIL FRAU
1000 OTP's are good correct 1 82AE B52D 9437 74E4
1001 FLIT DOSE ALSO MEW DRUM DEFY
1002 OTP's are good correct 99 4F29 6A74 FE15 67EC
1003 AURA ALOE HURL WING BERG WAIT
1004
1005
1006
1007
1008
1009 Haller Standards Track [Page 18]
1010
1011 RFC 2289 A One-Time Password System February 1998
1012
1013
1014 Appendix D - Dictionary for Converting Between 6-Word and Binary Formats
1015
1016 This dictionary is from the module put.c in the original Bellcore
1017 reference distribution.
1018
1019 { "A", "ABE", "ACE", "ACT", "AD", "ADA", "ADD",
1020 "AGO", "AID", "AIM", "AIR", "ALL", "ALP", "AM", "AMY",
1021 "AN", "ANA", "AND", "ANN", "ANT", "ANY", "APE", "APS",
1022 "APT", "ARC", "ARE", "ARK", "ARM", "ART", "AS", "ASH",
1023 "ASK", "AT", "ATE", "AUG", "AUK", "AVE", "AWE", "AWK",
1024 "AWL", "AWN", "AX", "AYE", "BAD", "BAG", "BAH", "BAM",
1025 "BAN", "BAR", "BAT", "BAY", "BE", "BED", "BEE", "BEG",
1026 "BEN", "BET", "BEY", "BIB", "BID", "BIG", "BIN", "BIT",
1027 "BOB", "BOG", "BON", "BOO", "BOP", "BOW", "BOY", "BUB",
1028 "BUD", "BUG", "BUM", "BUN", "BUS", "BUT", "BUY", "BY",
1029 "BYE", "CAB", "CAL", "CAM", "CAN", "CAP", "CAR", "CAT",
1030 "CAW", "COD", "COG", "COL", "CON", "COO", "COP", "COT",
1031 "COW", "COY", "CRY", "CUB", "CUE", "CUP", "CUR", "CUT",
1032 "DAB", "DAD", "DAM", "DAN", "DAR", "DAY", "DEE", "DEL",
1033 "DEN", "DES", "DEW", "DID", "DIE", "DIG", "DIN", "DIP",
1034 "DO", "DOE", "DOG", "DON", "DOT", "DOW", "DRY", "DUB",
1035 "DUD", "DUE", "DUG", "DUN", "EAR", "EAT", "ED", "EEL",
1036 "EGG", "EGO", "ELI", "ELK", "ELM", "ELY", "EM", "END",
1037 "EST", "ETC", "EVA", "EVE", "EWE", "EYE", "FAD", "FAN",
1038 "FAR", "FAT", "FAY", "FED", "FEE", "FEW", "FIB", "FIG",
1039 "FIN", "FIR", "FIT", "FLO", "FLY", "FOE", "FOG", "FOR",
1040 "FRY", "FUM", "FUN", "FUR", "GAB", "GAD", "GAG", "GAL",
1041 "GAM", "GAP", "GAS", "GAY", "GEE", "GEL", "GEM", "GET",
1042 "GIG", "GIL", "GIN", "GO", "GOT", "GUM", "GUN", "GUS",
1043 "GUT", "GUY", "GYM", "GYP", "HA", "HAD", "HAL", "HAM",
1044 "HAN", "HAP", "HAS", "HAT", "HAW", "HAY", "HE", "HEM",
1045 "HEN", "HER", "HEW", "HEY", "HI", "HID", "HIM", "HIP",
1046 "HIS", "HIT", "HO", "HOB", "HOC", "HOE", "HOG", "HOP",
1047 "HOT", "HOW", "HUB", "HUE", "HUG", "HUH", "HUM", "HUT",
1048 "I", "ICY", "IDA", "IF", "IKE", "ILL", "INK", "INN",
1049 "IO", "ION", "IQ", "IRA", "IRE", "IRK", "IS", "IT",
1050 "ITS", "IVY", "JAB", "JAG", "JAM", "JAN", "JAR", "JAW",
1051 "JAY", "JET", "JIG", "JIM", "JO", "JOB", "JOE", "JOG",
1052 "JOT", "JOY", "JUG", "JUT", "KAY", "KEG", "KEN", "KEY",
1053 "KID", "KIM", "KIN", "KIT", "LA", "LAB", "LAC", "LAD",
1054 "LAG", "LAM", "LAP", "LAW", "LAY", "LEA", "LED", "LEE",
1055 "LEG", "LEN", "LEO", "LET", "LEW", "LID", "LIE", "LIN",
1056 "LIP", "LIT", "LO", "LOB", "LOG", "LOP", "LOS", "LOT",
1057 "LOU", "LOW", "LOY", "LUG", "LYE", "MA", "MAC", "MAD",
1058 "MAE", "MAN", "MAO", "MAP", "MAT", "MAW", "MAY", "ME",
1059 "MEG", "MEL", "MEN", "MET", "MEW", "MID", "MIN", "MIT",
1060 "MOB", "MOD", "MOE", "MOO", "MOP", "MOS", "MOT", "MOW",
1061 "MUD", "MUG", "MUM", "MY", "NAB", "NAG", "NAN", "NAP",
1062
1063
1064
1065 Haller Standards Track [Page 19]
1066
1067 RFC 2289 A One-Time Password System February 1998
1068
1069
1070 "NAT", "NAY", "NE", "NED", "NEE", "NET", "NEW", "NIB",
1071 "NIL", "NIP", "NIT", "NO", "NOB", "NOD", "NON", "NOR",
1072 "NOT", "NOV", "NOW", "NU", "NUN", "NUT", "O", "OAF",
1073 "OAK", "OAR", "OAT", "ODD", "ODE", "OF", "OFF", "OFT",
1074 "OH", "OIL", "OK", "OLD", "ON", "ONE", "OR", "ORB",
1075 "ORE", "ORR", "OS", "OTT", "OUR", "OUT", "OVA", "OW",
1076 "OWE", "OWL", "OWN", "OX", "PA", "PAD", "PAL", "PAM",
1077 "PAN", "PAP", "PAR", "PAT", "PAW", "PAY", "PEA", "PEG",
1078 "PEN", "PEP", "PER", "PET", "PEW", "PHI", "PI", "PIE",
1079 "PIN", "PIT", "PLY", "PO", "POD", "POE", "POP", "POT",
1080 "POW", "PRO", "PRY", "PUB", "PUG", "PUN", "PUP", "PUT",
1081 "QUO", "RAG", "RAM", "RAN", "RAP", "RAT", "RAW", "RAY",
1082 "REB", "RED", "REP", "RET", "RIB", "RID", "RIG", "RIM",
1083 "RIO", "RIP", "ROB", "ROD", "ROE", "RON", "ROT", "ROW",
1084 "ROY", "RUB", "RUE", "RUG", "RUM", "RUN", "RYE", "SAC",
1085 "SAD", "SAG", "SAL", "SAM", "SAN", "SAP", "SAT", "SAW",
1086 "SAY", "SEA", "SEC", "SEE", "SEN", "SET", "SEW", "SHE",
1087 "SHY", "SIN", "SIP", "SIR", "SIS", "SIT", "SKI", "SKY",
1088 "SLY", "SO", "SOB", "SOD", "SON", "SOP", "SOW", "SOY",
1089 "SPA", "SPY", "SUB", "SUD", "SUE", "SUM", "SUN", "SUP",
1090 "TAB", "TAD", "TAG", "TAN", "TAP", "TAR", "TEA", "TED",
1091 "TEE", "TEN", "THE", "THY", "TIC", "TIE", "TIM", "TIN",
1092 "TIP", "TO", "TOE", "TOG", "TOM", "TON", "TOO", "TOP",
1093 "TOW", "TOY", "TRY", "TUB", "TUG", "TUM", "TUN", "TWO",
1094 "UN", "UP", "US", "USE", "VAN", "VAT", "VET", "VIE",
1095 "WAD", "WAG", "WAR", "WAS", "WAY", "WE", "WEB", "WED",
1096 "WEE", "WET", "WHO", "WHY", "WIN", "WIT", "WOK", "WON",
1097 "WOO", "WOW", "WRY", "WU", "YAM", "YAP", "YAW", "YE",
1098 "YEA", "YES", "YET", "YOU", "ABED", "ABEL", "ABET", "ABLE",
1099 "ABUT", "ACHE", "ACID", "ACME", "ACRE", "ACTA", "ACTS", "ADAM",
1100 "ADDS", "ADEN", "AFAR", "AFRO", "AGEE", "AHEM", "AHOY", "AIDA",
1101 "AIDE", "AIDS", "AIRY", "AJAR", "AKIN", "ALAN", "ALEC", "ALGA",
1102 "ALIA", "ALLY", "ALMA", "ALOE", "ALSO", "ALTO", "ALUM", "ALVA",
1103 "AMEN", "AMES", "AMID", "AMMO", "AMOK", "AMOS", "AMRA", "ANDY",
1104 "ANEW", "ANNA", "ANNE", "ANTE", "ANTI", "AQUA", "ARAB", "ARCH",
1105 "AREA", "ARGO", "ARID", "ARMY", "ARTS", "ARTY", "ASIA", "ASKS",
1106 "ATOM", "AUNT", "AURA", "AUTO", "AVER", "AVID", "AVIS", "AVON",
1107 "AVOW", "AWAY", "AWRY", "BABE", "BABY", "BACH", "BACK", "BADE",
1108 "BAIL", "BAIT", "BAKE", "BALD", "BALE", "BALI", "BALK", "BALL",
1109 "BALM", "BAND", "BANE", "BANG", "BANK", "BARB", "BARD", "BARE",
1110 "BARK", "BARN", "BARR", "BASE", "BASH", "BASK", "BASS", "BATE",
1111 "BATH", "BAWD", "BAWL", "BEAD", "BEAK", "BEAM", "BEAN", "BEAR",
1112 "BEAT", "BEAU", "BECK", "BEEF", "BEEN", "BEER", "BEET", "BELA",
1113 "BELL", "BELT", "BEND", "BENT", "BERG", "BERN", "BERT", "BESS",
1114 "BEST", "BETA", "BETH", "BHOY", "BIAS", "BIDE", "BIEN", "BILE",
1115 "BILK", "BILL", "BIND", "BING", "BIRD", "BITE", "BITS", "BLAB",
1116 "BLAT", "BLED", "BLEW", "BLOB", "BLOC", "BLOT", "BLOW", "BLUE",
1117 "BLUM", "BLUR", "BOAR", "BOAT", "BOCA", "BOCK", "BODE", "BODY",
1118
1119
1120
1121 Haller Standards Track [Page 20]
1122
1123 RFC 2289 A One-Time Password System February 1998
1124
1125
1126 "BOGY", "BOHR", "BOIL", "BOLD", "BOLO", "BOLT", "BOMB", "BONA",
1127 "BOND", "BONE", "BONG", "BONN", "BONY", "BOOK", "BOOM", "BOON",
1128 "BOOT", "BORE", "BORG", "BORN", "BOSE", "BOSS", "BOTH", "BOUT",
1129 "BOWL", "BOYD", "BRAD", "BRAE", "BRAG", "BRAN", "BRAY", "BRED",
1130 "BREW", "BRIG", "BRIM", "BROW", "BUCK", "BUDD", "BUFF", "BULB",
1131 "BULK", "BULL", "BUNK", "BUNT", "BUOY", "BURG", "BURL", "BURN",
1132 "BURR", "BURT", "BURY", "BUSH", "BUSS", "BUST", "BUSY", "BYTE",
1133 "CADY", "CAFE", "CAGE", "CAIN", "CAKE", "CALF", "CALL", "CALM",
1134 "CAME", "CANE", "CANT", "CARD", "CARE", "CARL", "CARR", "CART",
1135 "CASE", "CASH", "CASK", "CAST", "CAVE", "CEIL", "CELL", "CENT",
1136 "CERN", "CHAD", "CHAR", "CHAT", "CHAW", "CHEF", "CHEN", "CHEW",
1137 "CHIC", "CHIN", "CHOU", "CHOW", "CHUB", "CHUG", "CHUM", "CITE",
1138 "CITY", "CLAD", "CLAM", "CLAN", "CLAW", "CLAY", "CLOD", "CLOG",
1139 "CLOT", "CLUB", "CLUE", "COAL", "COAT", "COCA", "COCK", "COCO",
1140 "CODA", "CODE", "CODY", "COED", "COIL", "COIN", "COKE", "COLA",
1141 "COLD", "COLT", "COMA", "COMB", "COME", "COOK", "COOL", "COON",
1142 "COOT", "CORD", "CORE", "CORK", "CORN", "COST", "COVE", "COWL",
1143 "CRAB", "CRAG", "CRAM", "CRAY", "CREW", "CRIB", "CROW", "CRUD",
1144 "CUBA", "CUBE", "CUFF", "CULL", "CULT", "CUNY", "CURB", "CURD",
1145 "CURE", "CURL", "CURT", "CUTS", "DADE", "DALE", "DAME", "DANA",
1146 "DANE", "DANG", "DANK", "DARE", "DARK", "DARN", "DART", "DASH",
1147 "DATA", "DATE", "DAVE", "DAVY", "DAWN", "DAYS", "DEAD", "DEAF",
1148 "DEAL", "DEAN", "DEAR", "DEBT", "DECK", "DEED", "DEEM", "DEER",
1149 "DEFT", "DEFY", "DELL", "DENT", "DENY", "DESK", "DIAL", "DICE",
1150 "DIED", "DIET", "DIME", "DINE", "DING", "DINT", "DIRE", "DIRT",
1151 "DISC", "DISH", "DISK", "DIVE", "DOCK", "DOES", "DOLE", "DOLL",
1152 "DOLT", "DOME", "DONE", "DOOM", "DOOR", "DORA", "DOSE", "DOTE",
1153 "DOUG", "DOUR", "DOVE", "DOWN", "DRAB", "DRAG", "DRAM", "DRAW",
1154 "DREW", "DRUB", "DRUG", "DRUM", "DUAL", "DUCK", "DUCT", "DUEL",
1155 "DUET", "DUKE", "DULL", "DUMB", "DUNE", "DUNK", "DUSK", "DUST",
1156 "DUTY", "EACH", "EARL", "EARN", "EASE", "EAST", "EASY", "EBEN",
1157 "ECHO", "EDDY", "EDEN", "EDGE", "EDGY", "EDIT", "EDNA", "EGAN",
1158 "ELAN", "ELBA", "ELLA", "ELSE", "EMIL", "EMIT", "EMMA", "ENDS",
1159 "ERIC", "EROS", "EVEN", "EVER", "EVIL", "EYED", "FACE", "FACT",
1160 "FADE", "FAIL", "FAIN", "FAIR", "FAKE", "FALL", "FAME", "FANG",
1161 "FARM", "FAST", "FATE", "FAWN", "FEAR", "FEAT", "FEED", "FEEL",
1162 "FEET", "FELL", "FELT", "FEND", "FERN", "FEST", "FEUD", "FIEF",
1163 "FIGS", "FILE", "FILL", "FILM", "FIND", "FINE", "FINK", "FIRE",
1164 "FIRM", "FISH", "FISK", "FIST", "FITS", "FIVE", "FLAG", "FLAK",
1165 "FLAM", "FLAT", "FLAW", "FLEA", "FLED", "FLEW", "FLIT", "FLOC",
1166 "FLOG", "FLOW", "FLUB", "FLUE", "FOAL", "FOAM", "FOGY", "FOIL",
1167 "FOLD", "FOLK", "FOND", "FONT", "FOOD", "FOOL", "FOOT", "FORD",
1168 "FORE", "FORK", "FORM", "FORT", "FOSS", "FOUL", "FOUR", "FOWL",
1169 "FRAU", "FRAY", "FRED", "FREE", "FRET", "FREY", "FROG", "FROM",
1170 "FUEL", "FULL", "FUME", "FUND", "FUNK", "FURY", "FUSE", "FUSS",
1171 "GAFF", "GAGE", "GAIL", "GAIN", "GAIT", "GALA", "GALE", "GALL",
1172 "GALT", "GAME", "GANG", "GARB", "GARY", "GASH", "GATE", "GAUL",
1173 "GAUR", "GAVE", "GAWK", "GEAR", "GELD", "GENE", "GENT", "GERM",
1174
1175
1176
1177 Haller Standards Track [Page 21]
1178
1179 RFC 2289 A One-Time Password System February 1998
1180
1181
1182 "GETS", "GIBE", "GIFT", "GILD", "GILL", "GILT", "GINA", "GIRD",
1183 "GIRL", "GIST", "GIVE", "GLAD", "GLEE", "GLEN", "GLIB", "GLOB",
1184 "GLOM", "GLOW", "GLUE", "GLUM", "GLUT", "GOAD", "GOAL", "GOAT",
1185 "GOER", "GOES", "GOLD", "GOLF", "GONE", "GONG", "GOOD", "GOOF",
1186 "GORE", "GORY", "GOSH", "GOUT", "GOWN", "GRAB", "GRAD", "GRAY",
1187 "GREG", "GREW", "GREY", "GRID", "GRIM", "GRIN", "GRIT", "GROW",
1188 "GRUB", "GULF", "GULL", "GUNK", "GURU", "GUSH", "GUST", "GWEN",
1189 "GWYN", "HAAG", "HAAS", "HACK", "HAIL", "HAIR", "HALE", "HALF",
1190 "HALL", "HALO", "HALT", "HAND", "HANG", "HANK", "HANS", "HARD",
1191 "HARK", "HARM", "HART", "HASH", "HAST", "HATE", "HATH", "HAUL",
1192 "HAVE", "HAWK", "HAYS", "HEAD", "HEAL", "HEAR", "HEAT", "HEBE",
1193 "HECK", "HEED", "HEEL", "HEFT", "HELD", "HELL", "HELM", "HERB",
1194 "HERD", "HERE", "HERO", "HERS", "HESS", "HEWN", "HICK", "HIDE",
1195 "HIGH", "HIKE", "HILL", "HILT", "HIND", "HINT", "HIRE", "HISS",
1196 "HIVE", "HOBO", "HOCK", "HOFF", "HOLD", "HOLE", "HOLM", "HOLT",
1197 "HOME", "HONE", "HONK", "HOOD", "HOOF", "HOOK", "HOOT", "HORN",
1198 "HOSE", "HOST", "HOUR", "HOVE", "HOWE", "HOWL", "HOYT", "HUCK",
1199 "HUED", "HUFF", "HUGE", "HUGH", "HUGO", "HULK", "HULL", "HUNK",
1200 "HUNT", "HURD", "HURL", "HURT", "HUSH", "HYDE", "HYMN", "IBIS",
1201 "ICON", "IDEA", "IDLE", "IFFY", "INCA", "INCH", "INTO", "IONS",
1202 "IOTA", "IOWA", "IRIS", "IRMA", "IRON", "ISLE", "ITCH", "ITEM",
1203 "IVAN", "JACK", "JADE", "JAIL", "JAKE", "JANE", "JAVA", "JEAN",
1204 "JEFF", "JERK", "JESS", "JEST", "JIBE", "JILL", "JILT", "JIVE",
1205 "JOAN", "JOBS", "JOCK", "JOEL", "JOEY", "JOHN", "JOIN", "JOKE",
1206 "JOLT", "JOVE", "JUDD", "JUDE", "JUDO", "JUDY", "JUJU", "JUKE",
1207 "JULY", "JUNE", "JUNK", "JUNO", "JURY", "JUST", "JUTE", "KAHN",
1208 "KALE", "KANE", "KANT", "KARL", "KATE", "KEEL", "KEEN", "KENO",
1209 "KENT", "KERN", "KERR", "KEYS", "KICK", "KILL", "KIND", "KING",
1210 "KIRK", "KISS", "KITE", "KLAN", "KNEE", "KNEW", "KNIT", "KNOB",
1211 "KNOT", "KNOW", "KOCH", "KONG", "KUDO", "KURD", "KURT", "KYLE",
1212 "LACE", "LACK", "LACY", "LADY", "LAID", "LAIN", "LAIR", "LAKE",
1213 "LAMB", "LAME", "LAND", "LANE", "LANG", "LARD", "LARK", "LASS",
1214 "LAST", "LATE", "LAUD", "LAVA", "LAWN", "LAWS", "LAYS", "LEAD",
1215 "LEAF", "LEAK", "LEAN", "LEAR", "LEEK", "LEER", "LEFT", "LEND",
1216 "LENS", "LENT", "LEON", "LESK", "LESS", "LEST", "LETS", "LIAR",
1217 "LICE", "LICK", "LIED", "LIEN", "LIES", "LIEU", "LIFE", "LIFT",
1218 "LIKE", "LILA", "LILT", "LILY", "LIMA", "LIMB", "LIME", "LIND",
1219 "LINE", "LINK", "LINT", "LION", "LISA", "LIST", "LIVE", "LOAD",
1220 "LOAF", "LOAM", "LOAN", "LOCK", "LOFT", "LOGE", "LOIS", "LOLA",
1221 "LONE", "LONG", "LOOK", "LOON", "LOOT", "LORD", "LORE", "LOSE",
1222 "LOSS", "LOST", "LOUD", "LOVE", "LOWE", "LUCK", "LUCY", "LUGE",
1223 "LUKE", "LULU", "LUND", "LUNG", "LURA", "LURE", "LURK", "LUSH",
1224 "LUST", "LYLE", "LYNN", "LYON", "LYRA", "MACE", "MADE", "MAGI",
1225 "MAID", "MAIL", "MAIN", "MAKE", "MALE", "MALI", "MALL", "MALT",
1226 "MANA", "MANN", "MANY", "MARC", "MARE", "MARK", "MARS", "MART",
1227 "MARY", "MASH", "MASK", "MASS", "MAST", "MATE", "MATH", "MAUL",
1228 "MAYO", "MEAD", "MEAL", "MEAN", "MEAT", "MEEK", "MEET", "MELD",
1229 "MELT", "MEMO", "MEND", "MENU", "MERT", "MESH", "MESS", "MICE",
1230
1231
1232
1233 Haller Standards Track [Page 22]
1234
1235 RFC 2289 A One-Time Password System February 1998
1236
1237
1238 "MIKE", "MILD", "MILE", "MILK", "MILL", "MILT", "MIMI", "MIND",
1239 "MINE", "MINI", "MINK", "MINT", "MIRE", "MISS", "MIST", "MITE",
1240 "MITT", "MOAN", "MOAT", "MOCK", "MODE", "MOLD", "MOLE", "MOLL",
1241 "MOLT", "MONA", "MONK", "MONT", "MOOD", "MOON", "MOOR", "MOOT",
1242 "MORE", "MORN", "MORT", "MOSS", "MOST", "MOTH", "MOVE", "MUCH",
1243 "MUCK", "MUDD", "MUFF", "MULE", "MULL", "MURK", "MUSH", "MUST",
1244 "MUTE", "MUTT", "MYRA", "MYTH", "NAGY", "NAIL", "NAIR", "NAME",
1245 "NARY", "NASH", "NAVE", "NAVY", "NEAL", "NEAR", "NEAT", "NECK",
1246 "NEED", "NEIL", "NELL", "NEON", "NERO", "NESS", "NEST", "NEWS",
1247 "NEWT", "NIBS", "NICE", "NICK", "NILE", "NINA", "NINE", "NOAH",
1248 "NODE", "NOEL", "NOLL", "NONE", "NOOK", "NOON", "NORM", "NOSE",
1249 "NOTE", "NOUN", "NOVA", "NUDE", "NULL", "NUMB", "OATH", "OBEY",
1250 "OBOE", "ODIN", "OHIO", "OILY", "OINT", "OKAY", "OLAF", "OLDY",
1251 "OLGA", "OLIN", "OMAN", "OMEN", "OMIT", "ONCE", "ONES", "ONLY",
1252 "ONTO", "ONUS", "ORAL", "ORGY", "OSLO", "OTIS", "OTTO", "OUCH",
1253 "OUST", "OUTS", "OVAL", "OVEN", "OVER", "OWLY", "OWNS", "QUAD",
1254 "QUIT", "QUOD", "RACE", "RACK", "RACY", "RAFT", "RAGE", "RAID",
1255 "RAIL", "RAIN", "RAKE", "RANK", "RANT", "RARE", "RASH", "RATE",
1256 "RAVE", "RAYS", "READ", "REAL", "REAM", "REAR", "RECK", "REED",
1257 "REEF", "REEK", "REEL", "REID", "REIN", "RENA", "REND", "RENT",
1258 "REST", "RICE", "RICH", "RICK", "RIDE", "RIFT", "RILL", "RIME",
1259 "RING", "RINK", "RISE", "RISK", "RITE", "ROAD", "ROAM", "ROAR",
1260 "ROBE", "ROCK", "RODE", "ROIL", "ROLL", "ROME", "ROOD", "ROOF",
1261 "ROOK", "ROOM", "ROOT", "ROSA", "ROSE", "ROSS", "ROSY", "ROTH",
1262 "ROUT", "ROVE", "ROWE", "ROWS", "RUBE", "RUBY", "RUDE", "RUDY",
1263 "RUIN", "RULE", "RUNG", "RUNS", "RUNT", "RUSE", "RUSH", "RUSK",
1264 "RUSS", "RUST", "RUTH", "SACK", "SAFE", "SAGE", "SAID", "SAIL",
1265 "SALE", "SALK", "SALT", "SAME", "SAND", "SANE", "SANG", "SANK",
1266 "SARA", "SAUL", "SAVE", "SAYS", "SCAN", "SCAR", "SCAT", "SCOT",
1267 "SEAL", "SEAM", "SEAR", "SEAT", "SEED", "SEEK", "SEEM", "SEEN",
1268 "SEES", "SELF", "SELL", "SEND", "SENT", "SETS", "SEWN", "SHAG",
1269 "SHAM", "SHAW", "SHAY", "SHED", "SHIM", "SHIN", "SHOD", "SHOE",
1270 "SHOT", "SHOW", "SHUN", "SHUT", "SICK", "SIDE", "SIFT", "SIGH",
1271 "SIGN", "SILK", "SILL", "SILO", "SILT", "SINE", "SING", "SINK",
1272 "SIRE", "SITE", "SITS", "SITU", "SKAT", "SKEW", "SKID", "SKIM",
1273 "SKIN", "SKIT", "SLAB", "SLAM", "SLAT", "SLAY", "SLED", "SLEW",
1274 "SLID", "SLIM", "SLIT", "SLOB", "SLOG", "SLOT", "SLOW", "SLUG",
1275 "SLUM", "SLUR", "SMOG", "SMUG", "SNAG", "SNOB", "SNOW", "SNUB",
1276 "SNUG", "SOAK", "SOAR", "SOCK", "SODA", "SOFA", "SOFT", "SOIL",
1277 "SOLD", "SOME", "SONG", "SOON", "SOOT", "SORE", "SORT", "SOUL",
1278 "SOUR", "SOWN", "STAB", "STAG", "STAN", "STAR", "STAY", "STEM",
1279 "STEW", "STIR", "STOW", "STUB", "STUN", "SUCH", "SUDS", "SUIT",
1280 "SULK", "SUMS", "SUNG", "SUNK", "SURE", "SURF", "SWAB", "SWAG",
1281 "SWAM", "SWAN", "SWAT", "SWAY", "SWIM", "SWUM", "TACK", "TACT",
1282 "TAIL", "TAKE", "TALE", "TALK", "TALL", "TANK", "TASK", "TATE",
1283 "TAUT", "TEAL", "TEAM", "TEAR", "TECH", "TEEM", "TEEN", "TEET",
1284 "TELL", "TEND", "TENT", "TERM", "TERN", "TESS", "TEST", "THAN",
1285 "THAT", "THEE", "THEM", "THEN", "THEY", "THIN", "THIS", "THUD",
1286
1287
1288
1289 Haller Standards Track [Page 23]
1290
1291 RFC 2289 A One-Time Password System February 1998
1292
1293
1294 "THUG", "TICK", "TIDE", "TIDY", "TIED", "TIER", "TILE", "TILL",
1295 "TILT", "TIME", "TINA", "TINE", "TINT", "TINY", "TIRE", "TOAD",
1296 "TOGO", "TOIL", "TOLD", "TOLL", "TONE", "TONG", "TONY", "TOOK",
1297 "TOOL", "TOOT", "TORE", "TORN", "TOTE", "TOUR", "TOUT", "TOWN",
1298 "TRAG", "TRAM", "TRAY", "TREE", "TREK", "TRIG", "TRIM", "TRIO",
1299 "TROD", "TROT", "TROY", "TRUE", "TUBA", "TUBE", "TUCK", "TUFT",
1300 "TUNA", "TUNE", "TUNG", "TURF", "TURN", "TUSK", "TWIG", "TWIN",
1301 "TWIT", "ULAN", "UNIT", "URGE", "USED", "USER", "USES", "UTAH",
1302 "VAIL", "VAIN", "VALE", "VARY", "VASE", "VAST", "VEAL", "VEDA",
1303 "VEIL", "VEIN", "VEND", "VENT", "VERB", "VERY", "VETO", "VICE",
1304 "VIEW", "VINE", "VISE", "VOID", "VOLT", "VOTE", "WACK", "WADE",
1305 "WAGE", "WAIL", "WAIT", "WAKE", "WALE", "WALK", "WALL", "WALT",
1306 "WAND", "WANE", "WANG", "WANT", "WARD", "WARM", "WARN", "WART",
1307 "WASH", "WAST", "WATS", "WATT", "WAVE", "WAVY", "WAYS", "WEAK",
1308 "WEAL", "WEAN", "WEAR", "WEED", "WEEK", "WEIR", "WELD", "WELL",
1309 "WELT", "WENT", "WERE", "WERT", "WEST", "WHAM", "WHAT", "WHEE",
1310 "WHEN", "WHET", "WHOA", "WHOM", "WICK", "WIFE", "WILD", "WILL",
1311 "WIND", "WINE", "WING", "WINK", "WINO", "WIRE", "WISE", "WISH",
1312 "WITH", "WOLF", "WONT", "WOOD", "WOOL", "WORD", "WORE", "WORK",
1313 "WORM", "WORN", "WOVE", "WRIT", "WYNN", "YALE", "YANG", "YANK",
1314 "YARD", "YARN", "YAWL", "YAWN", "YEAH", "YEAR", "YELL", "YOGA",
1315 "YOKE" };
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345 Haller Standards Track [Page 24]
1346
1347 RFC 2289 A One-Time Password System February 1998
1348
1349
1350 Full Copyright Statement
1351
1352 Copyright (C) The Internet Society (1998). All Rights Reserved.
1353
1354 This document and translations of it may be copied and furnished to
1355 others, and derivative works that comment on or otherwise explain it
1356 or assist in its implementation may be prepared, copied, published
1357 and distributed, in whole or in part, without restriction of any
1358 kind, provided that the above copyright notice and this paragraph are
1359 included on all such copies and derivative works. However, this
1360 document itself may not be modified in any way, such as by removing
1361 the copyright notice or references to the Internet Society or other
1362 Internet organizations, except as needed for the purpose of
1363 developing Internet standards in which case the procedures for
1364 copyrights defined in the Internet Standards process must be
1365 followed, or as required to translate it into languages other than
1366 English.
1367
1368 The limited permissions granted above are perpetual and will not be
1369 revoked by the Internet Society or its successors or assigns.
1370
1371 This document and the information contained herein is provided on an
1372 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
1373 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
1374 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
1375 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
1376 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401 Haller Standards Track [Page 25]
1402
0
1
2
3
4
5
6 Network Working Group C. Newman
7 Request for Comments: 2444 Innosoft
8 Updates: 2222 October 1998
9 Category: Standards Track
10
11
12 The One-Time-Password SASL Mechanism
13
14 Status of this Memo
15
16 This document specifies an Internet standards track protocol for the
17 Internet community, and requests discussion and suggestions for
18 improvements. Please refer to the current edition of the "Internet
19 Official Protocol Standards" (STD 1) for the standardization state
20 and status of this protocol. Distribution of this memo is unlimited.
21
22 Copyright Notice
23
24 Copyright (C) The Internet Society (1998). All Rights Reserved.
25
26 Abstract
27
28 OTP [OTP] provides a useful authentication mechanism for situations
29 where there is limited client or server trust. Currently, OTP is
30 added to protocols in an ad-hoc fashion with heuristic parsing. This
31 specification defines an OTP SASL [SASL] mechanism so it can be
32 easily and formally integrated into many application protocols.
33
34 1. How to Read This Document
35
36 The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT",
37 "RECOMMENDED" and "MAY" in this document are to be interpreted as
38 defined in "Key words for use in RFCs to Indicate Requirement Levels"
39 [KEYWORDS].
40
41 This memo assumes the reader is familiar with OTP [OTP], OTP extended
42 responses [OTP-EXT] and SASL [SASL].
43
44 2. Intended Use
45
46 The OTP SASL mechanism replaces the SKEY SASL mechanism [SASL]. OTP
47 is a good choice for usage scenarios where the client is untrusted
48 (e.g., a kiosk client), as a one-time password will only give the
49 client a single opportunity to act on behalf of the user. OTP is
50 also a good choice for situations where interactive logins are
51 permitted to the server, as a compromised OTP authentication database
52 is only subject to dictionary attacks, unlike authentication
53 databases for other simple mechanisms such as CRAM-MD5 [CRAM-MD5].
54
55
56
57 Newman Standards Track [Page 1]
58
59 RFC 2444 OTP SASL Mechanism October 1998
60
61
62 It is important to note that each use of the OTP mechanism causes the
63 authentication database entry for a user to be updated.
64
65 This SASL mechanism provides a formal way to integrate OTP into
66 SASL-enabled protocols including IMAP [IMAP4], ACAP [ACAP], POP3
67 [POP-AUTH] and LDAPv3 [LDAPv3].
68
69 3. Profiling OTP for SASL
70
71 OTP [OTP] and OTP extended responses [OTP-EXT] offer a number of
72 options. However, for authentication to succeed, the client and
73 server need compatible option sets. This specification defines a
74 single SASL mechanism: OTP. The following rules apply to this
75 mechanism:
76
77 o The extended response syntax MUST be used.
78
79 o Servers MUST support the following four OTP extended responses:
80 "hex", "word", "init-hex" and "init-word". Servers MUST support
81 the "word" and "init-word" responses for the standard dictionary
82 and SHOULD support alternate dictionaries. Servers MUST NOT
83 require use of any additional OTP extensions or options.
84
85 o Clients SHOULD support display of the OTP challenge to the user
86 and entry of an OTP in multi-word format. Clients MAY also
87 support direct entry of the pass phrase and compute the "hex" or
88 "word" response.
89
90 o Clients MUST indicate when authentication fails due to the
91 sequence number getting too low and SHOULD offer the user the
92 option to reset the sequence using the "init-hex" or "init-word"
93 response.
94
95 Support for the MD5 algorithm is REQUIRED, and support for the SHA1
96 algorithm is RECOMMENDED.
97
98 4. OTP Authentication Mechanism
99
100 The mechanism does not provide any security layer.
101
102 The client begins by sending a message to the server containing the
103 following two pieces of information.
104
105 (1) An authorization identity. When the empty string is used, this
106 defaults to the authentication identity. This is used by system
107 administrators or proxy servers to login with a different user
108 identity. This field may be up to 255 octets and is terminated by a
109 NUL (0) octet. US-ASCII printable characters are preferred, although
110
111
112
113 Newman Standards Track [Page 2]
114
115 RFC 2444 OTP SASL Mechanism October 1998
116
117
118 UTF-8 [UTF-8] printable characters are permitted to support
119 international names. Use of character sets other than US-ASCII and
120 UTF-8 is forbidden.
121
122 (2) An authentication identity. The identity whose pass phrase will
123 be used. This field may be up to 255 octets. US-ASCII printable
124 characters are preferred, although UTF-8 [UTF-8] printable characters
125 are permitted to support international names. Use of character sets
126 other than US-ASCII and UTF-8 is forbidden.
127
128 The server responds by sending a message containing the OTP challenge
129 as described in OTP [OTP] and OTP extended responses [OTP-EXT].
130
131 If a client sees an unknown hash algorithm name it will not be able
132 to process a pass phrase input by the user. In this situation the
133 client MAY prompt for the six-word format, issue the cancel sequence
134 as specified by the SASL profile for the protocol in use and try a
135 different SASL mechanism, or close the connection and refuse to
136 authenticate. As a result of this behavior, a server is restricted
137 to one OTP hash algorithm per user.
138
139 On success, the client generates an extended response in the "hex",
140 "word", "init-hex" or "init-word" format. The client is not required
141 to terminate the response with a space or a newline and SHOULD NOT
142 include unnecessary whitespace.
143
144 Servers MUST tolerate input of arbitrary length, but MAY fail the
145 authentication if the length of client input exceeds reasonable size.
146
147 5. Examples
148
149 In these example, "C:" represents lines sent from the client to the
150 server and "S:" represents lines sent from the server to the client.
151 The user name is "tim" and no authorization identity is provided.
152 The "<NUL>" below represents an ASCII NUL octet.
153
154 The following is an example of the OTP mechanism using the ACAP
155 [ACAP] profile of SASL. The pass phrase used in this example is:
156 This is a test.
157
158 C: a001 AUTHENTICATE "OTP" {4}
159 C: <NUL>tim
160 S: + "otp-md5 499 ke1234 ext"
161 C: "hex:5bf075d9959d036f"
162 S: a001 OK "AUTHENTICATE completed"
163
164
165
166
167
168
169 Newman Standards Track [Page 3]
170
171 RFC 2444 OTP SASL Mechanism October 1998
172
173
174 Here is the same example using the six-words response:
175
176 C: a001 AUTHENTICATE "OTP" {4}
177 C: <NUL>tim
178 S: + "otp-md5 499 ke1234 ext"
179 C: "word:BOND FOGY DRAB NE RISE MART"
180 S: a001 OK "AUTHENTICATE completed"
181
182 Here is the same example using the OTP-SHA1 mechanism:
183
184 C: a001 AUTHENTICATE "OTP" {4}
185 C: <NUL>tim
186 S: + "otp-sha1 499 ke1234 ext"
187 C: "hex:c90fc02cc488df5e"
188 S: a001 OK "AUTHENTICATE completed"
189
190 Here is the same example with the init-hex extended response
191
192 C: a001 AUTHENTICATE "OTP" {4}
193 C: <NUL>tim
194 S: + "otp-md5 499 ke1234 ext"
195 C: "init-hex:5bf075d9959d036f:md5 499 ke1235:3712dcb4aa5316c1"
196 S: a001 OK "OTP sequence reset, authentication complete"
197
198 The following is an example of the OTP mechanism using the IMAP
199 [IMAP4] profile of SASL. The pass phrase used in this example is:
200 this is a test
201
202 C: a001 AUTHENTICATE OTP
203 S: +
204 C: AHRpbQ==
205 S: + b3RwLW1kNSAxMjMga2UxMjM0IGV4dA==
206 C: aGV4OjExZDRjMTQ3ZTIyN2MxZjE=
207 S: a001 OK AUTHENTICATE completed
208
209 Note that the lack of an initial client response and the base64
210 encoding are characteristics of the IMAP profile of SASL. The server
211 challenge is "otp-md5 123 ke1234 ext" and the client response is
212 "hex:11d4c147e227c1f1".
213
214 6. Security Considerations
215
216 This specification introduces no security considerations beyond those
217 those described in SASL [SASL], OTP [OTP] and OTP extended responses
218 [OTP-EXT]. A brief summary of these considerations follows:
219
220 This mechanism does not provide session privacy, server
221 authentication or protection from active attacks.
222
223
224
225 Newman Standards Track [Page 4]
226
227 RFC 2444 OTP SASL Mechanism October 1998
228
229
230 This mechanism is subject to passive dictionary attacks. The
231 severity of this attack can be reduced by choosing pass phrases well.
232
233 The server authentication database necessary for use with OTP need
234 not be plaintext-equivalent.
235
236 Server implementations MUST protect against the race attack [OTP].
237
238 7. Multinational Considerations
239
240 As remote access is a crucial service, users are encouraged to
241 restrict user names and pass phrases to the US-ASCII character set.
242 However, if characters outside the US-ASCII chracter set are used in
243 user names and pass phrases, then they are interpreted according to
244 UTF-8 [UTF-8].
245
246 Server support for alternate dictionaries is strongly RECOMMENDED to
247 permit use of the six-word format with non-English words.
248
249 8. IANA Considerations
250
251 Here is the registration template for the OTP SASL mechanism:
252
253 SASL mechanism name: OTP
254 Security Considerations: See section 6 of this memo
255 Published specification: this memo
256 Person & email address to contact for futher information:
257 see author's address section below
258 Intended usage: COMMON
259 Author/Change controller: see author's address section below
260
261 This memo also amends the SKEY SASL mechanism registration [SASL] by
262 changing its intended usage to OBSOLETE.
263
264 9. References
265
266 [ACAP] Newman, C. and J. Myers, "ACAP -- Application
267 Configuration Access Protocol", RFC 2244, November 1997.
268
269 [CRAM-MD5] Klensin, J., Catoe, R. and P. Krumviede, "IMAP/POP
270 AUTHorize Extension for Simple Challenge/Response", RFC
271 2195, September 1997.
272
273 [IMAP4] Crispin, M., "Internet Message Access Protocol - Version
274 4rev1", RFC 2060, December 1996.
275
276 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
277 Requirement Levels", BCP 14, RFC 2119, March 1997.
278
279
280
281 Newman Standards Track [Page 5]
282
283 RFC 2444 OTP SASL Mechanism October 1998
284
285
286 [LDAPv3] Wahl, M., Howes, T. and S. Kille, "Lightweight Directory
287 Access Protocol (v3)", RFC 2251, December 1997.
288
289 [MD5] Rivest, R., "The MD5 Message Digest Algorithm", RFC 1321,
290 April 1992.
291
292 [OTP] Haller, N., Metz, C., Nesser, P. and M. Straw, "A One-Time
293 Password System", RFC 2289, February 1998.
294
295 [OTP-EXT] Metz, C., "OTP Extended Responses", RFC 2243, November
296 1997.
297
298 [POP-AUTH] Myers, J., "POP3 AUTHentication command", RFC 1734,
299 December 1994.
300
301 [SASL] Myers, J., "Simple Authentication and Security Layer
302 (SASL)", RFC 2222, October 1997.
303
304 [UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO
305 10646", RFC 2279, January 1998.
306
307 10. Author's Address
308
309 Chris Newman
310 Innosoft International, Inc.
311 1050 Lakes Drive
312 West Covina, CA 91790 USA
313
314 EMail: chris.newman@innosoft.com
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337 Newman Standards Track [Page 6]
338
339 RFC 2444 OTP SASL Mechanism October 1998
340
341
342 11. Full Copyright Statement
343
344 Copyright (C) The Internet Society (1998). All Rights Reserved.
345
346 This document and translations of it may be copied and furnished to
347 others, and derivative works that comment on or otherwise explain it
348 or assist in its implementation may be prepared, copied, published
349 and distributed, in whole or in part, without restriction of any
350 kind, provided that the above copyright notice and this paragraph are
351 included on all such copies and derivative works. However, this
352 document itself may not be modified in any way, such as by removing
353 the copyright notice or references to the Internet Society or other
354 Internet organizations, except as needed for the purpose of
355 developing Internet standards in which case the procedures for
356 copyrights defined in the Internet Standards process must be
357 followed, or as required to translate it into languages other than
358 English.
359
360 The limited permissions granted above are perpetual and will not be
361 revoked by the Internet Society or its successors or assigns.
362
363 This document and the information contained herein is provided on an
364 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
365 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
366 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
367 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
368 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393 Newman Standards Track [Page 7]
394
0
1
2
3
4
5
6 Network Working Group C. Newman
7 Request for Comments: 2595 Innosoft
8 Category: Standards Track June 1999
9
10
11 Using TLS with IMAP, POP3 and ACAP
12
13
14 Status of this Memo
15
16 This document specifies an Internet standards track protocol for the
17 Internet community, and requests discussion and suggestions for
18 improvements. Please refer to the current edition of the "Internet
19 Official Protocol Standards" (STD 1) for the standardization state
20 and status of this protocol. Distribution of this memo is unlimited.
21
22 Copyright Notice
23
24 Copyright (C) The Internet Society (1999). All Rights Reserved.
25
26 1. Motivation
27
28 The TLS protocol (formerly known as SSL) provides a way to secure an
29 application protocol from tampering and eavesdropping. The option of
30 using such security is desirable for IMAP, POP and ACAP due to common
31 connection eavesdropping and hijacking attacks [AUTH]. Although
32 advanced SASL authentication mechanisms can provide a lightweight
33 version of this service, TLS is complimentary to simple
34 authentication-only SASL mechanisms or deployed clear-text password
35 login commands.
36
37 Many sites have a high investment in authentication infrastructure
38 (e.g., a large database of a one-way-function applied to user
39 passwords), so a privacy layer which is not tightly bound to user
40 authentication can protect against network eavesdropping attacks
41 without requiring a new authentication infrastructure and/or forcing
42 all users to change their password. Recognizing that such sites will
43 desire simple password authentication in combination with TLS
44 encryption, this specification defines the PLAIN SASL mechanism for
45 use with protocols which lack a simple password authentication
46 command such as ACAP and SMTP. (Note there is a separate RFC for the
47 STARTTLS command in SMTP [SMTPTLS].)
48
49 There is a strong desire in the IETF to eliminate the transmission of
50 clear-text passwords over unencrypted channels. While SASL can be
51 used for this purpose, TLS provides an additional tool with different
52 deployability characteristics. A server supporting both TLS with
53
54
55
56
57 Newman Standards Track [Page 1]
58
59 RFC 2595 Using TLS with IMAP, POP3 and ACAP June 1999
60
61
62 simple passwords and a challenge/response SASL mechanism is likely to
63 interoperate with a wide variety of clients without resorting to
64 unencrypted clear-text passwords.
65
66 The STARTTLS command rectifies a number of the problems with using a
67 separate port for a "secure" protocol variant. Some of these are
68 mentioned in section 7.
69
70 1.1. Conventions Used in this Document
71
72 The key words "REQUIRED", "MUST", "MUST NOT", "SHOULD", "SHOULD NOT",
73 "MAY", and "OPTIONAL" in this document are to be interpreted as
74 described in "Key words for use in RFCs to Indicate Requirement
75 Levels" [KEYWORDS].
76
77 Terms related to authentication are defined in "On Internet
78 Authentication" [AUTH].
79
80 Formal syntax is defined using ABNF [ABNF].
81
82 In examples, "C:" and "S:" indicate lines sent by the client and
83 server respectively.
84
85 2. Basic Interoperability and Security Requirements
86
87 The following requirements apply to all implementations of the
88 STARTTLS extension for IMAP, POP3 and ACAP.
89
90 2.1. Cipher Suite Requirements
91
92 Implementation of the TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA [TLS] cipher
93 suite is REQUIRED. This is important as it assures that any two
94 compliant implementations can be configured to interoperate.
95
96 All other cipher suites are OPTIONAL.
97
98 2.2. Privacy Operational Mode Security Requirements
99
100 Both clients and servers SHOULD have a privacy operational mode which
101 refuses authentication unless successful activation of an encryption
102 layer (such as that provided by TLS) occurs prior to or at the time
103 of authentication and which will terminate the connection if that
104 encryption layer is deactivated. Implementations are encouraged to
105 have flexibility with respect to the minimal encryption strength or
106 cipher suites permitted. A minimalist approach to this
107 recommendation would be an operational mode where the
108 TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA cipher suite is mandatory prior to
109 permitting authentication.
110
111
112
113 Newman Standards Track [Page 2]
114
115 RFC 2595 Using TLS with IMAP, POP3 and ACAP June 1999
116
117
118 Clients MAY have an operational mode which uses encryption only when
119 it is advertised by the server, but authentication continues
120 regardless. For backwards compatibility, servers SHOULD have an
121 operational mode where only the authentication mechanisms required by
122 the relevant base protocol specification are needed to successfully
123 authenticate.
124
125 2.3. Clear-Text Password Requirements
126
127 Clients and servers which implement STARTTLS MUST be configurable to
128 refuse all clear-text login commands or mechanisms (including both
129 standards-track and nonstandard mechanisms) unless an encryption
130 layer of adequate strength is active. Servers which allow
131 unencrypted clear-text logins SHOULD be configurable to refuse
132 clear-text logins both for the entire server, and on a per-user
133 basis.
134
135 2.4. Server Identity Check
136
137 During the TLS negotiation, the client MUST check its understanding
138 of the server hostname against the server's identity as presented in
139 the server Certificate message, in order to prevent man-in-the-middle
140 attacks. Matching is performed according to these rules:
141
142 - The client MUST use the server hostname it used to open the
143 connection as the value to compare against the server name as
144 expressed in the server certificate. The client MUST NOT use any
145 form of the server hostname derived from an insecure remote source
146 (e.g., insecure DNS lookup). CNAME canonicalization is not done.
147
148 - If a subjectAltName extension of type dNSName is present in the
149 certificate, it SHOULD be used as the source of the server's
150 identity.
151
152 - Matching is case-insensitive.
153
154 - A "*" wildcard character MAY be used as the left-most name
155 component in the certificate. For example, *.example.com would
156 match a.example.com, foo.example.com, etc. but would not match
157 example.com.
158
159 - If the certificate contains multiple names (e.g. more than one
160 dNSName field), then a match with any one of the fields is
161 considered acceptable.
162
163 If the match fails, the client SHOULD either ask for explicit user
164 confirmation, or terminate the connection and indicate the server's
165 identity is suspect.
166
167
168
169 Newman Standards Track [Page 3]
170
171 RFC 2595 Using TLS with IMAP, POP3 and ACAP June 1999
172
173
174 2.5. TLS Security Policy Check
175
176 Both the client and server MUST check the result of the STARTTLS
177 command and subsequent TLS negotiation to see whether acceptable
178 authentication or privacy was achieved. Ignoring this step
179 completely invalidates using TLS for security. The decision about
180 whether acceptable authentication or privacy was achieved is made
181 locally, is implementation-dependent, and is beyond the scope of this
182 document.
183
184 3. IMAP STARTTLS extension
185
186 When the TLS extension is present in IMAP, "STARTTLS" is listed as a
187 capability in response to the CAPABILITY command. This extension
188 adds a single command, "STARTTLS" to the IMAP protocol which is used
189 to begin a TLS negotiation.
190
191 3.1. STARTTLS Command
192
193 Arguments: none
194
195 Responses: no specific responses for this command
196
197 Result: OK - begin TLS negotiation
198 BAD - command unknown or arguments invalid
199
200 A TLS negotiation begins immediately after the CRLF at the end of
201 the tagged OK response from the server. Once a client issues a
202 STARTTLS command, it MUST NOT issue further commands until a
203 server response is seen and the TLS negotiation is complete.
204
205 The STARTTLS command is only valid in non-authenticated state.
206 The server remains in non-authenticated state, even if client
207 credentials are supplied during the TLS negotiation. The SASL
208 [SASL] EXTERNAL mechanism MAY be used to authenticate once TLS
209 client credentials are successfully exchanged, but servers
210 supporting the STARTTLS command are not required to support the
211 EXTERNAL mechanism.
212
213 Once TLS has been started, the client MUST discard cached
214 information about server capabilities and SHOULD re-issue the
215 CAPABILITY command. This is necessary to protect against
216 man-in-the-middle attacks which alter the capabilities list prior
217 to STARTTLS. The server MAY advertise different capabilities
218 after STARTTLS.
219
220 The formal syntax for IMAP is amended as follows:
221
222
223
224
225 Newman Standards Track [Page 4]
226
227 RFC 2595 Using TLS with IMAP, POP3 and ACAP June 1999
228
229
230 command_any =/ "STARTTLS"
231
232 Example: C: a001 CAPABILITY
233 S: * CAPABILITY IMAP4rev1 STARTTLS LOGINDISABLED
234 S: a001 OK CAPABILITY completed
235 C: a002 STARTTLS
236 S: a002 OK Begin TLS negotiation now
237 <TLS negotiation, further commands are under TLS layer>
238 C: a003 CAPABILITY
239 S: * CAPABILITY IMAP4rev1 AUTH=EXTERNAL
240 S: a003 OK CAPABILITY completed
241 C: a004 LOGIN joe password
242 S: a004 OK LOGIN completed
243
244 3.2. IMAP LOGINDISABLED capability
245
246 The current IMAP protocol specification (RFC 2060) requires the
247 implementation of the LOGIN command which uses clear-text passwords.
248 Many sites may choose to disable this command unless encryption is
249 active for security reasons. An IMAP server MAY advertise that the
250 LOGIN command is disabled by including the LOGINDISABLED capability
251 in the capability response. Such a server will respond with a tagged
252 "NO" response to any attempt to use the LOGIN command.
253
254 An IMAP server which implements STARTTLS MUST implement support for
255 the LOGINDISABLED capability on unencrypted connections.
256
257 An IMAP client which complies with this specification MUST NOT issue
258 the LOGIN command if this capability is present.
259
260 This capability is useful to prevent clients compliant with this
261 specification from sending an unencrypted password in an environment
262 subject to passive attacks. It has no impact on an environment
263 subject to active attacks as a man-in-the-middle attacker can remove
264 this capability. Therefore this does not relieve clients of the need
265 to follow the privacy mode recommendation in section 2.2.
266
267 Servers advertising this capability will fail to interoperate with
268 many existing compliant IMAP clients and will be unable to prevent
269 those clients from disclosing the user's password.
270
271 4. POP3 STARTTLS extension
272
273 The POP3 STARTTLS extension adds the STLS command to POP3 servers.
274 If this is implemented, the POP3 extension mechanism [POP3EXT] MUST
275 also be implemented to avoid the need for client probing of multiple
276 commands. The capability name "STLS" indicates this command is
277 present and permitted in the current state.
278
279
280
281 Newman Standards Track [Page 5]
282
283 RFC 2595 Using TLS with IMAP, POP3 and ACAP June 1999
284
285
286 STLS
287
288 Arguments: none
289
290 Restrictions:
291 Only permitted in AUTHORIZATION state.
292
293 Discussion:
294 A TLS negotiation begins immediately after the CRLF at the
295 end of the +OK response from the server. A -ERR response
296 MAY result if a security layer is already active. Once a
297 client issues a STLS command, it MUST NOT issue further
298 commands until a server response is seen and the TLS
299 negotiation is complete.
300
301 The STLS command is only permitted in AUTHORIZATION state
302 and the server remains in AUTHORIZATION state, even if
303 client credentials are supplied during the TLS negotiation.
304 The AUTH command [POP-AUTH] with the EXTERNAL mechanism
305 [SASL] MAY be used to authenticate once TLS client
306 credentials are successfully exchanged, but servers
307 supporting the STLS command are not required to support the
308 EXTERNAL mechanism.
309
310 Once TLS has been started, the client MUST discard cached
311 information about server capabilities and SHOULD re-issue
312 the CAPA command. This is necessary to protect against
313 man-in-the-middle attacks which alter the capabilities list
314 prior to STLS. The server MAY advertise different
315 capabilities after STLS.
316
317 Possible Responses:
318 +OK -ERR
319
320 Examples:
321 C: STLS
322 S: +OK Begin TLS negotiation
323 <TLS negotiation, further commands are under TLS layer>
324 ...
325 C: STLS
326 S: -ERR Command not permitted when TLS active
327
328
329
330
331
332
333
334
335
336
337 Newman Standards Track [Page 6]
338
339 RFC 2595 Using TLS with IMAP, POP3 and ACAP June 1999
340
341
342 5. ACAP STARTTLS extension
343
344 When the TLS extension is present in ACAP, "STARTTLS" is listed as a
345 capability in the ACAP greeting. No arguments to this capability are
346 defined at this time. This extension adds a single command,
347 "STARTTLS" to the ACAP protocol which is used to begin a TLS
348 negotiation.
349
350 5.1. STARTTLS Command
351
352 Arguments: none
353
354 Responses: no specific responses for this command
355
356 Result: OK - begin TLS negotiation
357 BAD - command unknown or arguments invalid
358
359 A TLS negotiation begins immediately after the CRLF at the end of
360 the tagged OK response from the server. Once a client issues a
361 STARTTLS command, it MUST NOT issue further commands until a
362 server response is seen and the TLS negotiation is complete.
363
364 The STARTTLS command is only valid in non-authenticated state.
365 The server remains in non-authenticated state, even if client
366 credentials are supplied during the TLS negotiation. The SASL
367 [SASL] EXTERNAL mechanism MAY be used to authenticate once TLS
368 client credentials are successfully exchanged, but servers
369 supporting the STARTTLS command are not required to support the
370 EXTERNAL mechanism.
371
372 After the TLS layer is established, the server MUST re-issue an
373 untagged ACAP greeting. This is necessary to protect against
374 man-in-the-middle attacks which alter the capabilities list prior
375 to STARTTLS. The client MUST discard cached capability
376 information and replace it with the information from the new ACAP
377 greeting. The server MAY advertise different capabilities after
378 STARTTLS.
379
380 The formal syntax for ACAP is amended as follows:
381
382 command_any =/ "STARTTLS"
383
384 Example: S: * ACAP (SASL "CRAM-MD5") (STARTTLS)
385 C: a002 STARTTLS
386 S: a002 OK "Begin TLS negotiation now"
387 <TLS negotiation, further commands are under TLS layer>
388 S: * ACAP (SASL "CRAM-MD5" "PLAIN" "EXTERNAL")
389
390
391
392
393 Newman Standards Track [Page 7]
394
395 RFC 2595 Using TLS with IMAP, POP3 and ACAP June 1999
396
397
398 6. PLAIN SASL mechanism
399
400 Clear-text passwords are simple, interoperate with almost all
401 existing operating system authentication databases, and are useful
402 for a smooth transition to a more secure password-based
403 authentication mechanism. The drawback is that they are unacceptable
404 for use over an unencrypted network connection.
405
406 This defines the "PLAIN" SASL mechanism for use with ACAP and other
407 protocols with no clear-text login command. The PLAIN SASL mechanism
408 MUST NOT be advertised or used unless a strong encryption layer (such
409 as the provided by TLS) is active or backwards compatibility dictates
410 otherwise.
411
412 The mechanism consists of a single message from the client to the
413 server. The client sends the authorization identity (identity to
414 login as), followed by a US-ASCII NUL character, followed by the
415 authentication identity (identity whose password will be used),
416 followed by a US-ASCII NUL character, followed by the clear-text
417 password. The client may leave the authorization identity empty to
418 indicate that it is the same as the authentication identity.
419
420 The server will verify the authentication identity and password with
421 the system authentication database and verify that the authentication
422 credentials permit the client to login as the authorization identity.
423 If both steps succeed, the user is logged in.
424
425 The server MAY also use the password to initialize any new
426 authentication database, such as one suitable for CRAM-MD5
427 [CRAM-MD5].
428
429 Non-US-ASCII characters are permitted as long as they are represented
430 in UTF-8 [UTF-8]. Use of non-visible characters or characters which
431 a user may be unable to enter on some keyboards is discouraged.
432
433 The formal grammar for the client message using Augmented BNF [ABNF]
434 follows.
435
436 message = [authorize-id] NUL authenticate-id NUL password
437 authenticate-id = 1*UTF8-SAFE ; MUST accept up to 255 octets
438 authorize-id = 1*UTF8-SAFE ; MUST accept up to 255 octets
439 password = 1*UTF8-SAFE ; MUST accept up to 255 octets
440 NUL = %x00
441 UTF8-SAFE = %x01-09 / %x0B-0C / %x0E-7F / UTF8-2 /
442 UTF8-3 / UTF8-4 / UTF8-5 / UTF8-6
443 UTF8-1 = %x80-BF
444 UTF8-2 = %xC0-DF UTF8-1
445 UTF8-3 = %xE0-EF 2UTF8-1
446
447
448
449 Newman Standards Track [Page 8]
450
451 RFC 2595 Using TLS with IMAP, POP3 and ACAP June 1999
452
453
454 UTF8-4 = %xF0-F7 3UTF8-1
455 UTF8-5 = %xF8-FB 4UTF8-1
456 UTF8-6 = %xFC-FD 5UTF8-1
457
458 Here is an example of how this might be used to initialize a CRAM-MD5
459 authentication database for ACAP:
460
461 Example: S: * ACAP (SASL "CRAM-MD5") (STARTTLS)
462 C: a001 AUTHENTICATE "CRAM-MD5"
463 S: + "<1896.697170952@postoffice.reston.mci.net>"
464 C: "tim b913a602c7eda7a495b4e6e7334d3890"
465 S: a001 NO (TRANSITION-NEEDED)
466 "Please change your password, or use TLS to login"
467 C: a002 STARTTLS
468 S: a002 OK "Begin TLS negotiation now"
469 <TLS negotiation, further commands are under TLS layer>
470 S: * ACAP (SASL "CRAM-MD5" "PLAIN" "EXTERNAL")
471 C: a003 AUTHENTICATE "PLAIN" {21+}
472 C: <NUL>tim<NUL>tanstaaftanstaaf
473 S: a003 OK CRAM-MD5 password initialized
474
475 Note: In this example, <NUL> represents a single ASCII NUL octet.
476
477 7. imaps and pop3s ports
478
479 Separate "imaps" and "pop3s" ports were registered for use with SSL.
480 Use of these ports is discouraged in favor of the STARTTLS or STLS
481 commands.
482
483 A number of problems have been observed with separate ports for
484 "secure" variants of protocols. This is an attempt to enumerate some
485 of those problems.
486
487 - Separate ports lead to a separate URL scheme which intrudes into
488 the user interface in inappropriate ways. For example, many web
489 pages use language like "click here if your browser supports SSL."
490 This is a decision the browser is often more capable of making than
491 the user.
492
493 - Separate ports imply a model of either "secure" or "not secure."
494 This can be misleading in a number of ways. First, the "secure"
495 port may not in fact be acceptably secure as an export-crippled
496 cipher suite might be in use. This can mislead users into a false
497 sense of security. Second, the normal port might in fact be
498 secured by using a SASL mechanism which includes a security layer.
499 Thus the separate port distinction makes the complex topic of
500 security policy even more confusing. One common result of this
501 confusion is that firewall administrators are often misled into
502
503
504
505 Newman Standards Track [Page 9]
506
507 RFC 2595 Using TLS with IMAP, POP3 and ACAP June 1999
508
509
510 permitting the "secure" port and blocking the standard port. This
511 could be a poor choice given the common use of SSL with a 40-bit
512 key encryption layer and plain-text password authentication is less
513 secure than strong SASL mechanisms such as GSSAPI with Kerberos 5.
514
515 - Use of separate ports for SSL has caused clients to implement only
516 two security policies: use SSL or don't use SSL. The desirable
517 security policy "use TLS when available" would be cumbersome with
518 the separate port model, but is simple with STARTTLS.
519
520 - Port numbers are a limited resource. While they are not yet in
521 short supply, it is unwise to set a precedent that could double (or
522 worse) the speed of their consumption.
523
524
525 8. IANA Considerations
526
527 This constitutes registration of the "STARTTLS" and "LOGINDISABLED"
528 IMAP capabilities as required by section 7.2.1 of RFC 2060 [IMAP].
529
530 The registration for the POP3 "STLS" capability follows:
531
532 CAPA tag: STLS
533 Arguments: none
534 Added commands: STLS
535 Standard commands affected: May enable USER/PASS as a side-effect.
536 CAPA command SHOULD be re-issued after successful completion.
537 Announced states/Valid states: AUTHORIZATION state only.
538 Specification reference: this memo
539
540 The registration for the ACAP "STARTTLS" capability follows:
541
542 Capability name: STARTTLS
543 Capability keyword: STARTTLS
544 Capability arguments: none
545 Published Specification(s): this memo
546 Person and email address for further information:
547 see author's address section below
548
549 The registration for the PLAIN SASL mechanism follows:
550
551 SASL mechanism name: PLAIN
552 Security Considerations: See section 9 of this memo
553 Published specification: this memo
554 Person & email address to contact for further information:
555 see author's address section below
556 Intended usage: COMMON
557 Author/Change controller: see author's address section below
558
559
560
561 Newman Standards Track [Page 10]
562
563 RFC 2595 Using TLS with IMAP, POP3 and ACAP June 1999
564
565
566 9. Security Considerations
567
568 TLS only provides protection for data sent over a network connection.
569 Messages transferred over IMAP or POP3 are still available to server
570 administrators and usually subject to eavesdropping, tampering and
571 forgery when transmitted through SMTP or NNTP. TLS is no substitute
572 for an end-to-end message security mechanism using MIME security
573 multiparts [MIME-SEC].
574
575 A man-in-the-middle attacker can remove STARTTLS from the capability
576 list or generate a failure response to the STARTTLS command. In
577 order to detect such an attack, clients SHOULD warn the user when
578 session privacy is not active and/or be configurable to refuse to
579 proceed without an acceptable level of security.
580
581 A man-in-the-middle attacker can always cause a down-negotiation to
582 the weakest authentication mechanism or cipher suite available. For
583 this reason, implementations SHOULD be configurable to refuse weak
584 mechanisms or cipher suites.
585
586 Any protocol interactions prior to the TLS handshake are performed in
587 the clear and can be modified by a man-in-the-middle attacker. For
588 this reason, clients MUST discard cached information about server
589 capabilities advertised prior to the start of the TLS handshake.
590
591 Clients are encouraged to clearly indicate when the level of
592 encryption active is known to be vulnerable to attack using modern
593 hardware (such as encryption keys with 56 bits of entropy or less).
594
595 The LOGINDISABLED IMAP capability (discussed in section 3.2) only
596 reduces the potential for passive attacks, it provides no protection
597 against active attacks. The responsibility remains with the client
598 to avoid sending a password over a vulnerable channel.
599
600 The PLAIN mechanism relies on the TLS encryption layer for security.
601 When used without TLS, it is vulnerable to a common network
602 eavesdropping attack. Therefore PLAIN MUST NOT be advertised or used
603 unless a suitable TLS encryption layer is active or backwards
604 compatibility dictates otherwise.
605
606 When the PLAIN mechanism is used, the server gains the ability to
607 impersonate the user to all services with the same password
608 regardless of any encryption provided by TLS or other network privacy
609 mechanisms. While many other authentication mechanisms have similar
610 weaknesses, stronger SASL mechanisms such as Kerberos address this
611 issue. Clients are encouraged to have an operational mode where all
612 mechanisms which are likely to reveal the user's password to the
613 server are disabled.
614
615
616
617 Newman Standards Track [Page 11]
618
619 RFC 2595 Using TLS with IMAP, POP3 and ACAP June 1999
620
621
622 The security considerations for TLS apply to STARTTLS and the
623 security considerations for SASL apply to the PLAIN mechanism.
624 Additional security requirements are discussed in section 2.
625
626 10. References
627
628 [ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax
629 Specifications: ABNF", RFC 2234, November 1997.
630
631 [ACAP] Newman, C. and J. Myers, "ACAP -- Application
632 Configuration Access Protocol", RFC 2244, November 1997.
633
634 [AUTH] Haller, N. and R. Atkinson, "On Internet Authentication",
635 RFC 1704, October 1994.
636
637 [CRAM-MD5] Klensin, J., Catoe, R. and P. Krumviede, "IMAP/POP
638 AUTHorize Extension for Simple Challenge/Response", RFC
639 2195, September 1997.
640
641 [IMAP] Crispin, M., "Internet Message Access Protocol - Version
642 4rev1", RFC 2060, December 1996.
643
644 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
645 Requirement Levels", BCP 14, RFC 2119, March 1997.
646
647 [MIME-SEC] Galvin, J., Murphy, S., Crocker, S. and N. Freed,
648 "Security Multiparts for MIME: Multipart/Signed and
649 Multipart/Encrypted", RFC 1847, October 1995.
650
651 [POP3] Myers, J. and M. Rose, "Post Office Protocol - Version 3",
652 STD 53, RFC 1939, May 1996.
653
654 [POP3EXT] Gellens, R., Newman, C. and L. Lundblade, "POP3 Extension
655 Mechanism", RFC 2449, November 1998.
656
657 [POP-AUTH] Myers, J., "POP3 AUTHentication command", RFC 1734,
658 December 1994.
659
660 [SASL] Myers, J., "Simple Authentication and Security Layer
661 (SASL)", RFC 2222, October 1997.
662
663 [SMTPTLS] Hoffman, P., "SMTP Service Extension for Secure SMTP over
664 TLS", RFC 2487, January 1999.
665
666 [TLS] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0",
667 RFC 2246, January 1999.
668
669
670
671
672
673 Newman Standards Track [Page 12]
674
675 RFC 2595 Using TLS with IMAP, POP3 and ACAP June 1999
676
677
678 [UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO
679 10646", RFC 2279, January 1998.
680
681
682 11. Author's Address
683
684 Chris Newman
685 Innosoft International, Inc.
686 1050 Lakes Drive
687 West Covina, CA 91790 USA
688
689 EMail: chris.newman@innosoft.com
690
691
692 A. Appendix -- Compliance Checklist
693
694 An implementation is not compliant if it fails to satisfy one or more
695 of the MUST requirements for the protocols it implements. An
696 implementation that satisfies all the MUST and all the SHOULD
697 requirements for its protocols is said to be "unconditionally
698 compliant"; one that satisfies all the MUST requirements but not all
699 the SHOULD requirements for its protocols is said to be
700 "conditionally compliant".
701
702 Rules Section
703 ----- -------
704 Mandatory-to-implement Cipher Suite 2.1
705 SHOULD have mode where encryption required 2.2
706 server SHOULD have mode where TLS not required 2.2
707 MUST be configurable to refuse all clear-text login
708 commands or mechanisms 2.3
709 server SHOULD be configurable to refuse clear-text
710 login commands on entire server and on per-user basis 2.3
711 client MUST check server identity 2.4
712 client MUST use hostname used to open connection 2.4
713 client MUST NOT use hostname from insecure remote lookup 2.4
714 client SHOULD support subjectAltName of dNSName type 2.4
715 client SHOULD ask for confirmation or terminate on fail 2.4
716 MUST check result of STARTTLS for acceptable privacy 2.5
717 client MUST NOT issue commands after STARTTLS
718 until server response and negotiation done 3.1,4,5.1
719 client MUST discard cached information 3.1,4,5.1,9
720 client SHOULD re-issue CAPABILITY/CAPA command 3.1,4
721 IMAP server with STARTTLS MUST implement LOGINDISABLED 3.2
722 IMAP client MUST NOT issue LOGIN if LOGINDISABLED 3.2
723 POP server MUST implement POP3 extensions 4
724 ACAP server MUST re-issue ACAP greeting 5.1
725
726
727
728
729 Newman Standards Track [Page 13]
730
731 RFC 2595 Using TLS with IMAP, POP3 and ACAP June 1999
732
733
734 client SHOULD warn when session privacy not active and/or
735 refuse to proceed without acceptable security level 9
736 SHOULD be configurable to refuse weak mechanisms or
737 cipher suites 9
738
739 The PLAIN mechanism is an optional part of this specification.
740 However if it is implemented the following rules apply:
741
742 Rules Section
743 ----- -------
744 MUST NOT use PLAIN unless strong encryption active
745 or backwards compatibility dictates otherwise 6,9
746 MUST use UTF-8 encoding for characters in PLAIN 6
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785 Newman Standards Track [Page 14]
786
787 RFC 2595 Using TLS with IMAP, POP3 and ACAP June 1999
788
789
790 Full Copyright Statement
791
792 Copyright (C) The Internet Society (1999). All Rights Reserved.
793
794 This document and translations of it may be copied and furnished to
795 others, and derivative works that comment on or otherwise explain it
796 or assist in its implementation may be prepared, copied, published
797 and distributed, in whole or in part, without restriction of any
798 kind, provided that the above copyright notice and this paragraph are
799 included on all such copies and derivative works. However, this
800 document itself may not be modified in any way, such as by removing
801 the copyright notice or references to the Internet Society or other
802 Internet organizations, except as needed for the purpose of
803 developing Internet standards in which case the procedures for
804 copyrights defined in the Internet Standards process must be
805 followed, or as required to translate it into languages other than
806 English.
807
808 The limited permissions granted above are perpetual and will not be
809 revoked by the Internet Society or its successors or assigns.
810
811 This document and the information contained herein is provided on an
812 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
813 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
814 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
815 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
816 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
817
818 Acknowledgement
819
820 Funding for the RFC Editor function is currently provided by the
821 Internet Society.
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841 Newman Standards Track [Page 15]
842
0
1
2
3
4
5
6 Network Working Group P. Leach
7 Request for Comments: 2831 Microsoft
8 Category: Standards Track C. Newman
9 Innosoft
10 May 2000
11
12
13 Using Digest Authentication as a SASL Mechanism
14
15 Status of this Memo
16
17 This document specifies an Internet standards track protocol for the
18 Internet community, and requests discussion and suggestions for
19 improvements. Please refer to the current edition of the "Internet
20 Official Protocol Standards" (STD 1) for the standardization state
21 and status of this protocol. Distribution of this memo is unlimited.
22
23 Copyright Notice
24
25 Copyright (C) The Internet Society (2000). All Rights Reserved.
26
27 Abstract
28
29 This specification defines how HTTP Digest Authentication [Digest]
30 can be used as a SASL [RFC 2222] mechanism for any protocol that has
31 a SASL profile. It is intended both as an improvement over CRAM-MD5
32 [RFC 2195] and as a convenient way to support a single authentication
33 mechanism for web, mail, LDAP, and other protocols.
34
35 Table of Contents
36
37 1 INTRODUCTION.....................................................2
38 1.1 CONVENTIONS AND NOTATION......................................2
39 1.2 REQUIREMENTS..................................................3
40 2 AUTHENTICATION...................................................3
41 2.1 INITIAL AUTHENTICATION........................................3
42 2.1.1 Step One...................................................3
43 2.1.2 Step Two...................................................6
44 2.1.3 Step Three................................................12
45 2.2 SUBSEQUENT AUTHENTICATION....................................12
46 2.2.1 Step one..................................................13
47 2.2.2 Step Two..................................................13
48 2.3 INTEGRITY PROTECTION.........................................13
49 2.4 CONFIDENTIALITY PROTECTION...................................14
50 3 SECURITY CONSIDERATIONS.........................................15
51 3.1 AUTHENTICATION OF CLIENTS USING DIGEST AUTHENTICATION........15
52 3.2 COMPARISON OF DIGEST WITH PLAINTEXT PASSWORDS................16
53 3.3 REPLAY ATTACKS...............................................16
54
55
56
57 Leach & Newman Standards Track [Page 1]
58
59 RFC 2831 Digest SASL Mechanism May 2000
60
61
62 3.4 ONLINE DICTIONARY ATTACKS....................................16
63 3.5 OFFLINE DICTIONARY ATTACKS...................................16
64 3.6 MAN IN THE MIDDLE............................................17
65 3.7 CHOSEN PLAINTEXT ATTACKS.....................................17
66 3.8 SPOOFING BY COUNTERFEIT SERVERS..............................17
67 3.9 STORING PASSWORDS............................................17
68 3.10 MULTIPLE REALMS.............................................18
69 3.11 SUMMARY.....................................................18
70 4 EXAMPLE.........................................................18
71 5 REFERENCES......................................................20
72 6 AUTHORS' ADDRESSES..............................................21
73 7 ABNF............................................................21
74 7.1 AUGMENTED BNF................................................21
75 7.2 BASIC RULES..................................................23
76 8 SAMPLE CODE.....................................................25
77 9 FULL COPYRIGHT STATEMENT........................................27
78
79 1 Introduction
80
81 This specification describes the use of HTTP Digest Access
82 Authentication as a SASL mechanism. The authentication type
83 associated with the Digest SASL mechanism is "DIGEST-MD5".
84
85 This specification is intended to be upward compatible with the
86 "md5-sess" algorithm of HTTP/1.1 Digest Access Authentication
87 specified in [Digest]. The only difference in the "md5-sess"
88 algorithm is that some directives not needed in a SASL mechanism have
89 had their values defaulted.
90
91 There is one new feature for use as a SASL mechanism: integrity
92 protection on application protocol messages after an authentication
93 exchange.
94
95 Also, compared to CRAM-MD5, DIGEST-MD5 prevents chosen plaintext
96 attacks, and permits the use of third party authentication servers,
97 mutual authentication, and optimized reauthentication if a client has
98 recently authenticated to a server.
99
100 1.1 Conventions and Notation
101
102 This specification uses the same ABNF notation and lexical
103 conventions as HTTP/1.1 specification; see appendix A.
104
105 Let { a, b, ... } be the concatenation of the octet strings a, b, ...
106
107 Let H(s) be the 16 octet MD5 hash [RFC 1321] of the octet string s.
108
109
110
111
112
113 Leach & Newman Standards Track [Page 2]
114
115 RFC 2831 Digest SASL Mechanism May 2000
116
117
118 Let KD(k, s) be H({k, ":", s}), i.e., the 16 octet hash of the string
119 k, a colon and the string s.
120
121 Let HEX(n) be the representation of the 16 octet MD5 hash n as a
122 string of 32 hex digits (with alphabetic characters always in lower
123 case, since MD5 is case sensitive).
124
125 Let HMAC(k, s) be the 16 octet HMAC-MD5 [RFC 2104] of the octet
126 string s using the octet string k as a key.
127
128 The value of a quoted string constant as an octet string does not
129 include any terminating null character.
130
131 1.2 Requirements
132
133 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
134 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
135 document are to be interpreted as described in RFC 2119 [RFC 2119].
136
137 An implementation is not compliant if it fails to satisfy one or more
138 of the MUST level requirements for the protocols it implements. An
139 implementation that satisfies all the MUST level and all the SHOULD
140 level requirements for its protocols is said to be "unconditionally
141 compliant"; one that satisfies all the MUST level requirements but
142 not all the SHOULD level requirements for its protocols is said to be
143 "conditionally compliant."
144
145 2 Authentication
146
147 The following sections describe how to use Digest as a SASL
148 authentication mechanism.
149
150 2.1 Initial Authentication
151
152 If the client has not recently authenticated to the server, then it
153 must perform "initial authentication", as defined in this section. If
154 it has recently authenticated, then a more efficient form is
155 available, defined in the next section.
156
157 2.1.1 Step One
158
159 The server starts by sending a challenge. The data encoded in the
160 challenge contains a string formatted according to the rules for a
161 "digest-challenge" defined as follows:
162
163
164
165
166
167
168
169 Leach & Newman Standards Track [Page 3]
170
171 RFC 2831 Digest SASL Mechanism May 2000
172
173
174 digest-challenge =
175 1#( realm | nonce | qop-options | stale | maxbuf | charset
176 algorithm | cipher-opts | auth-param )
177
178 realm = "realm" "=" <"> realm-value <">
179 realm-value = qdstr-val
180 nonce = "nonce" "=" <"> nonce-value <">
181 nonce-value = qdstr-val
182 qop-options = "qop" "=" <"> qop-list <">
183 qop-list = 1#qop-value
184 qop-value = "auth" | "auth-int" | "auth-conf" |
185 token
186 stale = "stale" "=" "true"
187 maxbuf = "maxbuf" "=" maxbuf-value
188 maxbuf-value = 1*DIGIT
189 charset = "charset" "=" "utf-8"
190 algorithm = "algorithm" "=" "md5-sess"
191 cipher-opts = "cipher" "=" <"> 1#cipher-value <">
192 cipher-value = "3des" | "des" | "rc4-40" | "rc4" |
193 "rc4-56" | token
194 auth-param = token "=" ( token | quoted-string )
195
196 The meanings of the values of the directives used above are as
197 follows:
198
199 realm
200 Mechanistically, a string which can enable users to know which
201 username and password to use, in case they might have different
202 ones for different servers. Conceptually, it is the name of a
203 collection of accounts that might include the user's account. This
204 string should contain at least the name of the host performing the
205 authentication and might additionally indicate the collection of
206 users who might have access. An example might be
207 "registered_users@gotham.news.example.com". This directive is
208 optional; if not present, the client SHOULD solicit it from the
209 user or be able to compute a default; a plausible default might be
210 the realm supplied by the user when they logged in to the client
211 system. Multiple realm directives are allowed, in which case the
212 user or client must choose one as the realm for which to supply to
213 username and password.
214
215 nonce
216 A server-specified data string which MUST be different each time a
217 digest-challenge is sent as part of initial authentication. It is
218 recommended that this string be base64 or hexadecimal data. Note
219 that since the string is passed as a quoted string, the
220 double-quote character is not allowed unless escaped (see section
221 7.2). The contents of the nonce are implementation dependent. The
222
223
224
225 Leach & Newman Standards Track [Page 4]
226
227 RFC 2831 Digest SASL Mechanism May 2000
228
229
230 security of the implementation depends on a good choice. It is
231 RECOMMENDED that it contain at least 64 bits of entropy. The nonce
232 is opaque to the client. This directive is required and MUST
233 appear exactly once; if not present, or if multiple instances are
234 present, the client should abort the authentication exchange.
235
236 qop-options
237 A quoted string of one or more tokens indicating the "quality of
238 protection" values supported by the server. The value "auth"
239 indicates authentication; the value "auth-int" indicates
240 authentication with integrity protection; the value "auth-conf"
241 indicates authentication with integrity protection and encryption.
242 This directive is optional; if not present it defaults to "auth".
243 The client MUST ignore unrecognized options; if the client
244 recognizes no option, it should abort the authentication exchange.
245
246 stale
247 The "stale" directive is not used in initial authentication. See
248 the next section for its use in subsequent authentications. This
249 directive may appear at most once; if multiple instances are
250 present, the client should abort the authentication exchange.
251
252 maxbuf
253 A number indicating the size of the largest buffer the server is
254 able to receive when using "auth-int" or "auth-conf". If this
255 directive is missing, the default value is 65536. This directive
256 may appear at most once; if multiple instances are present, the
257 client should abort the authentication exchange.
258
259 charset
260 This directive, if present, specifies that the server supports
261 UTF-8 encoding for the username and password. If not present, the
262 username and password must be encoded in ISO 8859-1 (of which
263 US-ASCII is a subset). The directive is needed for backwards
264 compatibility with HTTP Digest, which only supports ISO 8859-1.
265 This directive may appear at most once; if multiple instances are
266 present, the client should abort the authentication exchange.
267
268 algorithm
269 This directive is required for backwards compatibility with HTTP
270 Digest., which supports other algorithms. . This directive is
271 required and MUST appear exactly once; if not present, or if
272 multiple instances are present, the client should abort the
273 authentication exchange.
274
275
276
277
278
279
280
281 Leach & Newman Standards Track [Page 5]
282
283 RFC 2831 Digest SASL Mechanism May 2000
284
285
286 cipher-opts
287 A list of ciphers that the server supports. This directive must be
288 present exactly once if "auth-conf" is offered in the
289 "qop-options" directive, in which case the "3des" and "des" modes
290 are mandatory-to-implement. The client MUST ignore unrecognized
291 options; if the client recognizes no option, it should abort the
292 authentication exchange.
293
294 des
295 the Data Encryption Standard (DES) cipher [FIPS] in cipher
296 block chaining (CBC) mode with a 56 bit key.
297
298 3des
299 the "triple DES" cipher in CBC mode with EDE with the same key
300 for each E stage (aka "two keys mode") for a total key length
301 of 112 bits.
302
303 rc4, rc4-40, rc4-56
304 the RC4 cipher with a 128 bit, 40 bit, and 56 bit key,
305 respectively.
306
307 auth-param This construct allows for future extensions; it may appear
308 more than once. The client MUST ignore any unrecognized
309 directives.
310
311 For use as a SASL mechanism, note that the following changes are made
312 to "digest-challenge" from HTTP: the following Digest options (called
313 "directives" in HTTP terminology) are unused (i.e., MUST NOT be sent,
314 and MUST be ignored if received):
315
316 opaque
317 domain
318
319 The size of a digest-challenge MUST be less than 2048 bytes.
320
321 2.1.2 Step Two
322
323 The client makes note of the "digest-challenge" and then responds
324 with a string formatted and computed according to the rules for a
325 "digest-response" defined as follows:
326
327
328
329
330
331
332
333
334
335
336
337 Leach & Newman Standards Track [Page 6]
338
339 RFC 2831 Digest SASL Mechanism May 2000
340
341
342 digest-response = 1#( username | realm | nonce | cnonce |
343 nonce-count | qop | digest-uri | response |
344 maxbuf | charset | cipher | authzid |
345 auth-param )
346
347 username = "username" "=" <"> username-value <">
348 username-value = qdstr-val
349 cnonce = "cnonce" "=" <"> cnonce-value <">
350 cnonce-value = qdstr-val
351 nonce-count = "nc" "=" nc-value
352 nc-value = 8LHEX
353 qop = "qop" "=" qop-value
354 digest-uri = "digest-uri" "=" <"> digest-uri-value <">
355 digest-uri-value = serv-type "/" host [ "/" serv-name ]
356 serv-type = 1*ALPHA
357 host = 1*( ALPHA | DIGIT | "-" | "." )
358 serv-name = host
359 response = "response" "=" response-value
360 response-value = 32LHEX
361 LHEX = "0" | "1" | "2" | "3" |
362 "4" | "5" | "6" | "7" |
363 "8" | "9" | "a" | "b" |
364 "c" | "d" | "e" | "f"
365 cipher = "cipher" "=" cipher-value
366 authzid = "authzid" "=" <"> authzid-value <">
367 authzid-value = qdstr-val
368
369
370 username
371 The user's name in the specified realm, encoded according to the
372 value of the "charset" directive. This directive is required and
373 MUST be present exactly once; otherwise, authentication fails.
374
375 realm
376 The realm containing the user's account. This directive is
377 required if the server provided any realms in the
378 "digest-challenge", in which case it may appear exactly once and
379 its value SHOULD be one of those realms. If the directive is
380 missing, "realm-value" will set to the empty string when computing
381 A1 (see below for details).
382
383 nonce
384 The server-specified data string received in the preceding
385 digest-challenge. This directive is required and MUST be present
386 exactly once; otherwise, authentication fails.
387
388
389
390
391
392
393 Leach & Newman Standards Track [Page 7]
394
395 RFC 2831 Digest SASL Mechanism May 2000
396
397
398 cnonce
399 A client-specified data string which MUST be different each time a
400 digest-response is sent as part of initial authentication. The
401 cnonce-value is an opaque quoted string value provided by the
402 client and used by both client and server to avoid chosen
403 plaintext attacks, and to provide mutual authentication. The
404 security of the implementation depends on a good choice. It is
405 RECOMMENDED that it contain at least 64 bits of entropy. This
406 directive is required and MUST be present exactly once; otherwise,
407 authentication fails.
408
409 nonce-count
410 The nc-value is the hexadecimal count of the number of requests
411 (including the current request) that the client has sent with the
412 nonce value in this request. For example, in the first request
413 sent in response to a given nonce value, the client sends
414 "nc=00000001". The purpose of this directive is to allow the
415 server to detect request replays by maintaining its own copy of
416 this count - if the same nc-value is seen twice, then the request
417 is a replay. See the description below of the construction of
418 the response value. This directive may appear at most once; if
419 multiple instances are present, the client should abort the
420 authentication exchange.
421
422 qop
423 Indicates what "quality of protection" the client accepted. If
424 present, it may appear exactly once and its value MUST be one of
425 the alternatives in qop-options. If not present, it defaults to
426 "auth". These values affect the computation of the response. Note
427 that this is a single token, not a quoted list of alternatives.
428
429 serv-type
430 Indicates the type of service, such as "www" for web service,
431 "ftp" for FTP service, "smtp" for mail delivery service, etc. The
432 service name as defined in the SASL profile for the protocol see
433 section 4 of [RFC 2222], registered in the IANA registry of
434 "service" elements for the GSSAPI host-based service name form
435 [RFC 2078].
436
437 host
438 The DNS host name or IP address for the service requested. The
439 DNS host name must be the fully-qualified canonical name of the
440 host. The DNS host name is the preferred form; see notes on server
441 processing of the digest-uri.
442
443
444
445
446
447
448
449 Leach & Newman Standards Track [Page 8]
450
451 RFC 2831 Digest SASL Mechanism May 2000
452
453
454 serv-name
455 Indicates the name of the service if it is replicated. The service
456 is considered to be replicated if the client's service-location
457 process involves resolution using standard DNS lookup operations,
458 and if these operations involve DNS records (such as SRV, or MX)
459 which resolve one DNS name into a set of other DNS names. In this
460 case, the initial name used by the client is the "serv-name", and
461 the final name is the "host" component. For example, the incoming
462 mail service for "example.com" may be replicated through the use
463 of MX records stored in the DNS, one of which points at an SMTP
464 server called "mail3.example.com"; it's "serv-name" would be
465 "example.com", it's "host" would be "mail3.example.com". If the
466 service is not replicated, or the serv-name is identical to the
467 host, then the serv-name component MUST be omitted.
468
469 digest-uri
470 Indicates the principal name of the service with which the client
471 wishes to connect, formed from the serv-type, host, and serv-name.
472 For example, the FTP service on "ftp.example.com" would have a
473 "digest-uri" value of "ftp/ftp.example.com"; the SMTP server from
474 the example above would have a "digest-uri" value of
475 "smtp/mail3.example.com/example.com".
476
477 Servers SHOULD check that the supplied value is correct. This will
478 detect accidental connection to the incorrect server. It is also so
479 that clients will be trained to provide values that will work with
480 implementations that use a shared back-end authentication service
481 that can provide server authentication.
482
483 The serv-type component should match the service being offered. The
484 host component should match one of the host names of the host on
485 which the service is running, or it's IP address. Servers SHOULD NOT
486 normally support the IP address form, because server authentication
487 by IP address is not very useful; they should only do so if the DNS
488 is unavailable or unreliable. The serv-name component should match
489 one of the service's configured service names.
490
491 This directive may appear at most once; if multiple instances are
492 present, the client should abort the authentication exchange.
493
494 Note: In the HTTP use of Digest authentication, the digest-uri is the
495 URI (usually a URL) of the resource requested -- hence the name of
496 the directive.
497
498 response
499 A string of 32 hex digits computed as defined below, which proves
500 that the user knows a password. This directive is required and
501 MUST be present exactly once; otherwise, authentication fails.
502
503
504
505 Leach & Newman Standards Track [Page 9]
506
507 RFC 2831 Digest SASL Mechanism May 2000
508
509
510 maxbuf
511 A number indicating the size of the largest buffer the client is
512 able to receive. If this directive is missing, the default value
513 is 65536. This directive may appear at most once; if multiple
514 instances are present, the server should abort the authentication
515 exchange.
516
517 charset
518 This directive, if present, specifies that the client has used
519 UTF-8 encoding for the username and password. If not present, the
520 username and password must be encoded in ISO 8859-1 (of which
521 US-ASCII is a subset). The client should send this directive only
522 if the server has indicated it supports UTF-8. The directive is
523 needed for backwards compatibility with HTTP Digest, which only
524 supports ISO 8859-1.
525
526 LHEX
527 32 hex digits, where the alphabetic characters MUST be lower case,
528 because MD5 is not case insensitive.
529
530 cipher
531 The cipher chosen by the client. This directive MUST appear
532 exactly once if "auth-conf" is negotiated; if required and not
533 present, authentication fails.
534
535 authzid
536 The "authorization ID" as per RFC 2222, encoded in UTF-8. This
537 directive is optional. If present, and the authenticating user has
538 sufficient privilege, and the server supports it, then after
539 authentication the server will use this identity for making all
540 accesses and access checks. If the client specifies it, and the
541 server does not support it, then the response-value will be
542 incorrect, and authentication will fail.
543
544 The size of a digest-response MUST be less than 4096 bytes.
545
546 2.1.2.1 Response-value
547
548 The definition of "response-value" above indicates the encoding for
549 its value -- 32 lower case hex characters. The following definitions
550 show how the value is computed.
551
552 Although qop-value and components of digest-uri-value may be
553 case-insensitive, the case which the client supplies in step two is
554 preserved for the purpose of computing and verifying the
555 response-value.
556
557 response-value =
558
559
560
561 Leach & Newman Standards Track [Page 10]
562
563 RFC 2831 Digest SASL Mechanism May 2000
564
565
566 HEX( KD ( HEX(H(A1)),
567 { nonce-value, ":" nc-value, ":",
568 cnonce-value, ":", qop-value, ":", HEX(H(A2)) }))
569
570 If authzid is specified, then A1 is
571
572
573 A1 = { H( { username-value, ":", realm-value, ":", passwd } ),
574 ":", nonce-value, ":", cnonce-value, ":", authzid-value }
575
576 If authzid is not specified, then A1 is
577
578
579 A1 = { H( { username-value, ":", realm-value, ":", passwd } ),
580 ":", nonce-value, ":", cnonce-value }
581
582 where
583
584 passwd = *OCTET
585
586 The "username-value", "realm-value" and "passwd" are encoded
587 according to the value of the "charset" directive. If "charset=UTF-8"
588 is present, and all the characters of either "username-value" or
589 "passwd" are in the ISO 8859-1 character set, then it must be
590 converted to ISO 8859-1 before being hashed. This is so that
591 authentication databases that store the hashed username, realm and
592 password (which is common) can be shared compatibly with HTTP, which
593 specifies ISO 8859-1. A sample implementation of this conversion is
594 in section 8.
595
596 If the "qop" directive's value is "auth", then A2 is:
597
598 A2 = { "AUTHENTICATE:", digest-uri-value }
599
600 If the "qop" value is "auth-int" or "auth-conf" then A2 is:
601
602 A2 = { "AUTHENTICATE:", digest-uri-value,
603 ":00000000000000000000000000000000" }
604
605 Note that "AUTHENTICATE:" must be in upper case, and the second
606 string constant is a string with a colon followed by 32 zeros.
607
608 These apparently strange values of A2 are for compatibility with
609 HTTP; they were arrived at by setting "Method" to "AUTHENTICATE" and
610 the hash of the entity body to zero in the HTTP digest calculation of
611 A2.
612
613 Also, in the HTTP usage of Digest, several directives in the
614
615
616
617 Leach & Newman Standards Track [Page 11]
618
619 RFC 2831 Digest SASL Mechanism May 2000
620
621
622 "digest-challenge" sent by the server have to be returned by the
623 client in the "digest-response". These are:
624
625 opaque
626 algorithm
627
628 These directives are not needed when Digest is used as a SASL
629 mechanism (i.e., MUST NOT be sent, and MUST be ignored if received).
630
631 2.1.3 Step Three
632
633 The server receives and validates the "digest-response". The server
634 checks that the nonce-count is "00000001". If it supports subsequent
635 authentication (see section 2.2), it saves the value of the nonce and
636 the nonce-count. It sends a message formatted as follows:
637
638 response-auth = "rspauth" "=" response-value
639
640 where response-value is calculated as above, using the values sent in
641 step two, except that if qop is "auth", then A2 is
642
643 A2 = { ":", digest-uri-value }
644
645 And if qop is "auth-int" or "auth-conf" then A2 is
646
647 A2 = { ":", digest-uri-value, ":00000000000000000000000000000000" }
648
649 Compared to its use in HTTP, the following Digest directives in the
650 "digest-response" are unused:
651
652 nextnonce
653 qop
654 cnonce
655 nonce-count
656
657 2.2 Subsequent Authentication
658
659 If the client has previously authenticated to the server, and
660 remembers the values of username, realm, nonce, nonce-count, cnonce,
661 and qop that it used in that authentication, and the SASL profile for
662 a protocol permits an initial client response, then it MAY perform
663 "subsequent authentication", as defined in this section.
664
665
666
667
668
669
670
671
672
673 Leach & Newman Standards Track [Page 12]
674
675 RFC 2831 Digest SASL Mechanism May 2000
676
677
678 2.2.1 Step one
679
680 The client uses the values from the previous authentication and sends
681 an initial response with a string formatted and computed according to
682 the rules for a "digest-response", as defined above, but with a
683 nonce-count one greater than used in the last "digest-response".
684
685 2.2.2 Step Two
686
687 The server receives the "digest-response". If the server does not
688 support subsequent authentication, then it sends a
689 "digest-challenge", and authentication proceeds as in initial
690 authentication. If the server has no saved nonce and nonce-count from
691 a previous authentication, then it sends a "digest-challenge", and
692 authentication proceeds as in initial authentication. Otherwise, the
693 server validates the "digest-response", checks that the nonce-count
694 is one greater than that used in the previous authentication using
695 that nonce, and saves the new value of nonce-count.
696
697 If the response is invalid, then the server sends a
698 "digest-challenge", and authentication proceeds as in initial
699 authentication (and should be configurable to log an authentication
700 failure in some sort of security audit log, since the failure may be
701 a symptom of an attack). The nonce-count MUST NOT be incremented in
702 this case: to do so would allow a denial of service attack by sending
703 an out-of-order nonce-count.
704
705 If the response is valid, the server MAY choose to deem that
706 authentication has succeeded. However, if it has been too long since
707 the previous authentication, or for any other reason, the server MAY
708 send a new "digest-challenge" with a new value for nonce. The
709 challenge MAY contain a "stale" directive with value "true", which
710 says that the client may respond to the challenge using the password
711 it used in the previous response; otherwise, the client must solicit
712 the password anew from the user. This permits the server to make sure
713 that the user has presented their password recently. (The directive
714 name refers to the previous nonce being stale, not to the last use of
715 the password.) Except for the handling of "stale", after sending the
716 "digest-challenge" authentication proceeds as in the case of initial
717 authentication.
718
719 2.3 Integrity Protection
720
721 If the server offered "qop=auth-int" and the client responded
722 "qop=auth-int", then subsequent messages, up to but not including the
723 next subsequent authentication, between the client and the server
724
725
726
727
728
729 Leach & Newman Standards Track [Page 13]
730
731 RFC 2831 Digest SASL Mechanism May 2000
732
733
734 MUST be integrity protected. Using as a base session key the value of
735 H(A1) as defined above the client and server calculate a pair of
736 message integrity keys as follows.
737
738 The key for integrity protecting messages from client to server is:
739
740 Kic = MD5({H(A1),
741 "Digest session key to client-to-server signing key magic constant"})
742
743 The key for integrity protecting messages from server to client is:
744
745 Kis = MD5({H(A1),
746 "Digest session key to server-to-client signing key magic constant"})
747
748 where MD5 is as specified in [RFC 1321]. If message integrity is
749 negotiated, a MAC block for each message is appended to the message.
750 The MAC block is 16 bytes: the first 10 bytes of the HMAC-MD5 [RFC
751 2104] of the message, a 2-byte message type number in network byte
752 order with value 1, and the 4-byte sequence number in network byte
753 order. The message type is to allow for future extensions such as
754 rekeying.
755
756 MAC(Ki, SeqNum, msg) = (HMAC(Ki, {SeqNum, msg})[0..9], 0x0001,
757 SeqNum)
758
759 where Ki is Kic for messages sent by the client and Kis for those
760 sent by the server. The sequence number is initialized to zero, and
761 incremented by one for each message sent.
762
763 Upon receipt, MAC(Ki, SeqNum, msg) is computed and compared with the
764 received value; the message is discarded if they differ.
765
766 2.4 Confidentiality Protection
767
768 If the server sent a "cipher-opts" directive and the client responded
769 with a "cipher" directive, then subsequent messages between the
770 client and the server MUST be confidentiality protected. Using as a
771 base session key the value of H(A1) as defined above the client and
772 server calculate a pair of message integrity keys as follows.
773
774 The key for confidentiality protecting messages from client to server
775 is:
776
777 Kcc = MD5({H(A1)[0..n],
778 "Digest H(A1) to client-to-server sealing key magic constant"})
779
780 The key for confidentiality protecting messages from server to client
781 is:
782
783
784
785 Leach & Newman Standards Track [Page 14]
786
787 RFC 2831 Digest SASL Mechanism May 2000
788
789
790 Kcs = MD5({H(A1)[0..n],
791 "Digest H(A1) to server-to-client sealing key magic constant"})
792
793 where MD5 is as specified in [RFC 1321]. For cipher "rc4-40" n is 5;
794 for "rc4-56" n is 7; for the rest n is 16. The key for the "rc-*"
795 ciphers is all 16 bytes of Kcc or Kcs; the key for "des" is the first
796 7 bytes; the key for "3des" is the first 14 bytes. The IV for "des"
797 and "3des" is the last 8 bytes of Kcc or Kcs.
798
799 If message confidentiality is negotiated, each message is encrypted
800 with the chosen cipher and a MAC block is appended to the message.
801
802 The MAC block is a variable length padding prefix followed by 16
803 bytes formatted as follows: the first 10 bytes of the HMAC-MD5 [RFC
804 2104] of the message, a 2-byte message type number in network byte
805 order with value 1, and the 4-byte sequence number in network byte
806 order. If the blocksize of the chosen cipher is not 1 byte, the
807 padding prefix is one or more octets each containing the number of
808 padding bytes, such that total length of the encrypted part of the
809 message is a multiple of the blocksize. The padding and first 10
810 bytes of the MAC block are encrypted along with the message.
811
812 SEAL(Ki, Kc, SeqNum, msg) =
813 {CIPHER(Kc, {msg, pad, HMAC(Ki, {SeqNum, msg})[0..9])}), 0x0001,
814 SeqNum}
815
816 where CIPHER is the chosen cipher, Ki and Kc are Kic and Kcc for
817 messages sent by the client and Kis and Kcs for those sent by the
818 server. The sequence number is initialized to zero, and incremented
819 by one for each message sent.
820
821 Upon receipt, the message is decrypted, HMAC(Ki, {SeqNum, msg}) is
822 computed and compared with the received value; the message is
823 discarded if they differ.
824
825 3 Security Considerations
826
827 3.1 Authentication of Clients using Digest Authentication
828
829 Digest Authentication does not provide a strong authentication
830 mechanism, when compared to public key based mechanisms, for example.
831 However, since it prevents chosen plaintext attacks, it is stronger
832 than (e.g.) CRAM-MD5, which has been proposed for use with LDAP [10],
833 POP and IMAP (see RFC 2195 [9]). It is intended to replace the much
834 weaker and even more dangerous use of plaintext passwords; however,
835 since it is still a password based mechanism it avoids some of the
836 potential deployabilty issues with public-key, OTP or similar
837 mechanisms.
838
839
840
841 Leach & Newman Standards Track [Page 15]
842
843 RFC 2831 Digest SASL Mechanism May 2000
844
845
846 Digest Authentication offers no confidentiality protection beyond
847 protecting the actual password. All of the rest of the challenge and
848 response are available to an eavesdropper, including the user's name
849 and authentication realm.
850
851 3.2 Comparison of Digest with Plaintext Passwords
852
853 The greatest threat to the type of transactions for which these
854 protocols are used is network snooping. This kind of transaction
855 might involve, for example, online access to a mail service whose use
856 is restricted to paying subscribers. With plaintext password
857 authentication an eavesdropper can obtain the password of the user.
858 This not only permits him to access anything in the database, but,
859 often worse, will permit access to anything else the user protects
860 with the same password.
861
862 3.3 Replay Attacks
863
864 Replay attacks are defeated if the client or the server chooses a
865 fresh nonce for each authentication, as this specification requires.
866
867 3.4 Online dictionary attacks
868
869 If the attacker can eavesdrop, then it can test any overheard
870 nonce/response pairs against a (potentially very large) list of
871 common words. Such a list is usually much smaller than the total
872 number of possible passwords. The cost of computing the response for
873 each password on the list is paid once for each challenge.
874
875 The server can mitigate this attack by not allowing users to select
876 passwords that are in a dictionary.
877
878 3.5 Offline dictionary attacks
879
880 If the attacker can choose the challenge, then it can precompute the
881 possible responses to that challenge for a list of common words. Such
882 a list is usually much smaller than the total number of possible
883 passwords. The cost of computing the response for each password on
884 the list is paid just once.
885
886 Offline dictionary attacks are defeated if the client chooses a fresh
887 nonce for each authentication, as this specification requires.
888
889
890
891
892
893
894
895
896
897 Leach & Newman Standards Track [Page 16]
898
899 RFC 2831 Digest SASL Mechanism May 2000
900
901
902 3.6 Man in the Middle
903
904 Digest authentication is vulnerable to "man in the middle" (MITM)
905 attacks. Clearly, a MITM would present all the problems of
906 eavesdropping. But it also offers some additional opportunities to
907 the attacker.
908
909 A possible man-in-the-middle attack would be to substitute a weaker
910 qop scheme for the one(s) sent by the server; the server will not be
911 able to detect this attack. For this reason, the client should always
912 use the strongest scheme that it understands from the choices
913 offered, and should never choose a scheme that does not meet its
914 minimum requirements.
915
916 3.7 Chosen plaintext attacks
917
918 A chosen plaintext attack is where a MITM or a malicious server can
919 arbitrarily choose the challenge that the client will use to compute
920 the response. The ability to choose the challenge is known to make
921 cryptanalysis much easier [8].
922
923 However, Digest does not permit the attack to choose the challenge as
924 long as the client chooses a fresh nonce for each authentication, as
925 this specification requires.
926
927 3.8 Spoofing by Counterfeit Servers
928
929 If a user can be led to believe that she is connecting to a host
930 containing information protected by a password she knows, when in
931 fact she is connecting to a hostile server, then the hostile server
932 can obtain challenge/response pairs where it was able to partly
933 choose the challenge. There is no known way that this can be
934 exploited.
935
936 3.9 Storing passwords
937
938 Digest authentication requires that the authenticating agent (usually
939 the server) store some data derived from the user's name and password
940 in a "password file" associated with a given realm. Normally this
941 might contain pairs consisting of username and H({ username-value,
942 ":", realm-value, ":", passwd }), which is adequate to compute H(A1)
943 as described above without directly exposing the user's password.
944
945 The security implications of this are that if this password file is
946 compromised, then an attacker gains immediate access to documents on
947 the server using this realm. Unlike, say a standard UNIX password
948 file, this information need not be decrypted in order to access
949 documents in the server realm associated with this file. On the other
950
951
952
953 Leach & Newman Standards Track [Page 17]
954
955 RFC 2831 Digest SASL Mechanism May 2000
956
957
958 hand, decryption, or more likely a brute force attack, would be
959 necessary to obtain the user's password. This is the reason that the
960 realm is part of the digested data stored in the password file. It
961 means that if one Digest authentication password file is compromised,
962 it does not automatically compromise others with the same username
963 and password (though it does expose them to brute force attack).
964
965 There are two important security consequences of this. First the
966 password file must be protected as if it contained plaintext
967 passwords, because for the purpose of accessing documents in its
968 realm, it effectively does.
969
970 A second consequence of this is that the realm string should be
971 unique among all realms that any single user is likely to use. In
972 particular a realm string should include the name of the host doing
973 the authentication.
974
975 3.10 Multiple realms
976
977 Use of multiple realms may mean both that compromise of a the
978 security database for a single realm does not compromise all
979 security, and that there are more things to protect in order to keep
980 the whole system secure.
981
982 3.11 Summary
983
984 By modern cryptographic standards Digest Authentication is weak,
985 compared to (say) public key based mechanisms. But for a large range
986 of purposes it is valuable as a replacement for plaintext passwords.
987 Its strength may vary depending on the implementation.
988
989 4 Example
990
991 This example shows the use of the Digest SASL mechanism with the
992 IMAP4 AUTHENTICATE command [RFC 2060].
993
994 In this example, "C:" and "S:" represent a line sent by the client or
995 server respectively including a CRLF at the end. Linebreaks and
996 indentation within a "C:" or "S:" are editorial and not part of the
997 protocol. The password in this example was "secret". Note that the
998 base64 encoding of the challenges and responses is part of the IMAP4
999 AUTHENTICATE command, not part of the Digest specification itself.
1000
1001 S: * OK elwood.innosoft.com PMDF IMAP4rev1 V6.0-9
1002 C: c CAPABILITY
1003 S: * CAPABILITY IMAP4 IMAP4rev1 ACL LITERAL+ NAMESPACE QUOTA
1004 UIDPLUS AUTH=CRAM-MD5 AUTH=DIGEST-MD5 AUTH=PLAIN
1005 S: c OK Completed
1006
1007
1008
1009 Leach & Newman Standards Track [Page 18]
1010
1011 RFC 2831 Digest SASL Mechanism May 2000
1012
1013
1014 C: a AUTHENTICATE DIGEST-MD5
1015 S: + cmVhbG09ImVsd29vZC5pbm5vc29mdC5jb20iLG5vbmNlPSJPQTZNRzl0
1016 RVFHbTJoaCIscW9wPSJhdXRoIixhbGdvcml0aG09bWQ1LXNlc3MsY2hh
1017 cnNldD11dGYtOA==
1018 C: Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iY2hyaXMiLHJlYWxtPSJlbHdvb2
1019 QuaW5ub3NvZnQuY29tIixub25jZT0iT0E2TUc5dEVRR20yaGgiLG5jPTAw
1020 MDAwMDAxLGNub25jZT0iT0E2TUhYaDZWcVRyUmsiLGRpZ2VzdC11cmk9Im
1021 ltYXAvZWx3b29kLmlubm9zb2Z0LmNvbSIscmVzcG9uc2U9ZDM4OGRhZDkw
1022 ZDRiYmQ3NjBhMTUyMzIxZjIxNDNhZjcscW9wPWF1dGg=
1023 S: + cnNwYXV0aD1lYTQwZjYwMzM1YzQyN2I1NTI3Yjg0ZGJhYmNkZmZmZA==
1024 C:
1025 S: a OK User logged in
1026 ---
1027
1028 The base64-decoded version of the SASL exchange is:
1029
1030 S: realm="elwood.innosoft.com",nonce="OA6MG9tEQGm2hh",qop="auth",
1031 algorithm=md5-sess,charset=utf-8
1032 C: charset=utf-8,username="chris",realm="elwood.innosoft.com",
1033 nonce="OA6MG9tEQGm2hh",nc=00000001,cnonce="OA6MHXh6VqTrRk",
1034 digest-uri="imap/elwood.innosoft.com",
1035 response=d388dad90d4bbd760a152321f2143af7,qop=auth
1036 S: rspauth=ea40f60335c427b5527b84dbabcdfffd
1037
1038 The password in this example was "secret".
1039
1040 This example shows the use of the Digest SASL mechanism with the
1041 ACAP, using the same notational conventions and password as in the
1042 previous example. Note that ACAP does not base64 encode and uses
1043 fewer round trips that IMAP4.
1044
1045 S: * ACAP (IMPLEMENTATION "Test ACAP server") (SASL "CRAM-MD5"
1046 "DIGEST-MD5" "PLAIN")
1047 C: a AUTHENTICATE "DIGEST-MD5"
1048 S: + {94}
1049 S: realm="elwood.innosoft.com",nonce="OA9BSXrbuRhWay",qop="auth",
1050 algorithm=md5-sess,charset=utf-8
1051 C: {206}
1052 C: charset=utf-8,username="chris",realm="elwood.innosoft.com",
1053 nonce="OA9BSXrbuRhWay",nc=00000001,cnonce="OA9BSuZWMSpW8m",
1054 digest-uri="acap/elwood.innosoft.com",
1055 response=6084c6db3fede7352c551284490fd0fc,qop=auth
1056 S: a OK (SASL {40}
1057 S: rspauth=2f0b3d7c3c2e486600ef710726aa2eae) "AUTHENTICATE
1058 Completed"
1059 ---
1060
1061
1062
1063
1064
1065 Leach & Newman Standards Track [Page 19]
1066
1067 RFC 2831 Digest SASL Mechanism May 2000
1068
1069
1070 The server uses the values of all the directives, plus knowledge of
1071 the users password (or the hash of the user's name, server's realm
1072 and the user's password) to verify the computations above. If they
1073 check, then the user has authenticated.
1074
1075 5 References
1076
1077 [Digest] Franks, J., et al., "HTTP Authentication: Basic and Digest
1078 Access Authentication", RFC 2617, June 1999.
1079
1080 [ISO-8859] ISO-8859. International Standard--Information Processing--
1081 8-bit Single-Byte Coded Graphic Character Sets --
1082 Part 1: Latin alphabet No. 1, ISO-8859-1:1987.
1083 Part 2: Latin alphabet No. 2, ISO-8859-2, 1987.
1084 Part 3: Latin alphabet No. 3, ISO-8859-3, 1988.
1085 Part 4: Latin alphabet No. 4, ISO-8859-4, 1988.
1086 Part 5: Latin/Cyrillic alphabet, ISO-8859-5, 1988.
1087 Part 6: Latin/Arabic alphabet, ISO-8859-6, 1987.
1088 Part 7: Latin/Greek alphabet, ISO-8859-7, 1987.
1089 Part 8: Latin/Hebrew alphabet, ISO-8859-8, 1988.
1090 Part 9: Latin alphabet No. 5, ISO-8859-9, 1990.
1091
1092 [RFC 822] Crocker, D., "Standard for The Format of ARPA Internet
1093 Text Messages," STD 11, RFC 822, August 1982.
1094
1095 [RFC 1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
1096 April 1992.
1097
1098 [RFC 2047] Moore, K., "MIME (Multipurpose Internet Mail Extensions)
1099 Part Three: Message Header Extensions for Non-ASCII Text",
1100 RFC 2047, November 1996.
1101
1102 [RFC 2052] Gulbrandsen, A. and P. Vixie, "A DNS RR for specifying the
1103 location of services (DNS SRV)", RFC 2052, October 1996.
1104
1105 [RFC 2060] Crispin, M., "Internet Message Access Protocol - Version
1106 4rev1", RFC 2060, December 1996.
1107
1108 [RFC 2104] Krawczyk, H., Bellare, M. and R. Canetti, "HMAC: Keyed-
1109 Hashing for Message Authentication", RFC 2104, February
1110 1997.
1111
1112 [RFC 2195] Klensin, J., Catoe, R. and P. Krumviede, "IMAP/POP
1113 AUTHorize Extension for Simple Challenge/Response", RFC
1114 2195, September 1997.
1115
1116
1117
1118
1119
1120
1121 Leach & Newman Standards Track [Page 20]
1122
1123 RFC 2831 Digest SASL Mechanism May 2000
1124
1125
1126 [RFC 2119] Bradner, S., "Key words for use in RFCs to Indicate
1127 Requirement Levels", BCP 14, RFC 2119, March 1997.
1128
1129 [RFC 2222] Myers, J., "Simple Authentication and Security Layer
1130 (SASL)", RFC 2222, October 1997.
1131
1132 [USASCII] US-ASCII. Coded Character Set - 7-Bit American Standard
1133 Code for Information Interchange. Standard ANSI X3.4-1986,
1134 ANSI, 1986.
1135
1136 6 Authors' Addresses
1137
1138 Paul Leach
1139 Microsoft
1140 1 Microsoft Way
1141 Redmond, WA 98052
1142
1143 EMail: paulle@microsoft.com
1144
1145
1146 Chris Newman
1147 Innosoft International, Inc.
1148 1050 Lakes Drive
1149 West Covina, CA 91790 USA
1150
1151 EMail: chris.newman@innosoft.com
1152
1153 7 ABNF
1154
1155 What follows is the definition of the notation as is used in the
1156 HTTP/1.1 specification (RFC 2616) and the HTTP authentication
1157 specification (RFC 2617); it is reproduced here for ease of
1158 reference. Since it is intended that a single Digest implementation
1159 can support both HTTP and SASL-based protocols, the same notation is
1160 used in both to facilitate comparison and prevention of unwanted
1161 differences. Since it is cut-and-paste from the HTTP specifications,
1162 not all productions may be used in this specification. It is also not
1163 quite legal ABNF; again, the errors were copied from the HTTP
1164 specifications.
1165
1166 7.1 Augmented BNF
1167
1168 All of the mechanisms specified in this document are described in
1169 both prose and an augmented Backus-Naur Form (BNF) similar to that
1170 used by RFC 822 [RFC 822]. Implementers will need to be familiar with
1171 the notation in order to understand this specification.
1172
1173
1174
1175
1176
1177 Leach & Newman Standards Track [Page 21]
1178
1179 RFC 2831 Digest SASL Mechanism May 2000
1180
1181
1182 The augmented BNF includes the following constructs:
1183
1184 name = definition
1185 The name of a rule is simply the name itself (without any
1186 enclosing "<" and ">") and is separated from its definition by the
1187 equal "=" character. White space is only significant in that
1188 indentation of continuation lines is used to indicate a rule
1189 definition that spans more than one line. Certain basic rules are
1190 in uppercase, such as SP, LWS, HT, CRLF, DIGIT, ALPHA, etc. Angle
1191 brackets are used within definitions whenever their presence will
1192 facilitate discerning the use of rule names.
1193
1194 "literal"
1195 Quotation marks surround literal text. Unless stated otherwise,
1196 the text is case-insensitive.
1197
1198 rule1 | rule2
1199 Elements separated by a bar ("|") are alternatives, e.g., "yes |
1200 no" will accept yes or no.
1201
1202 (rule1 rule2)
1203 Elements enclosed in parentheses are treated as a single element.
1204 Thus, "(elem (foo | bar) elem)" allows the token sequences
1205 "elem foo elem" and "elem bar elem".
1206
1207 *rule
1208 The character "*" preceding an element indicates repetition. The
1209 full form is "<n>*<m>element" indicating at least <n> and at most
1210 <m> occurrences of element. Default values are 0 and infinity so
1211 that "*(element)" allows any number, including zero; "1*element"
1212 requires at least one; and "1*2element" allows one or two.
1213
1214 [rule]
1215 Square brackets enclose optional elements; "[foo bar]" is
1216 equivalent to "*1(foo bar)".
1217
1218 N rule
1219 Specific repetition: "<n>(element)" is equivalent to
1220 "<n>*<n>(element)"; that is, exactly <n> occurrences of (element).
1221 Thus 2DIGIT is a 2-digit number, and 3ALPHA is a string of three
1222 alphabetic characters.
1223
1224 #rule
1225 A construct "#" is defined, similar to "*", for defining lists of
1226 elements. The full form is "<n>#<m>element" indicating at least
1227 <n> and at most <m> elements, each separated by one or more commas
1228 (",") and OPTIONAL linear white space (LWS). This makes the usual
1229 form of lists very easy; a rule such as
1230
1231
1232
1233 Leach & Newman Standards Track [Page 22]
1234
1235 RFC 2831 Digest SASL Mechanism May 2000
1236
1237
1238 ( *LWS element *( *LWS "," *LWS element ))
1239 can be shown as
1240 1#element
1241 Wherever this construct is used, null elements are allowed, but do
1242 not contribute to the count of elements present. That is,
1243 "(element), , (element) " is permitted, but counts as only two
1244 elements. Therefore, where at least one element is required, at
1245 least one non-null element MUST be present. Default values are 0
1246 and infinity so that "#element" allows any number, including zero;
1247 "1#element" requires at least one; and "1#2element" allows one or
1248 two.
1249
1250 ; comment
1251 A semi-colon, set off some distance to the right of rule text,
1252 starts a comment that continues to the end of line. This is a
1253 simple way of including useful notes in parallel with the
1254 specifications.
1255
1256 implied *LWS
1257 The grammar described by this specification is word-based. Except
1258 where noted otherwise, linear white space (LWS) can be included
1259 between any two adjacent words (token or quoted-string), and
1260 between adjacent words and separators, without changing the
1261 interpretation of a field. At least one delimiter (LWS and/or
1262 separators) MUST exist between any two tokens (for the definition
1263 of "token" below), since they would otherwise be interpreted as a
1264 single token.
1265
1266 7.2 Basic Rules
1267
1268 The following rules are used throughout this specification to
1269 describe basic parsing constructs. The US-ASCII coded character set
1270 is defined by ANSI X3.4-1986 [USASCII].
1271
1272 OCTET = <any 8-bit sequence of data>
1273 CHAR = <any US-ASCII character (octets 0 - 127)>
1274 UPALPHA = <any US-ASCII uppercase letter "A".."Z">
1275 LOALPHA = <any US-ASCII lowercase letter "a".."z">
1276 ALPHA = UPALPHA | LOALPHA
1277 DIGIT = <any US-ASCII digit "0".."9">
1278 CTL = <any US-ASCII control character
1279 (octets 0 - 31) and DEL (127)>
1280 CR = <US-ASCII CR, carriage return (13)>
1281 LF = <US-ASCII LF, linefeed (10)>
1282 SP = <US-ASCII SP, space (32)>
1283 HT = <US-ASCII HT, horizontal-tab (9)>
1284 <"> = <US-ASCII double-quote mark (34)>
1285 CRLF = CR LF
1286
1287
1288
1289 Leach & Newman Standards Track [Page 23]
1290
1291 RFC 2831 Digest SASL Mechanism May 2000
1292
1293
1294
1295 All linear white space, including folding, has the same semantics as
1296 SP. A recipient MAY replace any linear white space with a single SP
1297 before interpreting the field value or forwarding the message
1298 downstream.
1299
1300 LWS = [CRLF] 1*( SP | HT )
1301
1302 The TEXT rule is only used for descriptive field contents and values
1303 that are not intended to be interpreted by the message parser. Words
1304 of *TEXT MAY contain characters from character sets other than
1305 ISO-8859-1 [ISO 8859] only when encoded according to the rules of RFC
1306 2047 [RFC 2047].
1307
1308 TEXT = <any OCTET except CTLs,
1309 but including LWS>
1310
1311 A CRLF is allowed in the definition of TEXT only as part of a header
1312 field continuation. It is expected that the folding LWS will be
1313 replaced with a single SP before interpretation of the TEXT value.
1314
1315 Hexadecimal numeric characters are used in several protocol elements.
1316
1317 HEX = "A" | "B" | "C" | "D" | "E" | "F"
1318 | "a" | "b" | "c" | "d" | "e" | "f" | DIGIT
1319
1320 Many HTTP/1.1 header field values consist of words separated by LWS
1321 or special characters. These special characters MUST be in a quoted
1322 string to be used within a parameter value.
1323
1324 token = 1*<any CHAR except CTLs or separators>
1325 separators = "(" | ")" | "<" | ">" | "@"
1326 | "," | ";" | ":" | "\" | <">
1327 | "/" | "[" | "]" | "?" | "="
1328 | "{" | "}" | SP | HT
1329
1330 A string of text is parsed as a single word if it is quoted using
1331 double-quote marks.
1332
1333 quoted-string = ( <"> qdstr-val <"> )
1334 qdstr-val = *( qdtext | quoted-pair )
1335 qdtext = <any TEXT except <">>
1336
1337 Note that LWS is NOT implicit between the double-quote marks (<">)
1338 surrounding a qdstr-val and the qdstr-val; any LWS will be considered
1339 part of the qdstr-val. This is also the case for quotation marks
1340 surrounding any other construct.
1341
1342
1343
1344
1345 Leach & Newman Standards Track [Page 24]
1346
1347 RFC 2831 Digest SASL Mechanism May 2000
1348
1349
1350 The backslash character ("\") MAY be used as a single-character
1351 quoting mechanism only within qdstr-val and comment constructs.
1352
1353 quoted-pair = "\" CHAR
1354
1355 The value of this construct is CHAR. Note that an effect of this rule
1356 is that backslash must be quoted.
1357
1358 8 Sample Code
1359
1360 The sample implementation in [Digest] also applies to DIGEST-MD5.
1361
1362 The following code implements the conversion from UTF-8 to 8859-1 if
1363 necessary.
1364
1365 /* if the string is entirely in the 8859-1 subset of UTF-8, then
1366 * translate to 8859-1 prior to MD5
1367 */
1368 void MD5_UTF8_8859_1(MD5_CTX *ctx, const unsigned char *base,
1369 int len)
1370 {
1371 const unsigned char *scan, *end;
1372 unsigned char cbuf;
1373
1374 end = base + len;
1375 for (scan = base; scan < end; ++scan) {
1376 if (*scan > 0xC3) break; /* abort if outside 8859-1 */
1377 if (*scan >= 0xC0 && *scan <= 0xC3) {
1378 if (++scan == end || *scan < 0x80 || *scan > 0xBF)
1379 break;
1380 }
1381 }
1382 /* if we found a character outside 8859-1, don't alter string
1383 */
1384 if (scan < end) {
1385 MD5Update(ctx, base, len);
1386 return;
1387 }
1388
1389 /* convert to 8859-1 prior to applying hash
1390 */
1391 do {
1392 for (scan = base; scan < end && *scan < 0xC0; ++scan)
1393 ;
1394 if (scan != base) MD5Update(ctx, base, scan - base);
1395 if (scan + 1 >= end) break;
1396 cbuf = ((scan[0] & 0x3) << 6) | (scan[1] & 0x3f);
1397 MD5Update(ctx, &cbuf, 1);
1398
1399
1400
1401 Leach & Newman Standards Track [Page 25]
1402
1403 RFC 2831 Digest SASL Mechanism May 2000
1404
1405
1406 base = scan + 2;
1407 } while (base < end);
1408 }
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457 Leach & Newman Standards Track [Page 26]
1458
1459 RFC 2831 Digest SASL Mechanism May 2000
1460
1461
1462 9 Full Copyright Statement
1463
1464 Copyright (C) The Internet Society (2000). All Rights Reserved.
1465
1466 This document and translations of it may be copied and furnished to
1467 others, and derivative works that comment on or otherwise explain it
1468 or assist in its implementation may be prepared, copied, published
1469 and distributed, in whole or in part, without restriction of any
1470 kind, provided that the above copyright notice and this paragraph are
1471 included on all such copies and derivative works. However, this
1472 document itself may not be modified in any way, such as by removing
1473 the copyright notice or references to the Internet Society or other
1474 Internet organizations, except as needed for the purpose of
1475 developing Internet standards in which case the procedures for
1476 copyrights defined in the Internet Standards process must be
1477 followed, or as required to translate it into languages other than
1478 English.
1479
1480 The limited permissions granted above are perpetual and will not be
1481 revoked by the Internet Society or its successors or assigns.
1482
1483 This document and the information contained herein is provided on an
1484 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
1485 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
1486 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
1487 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
1488 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
1489
1490 Acknowledgement
1491
1492 Funding for the RFC Editor function is currently provided by the
1493 Internet Society.
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513 Leach & Newman Standards Track [Page 27]
1514
0
1
2
3
4
5
6 Network Working Group T. Wu
7 Request for Comments: 2945 Stanford University
8 Category: Standards Track September 2000
9
10
11 The SRP Authentication and Key Exchange System
12
13 Status of this Memo
14
15 This document specifies an Internet standards track protocol for the
16 Internet community, and requests discussion and suggestions for
17 improvements. Please refer to the current edition of the "Internet
18 Official Protocol Standards" (STD 1) for the standardization state
19 and status of this protocol. Distribution of this memo is unlimited.
20
21 Copyright Notice
22
23 Copyright (C) The Internet Society (2000). All Rights Reserved.
24
25 Abstract
26
27 This document describes a cryptographically strong network
28 authentication mechanism known as the Secure Remote Password (SRP)
29 protocol. This mechanism is suitable for negotiating secure
30 connections using a user-supplied password, while eliminating the
31 security problems traditionally associated with reusable passwords.
32 This system also performs a secure key exchange in the process of
33 authentication, allowing security layers (privacy and/or integrity
34 protection) to be enabled during the session. Trusted key servers
35 and certificate infrastructures are not required, and clients are not
36 required to store or manage any long-term keys. SRP offers both
37 security and deployment advantages over existing challenge-response
38 techniques, making it an ideal drop-in replacement where secure
39 password authentication is needed.
40
41 1. Introduction
42
43 The lack of a secure authentication mechanism that is also easy to
44 use has been a long-standing problem with the vast majority of
45 Internet protocols currently in use. The problem is two-fold: Users
46 like to use passwords that they can remember, but most password-based
47 authentication systems offer little protection against even passive
48 attackers, especially if weak and easily-guessed passwords are used.
49
50 Eavesdropping on a TCP/IP network can be carried out very easily and
51 very effectively against protocols that transmit passwords in the
52 clear. Even so-called "challenge-response" techniques like the one
53 described in [RFC 2095] and [RFC 1760], which are designed to defeat
54
55
56
57 Wu Standards Track [Page 1]
58
59 RFC 2945 SRP Authentication & Key Exchange System September 2000
60
61
62 simple sniffing attacks, can be compromised by what is known as a
63 "dictionary attack". This occurs when an attacker captures the
64 messages exchanged during a legitimate run of the protocol and uses
65 that information to verify a series of guessed passwords taken from a
66 precompiled "dictionary" of common passwords. This works because
67 users often choose simple, easy-to-remember passwords, which
68 invariably are also easy to guess.
69
70 Many existing mechanisms also require the password database on the
71 host to be kept secret because the password P or some private hash
72 h(P) is stored there and would compromise security if revealed. That
73 approach often degenerates into "security through obscurity" and goes
74 against the UNIX convention of keeping a "public" password file whose
75 contents can be revealed without destroying system security.
76
77 SRP meets the strictest requirements laid down in [RFC 1704] for a
78 non-disclosing authentication protocol. It offers complete
79 protection against both passive and active attacks, and accomplishes
80 this efficiently using a single Diffie-Hellman-style round of
81 computation, making it feasible to use in both interactive and non-
82 interactive authentication for a wide range of Internet protocols.
83 Since it retains its security when used with low-entropy passwords,
84 it can be seamlessly integrated into existing user applications.
85
86 2. Conventions and Terminology
87
88 The protocol described by this document is sometimes referred to as
89 "SRP-3" for historical purposes. This particular protocol is
90 described in [SRP] and is believed to have very good logical and
91 cryptographic resistance to both eavesdropping and active attacks.
92
93 This document does not attempt to describe SRP in the context of any
94 particular Internet protocol; instead it describes an abstract
95 protocol that can be easily fitted to a particular application. For
96 example, the specific format of messages (including padding) is not
97 specified. Those issues have been left to the protocol implementor
98 to decide.
99
100 The one implementation issue worth specifying here is the mapping
101 between strings and integers. Internet protocols are byte-oriented,
102 while SRP performs algebraic operations on its messages, so it is
103 logical to define at least one method by which integers can be
104 converted into a string of bytes and vice versa.
105
106 An n-byte string S can be converted to an integer as follows:
107
108 i = S[n-1] + 256 * S[n-2] + 256^2 * S[n-3] + ... + 256^(n-1) * S[0]
109
110
111
112
113 Wu Standards Track [Page 2]
114
115 RFC 2945 SRP Authentication & Key Exchange System September 2000
116
117
118 where i is the integer and S[x] is the value of the x'th byte of S.
119 In human terms, the string of bytes is the integer expressed in base
120 256, with the most significant digit first. When converting back to
121 a string, S[0] must be non-zero (padding is considered to be a
122 separate, independent process). This conversion method is suitable
123 for file storage, in-memory representation, and network transmission
124 of large integer values. Unless otherwise specified, this mapping
125 will be assumed.
126
127 If implementations require padding a string that represents an
128 integer value, it is recommended that they use zero bytes and add
129 them to the beginning of the string. The conversion back to integer
130 automatically discards leading zero bytes, making this padding scheme
131 less prone to error.
132
133 The SHA hash function, when used in this document, refers to the
134 SHA-1 message digest algorithm described in [SHA1].
135
136 3. The SRP-SHA1 mechanism
137
138 This section describes an implementation of the SRP authentication
139 and key-exchange protocol that employs the SHA hash function to
140 generate session keys and authentication proofs.
141
142 The host stores user passwords as triplets of the form
143
144 { <username>, <password verifier>, <salt> }
145
146 Password entries are generated as follows:
147
148 <salt> = random()
149 x = SHA(<salt> | SHA(<username> | ":" | <raw password>))
150 <password verifier> = v = g^x % N
151
152 The | symbol indicates string concatenation, the ^ operator is the
153 exponentiation operation, and the % operator is the integer remainder
154 operation. Most implementations perform the exponentiation and
155 remainder in a single stage to avoid generating unwieldy intermediate
156 results. Note that the 160-bit output of SHA is implicitly converted
157 to an integer before it is operated upon.
158
159 Authentication is generally initiated by the client.
160
161 Client Host
162 -------- ------
163 U = <username> -->
164 <-- s = <salt from passwd file>
165
166
167
168
169 Wu Standards Track [Page 3]
170
171 RFC 2945 SRP Authentication & Key Exchange System September 2000
172
173
174 Upon identifying himself to the host, the client will receive the
175 salt stored on the host under his username.
176
177 a = random()
178 A = g^a % N -->
179 v = <stored password verifier>
180 b = random()
181 <-- B = (v + g^b) % N
182
183 p = <raw password>
184 x = SHA(s | SHA(U | ":" | p))
185
186 S = (B - g^x) ^ (a + u * x) % N S = (A * v^u) ^ b % N
187 K = SHA_Interleave(S) K = SHA_Interleave(S)
188 (this function is described
189 in the next section)
190
191 The client generates a random number, raises g to that power modulo
192 the field prime, and sends the result to the host. The host does the
193 same thing and also adds the public verifier before sending it to the
194 client. Both sides then construct the shared session key based on
195 the respective formulae.
196
197 The parameter u is a 32-bit unsigned integer which takes its value
198 from the first 32 bits of the SHA1 hash of B, MSB first.
199
200 The client MUST abort authentication if B % N is zero.
201
202 The host MUST abort the authentication attempt if A % N is zero. The
203 host MUST send B after receiving A from the client, never before.
204
205 At this point, the client and server should have a common session key
206 that is secure (i.e. not known to an outside party). To finish
207 authentication, they must prove to each other that their keys are
208 identical.
209
210 M = H(H(N) XOR H(g) | H(U) | s | A | B | K)
211 -->
212 <-- H(A | M | K)
213
214 The server will calculate M using its own K and compare it against
215 the client's response. If they do not match, the server MUST abort
216 and signal an error before it attempts to answer the client's
217 challenge. Not doing so could compromise the security of the user's
218 password.
219
220
221
222
223
224
225 Wu Standards Track [Page 4]
226
227 RFC 2945 SRP Authentication & Key Exchange System September 2000
228
229
230 If the server receives a correct response, it issues its own proof to
231 the client. The client will compute the expected response using its
232 own K to verify the authenticity of the server. If the client
233 responded correctly, the server MUST respond with its hash value.
234
235 The transactions in this protocol description do not necessarily have
236 a one-to-one correspondence with actual protocol messages. This
237 description is only intended to illustrate the relationships between
238 the different parameters and how they are computed. It is possible,
239 for example, for an implementation of the SRP-SHA1 mechanism to
240 consolidate some of the flows as follows:
241
242 Client Host
243 -------- ------
244 U, A -->
245 <-- s, B
246 H(H(N) XOR H(g) | H(U) | s | A | B | K)
247 -->
248 <-- H(A | M | K)
249
250 The values of N and g used in this protocol must be agreed upon by
251 the two parties in question. They can be set in advance, or the host
252 can supply them to the client. In the latter case, the host should
253 send the parameters in the first message along with the salt. For
254 maximum security, N should be a safe prime (i.e. a number of the form
255 N = 2q + 1, where q is also prime). Also, g should be a generator
256 modulo N (see [SRP] for details), which means that for any X where 0
257 < X < N, there exists a value x for which g^x % N == X.
258
259 3.1. Interleaved SHA
260
261 The SHA_Interleave function used in SRP-SHA1 is used to generate a
262 session key that is twice as long as the 160-bit output of SHA1. To
263 compute this function, remove all leading zero bytes from the input.
264 If the length of the resulting string is odd, also remove the first
265 byte. Call the resulting string T. Extract the even-numbered bytes
266 into a string E and the odd-numbered bytes into a string F, i.e.
267
268 E = T[0] | T[2] | T[4] | ...
269 F = T[1] | T[3] | T[5] | ...
270
271 Both E and F should be exactly half the length of T. Hash each one
272 with regular SHA1, i.e.
273
274 G = SHA(E)
275 H = SHA(F)
276
277
278
279
280
281 Wu Standards Track [Page 5]
282
283 RFC 2945 SRP Authentication & Key Exchange System September 2000
284
285
286 Interleave the two hashes back together to form the output, i.e.
287
288 result = G[0] | H[0] | G[1] | H[1] | ... | G[19] | H[19]
289
290 The result will be 40 bytes (320 bits) long.
291
292 3.2. Other Hash Algorithms
293
294 SRP can be used with hash functions other than SHA. If the hash
295 function produces an output of a different length than SHA (20
296 bytes), it may change the length of some of the messages in the
297 protocol, but the fundamental operation will be unaffected.
298
299 Earlier versions of the SRP mechanism used the MD5 hash function,
300 described in [RFC 1321]. Keyed hash transforms are also recommended
301 for use with SRP; one possible construction uses HMAC [RFC 2104],
302 using K to key the hash in each direction instead of concatenating it
303 with the other parameters.
304
305 Any hash function used with SRP should produce an output of at least
306 16 bytes and have the property that small changes in the input cause
307 significant nonlinear changes in the output. [SRP] covers these
308 issues in more depth.
309
310 4. Security Considerations
311
312 This entire memo discusses an authentication and key-exchange system
313 that protects passwords and exchanges keys across an untrusted
314 network. This system improves security by eliminating the need to
315 send cleartext passwords over the network and by enabling encryption
316 through its secure key-exchange mechanism.
317
318 The private values for a and b correspond roughly to the private
319 values in a Diffie-Hellman exchange and have similar constraints of
320 length and entropy. Implementations may choose to increase the
321 length of the parameter u, as long as both client and server agree,
322 but it is not recommended that it be shorter than 32 bits.
323
324 SRP has been designed not only to counter the threat of casual
325 password-sniffing, but also to prevent a determined attacker equipped
326 with a dictionary of passwords from guessing at passwords using
327 captured network traffic. The SRP protocol itself also resists
328 active network attacks, and implementations can use the securely
329 exchanged keys to protect the session against hijacking and provide
330 confidentiality.
331
332
333
334
335
336
337 Wu Standards Track [Page 6]
338
339 RFC 2945 SRP Authentication & Key Exchange System September 2000
340
341
342 SRP also has the added advantage of permitting the host to store
343 passwords in a form that is not directly useful to an attacker. Even
344 if the host's password database were publicly revealed, the attacker
345 would still need an expensive dictionary search to obtain any
346 passwords. The exponential computation required to validate a guess
347 in this case is much more time-consuming than the hash currently used
348 by most UNIX systems. Hosts are still advised, though, to try their
349 best to keep their password files secure.
350
351 5. References
352
353 [RFC 1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321,
354 April 1992.
355
356 [RFC 1704] Haller, N. and R. Atkinson, "On Internet Authentication",
357 RFC 1704, October 1994.
358
359 [RFC 1760] Haller, N., "The S/Key One-Time Password System", RFC
360 1760, Feburary 1995.
361
362 [RFC 2095] Klensin, J., Catoe, R. and P. Krumviede, "IMAP/POP
363 AUTHorize Extension for Simple Challenge/Response", RFC
364 2095, January 1997.
365
366 [RFC 2104] Krawczyk, H., Bellare, M. and R. Canetti, "HMAC: Keyed-
367 Hashing for Message Authentication", RFC 2104, February
368 1997.
369
370 [SHA1] National Institute of Standards and Technology (NIST),
371 "Announcing the Secure Hash Standard", FIPS 180-1, U.S.
372 Department of Commerce, April 1995.
373
374 [SRP] T. Wu, "The Secure Remote Password Protocol", In
375 Proceedings of the 1998 Internet Society Symposium on
376 Network and Distributed Systems Security, San Diego, CA,
377 pp. 97-111.
378
379 6. Author's Address
380
381 Thomas Wu
382 Stanford University
383 Stanford, CA 94305
384
385 EMail: tjw@cs.Stanford.EDU
386
387
388
389
390
391
392
393 Wu Standards Track [Page 7]
394
395 RFC 2945 SRP Authentication & Key Exchange System September 2000
396
397
398 7. Full Copyright Statement
399
400 Copyright (C) The Internet Society (2000). All Rights Reserved.
401
402 This document and translations of it may be copied and furnished to
403 others, and derivative works that comment on or otherwise explain it
404 or assist in its implementation may be prepared, copied, published
405 and distributed, in whole or in part, without restriction of any
406 kind, provided that the above copyright notice and this paragraph are
407 included on all such copies and derivative works. However, this
408 document itself may not be modified in any way, such as by removing
409 the copyright notice or references to the Internet Society or other
410 Internet organizations, except as needed for the purpose of
411 developing Internet standards in which case the procedures for
412 copyrights defined in the Internet Standards process must be
413 followed, or as required to translate it into languages other than
414 English.
415
416 The limited permissions granted above are perpetual and will not be
417 revoked by the Internet Society or its successors or assigns.
418
419 This document and the information contained herein is provided on an
420 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
421 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
422 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
423 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
424 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
425
426 Acknowledgement
427
428 Funding for the RFC Editor function is currently provided by the
429 Internet Society.
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449 Wu Standards Track [Page 8]
450
0
1
2
3
4
5
6 Network Working Group D. Eastlake, 3rd
7 Request for Comments: 3174 Motorola
8 Category: Informational P. Jones
9 Cisco Systems
10 September 2001
11
12
13 US Secure Hash Algorithm 1 (SHA1)
14
15 Status of this Memo
16
17 This memo provides information for the Internet community. It does
18 not specify an Internet standard of any kind. Distribution of this
19 memo is unlimited.
20
21 Copyright Notice
22
23 Copyright (C) The Internet Society (2001). All Rights Reserved.
24
25 Abstract
26
27 The purpose of this document is to make the SHA-1 (Secure Hash
28 Algorithm 1) hash algorithm conveniently available to the Internet
29 community. The United States of America has adopted the SHA-1 hash
30 algorithm described herein as a Federal Information Processing
31 Standard. Most of the text herein was taken by the authors from FIPS
32 180-1. Only the C code implementation is "original".
33
34 Acknowledgements
35
36 Most of the text herein was taken from [FIPS 180-1]. Only the C code
37 implementation is "original" but its style is similar to the
38 previously published MD4 and MD5 RFCs [RFCs 1320, 1321].
39
40 The SHA-1 is based on principles similar to those used by Professor
41 Ronald L. Rivest of MIT when designing the MD4 message digest
42 algorithm [MD4] and is modeled after that algorithm [RFC 1320].
43
44 Useful comments from the following, which have been incorporated
45 herein, are gratefully acknowledged:
46
47 Tony Hansen
48 Garrett Wollman
49
50
51
52
53
54
55
56
57 Eastlake & Jones Informational [Page 1]
58
59 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
60
61
62 Table of Contents
63
64 1. Overview of Contents........................................... 2
65 2. Definitions of Bit Strings and Integers........................ 3
66 3. Operations on Words............................................ 3
67 4. Message Padding................................................ 4
68 5. Functions and Constants Used................................... 6
69 6. Computing the Message Digest................................... 6
70 6.1 Method 1...................................................... 6
71 6.2 Method 2...................................................... 7
72 7. C Code......................................................... 8
73 7.1 .h file....................................................... 8
74 7.2 .c file....................................................... 10
75 7.3 Test Driver................................................... 18
76 8. Security Considerations........................................ 20
77 References........................................................ 21
78 Authors' Addresses................................................ 21
79 Full Copyright Statement.......................................... 22
80
81 1. Overview of Contents
82
83 NOTE: The text below is mostly taken from [FIPS 180-1] and assertions
84 therein of the security of SHA-1 are made by the US Government, the
85 author of [FIPS 180-1], and not by the authors of this document.
86
87 This document specifies a Secure Hash Algorithm, SHA-1, for computing
88 a condensed representation of a message or a data file. When a
89 message of any length < 2^64 bits is input, the SHA-1 produces a
90 160-bit output called a message digest. The message digest can then,
91 for example, be input to a signature algorithm which generates or
92 verifies the signature for the message. Signing the message digest
93 rather than the message often improves the efficiency of the process
94 because the message digest is usually much smaller in size than the
95 message. The same hash algorithm must be used by the verifier of a
96 digital signature as was used by the creator of the digital
97 signature. Any change to the message in transit will, with very high
98 probability, result in a different message digest, and the signature
99 will fail to verify.
100
101 The SHA-1 is called secure because it is computationally infeasible
102 to find a message which corresponds to a given message digest, or to
103 find two different messages which produce the same message digest.
104 Any change to a message in transit will, with very high probability,
105 result in a different message digest, and the signature will fail to
106 verify.
107
108
109
110
111
112
113 Eastlake & Jones Informational [Page 2]
114
115 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
116
117
118 Section 2 below defines the terminology and functions used as
119 building blocks to form SHA-1.
120
121 2. Definitions of Bit Strings and Integers
122
123 The following terminology related to bit strings and integers will be
124 used:
125
126 a. A hex digit is an element of the set {0, 1, ... , 9, A, ... , F}.
127 A hex digit is the representation of a 4-bit string. Examples: 7
128 = 0111, A = 1010.
129
130 b. A word equals a 32-bit string which may be represented as a
131 sequence of 8 hex digits. To convert a word to 8 hex digits each
132 4-bit string is converted to its hex equivalent as described in
133 (a) above. Example:
134
135 1010 0001 0000 0011 1111 1110 0010 0011 = A103FE23.
136
137 c. An integer between 0 and 2^32 - 1 inclusive may be represented as
138 a word. The least significant four bits of the integer are
139 represented by the right-most hex digit of the word
140 representation. Example: the integer 291 = 2^8+2^5+2^1+2^0 =
141 256+32+2+1 is represented by the hex word, 00000123.
142
143 If z is an integer, 0 <= z < 2^64, then z = (2^32)x + y where 0 <=
144 x < 2^32 and 0 <= y < 2^32. Since x and y can be represented as
145 words X and Y, respectively, z can be represented as the pair of
146 words (X,Y).
147
148 d. block = 512-bit string. A block (e.g., B) may be represented as a
149 sequence of 16 words.
150
151 3. Operations on Words
152
153 The following logical operators will be applied to words:
154
155 a. Bitwise logical word operations
156
157 X AND Y = bitwise logical "and" of X and Y.
158
159 X OR Y = bitwise logical "inclusive-or" of X and Y.
160
161 X XOR Y = bitwise logical "exclusive-or" of X and Y.
162
163 NOT X = bitwise logical "complement" of X.
164
165
166
167
168
169 Eastlake & Jones Informational [Page 3]
170
171 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
172
173
174 Example:
175
176 01101100101110011101001001111011
177 XOR 01100101110000010110100110110111
178 --------------------------------
179 = 00001001011110001011101111001100
180
181 b. The operation X + Y is defined as follows: words X and Y
182 represent integers x and y, where 0 <= x < 2^32 and 0 <= y < 2^32.
183 For positive integers n and m, let n mod m be the remainder upon
184 dividing n by m. Compute
185
186 z = (x + y) mod 2^32.
187
188 Then 0 <= z < 2^32. Convert z to a word, Z, and define Z = X +
189 Y.
190
191 c. The circular left shift operation S^n(X), where X is a word and n
192 is an integer with 0 <= n < 32, is defined by
193
194 S^n(X) = (X << n) OR (X >> 32-n).
195
196 In the above, X << n is obtained as follows: discard the left-most
197 n bits of X and then pad the result with n zeroes on the right
198 (the result will still be 32 bits). X >> n is obtained by
199 discarding the right-most n bits of X and then padding the result
200 with n zeroes on the left. Thus S^n(X) is equivalent to a
201 circular shift of X by n positions to the left.
202
203 4. Message Padding
204
205 SHA-1 is used to compute a message digest for a message or data file
206 that is provided as input. The message or data file should be
207 considered to be a bit string. The length of the message is the
208 number of bits in the message (the empty message has length 0). If
209 the number of bits in a message is a multiple of 8, for compactness
210 we can represent the message in hex. The purpose of message padding
211 is to make the total length of a padded message a multiple of 512.
212 SHA-1 sequentially processes blocks of 512 bits when computing the
213 message digest. The following specifies how this padding shall be
214 performed. As a summary, a "1" followed by m "0"s followed by a 64-
215 bit integer are appended to the end of the message to produce a
216 padded message of length 512 * n. The 64-bit integer is the length
217 of the original message. The padded message is then processed by the
218 SHA-1 as n 512-bit blocks.
219
220
221
222
223
224
225 Eastlake & Jones Informational [Page 4]
226
227 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
228
229
230 Suppose a message has length l < 2^64. Before it is input to the
231 SHA-1, the message is padded on the right as follows:
232
233 a. "1" is appended. Example: if the original message is "01010000",
234 this is padded to "010100001".
235
236 b. "0"s are appended. The number of "0"s will depend on the original
237 length of the message. The last 64 bits of the last 512-bit block
238 are reserved
239
240 for the length l of the original message.
241
242 Example: Suppose the original message is the bit string
243
244 01100001 01100010 01100011 01100100 01100101.
245
246 After step (a) this gives
247
248 01100001 01100010 01100011 01100100 01100101 1.
249
250 Since l = 40, the number of bits in the above is 41 and 407 "0"s
251 are appended, making the total now 448. This gives (in hex)
252
253 61626364 65800000 00000000 00000000
254 00000000 00000000 00000000 00000000
255 00000000 00000000 00000000 00000000
256 00000000 00000000.
257
258 c. Obtain the 2-word representation of l, the number of bits in the
259 original message. If l < 2^32 then the first word is all zeroes.
260 Append these two words to the padded message.
261
262 Example: Suppose the original message is as in (b). Then l = 40
263 (note that l is computed before any padding). The two-word
264 representation of 40 is hex 00000000 00000028. Hence the final
265 padded message is hex
266
267 61626364 65800000 00000000 00000000
268 00000000 00000000 00000000 00000000
269 00000000 00000000 00000000 00000000
270 00000000 00000000 00000000 00000028.
271
272 The padded message will contain 16 * n words for some n > 0.
273 The padded message is regarded as a sequence of n blocks M(1) ,
274 M(2), first characters (or bits) of the message.
275
276
277
278
279
280
281 Eastlake & Jones Informational [Page 5]
282
283 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
284
285
286 5. Functions and Constants Used
287
288 A sequence of logical functions f(0), f(1),..., f(79) is used in
289 SHA-1. Each f(t), 0 <= t <= 79, operates on three 32-bit words B, C,
290 D and produces a 32-bit word as output. f(t;B,C,D) is defined as
291 follows: for words B, C, D,
292
293 f(t;B,C,D) = (B AND C) OR ((NOT B) AND D) ( 0 <= t <= 19)
294
295 f(t;B,C,D) = B XOR C XOR D (20 <= t <= 39)
296
297 f(t;B,C,D) = (B AND C) OR (B AND D) OR (C AND D) (40 <= t <= 59)
298
299 f(t;B,C,D) = B XOR C XOR D (60 <= t <= 79).
300
301 A sequence of constant words K(0), K(1), ... , K(79) is used in the
302 SHA-1. In hex these are given by
303
304 K(t) = 5A827999 ( 0 <= t <= 19)
305
306 K(t) = 6ED9EBA1 (20 <= t <= 39)
307
308 K(t) = 8F1BBCDC (40 <= t <= 59)
309
310 K(t) = CA62C1D6 (60 <= t <= 79).
311
312 6. Computing the Message Digest
313
314 The methods given in 6.1 and 6.2 below yield the same message digest.
315 Although using method 2 saves sixty-four 32-bit words of storage, it
316 is likely to lengthen execution time due to the increased complexity
317 of the address computations for the { W[t] } in step (c). There are
318 other computation methods which give identical results.
319
320 6.1 Method 1
321
322 The message digest is computed using the message padded as described
323 in section 4. The computation is described using two buffers, each
324 consisting of five 32-bit words, and a sequence of eighty 32-bit
325 words. The words of the first 5-word buffer are labeled A,B,C,D,E.
326 The words of the second 5-word buffer are labeled H0, H1, H2, H3, H4.
327 The words of the 80-word sequence are labeled W(0), W(1),..., W(79).
328 A single word buffer TEMP is also employed.
329
330 To generate the message digest, the 16-word blocks M(1), M(2),...,
331 M(n) defined in section 4 are processed in order. The processing of
332 each M(i) involves 80 steps.
333
334
335
336
337 Eastlake & Jones Informational [Page 6]
338
339 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
340
341
342 Before processing any blocks, the H's are initialized as follows: in
343 hex,
344
345 H0 = 67452301
346
347 H1 = EFCDAB89
348
349 H2 = 98BADCFE
350
351 H3 = 10325476
352
353 H4 = C3D2E1F0.
354
355 Now M(1), M(2), ... , M(n) are processed. To process M(i), we
356 proceed as follows:
357
358 a. Divide M(i) into 16 words W(0), W(1), ... , W(15), where W(0)
359 is the left-most word.
360
361 b. For t = 16 to 79 let
362
363 W(t) = S^1(W(t-3) XOR W(t-8) XOR W(t-14) XOR W(t-16)).
364
365 c. Let A = H0, B = H1, C = H2, D = H3, E = H4.
366
367 d. For t = 0 to 79 do
368
369 TEMP = S^5(A) + f(t;B,C,D) + E + W(t) + K(t);
370
371 E = D; D = C; C = S^30(B); B = A; A = TEMP;
372
373 e. Let H0 = H0 + A, H1 = H1 + B, H2 = H2 + C, H3 = H3 + D, H4 = H4
374 + E.
375
376 After processing M(n), the message digest is the 160-bit string
377 represented by the 5 words
378
379 H0 H1 H2 H3 H4.
380
381 6.2 Method 2
382
383 The method above assumes that the sequence W(0), ... , W(79) is
384 implemented as an array of eighty 32-bit words. This is efficient
385 from the standpoint of minimization of execution time, since the
386 addresses of W(t-3), ... ,W(t-16) in step (b) are easily computed.
387 If space is at a premium, an alternative is to regard { W(t) } as a
388
389
390
391
392
393 Eastlake & Jones Informational [Page 7]
394
395 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
396
397
398 circular queue, which may be implemented using an array of sixteen
399 32-bit words W[0], ... W[15]. In this case, in hex let
400
401 MASK = 0000000F. Then processing of M(i) is as follows:
402
403 a. Divide M(i) into 16 words W[0], ... , W[15], where W[0] is the
404 left-most word.
405
406 b. Let A = H0, B = H1, C = H2, D = H3, E = H4.
407
408 c. For t = 0 to 79 do
409
410 s = t AND MASK;
411
412 if (t >= 16) W[s] = S^1(W[(s + 13) AND MASK] XOR W[(s + 8) AND
413 MASK] XOR W[(s + 2) AND MASK] XOR W[s]);
414
415 TEMP = S^5(A) + f(t;B,C,D) + E + W[s] + K(t);
416
417 E = D; D = C; C = S^30(B); B = A; A = TEMP;
418
419 d. Let H0 = H0 + A, H1 = H1 + B, H2 = H2 + C, H3 = H3 + D, H4 = H4
420 + E.
421
422 7. C Code
423
424 Below is a demonstration implementation of SHA-1 in C. Section 7.1
425 contains the header file, 7.2 the C code, and 7.3 a test driver.
426
427 7.1 .h file
428
429 /*
430 * sha1.h
431 *
432 * Description:
433 * This is the header file for code which implements the Secure
434 * Hashing Algorithm 1 as defined in FIPS PUB 180-1 published
435 * April 17, 1995.
436 *
437 * Many of the variable names in this code, especially the
438 * single character names, were used because those were the names
439 * used in the publication.
440 *
441 * Please read the file sha1.c for more information.
442 *
443 */
444
445
446
447
448
449 Eastlake & Jones Informational [Page 8]
450
451 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
452
453
454 #ifndef _SHA1_H_
455 #define _SHA1_H_
456
457 #include <stdint.h>
458 /*
459 * If you do not have the ISO standard stdint.h header file, then you
460 * must typdef the following:
461 * name meaning
462 * uint32_t unsigned 32 bit integer
463 * uint8_t unsigned 8 bit integer (i.e., unsigned char)
464 * int_least16_t integer of >= 16 bits
465 *
466 */
467
468 #ifndef _SHA_enum_
469 #define _SHA_enum_
470 enum
471 {
472 shaSuccess = 0,
473 shaNull, /* Null pointer parameter */
474 shaInputTooLong, /* input data too long */
475 shaStateError /* called Input after Result */
476 };
477 #endif
478 #define SHA1HashSize 20
479
480 /*
481 * This structure will hold context information for the SHA-1
482 * hashing operation
483 */
484 typedef struct SHA1Context
485 {
486 uint32_t Intermediate_Hash[SHA1HashSize/4]; /* Message Digest */
487
488 uint32_t Length_Low; /* Message length in bits */
489 uint32_t Length_High; /* Message length in bits */
490
491 /* Index into message block array */
492 int_least16_t Message_Block_Index;
493 uint8_t Message_Block[64]; /* 512-bit message blocks */
494
495 int Computed; /* Is the digest computed? */
496 int Corrupted; /* Is the message digest corrupted? */
497 } SHA1Context;
498
499 /*
500 * Function Prototypes
501 */
502
503
504
505 Eastlake & Jones Informational [Page 9]
506
507 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
508
509
510 int SHA1Reset( SHA1Context *);
511 int SHA1Input( SHA1Context *,
512 const uint8_t *,
513 unsigned int);
514 int SHA1Result( SHA1Context *,
515 uint8_t Message_Digest[SHA1HashSize]);
516
517 #endif
518
519 7.2 .c file
520
521 /*
522 * sha1.c
523 *
524 * Description:
525 * This file implements the Secure Hashing Algorithm 1 as
526 * defined in FIPS PUB 180-1 published April 17, 1995.
527 *
528 * The SHA-1, produces a 160-bit message digest for a given
529 * data stream. It should take about 2**n steps to find a
530 * message with the same digest as a given message and
531 * 2**(n/2) to find any two messages with the same digest,
532 * when n is the digest size in bits. Therefore, this
533 * algorithm can serve as a means of providing a
534 * "fingerprint" for a message.
535 *
536 * Portability Issues:
537 * SHA-1 is defined in terms of 32-bit "words". This code
538 * uses <stdint.h> (included via "sha1.h" to define 32 and 8
539 * bit unsigned integer types. If your C compiler does not
540 * support 32 bit unsigned integers, this code is not
541 * appropriate.
542 *
543 * Caveats:
544 * SHA-1 is designed to work with messages less than 2^64 bits
545 * long. Although SHA-1 allows a message digest to be generated
546 * for messages of any number of bits less than 2^64, this
547 * implementation only works with messages with a length that is
548 * a multiple of the size of an 8-bit character.
549 *
550 */
551
552
553
554
555
556
557
558
559
560
561 Eastlake & Jones Informational [Page 10]
562
563 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
564
565
566 #include "sha1.h"
567
568 /*
569 * Define the SHA1 circular left shift macro
570 */
571 #define SHA1CircularShift(bits,word) \
572 (((word) << (bits)) | ((word) >> (32-(bits))))
573
574 /* Local Function Prototyptes */
575 void SHA1PadMessage(SHA1Context *);
576 void SHA1ProcessMessageBlock(SHA1Context *);
577
578 /*
579 * SHA1Reset
580 *
581 * Description:
582 * This function will initialize the SHA1Context in preparation
583 * for computing a new SHA1 message digest.
584 *
585 * Parameters:
586 * context: [in/out]
587 * The context to reset.
588 *
589 * Returns:
590 * sha Error Code.
591 *
592 */
593 int SHA1Reset(SHA1Context *context)
594 {
595 if (!context)
596 {
597 return shaNull;
598 }
599
600 context->Length_Low = 0;
601 context->Length_High = 0;
602 context->Message_Block_Index = 0;
603
604 context->Intermediate_Hash[0] = 0x67452301;
605 context->Intermediate_Hash[1] = 0xEFCDAB89;
606 context->Intermediate_Hash[2] = 0x98BADCFE;
607 context->Intermediate_Hash[3] = 0x10325476;
608 context->Intermediate_Hash[4] = 0xC3D2E1F0;
609
610 context->Computed = 0;
611 context->Corrupted = 0;
612
613
614
615
616
617 Eastlake & Jones Informational [Page 11]
618
619 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
620
621
622 return shaSuccess;
623 }
624
625 /*
626 * SHA1Result
627 *
628 * Description:
629 * This function will return the 160-bit message digest into the
630 * Message_Digest array provided by the caller.
631 * NOTE: The first octet of hash is stored in the 0th element,
632 * the last octet of hash in the 19th element.
633 *
634 * Parameters:
635 * context: [in/out]
636 * The context to use to calculate the SHA-1 hash.
637 * Message_Digest: [out]
638 * Where the digest is returned.
639 *
640 * Returns:
641 * sha Error Code.
642 *
643 */
644 int SHA1Result( SHA1Context *context,
645 uint8_t Message_Digest[SHA1HashSize])
646 {
647 int i;
648
649 if (!context || !Message_Digest)
650 {
651 return shaNull;
652 }
653
654 if (context->Corrupted)
655 {
656 return context->Corrupted;
657 }
658
659 if (!context->Computed)
660 {
661 SHA1PadMessage(context);
662 for(i=0; i<64; ++i)
663 {
664 /* message may be sensitive, clear it out */
665 context->Message_Block[i] = 0;
666 }
667 context->Length_Low = 0; /* and clear length */
668 context->Length_High = 0;
669 context->Computed = 1;
670
671
672
673 Eastlake & Jones Informational [Page 12]
674
675 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
676
677
678 }
679
680 for(i = 0; i < SHA1HashSize; ++i)
681 {
682 Message_Digest[i] = context->Intermediate_Hash[i>>2]
683 >> 8 * ( 3 - ( i & 0x03 ) );
684 }
685
686 return shaSuccess;
687 }
688
689 /*
690 * SHA1Input
691 *
692 * Description:
693 * This function accepts an array of octets as the next portion
694 * of the message.
695 *
696 * Parameters:
697 * context: [in/out]
698 * The SHA context to update
699 * message_array: [in]
700 * An array of characters representing the next portion of
701 * the message.
702 * length: [in]
703 * The length of the message in message_array
704 *
705 * Returns:
706 * sha Error Code.
707 *
708 */
709 int SHA1Input( SHA1Context *context,
710 const uint8_t *message_array,
711 unsigned length)
712 {
713 if (!length)
714 {
715 return shaSuccess;
716 }
717
718 if (!context || !message_array)
719 {
720 return shaNull;
721 }
722
723 if (context->Computed)
724 {
725 context->Corrupted = shaStateError;
726
727
728
729 Eastlake & Jones Informational [Page 13]
730
731 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
732
733
734 return shaStateError;
735 }
736
737 if (context->Corrupted)
738 {
739 return context->Corrupted;
740 }
741 while(length-- && !context->Corrupted)
742 {
743 context->Message_Block[context->Message_Block_Index++] =
744 (*message_array & 0xFF);
745
746 context->Length_Low += 8;
747 if (context->Length_Low == 0)
748 {
749 context->Length_High++;
750 if (context->Length_High == 0)
751 {
752 /* Message is too long */
753 context->Corrupted = 1;
754 }
755 }
756
757 if (context->Message_Block_Index == 64)
758 {
759 SHA1ProcessMessageBlock(context);
760 }
761
762 message_array++;
763 }
764
765 return shaSuccess;
766 }
767
768 /*
769 * SHA1ProcessMessageBlock
770 *
771 * Description:
772 * This function will process the next 512 bits of the message
773 * stored in the Message_Block array.
774 *
775 * Parameters:
776 * None.
777 *
778 * Returns:
779 * Nothing.
780 *
781 * Comments:
782
783
784
785 Eastlake & Jones Informational [Page 14]
786
787 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
788
789
790 * Many of the variable names in this code, especially the
791 * single character names, were used because those were the
792 * names used in the publication.
793 *
794 *
795 */
796 void SHA1ProcessMessageBlock(SHA1Context *context)
797 {
798 const uint32_t K[] = { /* Constants defined in SHA-1 */
799 0x5A827999,
800 0x6ED9EBA1,
801 0x8F1BBCDC,
802 0xCA62C1D6
803 };
804 int t; /* Loop counter */
805 uint32_t temp; /* Temporary word value */
806 uint32_t W[80]; /* Word sequence */
807 uint32_t A, B, C, D, E; /* Word buffers */
808
809 /*
810 * Initialize the first 16 words in the array W
811 */
812 for(t = 0; t < 16; t++)
813 {
814 W[t] = context->Message_Block[t * 4] << 24;
815 W[t] |= context->Message_Block[t * 4 + 1] << 16;
816 W[t] |= context->Message_Block[t * 4 + 2] << 8;
817 W[t] |= context->Message_Block[t * 4 + 3];
818 }
819
820 for(t = 16; t < 80; t++)
821 {
822 W[t] = SHA1CircularShift(1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]);
823 }
824
825 A = context->Intermediate_Hash[0];
826 B = context->Intermediate_Hash[1];
827 C = context->Intermediate_Hash[2];
828 D = context->Intermediate_Hash[3];
829 E = context->Intermediate_Hash[4];
830
831 for(t = 0; t < 20; t++)
832 {
833 temp = SHA1CircularShift(5,A) +
834 ((B & C) | ((~B) & D)) + E + W[t] + K[0];
835 E = D;
836 D = C;
837 C = SHA1CircularShift(30,B);
838
839
840
841 Eastlake & Jones Informational [Page 15]
842
843 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
844
845
846 B = A;
847 A = temp;
848 }
849
850 for(t = 20; t < 40; t++)
851 {
852 temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[1];
853 E = D;
854 D = C;
855 C = SHA1CircularShift(30,B);
856 B = A;
857 A = temp;
858 }
859
860 for(t = 40; t < 60; t++)
861 {
862 temp = SHA1CircularShift(5,A) +
863 ((B & C) | (B & D) | (C & D)) + E + W[t] + K[2];
864 E = D;
865 D = C;
866 C = SHA1CircularShift(30,B);
867 B = A;
868 A = temp;
869 }
870
871 for(t = 60; t < 80; t++)
872 {
873 temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[3];
874 E = D;
875 D = C;
876 C = SHA1CircularShift(30,B);
877 B = A;
878 A = temp;
879 }
880
881 context->Intermediate_Hash[0] += A;
882 context->Intermediate_Hash[1] += B;
883 context->Intermediate_Hash[2] += C;
884 context->Intermediate_Hash[3] += D;
885 context->Intermediate_Hash[4] += E;
886
887 context->Message_Block_Index = 0;
888 }
889
890
891 /*
892 * SHA1PadMessage
893 *
894
895
896
897 Eastlake & Jones Informational [Page 16]
898
899 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
900
901
902 * Description:
903 * According to the standard, the message must be padded to an even
904 * 512 bits. The first padding bit must be a '1'. The last 64
905 * bits represent the length of the original message. All bits in
906 * between should be 0. This function will pad the message
907 * according to those rules by filling the Message_Block array
908 * accordingly. It will also call the ProcessMessageBlock function
909 * provided appropriately. When it returns, it can be assumed that
910 * the message digest has been computed.
911 *
912 * Parameters:
913 * context: [in/out]
914 * The context to pad
915 * ProcessMessageBlock: [in]
916 * The appropriate SHA*ProcessMessageBlock function
917 * Returns:
918 * Nothing.
919 *
920 */
921
922 void SHA1PadMessage(SHA1Context *context)
923 {
924 /*
925 * Check to see if the current message block is too small to hold
926 * the initial padding bits and length. If so, we will pad the
927 * block, process it, and then continue padding into a second
928 * block.
929 */
930 if (context->Message_Block_Index > 55)
931 {
932 context->Message_Block[context->Message_Block_Index++] = 0x80;
933 while(context->Message_Block_Index < 64)
934 {
935 context->Message_Block[context->Message_Block_Index++] = 0;
936 }
937
938 SHA1ProcessMessageBlock(context);
939
940 while(context->Message_Block_Index < 56)
941 {
942 context->Message_Block[context->Message_Block_Index++] = 0;
943 }
944 }
945 else
946 {
947 context->Message_Block[context->Message_Block_Index++] = 0x80;
948 while(context->Message_Block_Index < 56)
949 {
950
951
952
953 Eastlake & Jones Informational [Page 17]
954
955 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
956
957
958 context->Message_Block[context->Message_Block_Index++] = 0;
959 }
960 }
961
962 /*
963 * Store the message length as the last 8 octets
964 */
965 context->Message_Block[56] = context->Length_High >> 24;
966 context->Message_Block[57] = context->Length_High >> 16;
967 context->Message_Block[58] = context->Length_High >> 8;
968 context->Message_Block[59] = context->Length_High;
969 context->Message_Block[60] = context->Length_Low >> 24;
970 context->Message_Block[61] = context->Length_Low >> 16;
971 context->Message_Block[62] = context->Length_Low >> 8;
972 context->Message_Block[63] = context->Length_Low;
973
974 SHA1ProcessMessageBlock(context);
975 }
976
977 7.3 Test Driver
978
979 The following code is a main program test driver to exercise the code
980 in sha1.c.
981
982 /*
983 * sha1test.c
984 *
985 * Description:
986 * This file will exercise the SHA-1 code performing the three
987 * tests documented in FIPS PUB 180-1 plus one which calls
988 * SHA1Input with an exact multiple of 512 bits, plus a few
989 * error test checks.
990 *
991 * Portability Issues:
992 * None.
993 *
994 */
995
996 #include <stdint.h>
997 #include <stdio.h>
998 #include <string.h>
999 #include "sha1.h"
1000
1001 /*
1002 * Define patterns for testing
1003 */
1004 #define TEST1 "abc"
1005 #define TEST2a "abcdbcdecdefdefgefghfghighijhi"
1006
1007
1008
1009 Eastlake & Jones Informational [Page 18]
1010
1011 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
1012
1013
1014 #define TEST2b "jkijkljklmklmnlmnomnopnopq"
1015 #define TEST2 TEST2a TEST2b
1016 #define TEST3 "a"
1017 #define TEST4a "01234567012345670123456701234567"
1018 #define TEST4b "01234567012345670123456701234567"
1019 /* an exact multiple of 512 bits */
1020 #define TEST4 TEST4a TEST4b
1021 char *testarray[4] =
1022 {
1023 TEST1,
1024 TEST2,
1025 TEST3,
1026 TEST4
1027 };
1028 long int repeatcount[4] = { 1, 1, 1000000, 10 };
1029 char *resultarray[4] =
1030 {
1031 "A9 99 3E 36 47 06 81 6A BA 3E 25 71 78 50 C2 6C 9C D0 D8 9D",
1032 "84 98 3E 44 1C 3B D2 6E BA AE 4A A1 F9 51 29 E5 E5 46 70 F1",
1033 "34 AA 97 3C D4 C4 DA A4 F6 1E EB 2B DB AD 27 31 65 34 01 6F",
1034 "DE A3 56 A2 CD DD 90 C7 A7 EC ED C5 EB B5 63 93 4F 46 04 52"
1035 };
1036
1037 int main()
1038 {
1039 SHA1Context sha;
1040 int i, j, err;
1041 uint8_t Message_Digest[20];
1042
1043 /*
1044 * Perform SHA-1 tests
1045 */
1046 for(j = 0; j < 4; ++j)
1047 {
1048 printf( "\nTest %d: %d, '%s'\n",
1049 j+1,
1050 repeatcount[j],
1051 testarray[j]);
1052
1053 err = SHA1Reset(&sha);
1054 if (err)
1055 {
1056 fprintf(stderr, "SHA1Reset Error %d.\n", err );
1057 break; /* out of for j loop */
1058 }
1059
1060 for(i = 0; i < repeatcount[j]; ++i)
1061 {
1062
1063
1064
1065 Eastlake & Jones Informational [Page 19]
1066
1067 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
1068
1069
1070 err = SHA1Input(&sha,
1071 (const unsigned char *) testarray[j],
1072 strlen(testarray[j]));
1073 if (err)
1074 {
1075 fprintf(stderr, "SHA1Input Error %d.\n", err );
1076 break; /* out of for i loop */
1077 }
1078 }
1079
1080 err = SHA1Result(&sha, Message_Digest);
1081 if (err)
1082 {
1083 fprintf(stderr,
1084 "SHA1Result Error %d, could not compute message digest.\n",
1085 err );
1086 }
1087 else
1088 {
1089 printf("\t");
1090 for(i = 0; i < 20 ; ++i)
1091 {
1092 printf("%02X ", Message_Digest[i]);
1093 }
1094 printf("\n");
1095 }
1096 printf("Should match:\n");
1097 printf("\t%s\n", resultarray[j]);
1098 }
1099
1100 /* Test some error returns */
1101 err = SHA1Input(&sha,(const unsigned char *) testarray[1], 1);
1102 printf ("\nError %d. Should be %d.\n", err, shaStateError );
1103 err = SHA1Reset(0);
1104 printf ("\nError %d. Should be %d.\n", err, shaNull );
1105 return 0;
1106 }
1107
1108 8. Security Considerations
1109
1110 This document is intended to provide convenient open source access by
1111 the Internet community to the United States of America Federal
1112 Information Processing Standard Secure Hash Function SHA-1 [FIPS
1113 180-1]. No independent assertion of the security of this hash
1114 function by the authors for any particular use is intended.
1115
1116
1117
1118
1119
1120
1121 Eastlake & Jones Informational [Page 20]
1122
1123 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
1124
1125
1126 References
1127
1128 [FIPS 180-1] "Secure Hash Standard", United States of American,
1129 National Institute of Science and Technology, Federal
1130 Information Processing Standard (FIPS) 180-1, April
1131 1993.
1132
1133 [MD4] "The MD4 Message Digest Algorithm," Advances in
1134 Cryptology - CRYPTO '90 Proceedings, Springer-Verlag,
1135 1991, pp. 303-311.
1136
1137 [RFC 1320] Rivest, R., "The MD4 Message-Digest Algorithm", RFC
1138 1320, April 1992.
1139
1140 [RFC 1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC
1141 1321, April 1992.
1142
1143 [RFC 1750] Eastlake, D., Crocker, S. and J. Schiller, "Randomness
1144 Requirements for Security", RFC 1750, December 1994.
1145
1146 Authors' Addresses
1147
1148 Donald E. Eastlake, 3rd
1149 Motorola
1150 155 Beaver Street
1151 Milford, MA 01757 USA
1152
1153 Phone: +1 508-634-2066 (h)
1154 +1 508-261-5434 (w)
1155 Fax: +1 508-261-4777
1156 EMail: Donald.Eastlake@motorola.com
1157
1158
1159 Paul E. Jones
1160 Cisco Systems, Inc.
1161 7025 Kit Creek Road
1162 Research Triangle Park, NC 27709 USA
1163
1164 Phone: +1 919 392 6948
1165 EMail: paulej@packetizer.com
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177 Eastlake & Jones Informational [Page 21]
1178
1179 RFC 3174 US Secure Hash Algorithm 1 (SHA1) September 2001
1180
1181
1182 Full Copyright Statement
1183
1184 Copyright (C) The Internet Society (2001). All Rights Reserved.
1185
1186 This document and translations of it may be copied and furnished to
1187 others, and derivative works that comment on or otherwise explain it
1188 or assist in its implementation may be prepared, copied, published
1189 and distributed, in whole or in part, without restriction of any
1190 kind, provided that the above copyright notice and this paragraph are
1191 included on all such copies and derivative works. However, this
1192 document itself may not be modified in any way, such as by removing
1193 the copyright notice or references to the Internet Society or other
1194 Internet organizations, except as needed for the purpose of
1195 developing Internet standards in which case the procedures for
1196 copyrights defined in the Internet Standards process must be
1197 followed, or as required to translate it into languages other than
1198 English.
1199
1200 The limited permissions granted above are perpetual and will not be
1201 revoked by the Internet Society or its successors or assigns.
1202
1203 This document and the information contained herein is provided on an
1204 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
1205 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
1206 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
1207 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
1208 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
1209
1210 Acknowledgement
1211
1212 Funding for the RFC Editor function is currently provided by the
1213 Internet Society.
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233 Eastlake & Jones Informational [Page 22]
1234
0 Makefile.in
1 Makefile
2 .deps
3 .libs
4 *.l[ao]
5 *.o
6 makemd5
7 md5global.h
5050
5151 makemd5_SOURCES = makemd5.c
5252
53 md5global.h: makemd5
54 -rm -f md5global.h
55 ./makemd5 md5global.h
53 makemd5$(BUILD_EXEEXT) $(makemd5_OBJECTS): CC=$(CC_FOR_BUILD)
54 makemd5$(BUILD_EXEEXT) $(makemd5_OBJECTS): CFLAGS=$(CFLAGS_FOR_BUILD)
55 makemd5$(BUILD_EXEEXT): LDFLAGS=$(LDFLAGS_FOR_BUILD)
56
57 md5global.h: makemd5$(BUILD_EXEEXT) Makefile
58 -rm -f $@
59 ./$< $@
60
61 BUILT_SOURCES = md5global.h
5662
5763 EXTRA_DIST = NTMakefile
5864 DISTCLEANFILES = md5global.h
6268 frameheaderdir = $(framedir)/Versions/A/Headers
6369 frameheader_DATA = $(saslinclude_HEADERS)
6470 endif
71
72 # TODO: automake, don't build it
73 makemd5$(EXEEXT):
+0
-653
include/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 # Makefile.am for SASL includes
18 # Rob Earhart
19 #
20 ################################################################
21 # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
22 #
23 # Redistribution and use in source and binary forms, with or without
24 # modification, are permitted provided that the following conditions
25 # are met:
26 #
27 # 1. Redistributions of source code must retain the above copyright
28 # notice, this list of conditions and the following disclaimer.
29 #
30 # 2. Redistributions in binary form must reproduce the above copyright
31 # notice, this list of conditions and the following disclaimer in
32 # the documentation and/or other materials provided with the
33 # distribution.
34 #
35 # 3. The name "Carnegie Mellon University" must not be used to
36 # endorse or promote products derived from this software without
37 # prior written permission. For permission or any other legal
38 # details, please contact
39 # Office of Technology Transfer
40 # Carnegie Mellon University
41 # 5000 Forbes Avenue
42 # Pittsburgh, PA 15213-3890
43 # (412) 268-4387, fax: (412) 268-7395
44 # tech-transfer@andrew.cmu.edu
45 #
46 # 4. Redistributions of any form whatsoever must retain the following
47 # acknowledgment:
48 # "This product includes software developed by Computing Services
49 # at Carnegie Mellon University (http://www.cmu.edu/computing/)."
50 #
51 # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
52 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
53 # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
54 # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
55 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
56 # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
57 # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
58 #
59 ################################################################
60
61
62
63 VPATH = @srcdir@
64 pkgdatadir = $(datadir)/@PACKAGE@
65 pkgincludedir = $(includedir)/@PACKAGE@
66 pkglibdir = $(libdir)/@PACKAGE@
67 pkglibexecdir = $(libexecdir)/@PACKAGE@
68 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
69 install_sh_DATA = $(install_sh) -c -m 644
70 install_sh_PROGRAM = $(install_sh) -c
71 install_sh_SCRIPT = $(install_sh) -c
72 INSTALL_HEADER = $(INSTALL_DATA)
73 transform = $(program_transform_name)
74 NORMAL_INSTALL = :
75 PRE_INSTALL = :
76 POST_INSTALL = :
77 NORMAL_UNINSTALL = :
78 PRE_UNINSTALL = :
79 POST_UNINSTALL = :
80 build_triplet = @build@
81 host_triplet = @host@
82 target_triplet = @target@
83 noinst_PROGRAMS = makemd5$(EXEEXT)
84 subdir = include
85 DIST_COMMON = $(noinst_HEADERS) $(saslinclude_HEADERS) \
86 $(srcdir)/Makefile.am $(srcdir)/Makefile.in
87 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
88 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
89 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
90 $(top_srcdir)/config/sasldb.m4 \
91 $(top_srcdir)/cmulocal/berkdb.m4 \
92 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
93 $(top_srcdir)/cmulocal/c-attribute.m4 \
94 $(top_srcdir)/cmulocal/common.m4 \
95 $(top_srcdir)/cmulocal/cyrus.m4 \
96 $(top_srcdir)/cmulocal/init_automake.m4 \
97 $(top_srcdir)/cmulocal/ipv6.m4 \
98 $(top_srcdir)/cmulocal/openldap.m4 \
99 $(top_srcdir)/cmulocal/openssl.m4 \
100 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
101 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
102 $(ACLOCAL_M4)
103 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
104 CONFIG_HEADER = $(top_builddir)/config.h
105 CONFIG_CLEAN_FILES =
106 CONFIG_CLEAN_VPATH_FILES =
107 PROGRAMS = $(noinst_PROGRAMS)
108 am_makemd5_OBJECTS = makemd5.$(OBJEXT)
109 makemd5_OBJECTS = $(am_makemd5_OBJECTS)
110 makemd5_LDADD = $(LDADD)
111 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
112 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
113 am__depfiles_maybe = depfiles
114 am__mv = mv -f
115 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
116 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
117 LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
118 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
119 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
120 CCLD = $(CC)
121 LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
122 $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
123 SOURCES = $(makemd5_SOURCES)
124 DIST_SOURCES = $(makemd5_SOURCES)
125 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
126 am__vpath_adj = case $$p in \
127 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
128 *) f=$$p;; \
129 esac;
130 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
131 am__install_max = 40
132 am__nobase_strip_setup = \
133 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
134 am__nobase_strip = \
135 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
136 am__nobase_list = $(am__nobase_strip_setup); \
137 for p in $$list; do echo "$$p $$p"; done | \
138 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
139 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
140 if (++n[$$2] == $(am__install_max)) \
141 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
142 END { for (dir in files) print dir, files[dir] }'
143 am__base_list = \
144 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
145 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
146 am__installdirs = "$(DESTDIR)$(frameheaderdir)" \
147 "$(DESTDIR)$(saslincludedir)"
148 DATA = $(frameheader_DATA)
149 HEADERS = $(noinst_HEADERS) $(saslinclude_HEADERS)
150 ETAGS = etags
151 CTAGS = ctags
152 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
153 ACLOCAL = @ACLOCAL@
154 AMTAR = @AMTAR@
155 AUTOCONF = @AUTOCONF@
156 AUTOHEADER = @AUTOHEADER@
157 AUTOMAKE = @AUTOMAKE@
158 AWK = @AWK@
159 CC = @CC@
160 CCDEPMODE = @CCDEPMODE@
161 CFLAGS = @CFLAGS@
162 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
163 CPP = @CPP@
164 CPPFLAGS = @CPPFLAGS@
165 CYGPATH_W = @CYGPATH_W@
166 DEFS = @DEFS@
167 DEPDIR = @DEPDIR@
168 DIRS = @DIRS@
169 DMALLOC_LIBS = @DMALLOC_LIBS@
170 ECHO_C = @ECHO_C@
171 ECHO_N = @ECHO_N@
172 ECHO_T = @ECHO_T@
173 EGREP = @EGREP@
174 EXEEXT = @EXEEXT@
175 GETADDRINFOOBJS = @GETADDRINFOOBJS@
176 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
177 GETSUBOPT = @GETSUBOPT@
178 GREP = @GREP@
179 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
180 GSSAPI_LIBS = @GSSAPI_LIBS@
181 INSTALL = @INSTALL@
182 INSTALL_DATA = @INSTALL_DATA@
183 INSTALL_PROGRAM = @INSTALL_PROGRAM@
184 INSTALL_SCRIPT = @INSTALL_SCRIPT@
185 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
186 IPCTYPE = @IPCTYPE@
187 JAVAC = @JAVAC@
188 JAVADOC = @JAVADOC@
189 JAVAH = @JAVAH@
190 JAVAROOT = @JAVAROOT@
191 JAVA_INCLUDES = @JAVA_INCLUDES@
192 LDFLAGS = @LDFLAGS@
193 LIBOBJS = @LIBOBJS@
194 LIBS = @LIBS@
195 LIBTOOL = @LIBTOOL@
196 LIB_CRYPT = @LIB_CRYPT@
197 LIB_DES = @LIB_DES@
198 LIB_DOOR = @LIB_DOOR@
199 LIB_LDAP = @LIB_LDAP@
200 LIB_MYSQL = @LIB_MYSQL@
201 LIB_PGSQL = @LIB_PGSQL@
202 LIB_SOCKET = @LIB_SOCKET@
203 LIB_SQLITE = @LIB_SQLITE@
204 LIB_SQLITE3 = @LIB_SQLITE3@
205 LN_S = @LN_S@
206 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
207 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
208 LTLIBOBJS = @LTLIBOBJS@
209 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
210 MAKEINFO = @MAKEINFO@
211 MKDIR_P = @MKDIR_P@
212 NM = @NM@
213 NTLM_LIBS = @NTLM_LIBS@
214 OBJEXT = @OBJEXT@
215 OTP_LIBS = @OTP_LIBS@
216 PACKAGE = @PACKAGE@
217 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
218 PACKAGE_NAME = @PACKAGE_NAME@
219 PACKAGE_STRING = @PACKAGE_STRING@
220 PACKAGE_TARNAME = @PACKAGE_TARNAME@
221 PACKAGE_VERSION = @PACKAGE_VERSION@
222 PASSDSS_LIBS = @PASSDSS_LIBS@
223 PATH_SEPARATOR = @PATH_SEPARATOR@
224 PLAIN_LIBS = @PLAIN_LIBS@
225 PURECOV = @PURECOV@
226 PURIFY = @PURIFY@
227 PWCHECKMETH = @PWCHECKMETH@
228 RANLIB = @RANLIB@
229 SASL_DB_BACKEND = @SASL_DB_BACKEND@
230 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
231 SASL_DB_INC = @SASL_DB_INC@
232 SASL_DB_LIB = @SASL_DB_LIB@
233 SASL_DB_MANS = @SASL_DB_MANS@
234 SASL_DB_UTILS = @SASL_DB_UTILS@
235 SASL_DL_LIB = @SASL_DL_LIB@
236 SASL_KRB_LIB = @SASL_KRB_LIB@
237 SASL_MECHS = @SASL_MECHS@
238 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
239 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
240 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
241 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
242 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
243 SCRAM_LIBS = @SCRAM_LIBS@
244 SET_MAKE = @SET_MAKE@
245 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
246 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
247 SHELL = @SHELL@
248 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
249 SNPRINTFOBJS = @SNPRINTFOBJS@
250 SRP_LIBS = @SRP_LIBS@
251 STRIP = @STRIP@
252 VERSION = @VERSION@
253 abs_builddir = @abs_builddir@
254 abs_srcdir = @abs_srcdir@
255 abs_top_builddir = @abs_top_builddir@
256 abs_top_srcdir = @abs_top_srcdir@
257 ac_ct_CC = @ac_ct_CC@
258 am__include = @am__include@
259 am__leading_dot = @am__leading_dot@
260 am__quote = @am__quote@
261 am__tar = @am__tar@
262 am__untar = @am__untar@
263 bindir = @bindir@
264 build = @build@
265 build_alias = @build_alias@
266 build_cpu = @build_cpu@
267 build_os = @build_os@
268 build_vendor = @build_vendor@
269 builddir = @builddir@
270 configdir = @configdir@
271 datadir = @datadir@
272 datarootdir = @datarootdir@
273 docdir = @docdir@
274 dvidir = @dvidir@
275 exec_prefix = @exec_prefix@
276 host = @host@
277 host_alias = @host_alias@
278 host_cpu = @host_cpu@
279 host_os = @host_os@
280 host_vendor = @host_vendor@
281 htmldir = @htmldir@
282 includedir = @includedir@
283 infodir = @infodir@
284 install_sh = @install_sh@
285 libdir = @libdir@
286 libexecdir = @libexecdir@
287 localedir = @localedir@
288 localstatedir = @localstatedir@
289 mandir = @mandir@
290 mkdir_p = @mkdir_p@
291 oldincludedir = @oldincludedir@
292 pdfdir = @pdfdir@
293 plugindir = @plugindir@
294 prefix = @prefix@
295 program_transform_name = @program_transform_name@
296 psdir = @psdir@
297 sbindir = @sbindir@
298 sharedstatedir = @sharedstatedir@
299 srcdir = @srcdir@
300 subdirs = @subdirs@
301 sysconfdir = @sysconfdir@
302 target = @target@
303 target_alias = @target_alias@
304 target_cpu = @target_cpu@
305 target_os = @target_os@
306 target_vendor = @target_vendor@
307 top_build_prefix = @top_build_prefix@
308 top_builddir = @top_builddir@
309 top_srcdir = @top_srcdir@
310 noinst_HEADERS = gai.h exits.h
311 saslincludedir = $(includedir)/sasl
312 saslinclude_HEADERS = hmac-md5.h md5.h md5global.h sasl.h saslplug.h saslutil.h prop.h
313 makemd5_SOURCES = makemd5.c
314 EXTRA_DIST = NTMakefile
315 DISTCLEANFILES = md5global.h
316 @MACOSX_TRUE@framedir = /Library/Frameworks/SASL2.framework
317 @MACOSX_TRUE@frameheaderdir = $(framedir)/Versions/A/Headers
318 @MACOSX_TRUE@frameheader_DATA = $(saslinclude_HEADERS)
319 all: all-am
320
321 .SUFFIXES:
322 .SUFFIXES: .c .lo .o .obj
323 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
324 @for dep in $?; do \
325 case '$(am__configure_deps)' in \
326 *$$dep*) \
327 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
328 && { if test -f $@; then exit 0; else break; fi; }; \
329 exit 1;; \
330 esac; \
331 done; \
332 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
333 $(am__cd) $(top_srcdir) && \
334 $(AUTOMAKE) --gnu include/Makefile
335 .PRECIOUS: Makefile
336 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
337 @case '$?' in \
338 *config.status*) \
339 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
340 *) \
341 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
342 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
343 esac;
344
345 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
346 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
347
348 $(top_srcdir)/configure: $(am__configure_deps)
349 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
350 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
351 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
352 $(am__aclocal_m4_deps):
353
354 clean-noinstPROGRAMS:
355 @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
356 echo " rm -f" $$list; \
357 rm -f $$list || exit $$?; \
358 test -n "$(EXEEXT)" || exit 0; \
359 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
360 echo " rm -f" $$list; \
361 rm -f $$list
362 makemd5$(EXEEXT): $(makemd5_OBJECTS) $(makemd5_DEPENDENCIES)
363 @rm -f makemd5$(EXEEXT)
364 $(LINK) $(makemd5_OBJECTS) $(makemd5_LDADD) $(LIBS)
365
366 mostlyclean-compile:
367 -rm -f *.$(OBJEXT)
368
369 distclean-compile:
370 -rm -f *.tab.c
371
372 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/makemd5.Po@am__quote@
373
374 .c.o:
375 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
376 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
377 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
378 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
379 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
380
381 .c.obj:
382 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
383 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
384 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
385 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
386 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
387
388 .c.lo:
389 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
390 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
391 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
392 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
393 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
394
395 mostlyclean-libtool:
396 -rm -f *.lo
397
398 clean-libtool:
399 -rm -rf .libs _libs
400 install-frameheaderDATA: $(frameheader_DATA)
401 @$(NORMAL_INSTALL)
402 test -z "$(frameheaderdir)" || $(MKDIR_P) "$(DESTDIR)$(frameheaderdir)"
403 @list='$(frameheader_DATA)'; test -n "$(frameheaderdir)" || list=; \
404 for p in $$list; do \
405 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
406 echo "$$d$$p"; \
407 done | $(am__base_list) | \
408 while read files; do \
409 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(frameheaderdir)'"; \
410 $(INSTALL_DATA) $$files "$(DESTDIR)$(frameheaderdir)" || exit $$?; \
411 done
412
413 uninstall-frameheaderDATA:
414 @$(NORMAL_UNINSTALL)
415 @list='$(frameheader_DATA)'; test -n "$(frameheaderdir)" || list=; \
416 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
417 test -n "$$files" || exit 0; \
418 echo " ( cd '$(DESTDIR)$(frameheaderdir)' && rm -f" $$files ")"; \
419 cd "$(DESTDIR)$(frameheaderdir)" && rm -f $$files
420 install-saslincludeHEADERS: $(saslinclude_HEADERS)
421 @$(NORMAL_INSTALL)
422 test -z "$(saslincludedir)" || $(MKDIR_P) "$(DESTDIR)$(saslincludedir)"
423 @list='$(saslinclude_HEADERS)'; test -n "$(saslincludedir)" || list=; \
424 for p in $$list; do \
425 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
426 echo "$$d$$p"; \
427 done | $(am__base_list) | \
428 while read files; do \
429 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(saslincludedir)'"; \
430 $(INSTALL_HEADER) $$files "$(DESTDIR)$(saslincludedir)" || exit $$?; \
431 done
432
433 uninstall-saslincludeHEADERS:
434 @$(NORMAL_UNINSTALL)
435 @list='$(saslinclude_HEADERS)'; test -n "$(saslincludedir)" || list=; \
436 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
437 test -n "$$files" || exit 0; \
438 echo " ( cd '$(DESTDIR)$(saslincludedir)' && rm -f" $$files ")"; \
439 cd "$(DESTDIR)$(saslincludedir)" && rm -f $$files
440
441 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
442 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
443 unique=`for i in $$list; do \
444 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
445 done | \
446 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
447 END { if (nonempty) { for (i in files) print i; }; }'`; \
448 mkid -fID $$unique
449 tags: TAGS
450
451 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
452 $(TAGS_FILES) $(LISP)
453 set x; \
454 here=`pwd`; \
455 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
456 unique=`for i in $$list; do \
457 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
458 done | \
459 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
460 END { if (nonempty) { for (i in files) print i; }; }'`; \
461 shift; \
462 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
463 test -n "$$unique" || unique=$$empty_fix; \
464 if test $$# -gt 0; then \
465 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
466 "$$@" $$unique; \
467 else \
468 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
469 $$unique; \
470 fi; \
471 fi
472 ctags: CTAGS
473 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
474 $(TAGS_FILES) $(LISP)
475 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
476 unique=`for i in $$list; do \
477 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
478 done | \
479 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
480 END { if (nonempty) { for (i in files) print i; }; }'`; \
481 test -z "$(CTAGS_ARGS)$$unique" \
482 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
483 $$unique
484
485 GTAGS:
486 here=`$(am__cd) $(top_builddir) && pwd` \
487 && $(am__cd) $(top_srcdir) \
488 && gtags -i $(GTAGS_ARGS) "$$here"
489
490 distclean-tags:
491 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
492
493 distdir: $(DISTFILES)
494 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
495 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
496 list='$(DISTFILES)'; \
497 dist_files=`for file in $$list; do echo $$file; done | \
498 sed -e "s|^$$srcdirstrip/||;t" \
499 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
500 case $$dist_files in \
501 */*) $(MKDIR_P) `echo "$$dist_files" | \
502 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
503 sort -u` ;; \
504 esac; \
505 for file in $$dist_files; do \
506 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
507 if test -d $$d/$$file; then \
508 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
509 if test -d "$(distdir)/$$file"; then \
510 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
511 fi; \
512 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
513 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
514 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
515 fi; \
516 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
517 else \
518 test -f "$(distdir)/$$file" \
519 || cp -p $$d/$$file "$(distdir)/$$file" \
520 || exit 1; \
521 fi; \
522 done
523 check-am: all-am
524 check: check-am
525 all-am: Makefile $(PROGRAMS) $(DATA) $(HEADERS)
526 installdirs:
527 for dir in "$(DESTDIR)$(frameheaderdir)" "$(DESTDIR)$(saslincludedir)"; do \
528 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
529 done
530 install: install-am
531 install-exec: install-exec-am
532 install-data: install-data-am
533 uninstall: uninstall-am
534
535 install-am: all-am
536 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
537
538 installcheck: installcheck-am
539 install-strip:
540 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
541 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
542 `test -z '$(STRIP)' || \
543 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
544 mostlyclean-generic:
545
546 clean-generic:
547
548 distclean-generic:
549 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
550 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
551 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
552
553 maintainer-clean-generic:
554 @echo "This command is intended for maintainers to use"
555 @echo "it deletes files that may require special tools to rebuild."
556 clean: clean-am
557
558 clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
559 mostlyclean-am
560
561 distclean: distclean-am
562 -rm -rf ./$(DEPDIR)
563 -rm -f Makefile
564 distclean-am: clean-am distclean-compile distclean-generic \
565 distclean-tags
566
567 dvi: dvi-am
568
569 dvi-am:
570
571 html: html-am
572
573 html-am:
574
575 info: info-am
576
577 info-am:
578
579 install-data-am: install-frameheaderDATA install-saslincludeHEADERS
580
581 install-dvi: install-dvi-am
582
583 install-dvi-am:
584
585 install-exec-am:
586
587 install-html: install-html-am
588
589 install-html-am:
590
591 install-info: install-info-am
592
593 install-info-am:
594
595 install-man:
596
597 install-pdf: install-pdf-am
598
599 install-pdf-am:
600
601 install-ps: install-ps-am
602
603 install-ps-am:
604
605 installcheck-am:
606
607 maintainer-clean: maintainer-clean-am
608 -rm -rf ./$(DEPDIR)
609 -rm -f Makefile
610 maintainer-clean-am: distclean-am maintainer-clean-generic
611
612 mostlyclean: mostlyclean-am
613
614 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
615 mostlyclean-libtool
616
617 pdf: pdf-am
618
619 pdf-am:
620
621 ps: ps-am
622
623 ps-am:
624
625 uninstall-am: uninstall-frameheaderDATA uninstall-saslincludeHEADERS
626
627 .MAKE: install-am install-strip
628
629 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
630 clean-libtool clean-noinstPROGRAMS ctags distclean \
631 distclean-compile distclean-generic distclean-libtool \
632 distclean-tags distdir dvi dvi-am html html-am info info-am \
633 install install-am install-data install-data-am install-dvi \
634 install-dvi-am install-exec install-exec-am \
635 install-frameheaderDATA install-html install-html-am \
636 install-info install-info-am install-man install-pdf \
637 install-pdf-am install-ps install-ps-am \
638 install-saslincludeHEADERS install-strip installcheck \
639 installcheck-am installdirs maintainer-clean \
640 maintainer-clean-generic mostlyclean mostlyclean-compile \
641 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
642 tags uninstall uninstall-am uninstall-frameheaderDATA \
643 uninstall-saslincludeHEADERS
644
645
646 md5global.h: makemd5
647 -rm -f md5global.h
648 ./makemd5 md5global.h
649
650 # Tell versions [3.59,3.63) of GNU make to not export all variables.
651 # Otherwise a system limit (for SysV at least) may be exceeded.
652 .NOEXPORT:
+0
-38
include/md5global.h less more
0 /* GLOBAL.H - RSAREF types and constants
1 */
2 #ifndef MD5GLOBAL_H
3 #define MD5GLOBAL_H
4
5 /* PROTOTYPES should be set to one if and only if the compiler supports
6 function argument prototyping.
7 The following makes PROTOTYPES default to 0 if it has not already
8 been defined with C compiler flags.
9 */
10 #ifndef PROTOTYPES
11 #define PROTOTYPES 0
12 #endif
13
14 /* POINTER defines a generic pointer type */
15 typedef unsigned char *POINTER;
16
17 typedef signed char INT1; /* 8 bits */
18 typedef short INT2; /* 16 bits */
19 typedef int INT4; /* 32 bits */
20 /* There is no 64 bit type */
21 typedef unsigned char UINT1; /* 8 bits */
22 typedef unsigned short UINT2; /* 16 bits */
23 typedef unsigned int UINT4; /* 32 bits */
24 /* There is no 64 bit type */
25
26 /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
27 If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
28 returns an empty list.
29 */
30 #if PROTOTYPES
31 #define PROTO_LIST(list) list
32 #else
33 #define PROTO_LIST(list) ()
34 #endif
35
36 #endif /* MD5GLOBAL_H */
37
119119
120120 #ifndef SASL_H
121121 #define SASL_H 1
122
123 #include <stddef.h> /* For size_t */
122124
123125 /* Keep in sync with win32/common.mak */
124126 #define SASL_VERSION_MAJOR 2
176178 because of some constrains/policy violation */
177179
178180 #define SASL_BADBINDING -32 /* channel binding failure */
181 #define SASL_CONFIGERR -100 /* error when parsing configuration file */
179182
180183 /* max size of a sasl mechanism name */
181184 #define SASL_MECHNAMEMAX 20
221224 /* the following functions are used to adjust how allocation and mutexes work
222225 * they must be called before all other SASL functions:
223226 */
227
228 #include <sys/types.h>
224229
225230 /* memory allocation functions which may optionally be replaced:
226231 */
2727 javasasldir = $(prefix)/lib/java/classes/sasl/CyrusSasl
2828 javahtmldir = $(prefix)/html/sasl
2929
30 INCLUDES=-I$(top_srcdir)/include $(JAVA_INCLUDES)
30 AM_CPPFLAGS=-I$(top_srcdir)/include $(JAVA_INCLUDES)
3131
3232 javasasl_JAVA = Sasl.java GenericClient.java \
3333 ClientFactory.java \
+0
-665
java/CyrusSasl/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 # Makefile.am for the Java SASL library
18 # Rob Earhart
19 #
20 ################################################################
21 # Copyright 1998 by Carnegie Mellon University
22 #
23 # All Rights Reserved
24 #
25 #Permission to use, copy, modify, and distribute this software and its
26 #documentation for any purpose and without fee is hereby granted,
27 #provided that the above copyright notice appear in all copies and that
28 #both that copyright notice and this permission notice appear in
29 #supporting documentation, and that the name of Carnegie Mellon University
30 #not be used in advertising or publicity pertaining to distribution of the
31 #software without specific, written prior permission.
32 #
33 #CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
34 #SOFTWARE, INCLUDING #ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
35 #IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY SPECIAL,
36 #INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
37 #LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
38 #OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 #PERFORMANCE OF THIS SOFTWARE.
40 ################################################################
41
42 VPATH = @srcdir@
43 pkgdatadir = $(datadir)/@PACKAGE@
44 pkgincludedir = $(includedir)/@PACKAGE@
45 pkglibdir = $(libdir)/@PACKAGE@
46 pkglibexecdir = $(libexecdir)/@PACKAGE@
47 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
48 install_sh_DATA = $(install_sh) -c -m 644
49 install_sh_PROGRAM = $(install_sh) -c
50 install_sh_SCRIPT = $(install_sh) -c
51 INSTALL_HEADER = $(INSTALL_DATA)
52 transform = $(program_transform_name)
53 NORMAL_INSTALL = :
54 PRE_INSTALL = :
55 POST_INSTALL = :
56 NORMAL_UNINSTALL = :
57 PRE_UNINSTALL = :
58 POST_UNINSTALL = :
59 build_triplet = @build@
60 host_triplet = @host@
61 target_triplet = @target@
62 subdir = java/CyrusSasl
63 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
64 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
65 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
66 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
67 $(top_srcdir)/config/sasldb.m4 \
68 $(top_srcdir)/cmulocal/berkdb.m4 \
69 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
70 $(top_srcdir)/cmulocal/c-attribute.m4 \
71 $(top_srcdir)/cmulocal/common.m4 \
72 $(top_srcdir)/cmulocal/cyrus.m4 \
73 $(top_srcdir)/cmulocal/init_automake.m4 \
74 $(top_srcdir)/cmulocal/ipv6.m4 \
75 $(top_srcdir)/cmulocal/openldap.m4 \
76 $(top_srcdir)/cmulocal/openssl.m4 \
77 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
78 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
79 $(ACLOCAL_M4)
80 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
81 CONFIG_HEADER = $(top_builddir)/config.h
82 CONFIG_CLEAN_FILES =
83 CONFIG_CLEAN_VPATH_FILES =
84 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
85 am__vpath_adj = case $$p in \
86 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
87 *) f=$$p;; \
88 esac;
89 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
90 am__install_max = 40
91 am__nobase_strip_setup = \
92 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
93 am__nobase_strip = \
94 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
95 am__nobase_list = $(am__nobase_strip_setup); \
96 for p in $$list; do echo "$$p $$p"; done | \
97 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
98 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
99 if (++n[$$2] == $(am__install_max)) \
100 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
101 END { for (dir in files) print dir, files[dir] }'
102 am__base_list = \
103 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
104 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
105 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(javasasldir)"
106 LTLIBRARIES = $(lib_LTLIBRARIES)
107 libjavasasl_la_LIBADD =
108 am_libjavasasl_la_OBJECTS = javasasl.lo
109 libjavasasl_la_OBJECTS = $(am_libjavasasl_la_OBJECTS)
110 libjavasasl_la_LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
111 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
112 $(libjavasasl_la_LDFLAGS) $(LDFLAGS) -o $@
113 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
114 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
115 am__depfiles_maybe = depfiles
116 am__mv = mv -f
117 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
118 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
119 LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
120 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
121 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
122 CCLD = $(CC)
123 LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
124 $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
125 SOURCES = $(libjavasasl_la_SOURCES)
126 DIST_SOURCES = $(libjavasasl_la_SOURCES)
127 CLASSPATH_ENV = CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT):$$CLASSPATH
128 ETAGS = etags
129 CTAGS = ctags
130 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
131 ACLOCAL = @ACLOCAL@
132 AMTAR = @AMTAR@
133 AUTOCONF = @AUTOCONF@
134 AUTOHEADER = @AUTOHEADER@
135 AUTOMAKE = @AUTOMAKE@
136 AWK = @AWK@
137 CC = @CC@
138 CCDEPMODE = @CCDEPMODE@
139 CFLAGS = @CFLAGS@
140 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
141 CPP = @CPP@
142 CPPFLAGS = @CPPFLAGS@
143 CYGPATH_W = @CYGPATH_W@
144 DEFS = @DEFS@
145 DEPDIR = @DEPDIR@
146 DIRS = @DIRS@
147 DMALLOC_LIBS = @DMALLOC_LIBS@
148 ECHO_C = @ECHO_C@
149 ECHO_N = @ECHO_N@
150 ECHO_T = @ECHO_T@
151 EGREP = @EGREP@
152 EXEEXT = @EXEEXT@
153 GETADDRINFOOBJS = @GETADDRINFOOBJS@
154 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
155 GETSUBOPT = @GETSUBOPT@
156 GREP = @GREP@
157 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
158 GSSAPI_LIBS = @GSSAPI_LIBS@
159 INSTALL = @INSTALL@
160 INSTALL_DATA = @INSTALL_DATA@
161 INSTALL_PROGRAM = @INSTALL_PROGRAM@
162 INSTALL_SCRIPT = @INSTALL_SCRIPT@
163 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
164 IPCTYPE = @IPCTYPE@
165 JAVAC = @JAVAC@
166 JAVADOC = @JAVADOC@
167 JAVAH = @JAVAH@
168 JAVAROOT = @JAVAROOT@
169 JAVA_INCLUDES = @JAVA_INCLUDES@
170 LDFLAGS = @LDFLAGS@
171 LIBOBJS = @LIBOBJS@
172 LIBS = @LIBS@
173 LIBTOOL = @LIBTOOL@
174 LIB_CRYPT = @LIB_CRYPT@
175 LIB_DES = @LIB_DES@
176 LIB_DOOR = @LIB_DOOR@
177 LIB_LDAP = @LIB_LDAP@
178 LIB_MYSQL = @LIB_MYSQL@
179 LIB_PGSQL = @LIB_PGSQL@
180 LIB_SOCKET = @LIB_SOCKET@
181 LIB_SQLITE = @LIB_SQLITE@
182 LIB_SQLITE3 = @LIB_SQLITE3@
183 LN_S = @LN_S@
184 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
185 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
186 LTLIBOBJS = @LTLIBOBJS@
187 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
188 MAKEINFO = @MAKEINFO@
189 MKDIR_P = @MKDIR_P@
190 NM = @NM@
191 NTLM_LIBS = @NTLM_LIBS@
192 OBJEXT = @OBJEXT@
193 OTP_LIBS = @OTP_LIBS@
194 PACKAGE = @PACKAGE@
195 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
196 PACKAGE_NAME = @PACKAGE_NAME@
197 PACKAGE_STRING = @PACKAGE_STRING@
198 PACKAGE_TARNAME = @PACKAGE_TARNAME@
199 PACKAGE_VERSION = @PACKAGE_VERSION@
200 PASSDSS_LIBS = @PASSDSS_LIBS@
201 PATH_SEPARATOR = @PATH_SEPARATOR@
202 PLAIN_LIBS = @PLAIN_LIBS@
203 PURECOV = @PURECOV@
204 PURIFY = @PURIFY@
205 PWCHECKMETH = @PWCHECKMETH@
206 RANLIB = @RANLIB@
207 SASL_DB_BACKEND = @SASL_DB_BACKEND@
208 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
209 SASL_DB_INC = @SASL_DB_INC@
210 SASL_DB_LIB = @SASL_DB_LIB@
211 SASL_DB_MANS = @SASL_DB_MANS@
212 SASL_DB_UTILS = @SASL_DB_UTILS@
213 SASL_DL_LIB = @SASL_DL_LIB@
214 SASL_KRB_LIB = @SASL_KRB_LIB@
215 SASL_MECHS = @SASL_MECHS@
216 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
217 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
218 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
219 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
220 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
221 SCRAM_LIBS = @SCRAM_LIBS@
222 SET_MAKE = @SET_MAKE@
223 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
224 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
225 SHELL = @SHELL@
226 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
227 SNPRINTFOBJS = @SNPRINTFOBJS@
228 SRP_LIBS = @SRP_LIBS@
229 STRIP = @STRIP@
230 VERSION = @VERSION@
231 abs_builddir = @abs_builddir@
232 abs_srcdir = @abs_srcdir@
233 abs_top_builddir = @abs_top_builddir@
234 abs_top_srcdir = @abs_top_srcdir@
235 ac_ct_CC = @ac_ct_CC@
236 am__include = @am__include@
237 am__leading_dot = @am__leading_dot@
238 am__quote = @am__quote@
239 am__tar = @am__tar@
240 am__untar = @am__untar@
241 bindir = @bindir@
242 build = @build@
243 build_alias = @build_alias@
244 build_cpu = @build_cpu@
245 build_os = @build_os@
246 build_vendor = @build_vendor@
247 builddir = @builddir@
248 configdir = @configdir@
249 datadir = @datadir@
250 datarootdir = @datarootdir@
251 docdir = @docdir@
252 dvidir = @dvidir@
253 exec_prefix = @exec_prefix@
254 host = @host@
255 host_alias = @host_alias@
256 host_cpu = @host_cpu@
257 host_os = @host_os@
258 host_vendor = @host_vendor@
259 htmldir = @htmldir@
260 includedir = @includedir@
261 infodir = @infodir@
262 install_sh = @install_sh@
263 libdir = @libdir@
264 libexecdir = @libexecdir@
265 localedir = @localedir@
266 localstatedir = @localstatedir@
267 mandir = @mandir@
268 mkdir_p = @mkdir_p@
269 oldincludedir = @oldincludedir@
270 pdfdir = @pdfdir@
271 plugindir = @plugindir@
272 prefix = @prefix@
273 program_transform_name = @program_transform_name@
274 psdir = @psdir@
275 sbindir = @sbindir@
276 sharedstatedir = @sharedstatedir@
277 srcdir = @srcdir@
278 subdirs = @subdirs@
279 sysconfdir = @sysconfdir@
280 target = @target@
281 target_alias = @target_alias@
282 target_cpu = @target_cpu@
283 target_os = @target_os@
284 target_vendor = @target_vendor@
285 top_build_prefix = @top_build_prefix@
286 top_builddir = @top_builddir@
287 top_srcdir = @top_srcdir@
288 javasasl_version = 1:0:0
289 javasasldir = $(prefix)/lib/java/classes/sasl/CyrusSasl
290 javahtmldir = $(prefix)/html/sasl
291 INCLUDES = -I$(top_srcdir)/include $(JAVA_INCLUDES)
292 javasasl_JAVA = Sasl.java GenericClient.java \
293 ClientFactory.java \
294 GenericCommon.java SaslClient.java \
295 SaslClientFactory.java SaslException.java \
296 SaslInputStream.java SaslOutputStream.java\
297 SaslUtils.java ServerFactory.java \
298 SaslServerFactory.java SaslServer.java \
299 GenericServer.java
300
301 EXTRA_DIST = $(javasasl_JAVA)
302 CLASSES = $(javasasl_JAVA:.java=.class)
303 lib_LTLIBRARIES = libjavasasl.la
304 libjavasasl_la_SOURCES = javasasl.h javasasl.c
305 libjavasasl_la_LDFLAGS = -export_dynamic -L../../lib/.libs -lsasl2 -version-info $(javasasl_version) $(wildcard ../lib/*.lo)
306 BUILT_SOURCES = javasasl.h $(CLASSES)
307 all: $(BUILT_SOURCES)
308 $(MAKE) $(AM_MAKEFLAGS) all-am
309
310 .SUFFIXES:
311 .SUFFIXES: .c .lo .o .obj
312 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
313 @for dep in $?; do \
314 case '$(am__configure_deps)' in \
315 *$$dep*) \
316 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
317 && { if test -f $@; then exit 0; else break; fi; }; \
318 exit 1;; \
319 esac; \
320 done; \
321 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu java/CyrusSasl/Makefile'; \
322 $(am__cd) $(top_srcdir) && \
323 $(AUTOMAKE) --gnu java/CyrusSasl/Makefile
324 .PRECIOUS: Makefile
325 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
326 @case '$?' in \
327 *config.status*) \
328 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
329 *) \
330 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
331 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
332 esac;
333
334 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
335 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
336
337 $(top_srcdir)/configure: $(am__configure_deps)
338 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
339 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
340 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
341 $(am__aclocal_m4_deps):
342 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
343 @$(NORMAL_INSTALL)
344 test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
345 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
346 list2=; for p in $$list; do \
347 if test -f $$p; then \
348 list2="$$list2 $$p"; \
349 else :; fi; \
350 done; \
351 test -z "$$list2" || { \
352 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
353 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
354 }
355
356 uninstall-libLTLIBRARIES:
357 @$(NORMAL_UNINSTALL)
358 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
359 for p in $$list; do \
360 $(am__strip_dir) \
361 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
362 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
363 done
364
365 clean-libLTLIBRARIES:
366 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
367 @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
368 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
369 test "$$dir" != "$$p" || dir=.; \
370 echo "rm -f \"$${dir}/so_locations\""; \
371 rm -f "$${dir}/so_locations"; \
372 done
373 libjavasasl.la: $(libjavasasl_la_OBJECTS) $(libjavasasl_la_DEPENDENCIES)
374 $(libjavasasl_la_LINK) -rpath $(libdir) $(libjavasasl_la_OBJECTS) $(libjavasasl_la_LIBADD) $(LIBS)
375
376 mostlyclean-compile:
377 -rm -f *.$(OBJEXT)
378
379 distclean-compile:
380 -rm -f *.tab.c
381
382 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/javasasl.Plo@am__quote@
383
384 .c.o:
385 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
386 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
387 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
388 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
389 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
390
391 .c.obj:
392 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
393 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
394 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
395 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
396 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
397
398 .c.lo:
399 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
400 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
401 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
402 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
403 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
404
405 mostlyclean-libtool:
406 -rm -f *.lo
407
408 clean-libtool:
409 -rm -rf .libs _libs
410
411 classjavasasl.stamp: $(javasasl_JAVA)
412 @list1='$?'; list2=; if test -n "$$list1"; then \
413 for p in $$list1; do \
414 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
415 list2="$$list2 $$d$$p"; \
416 done; \
417 echo '$(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) '"$$list2"; \
418 $(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) $$list2; \
419 else :; fi
420 echo timestamp > classjavasasl.stamp
421 install-javasaslJAVA: classjavasasl.stamp
422 @$(NORMAL_INSTALL)
423 test -z "$(javasasldir)" || $(MKDIR_P) "$(DESTDIR)$(javasasldir)"
424 @test -n "$(javasasl_JAVA)" && test -n "$(javasasldir)" || exit 0; \
425 set x *.class; shift; test "$$1" != "*.class" || exit 0; \
426 echo " $(INSTALL_DATA)" "$$@" "'$(DESTDIR)$(javasasldir)/$$p'"; \
427 $(INSTALL_DATA) "$$@" "$(DESTDIR)$(javasasldir)"
428
429 uninstall-javasaslJAVA:
430 @$(NORMAL_UNINSTALL)
431 @test -n "$(javasasl_JAVA)" && test -n "$(javasasldir)" || exit 0; \
432 set x *.class; shift; test "$$1" != "*.class" || exit 0; \
433 echo " ( cd '$(DESTDIR)$(javasasldir)' && rm -f" "$$@" ")"; \
434 cd "$(DESTDIR)$(javasasldir)" && rm -f "$$@"
435
436 clean-javasaslJAVA:
437 -rm -f *.class classjavasasl.stamp
438
439 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
440 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
441 unique=`for i in $$list; do \
442 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
443 done | \
444 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
445 END { if (nonempty) { for (i in files) print i; }; }'`; \
446 mkid -fID $$unique
447 tags: TAGS
448
449 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
450 $(TAGS_FILES) $(LISP)
451 set x; \
452 here=`pwd`; \
453 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
454 unique=`for i in $$list; do \
455 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
456 done | \
457 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
458 END { if (nonempty) { for (i in files) print i; }; }'`; \
459 shift; \
460 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
461 test -n "$$unique" || unique=$$empty_fix; \
462 if test $$# -gt 0; then \
463 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
464 "$$@" $$unique; \
465 else \
466 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
467 $$unique; \
468 fi; \
469 fi
470 ctags: CTAGS
471 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
472 $(TAGS_FILES) $(LISP)
473 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
474 unique=`for i in $$list; do \
475 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
476 done | \
477 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
478 END { if (nonempty) { for (i in files) print i; }; }'`; \
479 test -z "$(CTAGS_ARGS)$$unique" \
480 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
481 $$unique
482
483 GTAGS:
484 here=`$(am__cd) $(top_builddir) && pwd` \
485 && $(am__cd) $(top_srcdir) \
486 && gtags -i $(GTAGS_ARGS) "$$here"
487
488 distclean-tags:
489 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
490
491 distdir: $(DISTFILES)
492 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
493 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
494 list='$(DISTFILES)'; \
495 dist_files=`for file in $$list; do echo $$file; done | \
496 sed -e "s|^$$srcdirstrip/||;t" \
497 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
498 case $$dist_files in \
499 */*) $(MKDIR_P) `echo "$$dist_files" | \
500 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
501 sort -u` ;; \
502 esac; \
503 for file in $$dist_files; do \
504 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
505 if test -d $$d/$$file; then \
506 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
507 if test -d "$(distdir)/$$file"; then \
508 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
509 fi; \
510 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
511 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
512 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
513 fi; \
514 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
515 else \
516 test -f "$(distdir)/$$file" \
517 || cp -p $$d/$$file "$(distdir)/$$file" \
518 || exit 1; \
519 fi; \
520 done
521 check-am: all-am
522 check: $(BUILT_SOURCES)
523 $(MAKE) $(AM_MAKEFLAGS) check-am
524 all-am: Makefile $(LTLIBRARIES) classjavasasl.stamp
525 installdirs:
526 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(javasasldir)"; do \
527 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
528 done
529 install: $(BUILT_SOURCES)
530 $(MAKE) $(AM_MAKEFLAGS) install-am
531 install-exec: install-exec-am
532 install-data: install-data-am
533 uninstall: uninstall-am
534
535 install-am: all-am
536 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
537
538 installcheck: installcheck-am
539 install-strip:
540 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
541 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
542 `test -z '$(STRIP)' || \
543 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
544 mostlyclean-generic:
545
546 clean-generic:
547
548 distclean-generic:
549 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
550 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
551
552 maintainer-clean-generic:
553 @echo "This command is intended for maintainers to use"
554 @echo "it deletes files that may require special tools to rebuild."
555 -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
556 clean: clean-am
557
558 clean-am: clean-generic clean-javasaslJAVA clean-libLTLIBRARIES \
559 clean-libtool mostlyclean-am
560
561 distclean: distclean-am
562 -rm -rf ./$(DEPDIR)
563 -rm -f Makefile
564 distclean-am: clean-am distclean-compile distclean-generic \
565 distclean-tags
566
567 dvi: dvi-am
568
569 dvi-am:
570
571 html: html-am
572
573 html-am:
574
575 info: info-am
576
577 info-am:
578
579 install-data-am: install-javasaslJAVA
580
581 install-dvi: install-dvi-am
582
583 install-dvi-am:
584
585 install-exec-am: install-libLTLIBRARIES
586
587 install-html: install-html-am
588
589 install-html-am:
590
591 install-info: install-info-am
592
593 install-info-am:
594
595 install-man:
596
597 install-pdf: install-pdf-am
598
599 install-pdf-am:
600
601 install-ps: install-ps-am
602
603 install-ps-am:
604
605 installcheck-am:
606
607 maintainer-clean: maintainer-clean-am
608 -rm -rf ./$(DEPDIR)
609 -rm -f Makefile
610 maintainer-clean-am: distclean-am maintainer-clean-generic
611
612 mostlyclean: mostlyclean-am
613
614 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
615 mostlyclean-libtool
616
617 pdf: pdf-am
618
619 pdf-am:
620
621 ps: ps-am
622
623 ps-am:
624
625 uninstall-am: uninstall-javasaslJAVA uninstall-libLTLIBRARIES
626
627 .MAKE: all check install install-am install-strip
628
629 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
630 clean-javasaslJAVA clean-libLTLIBRARIES clean-libtool ctags \
631 distclean distclean-compile distclean-generic \
632 distclean-libtool distclean-tags distdir dvi dvi-am html \
633 html-am info info-am install install-am install-data \
634 install-data-am install-dvi install-dvi-am install-exec \
635 install-exec-am install-html install-html-am install-info \
636 install-info-am install-javasaslJAVA install-libLTLIBRARIES \
637 install-man install-pdf install-pdf-am install-ps \
638 install-ps-am install-strip installcheck installcheck-am \
639 installdirs maintainer-clean maintainer-clean-generic \
640 mostlyclean mostlyclean-compile mostlyclean-generic \
641 mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
642 uninstall-am uninstall-javasaslJAVA uninstall-libLTLIBRARIES
643
644
645 $(srcdir)/javasasl.c: javasasl.h
646
647 javasasl.h: $(CLASSES)
648 $(CLASSPATH_ENV) $(JAVAH) -o $@ -jni $(patsubst %.class,CyrusSasl.%,$^)
649
650 # force build of class files
651 $(CLASSES): classjavasasl.stamp
652
653 #install-data-local:
654 # xxx broken
655 # $(mkinstalldirs) $(javahtmldir)
656 # $(CLASSPATH_ENV) $(JAVADOC) -d $(javahtmldir) sasl
657 # -if test ! -h $(javahtmldir)/images; \
658 # then \
659 # $(LN_S) $(JAVA_BASE)/docs/api/images $(javahtmldir)/images; \
660 # fi
661
662 # Tell versions [3.59,3.63) of GNU make to not export all variables.
663 # Otherwise a system limit (for SysV at least) may be exceeded.
664 .NOEXPORT:
+0
-324
java/CyrusSasl/javasasl.h less more
0 /* DO NOT EDIT THIS FILE - it is machine generated */
1 #include <jni.h>
2 /* Header for class CyrusSasl_Sasl */
3
4 #ifndef _Included_CyrusSasl_Sasl
5 #define _Included_CyrusSasl_Sasl
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 #ifdef __cplusplus
10 }
11 #endif
12 #endif
13 /* Header for class CyrusSasl_GenericClient */
14
15 #ifndef _Included_CyrusSasl_GenericClient
16 #define _Included_CyrusSasl_GenericClient
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 /*
21 * Class: CyrusSasl_GenericClient
22 * Method: jni_sasl_client_start
23 * Signature: (ILjava/lang/String;)[B
24 */
25 JNIEXPORT jbyteArray JNICALL Java_CyrusSasl_GenericClient_jni_1sasl_1client_1start
26 (JNIEnv *, jobject, jint, jstring);
27
28 /*
29 * Class: CyrusSasl_GenericClient
30 * Method: jni_sasl_client_step
31 * Signature: (I[BI)[B
32 */
33 JNIEXPORT jbyteArray JNICALL Java_CyrusSasl_GenericClient_jni_1sasl_1client_1step
34 (JNIEnv *, jobject, jint, jbyteArray, jint);
35
36 #ifdef __cplusplus
37 }
38 #endif
39 #endif
40 /* Header for class CyrusSasl_ClientFactory */
41
42 #ifndef _Included_CyrusSasl_ClientFactory
43 #define _Included_CyrusSasl_ClientFactory
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 /*
48 * Class: CyrusSasl_ClientFactory
49 * Method: jni_sasl_client_init
50 * Signature: (Ljava/lang/String;)I
51 */
52 JNIEXPORT jint JNICALL Java_CyrusSasl_ClientFactory_jni_1sasl_1client_1init
53 (JNIEnv *, jobject, jstring);
54
55 /*
56 * Class: CyrusSasl_ClientFactory
57 * Method: jni_sasl_client_new
58 * Signature: (Ljava/lang/String;Ljava/lang/String;IZ)I
59 */
60 JNIEXPORT jint JNICALL Java_CyrusSasl_ClientFactory_jni_1sasl_1client_1new
61 (JNIEnv *, jobject, jstring, jstring, jint, jboolean);
62
63 #ifdef __cplusplus
64 }
65 #endif
66 #endif
67 /* Header for class CyrusSasl_GenericCommon */
68
69 #ifndef _Included_CyrusSasl_GenericCommon
70 #define _Included_CyrusSasl_GenericCommon
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74 /*
75 * Class: CyrusSasl_GenericCommon
76 * Method: jni_sasl_set_prop_string
77 * Signature: (IILjava/lang/String;)V
78 */
79 JNIEXPORT void JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1set_1prop_1string
80 (JNIEnv *, jobject, jint, jint, jstring);
81
82 /*
83 * Class: CyrusSasl_GenericCommon
84 * Method: jni_sasl_set_prop_int
85 * Signature: (III)V
86 */
87 JNIEXPORT void JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1set_1prop_1int
88 (JNIEnv *, jobject, jint, jint, jint);
89
90 /*
91 * Class: CyrusSasl_GenericCommon
92 * Method: jni_sasl_set_prop_bytes
93 * Signature: (II[B)V
94 */
95 JNIEXPORT void JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1set_1prop_1bytes
96 (JNIEnv *, jobject, jint, jint, jbyteArray);
97
98 /*
99 * Class: CyrusSasl_GenericCommon
100 * Method: jni_sasl_set_server
101 * Signature: (I[BI)V
102 */
103 JNIEXPORT void JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1set_1server
104 (JNIEnv *, jobject, jint, jbyteArray, jint);
105
106 /*
107 * Class: CyrusSasl_GenericCommon
108 * Method: jni_sasl_set_client
109 * Signature: (I[BI)V
110 */
111 JNIEXPORT void JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1set_1client
112 (JNIEnv *, jobject, jint, jbyteArray, jint);
113
114 /*
115 * Class: CyrusSasl_GenericCommon
116 * Method: jni_sasl_setSecurity
117 * Signature: (III)V
118 */
119 JNIEXPORT void JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1setSecurity
120 (JNIEnv *, jobject, jint, jint, jint);
121
122 /*
123 * Class: CyrusSasl_GenericCommon
124 * Method: jni_sasl_getSecurity
125 * Signature: (I)I
126 */
127 JNIEXPORT jint JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1getSecurity
128 (JNIEnv *, jobject, jint);
129
130 /*
131 * Class: CyrusSasl_GenericCommon
132 * Method: jni_sasl_encode
133 * Signature: (I[BI)[B
134 */
135 JNIEXPORT jbyteArray JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1encode
136 (JNIEnv *, jobject, jint, jbyteArray, jint);
137
138 /*
139 * Class: CyrusSasl_GenericCommon
140 * Method: jni_sasl_decode
141 * Signature: (I[BI)[B
142 */
143 JNIEXPORT jbyteArray JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1decode
144 (JNIEnv *, jobject, jint, jbyteArray, jint);
145
146 /*
147 * Class: CyrusSasl_GenericCommon
148 * Method: jni_sasl_dispose
149 * Signature: (I)V
150 */
151 JNIEXPORT void JNICALL Java_CyrusSasl_GenericCommon_jni_1sasl_1dispose
152 (JNIEnv *, jobject, jint);
153
154 #ifdef __cplusplus
155 }
156 #endif
157 #endif
158 /* Header for class CyrusSasl_SaslClient */
159
160 #ifndef _Included_CyrusSasl_SaslClient
161 #define _Included_CyrusSasl_SaslClient
162 #ifdef __cplusplus
163 extern "C" {
164 #endif
165 #ifdef __cplusplus
166 }
167 #endif
168 #endif
169 /* Header for class CyrusSasl_SaslClientFactory */
170
171 #ifndef _Included_CyrusSasl_SaslClientFactory
172 #define _Included_CyrusSasl_SaslClientFactory
173 #ifdef __cplusplus
174 extern "C" {
175 #endif
176 #ifdef __cplusplus
177 }
178 #endif
179 #endif
180 /* Header for class CyrusSasl_SaslException */
181
182 #ifndef _Included_CyrusSasl_SaslException
183 #define _Included_CyrusSasl_SaslException
184 #ifdef __cplusplus
185 extern "C" {
186 #endif
187 #undef CyrusSasl_SaslException_serialVersionUID
188 #define CyrusSasl_SaslException_serialVersionUID -3042686055658047285LL
189 #undef CyrusSasl_SaslException_serialVersionUID
190 #define CyrusSasl_SaslException_serialVersionUID -3387516993124229948LL
191 #undef CyrusSasl_SaslException_serialVersionUID
192 #define CyrusSasl_SaslException_serialVersionUID 7818375828146090155LL
193 #ifdef __cplusplus
194 }
195 #endif
196 #endif
197 /* Header for class CyrusSasl_SaslInputStream */
198
199 #ifndef _Included_CyrusSasl_SaslInputStream
200 #define _Included_CyrusSasl_SaslInputStream
201 #ifdef __cplusplus
202 extern "C" {
203 #endif
204 #undef CyrusSasl_SaslInputStream_SKIP_BUFFER_SIZE
205 #define CyrusSasl_SaslInputStream_SKIP_BUFFER_SIZE 2048L
206 #undef CyrusSasl_SaslInputStream_DoEncrypt
207 #define CyrusSasl_SaslInputStream_DoEncrypt 1L
208 #undef CyrusSasl_SaslInputStream_DoDebug
209 #define CyrusSasl_SaslInputStream_DoDebug 0L
210 #ifdef __cplusplus
211 }
212 #endif
213 #endif
214 /* Header for class CyrusSasl_SaslOutputStream */
215
216 #ifndef _Included_CyrusSasl_SaslOutputStream
217 #define _Included_CyrusSasl_SaslOutputStream
218 #ifdef __cplusplus
219 extern "C" {
220 #endif
221 #undef CyrusSasl_SaslOutputStream_DoEncrypt
222 #define CyrusSasl_SaslOutputStream_DoEncrypt 1L
223 #undef CyrusSasl_SaslOutputStream_DoDebug
224 #define CyrusSasl_SaslOutputStream_DoDebug 0L
225 #ifdef __cplusplus
226 }
227 #endif
228 #endif
229 /* Header for class CyrusSasl_SaslUtils */
230
231 #ifndef _Included_CyrusSasl_SaslUtils
232 #define _Included_CyrusSasl_SaslUtils
233 #ifdef __cplusplus
234 extern "C" {
235 #endif
236 #ifdef __cplusplus
237 }
238 #endif
239 #endif
240 /* Header for class CyrusSasl_ServerFactory */
241
242 #ifndef _Included_CyrusSasl_ServerFactory
243 #define _Included_CyrusSasl_ServerFactory
244 #ifdef __cplusplus
245 extern "C" {
246 #endif
247 /*
248 * Class: CyrusSasl_ServerFactory
249 * Method: jni_sasl_server_init
250 * Signature: (Ljava/lang/String;)I
251 */
252 JNIEXPORT jint JNICALL Java_CyrusSasl_ServerFactory_jni_1sasl_1server_1init
253 (JNIEnv *, jobject, jstring);
254
255 /*
256 * Class: CyrusSasl_ServerFactory
257 * Method: jni_sasl_server_new
258 * Signature: (Ljava/lang/String;Ljava/lang/String;I)I
259 */
260 JNIEXPORT jint JNICALL Java_CyrusSasl_ServerFactory_jni_1sasl_1server_1new
261 (JNIEnv *, jobject, jstring, jstring, jint);
262
263 /*
264 * Class: CyrusSasl_ServerFactory
265 * Method: jni_sasl_server_getlist
266 * Signature: (ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
267 */
268 JNIEXPORT jstring JNICALL Java_CyrusSasl_ServerFactory_jni_1sasl_1server_1getlist
269 (JNIEnv *, jobject, jint, jstring, jstring, jstring);
270
271 #ifdef __cplusplus
272 }
273 #endif
274 #endif
275 /* Header for class CyrusSasl_SaslServerFactory */
276
277 #ifndef _Included_CyrusSasl_SaslServerFactory
278 #define _Included_CyrusSasl_SaslServerFactory
279 #ifdef __cplusplus
280 extern "C" {
281 #endif
282 #ifdef __cplusplus
283 }
284 #endif
285 #endif
286 /* Header for class CyrusSasl_SaslServer */
287
288 #ifndef _Included_CyrusSasl_SaslServer
289 #define _Included_CyrusSasl_SaslServer
290 #ifdef __cplusplus
291 extern "C" {
292 #endif
293 #ifdef __cplusplus
294 }
295 #endif
296 #endif
297 /* Header for class CyrusSasl_GenericServer */
298
299 #ifndef _Included_CyrusSasl_GenericServer
300 #define _Included_CyrusSasl_GenericServer
301 #ifdef __cplusplus
302 extern "C" {
303 #endif
304 /*
305 * Class: CyrusSasl_GenericServer
306 * Method: jni_sasl_server_start
307 * Signature: (ILjava/lang/String;[BI)[B
308 */
309 JNIEXPORT jbyteArray JNICALL Java_CyrusSasl_GenericServer_jni_1sasl_1server_1start
310 (JNIEnv *, jobject, jint, jstring, jbyteArray, jint);
311
312 /*
313 * Class: CyrusSasl_GenericServer
314 * Method: jni_sasl_server_step
315 * Signature: (I[BI)[B
316 */
317 JNIEXPORT jbyteArray JNICALL Java_CyrusSasl_GenericServer_jni_1sasl_1server_1step
318 (JNIEnv *, jobject, jint, jbyteArray, jint);
319
320 #ifdef __cplusplus
321 }
322 #endif
323 #endif
+0
-635
java/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 # Makefile.am for the Java SASL library
18 # Rob Earhart
19 #
20 ################################################################
21 # Copyright 1998 by Carnegie Mellon University
22 #
23 # All Rights Reserved
24 #
25 #Permission to use, copy, modify, and distribute this software and its
26 #documentation for any purpose and without fee is hereby granted,
27 #provided that the above copyright notice appear in all copies and that
28 #both that copyright notice and this permission notice appear in
29 #supporting documentation, and that the name of Carnegie Mellon University
30 #not be used in advertising or publicity pertaining to distribution of the
31 #software without specific, written prior permission.
32 #
33 #CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
34 #SOFTWARE, INCLUDING #ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
35 #IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY SPECIAL,
36 #INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
37 #LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
38 #OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 #PERFORMANCE OF THIS SOFTWARE.
40 ################################################################
41 VPATH = @srcdir@
42 pkgdatadir = $(datadir)/@PACKAGE@
43 pkgincludedir = $(includedir)/@PACKAGE@
44 pkglibdir = $(libdir)/@PACKAGE@
45 pkglibexecdir = $(libexecdir)/@PACKAGE@
46 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
47 install_sh_DATA = $(install_sh) -c -m 644
48 install_sh_PROGRAM = $(install_sh) -c
49 install_sh_SCRIPT = $(install_sh) -c
50 INSTALL_HEADER = $(INSTALL_DATA)
51 transform = $(program_transform_name)
52 NORMAL_INSTALL = :
53 PRE_INSTALL = :
54 POST_INSTALL = :
55 NORMAL_UNINSTALL = :
56 PRE_UNINSTALL = :
57 POST_UNINSTALL = :
58 build_triplet = @build@
59 host_triplet = @host@
60 target_triplet = @target@
61 subdir = java
62 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
63 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
64 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
65 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
66 $(top_srcdir)/config/sasldb.m4 \
67 $(top_srcdir)/cmulocal/berkdb.m4 \
68 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
69 $(top_srcdir)/cmulocal/c-attribute.m4 \
70 $(top_srcdir)/cmulocal/common.m4 \
71 $(top_srcdir)/cmulocal/cyrus.m4 \
72 $(top_srcdir)/cmulocal/init_automake.m4 \
73 $(top_srcdir)/cmulocal/ipv6.m4 \
74 $(top_srcdir)/cmulocal/openldap.m4 \
75 $(top_srcdir)/cmulocal/openssl.m4 \
76 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
77 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
78 $(ACLOCAL_M4)
79 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
80 CONFIG_HEADER = $(top_builddir)/config.h
81 CONFIG_CLEAN_FILES =
82 CONFIG_CLEAN_VPATH_FILES =
83 SOURCES =
84 DIST_SOURCES =
85 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
86 html-recursive info-recursive install-data-recursive \
87 install-dvi-recursive install-exec-recursive \
88 install-html-recursive install-info-recursive \
89 install-pdf-recursive install-ps-recursive install-recursive \
90 installcheck-recursive installdirs-recursive pdf-recursive \
91 ps-recursive uninstall-recursive
92 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
93 distclean-recursive maintainer-clean-recursive
94 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
95 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
96 distdir
97 ETAGS = etags
98 CTAGS = ctags
99 DIST_SUBDIRS = $(SUBDIRS)
100 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
101 am__relativize = \
102 dir0=`pwd`; \
103 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
104 sed_rest='s,^[^/]*/*,,'; \
105 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
106 sed_butlast='s,/*[^/]*$$,,'; \
107 while test -n "$$dir1"; do \
108 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
109 if test "$$first" != "."; then \
110 if test "$$first" = ".."; then \
111 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
112 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
113 else \
114 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
115 if test "$$first2" = "$$first"; then \
116 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
117 else \
118 dir2="../$$dir2"; \
119 fi; \
120 dir0="$$dir0"/"$$first"; \
121 fi; \
122 fi; \
123 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
124 done; \
125 reldir="$$dir2"
126 ACLOCAL = @ACLOCAL@
127 AMTAR = @AMTAR@
128 AUTOCONF = @AUTOCONF@
129 AUTOHEADER = @AUTOHEADER@
130 AUTOMAKE = @AUTOMAKE@
131 AWK = @AWK@
132 CC = @CC@
133 CCDEPMODE = @CCDEPMODE@
134 CFLAGS = @CFLAGS@
135 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
136 CPP = @CPP@
137 CPPFLAGS = @CPPFLAGS@
138 CYGPATH_W = @CYGPATH_W@
139 DEFS = @DEFS@
140 DEPDIR = @DEPDIR@
141 DIRS = @DIRS@
142 DMALLOC_LIBS = @DMALLOC_LIBS@
143 ECHO_C = @ECHO_C@
144 ECHO_N = @ECHO_N@
145 ECHO_T = @ECHO_T@
146 EGREP = @EGREP@
147 EXEEXT = @EXEEXT@
148 GETADDRINFOOBJS = @GETADDRINFOOBJS@
149 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
150 GETSUBOPT = @GETSUBOPT@
151 GREP = @GREP@
152 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
153 GSSAPI_LIBS = @GSSAPI_LIBS@
154 INSTALL = @INSTALL@
155 INSTALL_DATA = @INSTALL_DATA@
156 INSTALL_PROGRAM = @INSTALL_PROGRAM@
157 INSTALL_SCRIPT = @INSTALL_SCRIPT@
158 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
159 IPCTYPE = @IPCTYPE@
160 JAVAC = @JAVAC@
161 JAVADOC = @JAVADOC@
162 JAVAH = @JAVAH@
163 JAVAROOT = @JAVAROOT@
164 JAVA_INCLUDES = @JAVA_INCLUDES@
165 LDFLAGS = @LDFLAGS@
166 LIBOBJS = @LIBOBJS@
167 LIBS = @LIBS@
168 LIBTOOL = @LIBTOOL@
169 LIB_CRYPT = @LIB_CRYPT@
170 LIB_DES = @LIB_DES@
171 LIB_DOOR = @LIB_DOOR@
172 LIB_LDAP = @LIB_LDAP@
173 LIB_MYSQL = @LIB_MYSQL@
174 LIB_PGSQL = @LIB_PGSQL@
175 LIB_SOCKET = @LIB_SOCKET@
176 LIB_SQLITE = @LIB_SQLITE@
177 LIB_SQLITE3 = @LIB_SQLITE3@
178 LN_S = @LN_S@
179 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
180 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
181 LTLIBOBJS = @LTLIBOBJS@
182 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
183 MAKEINFO = @MAKEINFO@
184 MKDIR_P = @MKDIR_P@
185 NM = @NM@
186 NTLM_LIBS = @NTLM_LIBS@
187 OBJEXT = @OBJEXT@
188 OTP_LIBS = @OTP_LIBS@
189 PACKAGE = @PACKAGE@
190 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
191 PACKAGE_NAME = @PACKAGE_NAME@
192 PACKAGE_STRING = @PACKAGE_STRING@
193 PACKAGE_TARNAME = @PACKAGE_TARNAME@
194 PACKAGE_VERSION = @PACKAGE_VERSION@
195 PASSDSS_LIBS = @PASSDSS_LIBS@
196 PATH_SEPARATOR = @PATH_SEPARATOR@
197 PLAIN_LIBS = @PLAIN_LIBS@
198 PURECOV = @PURECOV@
199 PURIFY = @PURIFY@
200 PWCHECKMETH = @PWCHECKMETH@
201 RANLIB = @RANLIB@
202 SASL_DB_BACKEND = @SASL_DB_BACKEND@
203 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
204 SASL_DB_INC = @SASL_DB_INC@
205 SASL_DB_LIB = @SASL_DB_LIB@
206 SASL_DB_MANS = @SASL_DB_MANS@
207 SASL_DB_UTILS = @SASL_DB_UTILS@
208 SASL_DL_LIB = @SASL_DL_LIB@
209 SASL_KRB_LIB = @SASL_KRB_LIB@
210 SASL_MECHS = @SASL_MECHS@
211 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
212 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
213 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
214 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
215 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
216 SCRAM_LIBS = @SCRAM_LIBS@
217 SET_MAKE = @SET_MAKE@
218 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
219 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
220 SHELL = @SHELL@
221 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
222 SNPRINTFOBJS = @SNPRINTFOBJS@
223 SRP_LIBS = @SRP_LIBS@
224 STRIP = @STRIP@
225 VERSION = @VERSION@
226 abs_builddir = @abs_builddir@
227 abs_srcdir = @abs_srcdir@
228 abs_top_builddir = @abs_top_builddir@
229 abs_top_srcdir = @abs_top_srcdir@
230 ac_ct_CC = @ac_ct_CC@
231 am__include = @am__include@
232 am__leading_dot = @am__leading_dot@
233 am__quote = @am__quote@
234 am__tar = @am__tar@
235 am__untar = @am__untar@
236 bindir = @bindir@
237 build = @build@
238 build_alias = @build_alias@
239 build_cpu = @build_cpu@
240 build_os = @build_os@
241 build_vendor = @build_vendor@
242 builddir = @builddir@
243 configdir = @configdir@
244 datadir = @datadir@
245 datarootdir = @datarootdir@
246 docdir = @docdir@
247 dvidir = @dvidir@
248 exec_prefix = @exec_prefix@
249 host = @host@
250 host_alias = @host_alias@
251 host_cpu = @host_cpu@
252 host_os = @host_os@
253 host_vendor = @host_vendor@
254 htmldir = @htmldir@
255 includedir = @includedir@
256 infodir = @infodir@
257 install_sh = @install_sh@
258 libdir = @libdir@
259 libexecdir = @libexecdir@
260 localedir = @localedir@
261 localstatedir = @localstatedir@
262 mandir = @mandir@
263 mkdir_p = @mkdir_p@
264 oldincludedir = @oldincludedir@
265 pdfdir = @pdfdir@
266 plugindir = @plugindir@
267 prefix = @prefix@
268 program_transform_name = @program_transform_name@
269 psdir = @psdir@
270 sbindir = @sbindir@
271 sharedstatedir = @sharedstatedir@
272 srcdir = @srcdir@
273 subdirs = @subdirs@
274 sysconfdir = @sysconfdir@
275 target = @target@
276 target_alias = @target_alias@
277 target_cpu = @target_cpu@
278 target_os = @target_os@
279 target_vendor = @target_vendor@
280 top_build_prefix = @top_build_prefix@
281 top_builddir = @top_builddir@
282 top_srcdir = @top_srcdir@
283 SUBDIRS = CyrusSasl javax Test
284 EXTRA_DIST = doc
285 all: all-recursive
286
287 .SUFFIXES:
288 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
289 @for dep in $?; do \
290 case '$(am__configure_deps)' in \
291 *$$dep*) \
292 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
293 && { if test -f $@; then exit 0; else break; fi; }; \
294 exit 1;; \
295 esac; \
296 done; \
297 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu java/Makefile'; \
298 $(am__cd) $(top_srcdir) && \
299 $(AUTOMAKE) --gnu java/Makefile
300 .PRECIOUS: Makefile
301 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
302 @case '$?' in \
303 *config.status*) \
304 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
305 *) \
306 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
307 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
308 esac;
309
310 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
311 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
312
313 $(top_srcdir)/configure: $(am__configure_deps)
314 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
315 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
316 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
317 $(am__aclocal_m4_deps):
318
319 mostlyclean-libtool:
320 -rm -f *.lo
321
322 clean-libtool:
323 -rm -rf .libs _libs
324
325 # This directory's subdirectories are mostly independent; you can cd
326 # into them and run `make' without going through this Makefile.
327 # To change the values of `make' variables: instead of editing Makefiles,
328 # (1) if the variable is set in `config.status', edit `config.status'
329 # (which will cause the Makefiles to be regenerated when you run `make');
330 # (2) otherwise, pass the desired values on the `make' command line.
331 $(RECURSIVE_TARGETS):
332 @failcom='exit 1'; \
333 for f in x $$MAKEFLAGS; do \
334 case $$f in \
335 *=* | --[!k]*);; \
336 *k*) failcom='fail=yes';; \
337 esac; \
338 done; \
339 dot_seen=no; \
340 target=`echo $@ | sed s/-recursive//`; \
341 list='$(SUBDIRS)'; for subdir in $$list; do \
342 echo "Making $$target in $$subdir"; \
343 if test "$$subdir" = "."; then \
344 dot_seen=yes; \
345 local_target="$$target-am"; \
346 else \
347 local_target="$$target"; \
348 fi; \
349 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
350 || eval $$failcom; \
351 done; \
352 if test "$$dot_seen" = "no"; then \
353 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
354 fi; test -z "$$fail"
355
356 $(RECURSIVE_CLEAN_TARGETS):
357 @failcom='exit 1'; \
358 for f in x $$MAKEFLAGS; do \
359 case $$f in \
360 *=* | --[!k]*);; \
361 *k*) failcom='fail=yes';; \
362 esac; \
363 done; \
364 dot_seen=no; \
365 case "$@" in \
366 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
367 *) list='$(SUBDIRS)' ;; \
368 esac; \
369 rev=''; for subdir in $$list; do \
370 if test "$$subdir" = "."; then :; else \
371 rev="$$subdir $$rev"; \
372 fi; \
373 done; \
374 rev="$$rev ."; \
375 target=`echo $@ | sed s/-recursive//`; \
376 for subdir in $$rev; do \
377 echo "Making $$target in $$subdir"; \
378 if test "$$subdir" = "."; then \
379 local_target="$$target-am"; \
380 else \
381 local_target="$$target"; \
382 fi; \
383 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
384 || eval $$failcom; \
385 done && test -z "$$fail"
386 tags-recursive:
387 list='$(SUBDIRS)'; for subdir in $$list; do \
388 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
389 done
390 ctags-recursive:
391 list='$(SUBDIRS)'; for subdir in $$list; do \
392 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
393 done
394
395 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
396 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
397 unique=`for i in $$list; do \
398 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
399 done | \
400 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
401 END { if (nonempty) { for (i in files) print i; }; }'`; \
402 mkid -fID $$unique
403 tags: TAGS
404
405 TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
406 $(TAGS_FILES) $(LISP)
407 set x; \
408 here=`pwd`; \
409 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
410 include_option=--etags-include; \
411 empty_fix=.; \
412 else \
413 include_option=--include; \
414 empty_fix=; \
415 fi; \
416 list='$(SUBDIRS)'; for subdir in $$list; do \
417 if test "$$subdir" = .; then :; else \
418 test ! -f $$subdir/TAGS || \
419 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
420 fi; \
421 done; \
422 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
423 unique=`for i in $$list; do \
424 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
425 done | \
426 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
427 END { if (nonempty) { for (i in files) print i; }; }'`; \
428 shift; \
429 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
430 test -n "$$unique" || unique=$$empty_fix; \
431 if test $$# -gt 0; then \
432 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
433 "$$@" $$unique; \
434 else \
435 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
436 $$unique; \
437 fi; \
438 fi
439 ctags: CTAGS
440 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
441 $(TAGS_FILES) $(LISP)
442 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
443 unique=`for i in $$list; do \
444 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
445 done | \
446 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
447 END { if (nonempty) { for (i in files) print i; }; }'`; \
448 test -z "$(CTAGS_ARGS)$$unique" \
449 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
450 $$unique
451
452 GTAGS:
453 here=`$(am__cd) $(top_builddir) && pwd` \
454 && $(am__cd) $(top_srcdir) \
455 && gtags -i $(GTAGS_ARGS) "$$here"
456
457 distclean-tags:
458 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
459
460 distdir: $(DISTFILES)
461 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
462 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
463 list='$(DISTFILES)'; \
464 dist_files=`for file in $$list; do echo $$file; done | \
465 sed -e "s|^$$srcdirstrip/||;t" \
466 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
467 case $$dist_files in \
468 */*) $(MKDIR_P) `echo "$$dist_files" | \
469 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
470 sort -u` ;; \
471 esac; \
472 for file in $$dist_files; do \
473 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
474 if test -d $$d/$$file; then \
475 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
476 if test -d "$(distdir)/$$file"; then \
477 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
478 fi; \
479 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
480 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
481 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
482 fi; \
483 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
484 else \
485 test -f "$(distdir)/$$file" \
486 || cp -p $$d/$$file "$(distdir)/$$file" \
487 || exit 1; \
488 fi; \
489 done
490 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
491 if test "$$subdir" = .; then :; else \
492 test -d "$(distdir)/$$subdir" \
493 || $(MKDIR_P) "$(distdir)/$$subdir" \
494 || exit 1; \
495 fi; \
496 done
497 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
498 if test "$$subdir" = .; then :; else \
499 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
500 $(am__relativize); \
501 new_distdir=$$reldir; \
502 dir1=$$subdir; dir2="$(top_distdir)"; \
503 $(am__relativize); \
504 new_top_distdir=$$reldir; \
505 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
506 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
507 ($(am__cd) $$subdir && \
508 $(MAKE) $(AM_MAKEFLAGS) \
509 top_distdir="$$new_top_distdir" \
510 distdir="$$new_distdir" \
511 am__remove_distdir=: \
512 am__skip_length_check=: \
513 am__skip_mode_fix=: \
514 distdir) \
515 || exit 1; \
516 fi; \
517 done
518 check-am: all-am
519 check: check-recursive
520 all-am: Makefile
521 installdirs: installdirs-recursive
522 installdirs-am:
523 install: install-recursive
524 install-exec: install-exec-recursive
525 install-data: install-data-recursive
526 uninstall: uninstall-recursive
527
528 install-am: all-am
529 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
530
531 installcheck: installcheck-recursive
532 install-strip:
533 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
534 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
535 `test -z '$(STRIP)' || \
536 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
537 mostlyclean-generic:
538
539 clean-generic:
540
541 distclean-generic:
542 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
543 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
544
545 maintainer-clean-generic:
546 @echo "This command is intended for maintainers to use"
547 @echo "it deletes files that may require special tools to rebuild."
548 clean: clean-recursive
549
550 clean-am: clean-generic clean-libtool mostlyclean-am
551
552 distclean: distclean-recursive
553 -rm -f Makefile
554 distclean-am: clean-am distclean-generic distclean-tags
555
556 dvi: dvi-recursive
557
558 dvi-am:
559
560 html: html-recursive
561
562 html-am:
563
564 info: info-recursive
565
566 info-am:
567
568 install-data-am:
569
570 install-dvi: install-dvi-recursive
571
572 install-dvi-am:
573
574 install-exec-am:
575
576 install-html: install-html-recursive
577
578 install-html-am:
579
580 install-info: install-info-recursive
581
582 install-info-am:
583
584 install-man:
585
586 install-pdf: install-pdf-recursive
587
588 install-pdf-am:
589
590 install-ps: install-ps-recursive
591
592 install-ps-am:
593
594 installcheck-am:
595
596 maintainer-clean: maintainer-clean-recursive
597 -rm -f Makefile
598 maintainer-clean-am: distclean-am maintainer-clean-generic
599
600 mostlyclean: mostlyclean-recursive
601
602 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
603
604 pdf: pdf-recursive
605
606 pdf-am:
607
608 ps: ps-recursive
609
610 ps-am:
611
612 uninstall-am:
613
614 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
615 install-am install-strip tags-recursive
616
617 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
618 all all-am check check-am clean clean-generic clean-libtool \
619 ctags ctags-recursive distclean distclean-generic \
620 distclean-libtool distclean-tags distdir dvi dvi-am html \
621 html-am info info-am install install-am install-data \
622 install-data-am install-dvi install-dvi-am install-exec \
623 install-exec-am install-html install-html-am install-info \
624 install-info-am install-man install-pdf install-pdf-am \
625 install-ps install-ps-am install-strip installcheck \
626 installcheck-am installdirs installdirs-am maintainer-clean \
627 maintainer-clean-generic mostlyclean mostlyclean-generic \
628 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
629 uninstall uninstall-am
630
631
632 # Tell versions [3.59,3.63) of GNU make to not export all variables.
633 # Otherwise a system limit (for SysV at least) may be exceeded.
634 .NOEXPORT:
+0
-434
java/Test/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 # Makefile.am for the Java SASL library
18 # Rob Earhart
19 #
20 ################################################################
21 # Copyright 1998 by Carnegie Mellon University
22 #
23 # All Rights Reserved
24 #
25 #Permission to use, copy, modify, and distribute this software and its
26 #documentation for any purpose and without fee is hereby granted,
27 #provided that the above copyright notice appear in all copies and that
28 #both that copyright notice and this permission notice appear in
29 #supporting documentation, and that the name of Carnegie Mellon University
30 #not be used in advertising or publicity pertaining to distribution of the
31 #software without specific, written prior permission.
32 #
33 #CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
34 #SOFTWARE, INCLUDING #ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
35 #IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY SPECIAL,
36 #INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
37 #LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
38 #OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 #PERFORMANCE OF THIS SOFTWARE.
40 ################################################################
41 VPATH = @srcdir@
42 pkgdatadir = $(datadir)/@PACKAGE@
43 pkgincludedir = $(includedir)/@PACKAGE@
44 pkglibdir = $(libdir)/@PACKAGE@
45 pkglibexecdir = $(libexecdir)/@PACKAGE@
46 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
47 install_sh_DATA = $(install_sh) -c -m 644
48 install_sh_PROGRAM = $(install_sh) -c
49 install_sh_SCRIPT = $(install_sh) -c
50 INSTALL_HEADER = $(INSTALL_DATA)
51 transform = $(program_transform_name)
52 NORMAL_INSTALL = :
53 PRE_INSTALL = :
54 POST_INSTALL = :
55 NORMAL_UNINSTALL = :
56 PRE_UNINSTALL = :
57 POST_UNINSTALL = :
58 build_triplet = @build@
59 host_triplet = @host@
60 target_triplet = @target@
61 subdir = java/Test
62 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
63 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
64 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
65 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
66 $(top_srcdir)/config/sasldb.m4 \
67 $(top_srcdir)/cmulocal/berkdb.m4 \
68 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
69 $(top_srcdir)/cmulocal/c-attribute.m4 \
70 $(top_srcdir)/cmulocal/common.m4 \
71 $(top_srcdir)/cmulocal/cyrus.m4 \
72 $(top_srcdir)/cmulocal/init_automake.m4 \
73 $(top_srcdir)/cmulocal/ipv6.m4 \
74 $(top_srcdir)/cmulocal/openldap.m4 \
75 $(top_srcdir)/cmulocal/openssl.m4 \
76 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
77 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
78 $(ACLOCAL_M4)
79 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
80 CONFIG_HEADER = $(top_builddir)/config.h
81 CONFIG_CLEAN_FILES =
82 CONFIG_CLEAN_VPATH_FILES =
83 SOURCES =
84 DIST_SOURCES =
85 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
86 ACLOCAL = @ACLOCAL@
87 AMTAR = @AMTAR@
88 AUTOCONF = @AUTOCONF@
89 AUTOHEADER = @AUTOHEADER@
90 AUTOMAKE = @AUTOMAKE@
91 AWK = @AWK@
92 CC = @CC@
93 CCDEPMODE = @CCDEPMODE@
94 CFLAGS = @CFLAGS@
95 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
96 CPP = @CPP@
97 CPPFLAGS = @CPPFLAGS@
98 CYGPATH_W = @CYGPATH_W@
99 DEFS = @DEFS@
100 DEPDIR = @DEPDIR@
101 DIRS = @DIRS@
102 DMALLOC_LIBS = @DMALLOC_LIBS@
103 ECHO_C = @ECHO_C@
104 ECHO_N = @ECHO_N@
105 ECHO_T = @ECHO_T@
106 EGREP = @EGREP@
107 EXEEXT = @EXEEXT@
108 GETADDRINFOOBJS = @GETADDRINFOOBJS@
109 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
110 GETSUBOPT = @GETSUBOPT@
111 GREP = @GREP@
112 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
113 GSSAPI_LIBS = @GSSAPI_LIBS@
114 INSTALL = @INSTALL@
115 INSTALL_DATA = @INSTALL_DATA@
116 INSTALL_PROGRAM = @INSTALL_PROGRAM@
117 INSTALL_SCRIPT = @INSTALL_SCRIPT@
118 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
119 IPCTYPE = @IPCTYPE@
120 JAVAC = @JAVAC@
121 JAVADOC = @JAVADOC@
122 JAVAH = @JAVAH@
123 JAVAROOT = @JAVAROOT@
124 JAVA_INCLUDES = @JAVA_INCLUDES@
125 LDFLAGS = @LDFLAGS@
126 LIBOBJS = @LIBOBJS@
127 LIBS = @LIBS@
128 LIBTOOL = @LIBTOOL@
129 LIB_CRYPT = @LIB_CRYPT@
130 LIB_DES = @LIB_DES@
131 LIB_DOOR = @LIB_DOOR@
132 LIB_LDAP = @LIB_LDAP@
133 LIB_MYSQL = @LIB_MYSQL@
134 LIB_PGSQL = @LIB_PGSQL@
135 LIB_SOCKET = @LIB_SOCKET@
136 LIB_SQLITE = @LIB_SQLITE@
137 LIB_SQLITE3 = @LIB_SQLITE3@
138 LN_S = @LN_S@
139 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
140 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
141 LTLIBOBJS = @LTLIBOBJS@
142 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
143 MAKEINFO = @MAKEINFO@
144 MKDIR_P = @MKDIR_P@
145 NM = @NM@
146 NTLM_LIBS = @NTLM_LIBS@
147 OBJEXT = @OBJEXT@
148 OTP_LIBS = @OTP_LIBS@
149 PACKAGE = @PACKAGE@
150 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
151 PACKAGE_NAME = @PACKAGE_NAME@
152 PACKAGE_STRING = @PACKAGE_STRING@
153 PACKAGE_TARNAME = @PACKAGE_TARNAME@
154 PACKAGE_VERSION = @PACKAGE_VERSION@
155 PASSDSS_LIBS = @PASSDSS_LIBS@
156 PATH_SEPARATOR = @PATH_SEPARATOR@
157 PLAIN_LIBS = @PLAIN_LIBS@
158 PURECOV = @PURECOV@
159 PURIFY = @PURIFY@
160 PWCHECKMETH = @PWCHECKMETH@
161 RANLIB = @RANLIB@
162 SASL_DB_BACKEND = @SASL_DB_BACKEND@
163 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
164 SASL_DB_INC = @SASL_DB_INC@
165 SASL_DB_LIB = @SASL_DB_LIB@
166 SASL_DB_MANS = @SASL_DB_MANS@
167 SASL_DB_UTILS = @SASL_DB_UTILS@
168 SASL_DL_LIB = @SASL_DL_LIB@
169 SASL_KRB_LIB = @SASL_KRB_LIB@
170 SASL_MECHS = @SASL_MECHS@
171 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
172 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
173 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
174 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
175 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
176 SCRAM_LIBS = @SCRAM_LIBS@
177 SET_MAKE = @SET_MAKE@
178 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
179 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
180 SHELL = @SHELL@
181 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
182 SNPRINTFOBJS = @SNPRINTFOBJS@
183 SRP_LIBS = @SRP_LIBS@
184 STRIP = @STRIP@
185 VERSION = @VERSION@
186 abs_builddir = @abs_builddir@
187 abs_srcdir = @abs_srcdir@
188 abs_top_builddir = @abs_top_builddir@
189 abs_top_srcdir = @abs_top_srcdir@
190 ac_ct_CC = @ac_ct_CC@
191 am__include = @am__include@
192 am__leading_dot = @am__leading_dot@
193 am__quote = @am__quote@
194 am__tar = @am__tar@
195 am__untar = @am__untar@
196 bindir = @bindir@
197 build = @build@
198 build_alias = @build_alias@
199 build_cpu = @build_cpu@
200 build_os = @build_os@
201 build_vendor = @build_vendor@
202 builddir = @builddir@
203 configdir = @configdir@
204 datadir = @datadir@
205 datarootdir = @datarootdir@
206 docdir = @docdir@
207 dvidir = @dvidir@
208 exec_prefix = @exec_prefix@
209 host = @host@
210 host_alias = @host_alias@
211 host_cpu = @host_cpu@
212 host_os = @host_os@
213 host_vendor = @host_vendor@
214 htmldir = @htmldir@
215 includedir = @includedir@
216 infodir = @infodir@
217 install_sh = @install_sh@
218 libdir = @libdir@
219 libexecdir = @libexecdir@
220 localedir = @localedir@
221 localstatedir = @localstatedir@
222 mandir = @mandir@
223 mkdir_p = @mkdir_p@
224 oldincludedir = @oldincludedir@
225 pdfdir = @pdfdir@
226 plugindir = @plugindir@
227 prefix = @prefix@
228 program_transform_name = @program_transform_name@
229 psdir = @psdir@
230 sbindir = @sbindir@
231 sharedstatedir = @sharedstatedir@
232 srcdir = @srcdir@
233 subdirs = @subdirs@
234 sysconfdir = @sysconfdir@
235 target = @target@
236 target_alias = @target_alias@
237 target_cpu = @target_cpu@
238 target_os = @target_os@
239 target_vendor = @target_vendor@
240 top_build_prefix = @top_build_prefix@
241 top_builddir = @top_builddir@
242 top_srcdir = @top_srcdir@
243 EXTRA_DIST = ServerHandler.java Handler.java jimtest.java testserver.java \
244 jimtest-compile.sh jimtest.sh
245
246 all: all-am
247
248 .SUFFIXES:
249 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
250 @for dep in $?; do \
251 case '$(am__configure_deps)' in \
252 *$$dep*) \
253 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
254 && { if test -f $@; then exit 0; else break; fi; }; \
255 exit 1;; \
256 esac; \
257 done; \
258 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu java/Test/Makefile'; \
259 $(am__cd) $(top_srcdir) && \
260 $(AUTOMAKE) --gnu java/Test/Makefile
261 .PRECIOUS: Makefile
262 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
263 @case '$?' in \
264 *config.status*) \
265 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
266 *) \
267 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
268 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
269 esac;
270
271 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
272 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
273
274 $(top_srcdir)/configure: $(am__configure_deps)
275 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
276 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
277 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
278 $(am__aclocal_m4_deps):
279
280 mostlyclean-libtool:
281 -rm -f *.lo
282
283 clean-libtool:
284 -rm -rf .libs _libs
285 tags: TAGS
286 TAGS:
287
288 ctags: CTAGS
289 CTAGS:
290
291
292 distdir: $(DISTFILES)
293 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
294 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
295 list='$(DISTFILES)'; \
296 dist_files=`for file in $$list; do echo $$file; done | \
297 sed -e "s|^$$srcdirstrip/||;t" \
298 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
299 case $$dist_files in \
300 */*) $(MKDIR_P) `echo "$$dist_files" | \
301 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
302 sort -u` ;; \
303 esac; \
304 for file in $$dist_files; do \
305 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
306 if test -d $$d/$$file; then \
307 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
308 if test -d "$(distdir)/$$file"; then \
309 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
310 fi; \
311 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
312 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
313 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
314 fi; \
315 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
316 else \
317 test -f "$(distdir)/$$file" \
318 || cp -p $$d/$$file "$(distdir)/$$file" \
319 || exit 1; \
320 fi; \
321 done
322 check-am: all-am
323 check: check-am
324 all-am: Makefile
325 installdirs:
326 install: install-am
327 install-exec: install-exec-am
328 install-data: install-data-am
329 uninstall: uninstall-am
330
331 install-am: all-am
332 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
333
334 installcheck: installcheck-am
335 install-strip:
336 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
337 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
338 `test -z '$(STRIP)' || \
339 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
340 mostlyclean-generic:
341
342 clean-generic:
343
344 distclean-generic:
345 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
346 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
347
348 maintainer-clean-generic:
349 @echo "This command is intended for maintainers to use"
350 @echo "it deletes files that may require special tools to rebuild."
351 clean: clean-am
352
353 clean-am: clean-generic clean-libtool mostlyclean-am
354
355 distclean: distclean-am
356 -rm -f Makefile
357 distclean-am: clean-am distclean-generic
358
359 dvi: dvi-am
360
361 dvi-am:
362
363 html: html-am
364
365 html-am:
366
367 info: info-am
368
369 info-am:
370
371 install-data-am:
372
373 install-dvi: install-dvi-am
374
375 install-dvi-am:
376
377 install-exec-am:
378
379 install-html: install-html-am
380
381 install-html-am:
382
383 install-info: install-info-am
384
385 install-info-am:
386
387 install-man:
388
389 install-pdf: install-pdf-am
390
391 install-pdf-am:
392
393 install-ps: install-ps-am
394
395 install-ps-am:
396
397 installcheck-am:
398
399 maintainer-clean: maintainer-clean-am
400 -rm -f Makefile
401 maintainer-clean-am: distclean-am maintainer-clean-generic
402
403 mostlyclean: mostlyclean-am
404
405 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
406
407 pdf: pdf-am
408
409 pdf-am:
410
411 ps: ps-am
412
413 ps-am:
414
415 uninstall-am:
416
417 .MAKE: install-am install-strip
418
419 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
420 distclean distclean-generic distclean-libtool distdir dvi \
421 dvi-am html html-am info info-am install install-am \
422 install-data install-data-am install-dvi install-dvi-am \
423 install-exec install-exec-am install-html install-html-am \
424 install-info install-info-am install-man install-pdf \
425 install-pdf-am install-ps install-ps-am install-strip \
426 installcheck installcheck-am installdirs maintainer-clean \
427 maintainer-clean-generic mostlyclean mostlyclean-generic \
428 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
429
430
431 # Tell versions [3.59,3.63) of GNU make to not export all variables.
432 # Otherwise a system limit (for SysV at least) may be exceeded.
433 .NOEXPORT:
0
1 Internet Draft Rob Weltman
2 Netscape Communications Corp.
3 Rosanna Lee
4 draft-weltman-java-sasl-02.txt Sun Microsystems
5 Rob Earhart
6 Carnegie Mellon
7 June 4, 1999
8
9
10 The Java SASL Application Program Interface
11
12
13 Status of this Memo
14
15 This document is an Internet-Draft and is in full conformance with
16 all provisions of Section 10 of RFC2026.
17
18 Internet-Drafts are working documents of the Internet Task Force
19 (IETF), its areas, and its working groups. Note that other groups
20 may also distribute working documents as Internet-Drafts.
21
22 Internet-Drafts are draft documents valid for a maximum of six
23 months and may be updated, replaced, or obsoleted by other documents
24 at any time. It is inappropriate to use Internet Drafts as
25 reference material or to cite them other than as "work in progress."
26
27 The list of current Internet-Drafts can be accessed at
28 http://www.ietf.org/ietf/1id-abstracts.txt
29
30 The list of Internet-Draft Shadow Directories can be accessed at
31 http://www.ietf.org/shadow.html.
32
33
34
35 Abstract
36
37 This document defines a client-side and a server-side Java language
38 interface for using the Simple Authentication and Security Layer
39 (SASL) mechanisms for adding authentication support to connection-
40 based protocols. The interface promotes sharing of SASL mechanism
41 drivers and security layers between applications using different
42 protocols. It complements but does not replace [SASL], which defines
43 and exemplifies use of the SASL protocol in a language-independent
44 way.
45
46
47
48
49
50
51
52
53
54
55
56
57 Expires 12/99 [Page 1]
58
59 JAVA SASL API June 1999
60
61
62 1 Overview of the SASL classes..........................5
63 1.1 Interfaces .......................................5
64 1.2 Classes .......................................5
65 2 Overview of SASL API Use..............................6
66 3 The java SASL classes.................................7
67 3.1 public class Sasl.....................................7
68 3.1.1 createSaslClient.................................7
69 3.1.2 setSaslClientFactory.............................9
70 3.1.3 createSaslServer.................................9
71 3.1.4 setSaslServerFactory............................10
72 3.2 public interface SaslClient..........................11
73 3.2.1 createInitialResponse...........................11
74 3.2.2 evaluateChallenge...............................11
75 3.2.3 isComplete......................................11
76 3.2.4 getSecurityLayer................................11
77 3.2.5 getMechanismName................................12
78 3.3 public interface SaslClientFactory...................12
79 3.3.1 createSaslClient................................12
80 3.3.2 getMechanismNames...............................13
81 3.4 public interface SaslServer..........................13
82 3.4.1 evaluateResponse................................13
83 3.4.2 isComplete......................................14
84 3.4.3 getSecurityLayer................................14
85 3.4.4 getMechanismName................................14
86 3.4.5 getAuthorizationID..............................14
87 3.5 public interface SaslServerFactory...................15
88 3.5.1 createSaslServer................................15
89 3.5.2 getMechanismNames...............................16
90 3.6 public class SaslException...........................16
91 3.6.1 Constructors....................................16
92 3.6.2 getException....................................17
93 3.6.3 printStackTrace.................................17
94 3.7 public interface SecurityLayer.......................17
95 3.7.1 encode......................................17
96 3.7.2 decode......................................18
97 4 Security Considerations..............................19
98 5 Bibliography ......................................19
99 6 Authors' Addresses...................................19
100 7 Acknowledgements.....................................19
101 8 Appendix A - Sample java LDAP program using SASL.....20
102 9 Appendix B - Changes from java-sasl-01.txt...........24
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117 Expires 12/99 [Page 2]
118
119 JAVA SASL API June 1999
120
121 Introduction
122
123
124 See [SASL], section 3, for an introduction to and overview of the
125 SASL framework for authentication and negotiation of a security
126 layer. The following presents an outline of the concepts.
127
128 --------------- ------------------- -----------------
129 | Application |-----| Protocol Driver |------| MD5 |
130 --------------- ------------------- | -----------------
131 |
132 | -----------------
133 |--| Kerberos v5 |
134 | -----------------
135 |
136 | -----------------
137 |--| PKCS-11 |
138 | -----------------
139 |
140 |
141 |
142 | - - - - - - - - -
143 |--| xxxYYYxxx |
144 - - - - - - - - -
145
146 An application chooses a Protocol Driver specific to the protocol it
147 wants to use, and specifies one or more acceptable mechanisms. The
148 Protocol Driver controls the socket, and knows the format/packaging
149 of bytes sent down and received from the socket, but does not know
150 how to authenticate or to encrypt/ decrypt the bytes. It uses one of
151 the Mechanism Drivers to help it perform authentication. The
152 Protocol Driver examines each byte string received from the server
153 during the authentication in a protocol-specific way to determine if
154 the authentication process has been completed. If not, the byte
155 string is passed to the Mechanism Driver to be interpreted as a
156 server challenge; the Mechanism Driver returns an appropriate
157 response, which the Protocol Driver can encode in a protocol-
158 specific way and return to the server.
159
160 If the Protocol Driver concludes from the byte string received from
161 the server that authentication is complete, it may query the
162 Mechanism Driver if it considers the authentication process
163 complete, in order to thwart early completion messages inserted by
164 an intruder.
165
166 On completed authentication, the Protocol Driver may receive from
167 the Mechanism Driver a Security Layer object. From this point on,
168 any data exchanged throught the socket is passed to the Security
169 Layer object for encoding/decoding.
170
171 A complication here is that some authentication methods may require
172 additional user/application input. That means that a Mechanism
173 Driver may need to call up to an application during the
174 authentication process. To satisfy this requirement, the application
175
176
177 Expires 12/99 [Page 3]
178
179 JAVA SASL API June 1999
180
181 can supply a javax.security.auth.callback.CallbackHandler instance
182 [JAAS] that can be used by the Mechanism Driver to prompt the user
183 for additional input.
184
185 Protocol Drivers are protocol-dependent, and may be built in to a
186 protocol package or an application. There is a generalized framework
187 for registering and finding Mechanism Drivers. The framework uses a
188 factory to produce an appropriate Mechanism Driver. The factory may
189 be preconfigured, explicitly specified by the caller, specified as a
190 list of packages by the caller, or be identified based on a list of
191 packages in the System properties.
192
193 The Mechanism Drivers are protocol-independent, and don't deal
194 directly with network connections, just byte arrays, so they can be
195 implemented in a generalizable way for all protocols.
196
197 A Security Layer Driver typically inherits a state object from the
198 Mechanism Driver, where parameters and resolutions reached during
199 authentication have been stored.
200
201 Different Mechanism Drivers may require different parameters to
202 carry out the authentication process. This is handled by passing a
203 java.util.Hashtable object as an argument to instantiation methods.
204
205 In the following discussion, 'client' refers to the client-side
206 protocol driver that is using the SASL mechanism while 'server'
207 refers to the server-side protocol driver that is using the SASL
208 mechanism.
209
210 In the Java SASL environment, the SaslClient interface represents
211 the client's view of the Mechanism Driver, while the SaslServer
212 interface represents the server's view.
213
214 --------------- ---------------
215 | Application |--+ +--| Server |
216 --------------- | | ---------------
217 | |
218 ------------------- -------------------
219 | Protocol Driver |--+ <- - - - -> +--| Protocol Driver |
220 ------------------- | | -------------------
221 | |
222 ------------------- -------------------
223 | SaslClient | | SaslServer |
224 ------------------- -------------------
225 | |
226 ----------------- | | -----------------
227 | MD5 |----| |---| MD5 |
228 ----------------- | | -----------------
229 | |
230 ----------------- | | -----------------
231 | Kerberos v5 |----| |---| Kerberos v5 |
232 ----------------- | | -----------------
233 | |
234 ----------------- | | -----------------
235
236
237 Expires 12/99 [Page 4]
238
239 JAVA SASL API June 1999
240
241 | PKCS-11 |----| |---| PKCS-11 |
242 ----------------- | | -----------------
243 | |
244 - - - - - - - - - | | - - - - - - - - -
245 | xxxYYYxxx |----+ +---| xxxYYYxxx |
246 - - - - - - - - - - - - - - - - - -
247
248 A client using the Java SASL API may communicate with any server
249 implementing the SASL protocol, and a server may use the API to
250 process authentication requests from any client using the SASL
251 protocol. It is not required that both sides use the same language
252 bindings.
253
254 1 Overview of the SASL classes
255
256
257 1.1 Interfaces
258
259
260 SaslClient Performs SASL authentication as a
261 client.
262
263 SaslClientFactory An interface for creating instances of
264 SaslClient. It is not normally accessed
265 directly by a client, which will use the
266 Sasl static methods instead. However, a
267 particular environment may provide and
268 install a new or different
269 SaslClientFactory.
270
271 SaslServer Performs SASL authentication as a
272 server.
273
274 SaslServerFactory An interface for creating instances of
275 SaslServer. It is not normally accessed
276 directly by a server, which will use the
277 Sasl static methods instead. However, a
278 particular environment may provide and
279 install a new or different
280 SaslServerFactory.
281
282 SecurityLayer An interface for encoding and decoding
283 data.
284
285
286 1.2 Classes
287
288
289 Sasl A static class for creating SASL clients
290 and servers. It transparently locates
291 and uses any available
292 SaslClientFactory/SaslServerFactory
293 instances.
294
295
296
297 Expires 12/99 [Page 5]
298
299 JAVA SASL API June 1999
300
301 SaslException Exception thrown on errors and failures
302 in the authentication process.
303
304
305 2 Overview of SASL API Use
306
307 An application generally uses the SASL API as follows:
308
309 - Pass a list of acceptable or known Mechanisms to
310 Sasl.createSaslClient. The method returns an object
311 implementing SaslClient on success.
312
313 - Create an object implementing the client authentication
314 callback interfaces, which can provide credentials when
315 required by the SaslClient.
316
317 - Have the SaslClient object begin the authentication process by
318 providing an initial server response, if the protocol supports
319 an initial response.
320
321 - Responses/challenges are exchanged with the server. If a
322 response indicates authentication has completed, SaslClient is
323 queried for validation, and a SecurityLayer object may be
324 obtained from it. If not, the SaslClient is queried for an
325 appropriate next response to the server. This continues until
326 authentication has completed.
327
328 - For the rest of the session, messages to the server are encoded
329 first by the Security Layer (if one has been provided by
330 SaslClient), and messages from the server are decoded by it
331 before processing in the application.
332
333
334 A server generally uses the SASL API as follows:
335
336 - It receives a request from the client requesting authentication
337 for a particular SASL mechanism, accompanied by an optional
338 an initial response.
339
340 - It processes the initial response and generates a challenge
341 specific for the SASL mechanism to be sent back to the client
342 if the response is processed successfully. If the response is
343 not processed successfully, it sends an error to the client and
344 terminates the authentication session.
345
346 - Responses/challenges are exchanged with the client. If the
347 server cannot successful process a response, the server sends
348 an error to the client and terminates the authentication. If
349 the server has completed the authentication and has no more
350 challenges to send, it sends a success indication to the
351 client.
352
353 - If the authentication has completed successfully, the server
354 extracts the authorization ID of the client from the SaslServer
355
356
357 Expires 12/99 [Page 6]
358
359 JAVA SASL API June 1999
360
361 instance (if appropriate) to be used for subsequent access
362 control checks.
363
364 - For the rest of the session, messages to and from the client
365 are encoded and decoded by the Security Layer, if one has been
366 provided by SaslServer.
367
368 The following sections describe the SASL classes in more detail.
369
370
371 3 The Java SASL classes
372
373
374 3.1 public class Sasl
375
376 A class capable of providing a SaslClient or SaslServer.
377
378
379 3.1.1 createSaslClient
380
381 public static SaslClient
382 createSaslClient(String[] mechanisms,
383 String authorizationID,
384 String protocol,
385 String serverName,
386 Hashtable props,
387 javax.security.auth.callback.CallbackHandler cbh)
388 throws SaslException
389
390 Creates a SaslClient using the parameters supplied. It returns null
391 if no SaslClient can be created using the parameters supplied.
392 Throws SaslException if it cannot create a SaslClient because of an
393 error.
394
395 The algorithm for selection is as follows:
396
397 1.If a factory has been installed via setSaslClientFactory(), try
398 it first. If non-null answer produced, return it.
399 2.Use the packages listed in the javax.security.sasl.client.pkgs
400 property from props to load in a factory and try to create a
401 SaslClient, by looking for a class named ClientFactory. Repeat
402 this for each package on the list until a non-null answer is
403 produced. If non-null answer produced, return it.
404 3.Repeat previous step using the javax.security.sasl.client.pkgs
405 System property.
406 4.If no non-null answer produced, return null.
407
408 Parameters are:
409
410 mechanisms The non-null list of mechanism names to try. Each
411 is the IANA-registered name of a SASL mechanism.
412 (e.g. "GSSAPI", "CRAM-MD5").
413
414
415
416
417 Expires 12/99 [Page 7]
418
419 JAVA SASL API June 1999
420
421 authorizationIDThe possibly null protocol-dependent
422 identification to be used for authorization, e.g.
423 user name or distinguished name. When the SASL
424 authentication completes successfully, the entity
425 named by authorizationId is granted access. If
426 null, access is granted to a protocol-dependent
427 default (for example, in LDAP this is the DN in
428 the bind request).
429
430 protocol The non-null string name of the protocol for
431 which the authentication is being performed, e.g
432 "pop", "ldap".
433
434 serverName The non-null fully qualified host name of the
435 server to authenticate to.
436
437 props The possibly null additional configuration
438 properties for the session, e.g.
439
440 javax.security.sasl.encryption.minimum Minimum key length;
441 default "0" (no
442 session
443 protection). "1"
444 means integrity
445 protection only.
446
447 javax.security.sasl.encryption.maximum Maximum key length;
448 default "256".
449
450 javax.security.sasl.server.authentication "true" if
451 server must
452 authenticate to
453 client; default
454 "false".
455
456 javax.security.sasl.ip.local IP address in
457 dotted decimal
458 format, for
459 kerberos v4; no
460 default.
461
462 javax.security.sasl.ip.remote IP address in
463 dotted decimal
464 format, for
465 kerberos v4; no
466 default.
467
468 javax.security.sasl.maxbuffer Maximum size of
469 security layer
470 frames; default "0"
471 (client will
472 not use the
473 security layer).
474
475
476
477 Expires 12/99 [Page 8]
478
479 JAVA SASL API June 1999
480
481 javax.security.sasl.client.pkgs A space-separated
482 list of package
483 names to use when
484 locating a
485 SaslClientFactory.
486
487 cbh The possibly null callback handler to used by the
488 SASL mechanisms to get further information from
489 the application/library to complete the
490 authentication. For example, a SASL mechanism
491 might require the authentication ID and password
492 from the caller. The authentication ID may be
493 requested with a NameCallback, and the password
494 with a PasswordCallback.
495
496
497 3.1.2 setSaslClientFactory
498
499 public static void
500 setSaslClientFactory(SaslClientFactory fac)
501
502 Sets the default SaslClientFactory to use. This method sets fac to
503 be the default factory. It can only be called with a non-null value
504 once per VM. If a factory has been set already, this method throws
505 IllegalStateException.
506
507 Parameters are:
508
509 fac The possibly null factory to set. If null, it
510 doesn't do anything.
511
512
513
514 3.1.3 createSaslServer
515
516 public static SaslServer
517 createSaslServer(String mechanism,
518 String protocol,
519 String serverName,
520 Hashtable props,
521 javax.security.auth.callback.CallbackHandler cbh)
522 throws SaslException
523
524 This method creates a SaslServer for the specified mechanism. It
525 returns null if no SaslServer can be created for the specified
526 mechanism.
527
528 The algorithm for selection is as follows:
529
530 1.If a factory has been installed via setSaslServerFactory(), try
531 it first. If non-null answer produced, return it.
532 2.Use the packages listed in the javax.security.sasl.server.pkgs
533 property in props, if present, to load in a factory and try to
534 create a SaslServer, by looking for a class named
535
536
537 Expires 12/99 [Page 9]
538
539 JAVA SASL API June 1999
540
541 ServerFactory. Repeat this for each package on the list until a
542 non-null answer is produced. If non-null answer produced,
543 return it.
544 3.Use the packages listed in the javax.security.sasl.server.pkgs
545 System property to load in a factory and try to create a
546 SaslServer. Repeat this for each package on the list until a
547 non-null answer is produced. If non-null answer produced,
548 return it.
549 4.If no non-null answer produced, return null.
550
551 Parameters are:
552
553 mechanism A non-null IANA-registered name of a SASL
554 mechanism (e.g. "GSSAPI", "CRAM-MD5").
555
556 protocol The non-null string name of the protocol for
557 which the authentication is being performed, e.g
558 "pop", "ldap".
559
560 serverName The non-null fully qualified host name of the
561 server to authenticate to.
562
563 props The possibly null properties to be used by the
564 SASL mechanisms to configure the authentication
565 exchange. See Sasl.createSaslClient for examples
566 of properties.
567
568 cbh The possibly null callback handler to used by the
569 SASL mechanisms to get further information from
570 the application/library to complete the
571 authentication. For example, a SASL mechanism
572 might require the authentication ID and password
573 from the caller. The authentication ID may be
574 requested with a NameCallback, and the password
575 with a PasswordCallback.
576
577
578 3.1.4 setSaslServerFactory
579
580 public static void
581 setSaslServerFactory(SaslServerFactory fac)
582
583 Sets the default SaslServerFactory to use. This method sets fac to
584 be the default factory. It can only be called with a non-null value
585 once per VM. If a factory has been set already, this method throws
586 IllegalStateException.
587
588 Parameters are:
589
590 fac The possibly null factory to set. If null, it
591 doesn't do anything.
592
593
594
595
596
597 Expires 12/99 [Page 10]
598
599 JAVA SASL API June 1999
600
601 3.2 public interface SaslClient
602
603 An object implementing this interface can negotiate authentication
604 using one of the IANA-registered mechanisms.
605
606
607 3.2.1 createInitialResponse
608
609 public byte[]
610 createInitialResponse() throws SaslException
611
612 This method prepares a byte array to use for the initial response to
613 start the authentication process. A SaslException is thrown if the
614 driver cannot initiate authentication. The return value may be
615 null, indicating there is no initial response to send to the server.
616
617
618 3.2.2 evaluateChallenge
619
620 public byte[]
621 evaluateChallenge(byte[] challenge)
622 throws SaslException
623
624 If a challenge is received from the server during the authentication
625 process, this method is called to prepare an appropriate next
626 response to submit to the server. The response is null if the
627 challenge accompanied a "SUCCESS" status and the challenge only
628 contains data for the client to update its state and no response
629 needs to be sent to the server. A SaslException is thrown if an
630 error occurred while processing the challenge or generating a
631 response.
632
633 Parameters are:
634
635 challenge The non-null challenge received from the server.
636
637
638 3.2.3 isComplete
639
640 public boolean
641 isComplete()
642
643 This method may be called at any time to determine if the
644 authentication process is finished. Typically, the protocol driver
645 will not do this until it has received something from the server
646 which indicates (in a protocol-specific manner) that the process has
647 completed.
648
649 3.2.4 getSecurityLayer
650
651 public SecurityLayer
652 getSecurityLayer() throws SaslException
653
654
655
656
657 Expires 12/99 [Page 11]
658
659 JAVA SASL API June 1999
660
661 Once authentication is complete, this method may be called to obtain
662 an object capable of encoding/decoding data content for the rest of
663 the session. An exception is thrown if authentication is not yet
664 complete. It may return null if the mechanism does not define a
665 security layer, or if none was negotiated.
666
667
668 3.2.5 getMechanismName
669
670 public String
671 getMechanismName()
672
673 Report the IANA-registered name of the mechanism used by this
674 client, e.g. "GSSAPI" or "CRAM-MD5".
675
676
677
678 3.3 public interface SaslClientFactory
679
680 An object implementing this interface can provide a SaslClient.
681 Implementations must be thread-safe and handle multiple simultaneous
682 requests.
683
684
685 3.3.1 createSaslClient
686
687 public SaslClient
688 createSaslClient(String[] mechanisms,
689 String authorizationID,
690 String protocol,
691 String serverName,
692 Hashtable props,
693 javax.security.auth.callback.CallbackHandler cbh)
694 throws SaslException
695
696 Creates a SaslClient using the parameters supplied. It returns null
697 if no SaslClient can be created using the parameters supplied.
698 Throws SaslException if it cannot create a SaslClient because of an
699 error.
700
701 Returns a possibly null SaslClient created using the parameters
702 supplied. If null, this factory cannot produce a SaslClient using
703 the parameters supplied.
704
705 Parameters are:
706
707 mechanisms The non-null list of mechanism names to try. Each
708 is the IANA-registered name of a SASL mechanism.
709 (e.g. "GSSAPI", "CRAM-MD5").
710
711 authorizationID The possibly null protocol-dependent
712 identification to be used for authorization, e.g.
713 user name or distinguished name. When the SASL
714 authentication completes successfully, the entity
715
716
717 Expires 12/99 [Page 12]
718
719 JAVA SASL API June 1999
720
721 named by authorizationId is granted access. If
722 null, access is granted to a protocol-dependent
723 default (for example, in LDAP this is the DN in
724 the bind request).
725
726 protocol The non-null string name of the protocol for
727 which the authentication is being performed, e.g
728 "pop", "ldap".
729
730 serverName The non-null fully qualified host name of the
731 server to authenticate to.
732
733 props The possibly null properties to be used by the
734 SASL mechanisms to configure the authentication
735 exchange. See Sasl.createSaslClient for examples
736 of properties.
737
738 cbh The possibly null callback handler to used by the
739 SASL mechanisms to get further information from
740 the application/library to complete the
741 authentication. For example, a SASL mechanism
742 might require the authentication ID and password
743 from the caller. The authentication ID may be
744 requested with a NameCallback, and the password
745 with a PasswordCallback.
746
747
748
749 3.3.2 getMechanismNames
750
751 public String[]
752 getMechanismNames()
753
754 Returns a non-null array of names of mechanisms supported by this
755 factory.
756
757
758 3.4 public interface SaslServer
759
760 An object implementing this interface can negotiate authentication
761 using one of the IANA-registered mechanisms.
762
763
764 3.4.1 evaluateResponse
765
766 public byte[]
767 evaluateResponse(byte[] response)
768 throws SaslException
769
770 If a response is received from the client during the authentication
771 process, this method is called to prepare an appropriate next
772 challenge to submit to the client. The challenge is null if the
773 authentication has succeeded and no more challenge data is to be
774 sent to the client. It is non-null if the authentication must be
775
776
777 Expires 12/99 [Page 13]
778
779 JAVA SASL API June 1999
780
781 continued by sending a challenge to the client, or if the
782 authentication has succeeded but challenge data needs to be
783 processed by the client. A SaslException is thrown if an error
784 occurred while processing the response or generating a challenge.
785 isComplete() should be called after each call to evaluateResponse(),
786 to determine if any further response is needed from the client. The
787 protocol driver will send an indication (in a protocol-specific
788 manner) as to whether the authentication has succeeded, failed, or
789 should be continued, and any accompanying challenge data.
790
791 Parameters are:
792
793 response Non-null response received from client.
794
795
796 3.4.2 isComplete
797
798 public boolean
799 isComplete()
800
801 This method may be called at any time to determine if the
802 authentication process is finished. This method is typically called
803 after each invocation of evaluateResponse() to determine whether the
804 authentication has completed successfully or should be continued.
805
806
807 3.4.3 getSecurityLayer
808
809 public SecurityLayer
810 getSecurityLayer() throws SaslException
811
812 Once authentication is complete, this method may be called to obtain
813 an object capable of encoding/decoding data content for the rest of
814 the session. An exception is thrown if authentication is not yet
815 complete. It may return null if the mechanism does not define a
816 security layer, or if none was negotiated.
817
818
819 3.4.4 getMechanismName
820
821 public String
822 getMechanismName()
823
824 Returns the non-null IANA-registered name of the mechanism used by
825 this server, e.g. "GSSAPI" or "CRAM-MD5".
826
827
828 3.4.5 getAuthorizationID
829
830 public String
831 getAuthorizationID()
832
833 Report the authorization ID in effect for the client of this
834 session. If null, a protocol-dependent default is assumed.
835
836
837 Expires 12/99 [Page 14]
838
839 JAVA SASL API June 1999
840
841
842
843
844 3.5 public interface SaslServerFactory
845
846 An object implementing this interface can provide a SaslServer.
847 Implementations must be thread-safe and handle multiple simultaneous
848 requests.
849
850
851 3.5.1 createSaslServer
852
853 public SaslServer
854 createSaslServer(String mechanism,
855 String protocol,
856 String serverName,
857 Hashtable props,
858 javax.security.auth.callback.CallbackHandler cbh)
859 throws SaslException
860
861 Creates a SaslServer using the mechanism supplied. It returns null
862 if no SaslClient can be created using the parameters supplied.
863 Throws SaslException if it cannot create a SaslClient because of an
864 error.
865
866 Returns a possibly null SaslServer which supports the specified
867 mechanism. If null, this factory cannot produce a SaslServer for the
868 specified mechanism.
869
870 Parameters are:
871
872 mechanism The non-null IANA-registered name of a SASL
873 mechanism (e.g. "GSSAPI", "CRAM-MD5").
874
875 protocol The non-null string name of the protocol for
876 which the authentication is being performed, e.g
877 "pop", "ldap".
878
879 serverName The non-null fully qualified host name of the
880 server.
881
882 props The possibly null properties to be used by the
883 SASL mechanisms to configure the authentication
884 exchange. See Sasl.createSaslClient for examples
885 of properties.
886
887 cbh The possibly null callback handler to used by the
888 SASL mechanisms to get further information from
889 the application/library to complete the
890 authentication. For example, a SASL mechanism
891 might require the authentication ID and password
892 from the caller. The authentication ID may be
893 requested with a NameCallback, and the password
894 with a PasswordCallback.
895
896
897 Expires 12/99 [Page 15]
898
899 JAVA SASL API June 1999
900
901
902
903 3.5.2 getMechanismNames
904
905 public String[]
906 getMechanismNames()
907
908 Returns a non-null array of names of mechanisms supported by this
909 factory.
910
911
912 3.6 public class SaslException
913 extends IOException
914
915 Exception thrown on errors and failures in authentication.
916
917
918 3.6.1 Constructors
919
920 public SaslException()
921
922 Constructs a new instance of SaslException. The root exception and
923 the detailed message are null.
924
925
926 public SaslException(String message)
927
928
929 Constructs a default exception with a detailed message and no root
930 exception.
931
932
933 public SaslException(String messag,
934 Throwable ex)
935
936 Constructs a new instance of SaslException with a detailed message
937 and a root exception. For example, a SaslException might result from
938 a problem with the callback handler, which might throw a
939 NoSuchCallbackException if it does not support the requested
940 callback, or throw an IOException if it had problems obtaining data
941 for the callback. The SaslException's root exception would be then
942 be the exception thrown by the callback handler.
943
944
945 Parameters are:
946
947 message Possibly null additional detail about the
948 exception.
949
950 ex A possibly null root exception that caused this
951 exception.
952
953
954
955
956
957 Expires 12/99 [Page 16]
958
959 JAVA SASL API June 1999
960
961 3.6.2 getException
962
963 public Throwable
964 getException()
965
966 Returns the possibly null root exception that caused this exception.
967
968
969 3.6.3 printStackTrace
970
971 public void
972 printStackTrace()
973
974 Prints this exception's stack trace to System.err. If this
975 exception has a root exception, the stack trace of the root
976 exception is printed to System.err instead.
977
978 public void
979 printStackTrace(PrintStream ps)
980
981 Prints this exception's stack trace to a print stream. If this
982 exception has a root exception, the stack trace of the root
983 exception is printed to the print stream instead.
984
985 public void
986 printStackTrace(PrintWriter pw)
987
988 Prints this exception's stack trace to a print writer. If this
989 exception has a root exception, the stack trace of the root
990 exception is printed to the print writer instead.
991
992 Parameters are:
993
994 ps The non-null print stream to which to print.
995
996 pw The non-null print writer to which to print.
997
998
999 3.7 public interface SecurityLayer
1000
1001 An object implementing this interface translates buffers back and
1002 forth during a session, after the authentication process has
1003 completed, to provide a security layer. The security layer may
1004 provide data integrity and/or session privacy.
1005
1006
1007 3.7.1 encode
1008
1009 public byte[]
1010 encode(byte[] inVals, int offset, int count) throws SASLException
1011
1012 Take a protocol-dependent byte array and encode it (encrypt, for
1013 example) for sending to the server.
1014
1015
1016
1017 Expires 12/99 [Page 17]
1018
1019 JAVA SASL API June 1999
1020
1021
1022 Parameters are:
1023
1024 inVals A request to be encoded before sending to the
1025 server.
1026
1027 offset The inclusive starting offset in the byte array
1028 inVals to use. 0 <= offset < inVals.length.
1029
1030 count The number of bytes in inVals to use.
1031 0 <= count < inVals.length-offset.
1032
1033
1034 3.7.2 decode
1035
1036 public byte[]
1037 decode(byte[] outVals, int offset, int count) throws SASLException
1038
1039 Take an encoded byte array received from the server and decode it.
1040
1041 Parameters are:
1042
1043 outVals A response received from the server, to be
1044 decoded.
1045
1046 offset The inclusive starting offset in the byte array
1047 outVals to use. 0 <= offset < outVals.length.
1048
1049 count The number of bytes in outVals to use.
1050 0 <= count < outVals.length-offset.
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077 Expires 12/99 [Page 18]
1078
1079 JAVA SASL API June 1999
1080
1081 4 Security Considerations
1082
1083 When SASL authentication is performed over unsecured connections, it
1084 is possible for an active attacker to spoof the server's protocol-
1085 specific indication that authentication is complete. Clients should
1086 protect against this attack by verifying the completion of
1087 authentication with the mechanism driver by calling the driver's
1088 isComplete() method.
1089
1090 Additional security considerations are discussed in [SASL].
1091
1092
1093 5 Bibliography
1094
1095 [JAAS] Java Software, Sun Microsystems, Inc., "Java Authentication
1096 and Authorization Service," http://java.sun.com/security/jaas,
1097 March 1999.
1098
1099 [SASL] J. Myers, "Simple Authentication and Security Layer (SASL)",
1100 RFC 2222, October 1997
1101
1102
1103 6 Authors' Addresses
1104
1105 Rob Weltman
1106 Netscape Communications Corp.
1107 501 E. Middlefield Rd.
1108 Mail Stop MV-029
1109 Mountain View, CA 94043-4042
1110 USA
1111 Email: rweltman@netscape.com
1112
1113 Rosanna Lee
1114 Sun Microsystems
1115 Mail Stop UCUP02-206
1116 901 San Antonio Road
1117 Palo Alto, CA 94303
1118 USA
1119 Email: rosanna.lee@eng.sun.com
1120
1121 Rob Earhart
1122 Carnegie Mellon
1123 5000 Forbes Ave.
1124 Pittsburgh, PA 15213-3890
1125 USA
1126 Email: earhart@cmu.edu
1127
1128
1129 7 Acknowledgements
1130
1131 Scott Seligman of Sun Microsystems, Inc. contributed to the
1132 architecture and API proposed in this document.
1133
1134
1135
1136
1137 Expires 12/99 [Page 19]
1138
1139 JAVA SASL API June 1999
1140
1141 8 Appendix A - Sample java LDAP program using SASL
1142
1143 /****************************************************************
1144 It might look like this in LDAP. The Protocol Driver is
1145 implemented as part of the authenticate method of
1146 LDAPConnection.
1147 ****************************************************************/
1148
1149 public class LDAPConnection {
1150 public void authenticate( String dn,
1151 String[] mechs,
1152 Hashtable props,
1153 CallbackHandler cbh )
1154 throws SaslException {
1155
1156 // Create SASL client to use for authentication
1157 SaslClient saslClnt = Sasl.createSaslClient(
1158 mechs, dn, "ldap", getHost(), props, cbh);
1159
1160 if (saslClnt == null) {
1161 throw new SaslException("SASL client not available");
1162 }
1163
1164 String mechName = saslClnt.getMechanismName();
1165 byte[] response = saslClnt.createInitialResponse();
1166
1167 // Create a bind request message, including the initial
1168
1169 // response (if any), and send it off
1170
1171 LDAPSASLBindResponse msg =
1172
1173 writeRequest( new LDAPSASLBindRequest( dn, mechName,
1174
1175 response ) );
1176
1177 // Get the server challenge
1178 LDAPSASLBindResponse msg = (LDAPSASLBindResponse)readResponse();
1179 // Authentication done?
1180 while (!saslClnt.isComplete() &&
1181 msg.getStatus() == LDAP_SASL_BIND_IN_PROGRESS) {
1182 // No, get an appropriate next response and send it off
1183 byte[] challenge = msg.getChallenge();
1184 response = saslClnt.evaluateChallenge( challenge );
1185 // May be a success message with no further challenge
1186 if ( response != null ) {
1187 // Wrap the response in another bind request and
1188 // send it off
1189 writeRequest( new LDAPSASLBindRequest( dn,
1190 mechName, response ) );
1191 msg = (LDAPSASLBindResponse)readResponse();
1192 }
1193 }
1194 // Make sure authentication REALLY is complete
1195 if ( !driver.isComplete() ) {
1196 /* Authentication session hijacked! */
1197 throw new SaslException( "SASL session hijacked!" );
1198 }
1199 // Get the negotiated security layer, if any
1200
1201
1202 Expires 12/99 [Page 20]
1203
1204 JAVA SASL API June 1999
1205
1206 security = saslClnt.getSecurityLayer();
1207
1208 }
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262 Expires 12/99 [Page 21]
1263
1264 JAVA SASL API June 1999
1265
1266 /****************************************************************
1267 This might be in an application
1268 ****************************************************************/
1269
1270 /**
1271 * A sample callback handler. This implementation is created by
1272 * using the input that it will return. Other implementations are
1273 * typically more sophisticated and might prompt the user on demand
1274 * in order to satisfy the callbacks.
1275 */
1276 class SimpleCallbackHandler implements CallbackHandler {
1277 private char[] passwd;
1278 private String authenticationID;
1279
1280 SimpleCallbackHandler(String principal, Object cred)
1281 throws IOException {
1282 authenticationID = principal;
1283
1284 if (cred instanceof String) {
1285 passwd = ((String)cred).toCharArray();
1286 } else if (cred instanceof char[]) {
1287 passwd = (char[])((char[])cred).clone();
1288 } else if (cred instanceof byte[]) {
1289 // PasswordCallback expects char[]; assume UTF-8
1290 // encoding
1291 String orig = new String((byte[])cred, "UTF8");
1292 passwd = orig.toCharArray();
1293 } else {
1294 throw new IOException("Unsupported password format: " +
1295 cred);
1296 }
1297 }
1298
1299 public void invokeCallback(Callback[] callbacks)
1300 throws java.io.IOException, UnsupportedCallbackException {
1301 for (int i = 0; i < callbacks.length; i++) {
1302 if (callbacks[i] instanceof NameCallback) {
1303 ((NameCallback)callbacks[i]).setName(
1304 authenticationID);
1305
1306 } else if (callbacks[i] instanceof PasswordCallback) {
1307 ((PasswordCallback)callbacks[i]).setPassword(
1308 passwd);
1309 } else {
1310 throw new
1311 UnsupportedCallbackException(callbacks[i]);
1312 }
1313 }
1314 }
1315 }
1316
1317
1318
1319
1320
1321
1322 Expires 12/99 [Page 22]
1323
1324 JAVA SASL API June 1999
1325
1326 /***************************************************************
1327 And so the application code to do authentication
1328 ***************************************************************/
1329
1330 // Set up all SASL parameters; some may have reasonable defaults
1331 Hashtable props = new Hashtable();
1332 props.add("javax.security.sasl.encryption.minimum", "40");
1333 props.add("javax.security.sasl.encryption.maximum", "128");
1334 props.add("javax.security.sasl.server_authentication", "true");
1335 props.add("javax.security.sasl.maxbuffer", "4096");
1336 // The following two for kerberos v4, only
1337 //props.add("javax.security.sasl.ip.local", "192.68.1.10");
1338 //props.add("javax.security.sasl.ip.remote", "192.68.1.50");
1339
1340 // What we want to authenticate as
1341 String dn = "cn=Directory Manager";
1342
1343 // Create an object for possible use by the authentication
1344 // process
1345 SimpleCallbackHandler cbh = new SimpleCallbackHandler();
1346
1347 try {
1348 // Note: cbh methods may be called during authentication
1349 // Note: "connection" includes the SASL Protocol Driver
1350 // functionality, and it will internally manage a Mechanism
1351 // Driver for GSSAPI, and then a Security Layer object for
1352 // data translation
1353 String[] mechNames = { "GSSAPI" };
1354 connection.authenticate( dn, mechNames, props, cbh );
1355 } catch ( SaslException e ) {
1356 // Abort, return, maybe try some other authentication
1357 }
1358
1359 // Okay. From here on, everything goes through security, but the
1360 // methods have the same signatures as if we were not using SASL
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382 Expires 12/99 [Page 23]
1383
1384 JAVA SASL API June 1999
1385
1386 9 Appendix B - Changes from draft-weltman-java-sasl-01.txt
1387
1388 The class hierarchy defined in this document is entirely different
1389 from that defined in the previous document.
1390
1391 For callback handling, the newly released
1392 javax.security.auth.callback package is used.
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442 Expires 12/99 [Page 24]
1443
+0
-650
java/javax/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 ################################################################
18 # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
19 #
20 # Redistribution and use in source and binary forms, with or without
21 # modification, are permitted provided that the following conditions
22 # are met:
23 #
24 # 1. Redistributions of source code must retain the above copyright
25 # notice, this list of conditions and the following disclaimer.
26 #
27 # 2. Redistributions in binary form must reproduce the above copyright
28 # notice, this list of conditions and the following disclaimer in
29 # the documentation and/or other materials provided with the
30 # distribution.
31 #
32 # 3. The name "Carnegie Mellon University" must not be used to
33 # endorse or promote products derived from this software without
34 # prior written permission. For permission or any other legal
35 # details, please contact
36 # Office of Technology Transfer
37 # Carnegie Mellon University
38 # 5000 Forbes Avenue
39 # Pittsburgh, PA 15213-3890
40 # (412) 268-4387, fax: (412) 268-7395
41 # tech-transfer@andrew.cmu.edu
42 #
43 # 4. Redistributions of any form whatsoever must retain the following
44 # acknowledgment:
45 # "This product includes software developed by Computing Services
46 # at Carnegie Mellon University (http://www.cmu.edu/computing/)."
47 #
48 # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
49 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
50 # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
51 # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
52 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
53 # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
54 # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
55 #
56 ################################################################
57 VPATH = @srcdir@
58 pkgdatadir = $(datadir)/@PACKAGE@
59 pkgincludedir = $(includedir)/@PACKAGE@
60 pkglibdir = $(libdir)/@PACKAGE@
61 pkglibexecdir = $(libexecdir)/@PACKAGE@
62 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
63 install_sh_DATA = $(install_sh) -c -m 644
64 install_sh_PROGRAM = $(install_sh) -c
65 install_sh_SCRIPT = $(install_sh) -c
66 INSTALL_HEADER = $(INSTALL_DATA)
67 transform = $(program_transform_name)
68 NORMAL_INSTALL = :
69 PRE_INSTALL = :
70 POST_INSTALL = :
71 NORMAL_UNINSTALL = :
72 PRE_UNINSTALL = :
73 POST_UNINSTALL = :
74 build_triplet = @build@
75 host_triplet = @host@
76 target_triplet = @target@
77 subdir = java/javax
78 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
79 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
80 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
81 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
82 $(top_srcdir)/config/sasldb.m4 \
83 $(top_srcdir)/cmulocal/berkdb.m4 \
84 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
85 $(top_srcdir)/cmulocal/c-attribute.m4 \
86 $(top_srcdir)/cmulocal/common.m4 \
87 $(top_srcdir)/cmulocal/cyrus.m4 \
88 $(top_srcdir)/cmulocal/init_automake.m4 \
89 $(top_srcdir)/cmulocal/ipv6.m4 \
90 $(top_srcdir)/cmulocal/openldap.m4 \
91 $(top_srcdir)/cmulocal/openssl.m4 \
92 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
93 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
94 $(ACLOCAL_M4)
95 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
96 CONFIG_HEADER = $(top_builddir)/config.h
97 CONFIG_CLEAN_FILES =
98 CONFIG_CLEAN_VPATH_FILES =
99 SOURCES =
100 DIST_SOURCES =
101 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
102 html-recursive info-recursive install-data-recursive \
103 install-dvi-recursive install-exec-recursive \
104 install-html-recursive install-info-recursive \
105 install-pdf-recursive install-ps-recursive install-recursive \
106 installcheck-recursive installdirs-recursive pdf-recursive \
107 ps-recursive uninstall-recursive
108 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
109 distclean-recursive maintainer-clean-recursive
110 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
111 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
112 distdir
113 ETAGS = etags
114 CTAGS = ctags
115 DIST_SUBDIRS = $(SUBDIRS)
116 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
117 am__relativize = \
118 dir0=`pwd`; \
119 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
120 sed_rest='s,^[^/]*/*,,'; \
121 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
122 sed_butlast='s,/*[^/]*$$,,'; \
123 while test -n "$$dir1"; do \
124 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
125 if test "$$first" != "."; then \
126 if test "$$first" = ".."; then \
127 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
128 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
129 else \
130 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
131 if test "$$first2" = "$$first"; then \
132 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
133 else \
134 dir2="../$$dir2"; \
135 fi; \
136 dir0="$$dir0"/"$$first"; \
137 fi; \
138 fi; \
139 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
140 done; \
141 reldir="$$dir2"
142 ACLOCAL = @ACLOCAL@
143 AMTAR = @AMTAR@
144 AUTOCONF = @AUTOCONF@
145 AUTOHEADER = @AUTOHEADER@
146 AUTOMAKE = @AUTOMAKE@
147 AWK = @AWK@
148 CC = @CC@
149 CCDEPMODE = @CCDEPMODE@
150 CFLAGS = @CFLAGS@
151 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
152 CPP = @CPP@
153 CPPFLAGS = @CPPFLAGS@
154 CYGPATH_W = @CYGPATH_W@
155 DEFS = @DEFS@
156 DEPDIR = @DEPDIR@
157 DIRS = @DIRS@
158 DMALLOC_LIBS = @DMALLOC_LIBS@
159 ECHO_C = @ECHO_C@
160 ECHO_N = @ECHO_N@
161 ECHO_T = @ECHO_T@
162 EGREP = @EGREP@
163 EXEEXT = @EXEEXT@
164 GETADDRINFOOBJS = @GETADDRINFOOBJS@
165 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
166 GETSUBOPT = @GETSUBOPT@
167 GREP = @GREP@
168 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
169 GSSAPI_LIBS = @GSSAPI_LIBS@
170 INSTALL = @INSTALL@
171 INSTALL_DATA = @INSTALL_DATA@
172 INSTALL_PROGRAM = @INSTALL_PROGRAM@
173 INSTALL_SCRIPT = @INSTALL_SCRIPT@
174 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
175 IPCTYPE = @IPCTYPE@
176 JAVAC = @JAVAC@
177 JAVADOC = @JAVADOC@
178 JAVAH = @JAVAH@
179 JAVAROOT = @JAVAROOT@
180 JAVA_INCLUDES = @JAVA_INCLUDES@
181 LDFLAGS = @LDFLAGS@
182 LIBOBJS = @LIBOBJS@
183 LIBS = @LIBS@
184 LIBTOOL = @LIBTOOL@
185 LIB_CRYPT = @LIB_CRYPT@
186 LIB_DES = @LIB_DES@
187 LIB_DOOR = @LIB_DOOR@
188 LIB_LDAP = @LIB_LDAP@
189 LIB_MYSQL = @LIB_MYSQL@
190 LIB_PGSQL = @LIB_PGSQL@
191 LIB_SOCKET = @LIB_SOCKET@
192 LIB_SQLITE = @LIB_SQLITE@
193 LIB_SQLITE3 = @LIB_SQLITE3@
194 LN_S = @LN_S@
195 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
196 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
197 LTLIBOBJS = @LTLIBOBJS@
198 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
199 MAKEINFO = @MAKEINFO@
200 MKDIR_P = @MKDIR_P@
201 NM = @NM@
202 NTLM_LIBS = @NTLM_LIBS@
203 OBJEXT = @OBJEXT@
204 OTP_LIBS = @OTP_LIBS@
205 PACKAGE = @PACKAGE@
206 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
207 PACKAGE_NAME = @PACKAGE_NAME@
208 PACKAGE_STRING = @PACKAGE_STRING@
209 PACKAGE_TARNAME = @PACKAGE_TARNAME@
210 PACKAGE_VERSION = @PACKAGE_VERSION@
211 PASSDSS_LIBS = @PASSDSS_LIBS@
212 PATH_SEPARATOR = @PATH_SEPARATOR@
213 PLAIN_LIBS = @PLAIN_LIBS@
214 PURECOV = @PURECOV@
215 PURIFY = @PURIFY@
216 PWCHECKMETH = @PWCHECKMETH@
217 RANLIB = @RANLIB@
218 SASL_DB_BACKEND = @SASL_DB_BACKEND@
219 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
220 SASL_DB_INC = @SASL_DB_INC@
221 SASL_DB_LIB = @SASL_DB_LIB@
222 SASL_DB_MANS = @SASL_DB_MANS@
223 SASL_DB_UTILS = @SASL_DB_UTILS@
224 SASL_DL_LIB = @SASL_DL_LIB@
225 SASL_KRB_LIB = @SASL_KRB_LIB@
226 SASL_MECHS = @SASL_MECHS@
227 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
228 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
229 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
230 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
231 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
232 SCRAM_LIBS = @SCRAM_LIBS@
233 SET_MAKE = @SET_MAKE@
234 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
235 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
236 SHELL = @SHELL@
237 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
238 SNPRINTFOBJS = @SNPRINTFOBJS@
239 SRP_LIBS = @SRP_LIBS@
240 STRIP = @STRIP@
241 VERSION = @VERSION@
242 abs_builddir = @abs_builddir@
243 abs_srcdir = @abs_srcdir@
244 abs_top_builddir = @abs_top_builddir@
245 abs_top_srcdir = @abs_top_srcdir@
246 ac_ct_CC = @ac_ct_CC@
247 am__include = @am__include@
248 am__leading_dot = @am__leading_dot@
249 am__quote = @am__quote@
250 am__tar = @am__tar@
251 am__untar = @am__untar@
252 bindir = @bindir@
253 build = @build@
254 build_alias = @build_alias@
255 build_cpu = @build_cpu@
256 build_os = @build_os@
257 build_vendor = @build_vendor@
258 builddir = @builddir@
259 configdir = @configdir@
260 datadir = @datadir@
261 datarootdir = @datarootdir@
262 docdir = @docdir@
263 dvidir = @dvidir@
264 exec_prefix = @exec_prefix@
265 host = @host@
266 host_alias = @host_alias@
267 host_cpu = @host_cpu@
268 host_os = @host_os@
269 host_vendor = @host_vendor@
270 htmldir = @htmldir@
271 includedir = @includedir@
272 infodir = @infodir@
273 install_sh = @install_sh@
274 libdir = @libdir@
275 libexecdir = @libexecdir@
276 localedir = @localedir@
277 localstatedir = @localstatedir@
278 mandir = @mandir@
279 mkdir_p = @mkdir_p@
280 oldincludedir = @oldincludedir@
281 pdfdir = @pdfdir@
282 plugindir = @plugindir@
283 prefix = @prefix@
284 program_transform_name = @program_transform_name@
285 psdir = @psdir@
286 sbindir = @sbindir@
287 sharedstatedir = @sharedstatedir@
288 srcdir = @srcdir@
289 subdirs = @subdirs@
290 sysconfdir = @sysconfdir@
291 target = @target@
292 target_alias = @target_alias@
293 target_cpu = @target_cpu@
294 target_os = @target_os@
295 target_vendor = @target_vendor@
296 top_build_prefix = @top_build_prefix@
297 top_builddir = @top_builddir@
298 top_srcdir = @top_srcdir@
299 SUBDIRS = security
300 all: all-recursive
301
302 .SUFFIXES:
303 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
304 @for dep in $?; do \
305 case '$(am__configure_deps)' in \
306 *$$dep*) \
307 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
308 && { if test -f $@; then exit 0; else break; fi; }; \
309 exit 1;; \
310 esac; \
311 done; \
312 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu java/javax/Makefile'; \
313 $(am__cd) $(top_srcdir) && \
314 $(AUTOMAKE) --gnu java/javax/Makefile
315 .PRECIOUS: Makefile
316 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
317 @case '$?' in \
318 *config.status*) \
319 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
320 *) \
321 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
322 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
323 esac;
324
325 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
326 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
327
328 $(top_srcdir)/configure: $(am__configure_deps)
329 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
330 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
331 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
332 $(am__aclocal_m4_deps):
333
334 mostlyclean-libtool:
335 -rm -f *.lo
336
337 clean-libtool:
338 -rm -rf .libs _libs
339
340 # This directory's subdirectories are mostly independent; you can cd
341 # into them and run `make' without going through this Makefile.
342 # To change the values of `make' variables: instead of editing Makefiles,
343 # (1) if the variable is set in `config.status', edit `config.status'
344 # (which will cause the Makefiles to be regenerated when you run `make');
345 # (2) otherwise, pass the desired values on the `make' command line.
346 $(RECURSIVE_TARGETS):
347 @failcom='exit 1'; \
348 for f in x $$MAKEFLAGS; do \
349 case $$f in \
350 *=* | --[!k]*);; \
351 *k*) failcom='fail=yes';; \
352 esac; \
353 done; \
354 dot_seen=no; \
355 target=`echo $@ | sed s/-recursive//`; \
356 list='$(SUBDIRS)'; for subdir in $$list; do \
357 echo "Making $$target in $$subdir"; \
358 if test "$$subdir" = "."; then \
359 dot_seen=yes; \
360 local_target="$$target-am"; \
361 else \
362 local_target="$$target"; \
363 fi; \
364 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
365 || eval $$failcom; \
366 done; \
367 if test "$$dot_seen" = "no"; then \
368 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
369 fi; test -z "$$fail"
370
371 $(RECURSIVE_CLEAN_TARGETS):
372 @failcom='exit 1'; \
373 for f in x $$MAKEFLAGS; do \
374 case $$f in \
375 *=* | --[!k]*);; \
376 *k*) failcom='fail=yes';; \
377 esac; \
378 done; \
379 dot_seen=no; \
380 case "$@" in \
381 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
382 *) list='$(SUBDIRS)' ;; \
383 esac; \
384 rev=''; for subdir in $$list; do \
385 if test "$$subdir" = "."; then :; else \
386 rev="$$subdir $$rev"; \
387 fi; \
388 done; \
389 rev="$$rev ."; \
390 target=`echo $@ | sed s/-recursive//`; \
391 for subdir in $$rev; do \
392 echo "Making $$target in $$subdir"; \
393 if test "$$subdir" = "."; then \
394 local_target="$$target-am"; \
395 else \
396 local_target="$$target"; \
397 fi; \
398 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
399 || eval $$failcom; \
400 done && test -z "$$fail"
401 tags-recursive:
402 list='$(SUBDIRS)'; for subdir in $$list; do \
403 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
404 done
405 ctags-recursive:
406 list='$(SUBDIRS)'; for subdir in $$list; do \
407 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
408 done
409
410 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
411 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
412 unique=`for i in $$list; do \
413 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
414 done | \
415 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
416 END { if (nonempty) { for (i in files) print i; }; }'`; \
417 mkid -fID $$unique
418 tags: TAGS
419
420 TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
421 $(TAGS_FILES) $(LISP)
422 set x; \
423 here=`pwd`; \
424 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
425 include_option=--etags-include; \
426 empty_fix=.; \
427 else \
428 include_option=--include; \
429 empty_fix=; \
430 fi; \
431 list='$(SUBDIRS)'; for subdir in $$list; do \
432 if test "$$subdir" = .; then :; else \
433 test ! -f $$subdir/TAGS || \
434 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
435 fi; \
436 done; \
437 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
438 unique=`for i in $$list; do \
439 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
440 done | \
441 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
442 END { if (nonempty) { for (i in files) print i; }; }'`; \
443 shift; \
444 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
445 test -n "$$unique" || unique=$$empty_fix; \
446 if test $$# -gt 0; then \
447 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
448 "$$@" $$unique; \
449 else \
450 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
451 $$unique; \
452 fi; \
453 fi
454 ctags: CTAGS
455 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
456 $(TAGS_FILES) $(LISP)
457 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
458 unique=`for i in $$list; do \
459 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
460 done | \
461 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
462 END { if (nonempty) { for (i in files) print i; }; }'`; \
463 test -z "$(CTAGS_ARGS)$$unique" \
464 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
465 $$unique
466
467 GTAGS:
468 here=`$(am__cd) $(top_builddir) && pwd` \
469 && $(am__cd) $(top_srcdir) \
470 && gtags -i $(GTAGS_ARGS) "$$here"
471
472 distclean-tags:
473 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
474
475 distdir: $(DISTFILES)
476 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
477 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
478 list='$(DISTFILES)'; \
479 dist_files=`for file in $$list; do echo $$file; done | \
480 sed -e "s|^$$srcdirstrip/||;t" \
481 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
482 case $$dist_files in \
483 */*) $(MKDIR_P) `echo "$$dist_files" | \
484 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
485 sort -u` ;; \
486 esac; \
487 for file in $$dist_files; do \
488 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
489 if test -d $$d/$$file; then \
490 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
491 if test -d "$(distdir)/$$file"; then \
492 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
493 fi; \
494 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
495 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
496 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
497 fi; \
498 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
499 else \
500 test -f "$(distdir)/$$file" \
501 || cp -p $$d/$$file "$(distdir)/$$file" \
502 || exit 1; \
503 fi; \
504 done
505 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
506 if test "$$subdir" = .; then :; else \
507 test -d "$(distdir)/$$subdir" \
508 || $(MKDIR_P) "$(distdir)/$$subdir" \
509 || exit 1; \
510 fi; \
511 done
512 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
513 if test "$$subdir" = .; then :; else \
514 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
515 $(am__relativize); \
516 new_distdir=$$reldir; \
517 dir1=$$subdir; dir2="$(top_distdir)"; \
518 $(am__relativize); \
519 new_top_distdir=$$reldir; \
520 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
521 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
522 ($(am__cd) $$subdir && \
523 $(MAKE) $(AM_MAKEFLAGS) \
524 top_distdir="$$new_top_distdir" \
525 distdir="$$new_distdir" \
526 am__remove_distdir=: \
527 am__skip_length_check=: \
528 am__skip_mode_fix=: \
529 distdir) \
530 || exit 1; \
531 fi; \
532 done
533 check-am: all-am
534 check: check-recursive
535 all-am: Makefile
536 installdirs: installdirs-recursive
537 installdirs-am:
538 install: install-recursive
539 install-exec: install-exec-recursive
540 install-data: install-data-recursive
541 uninstall: uninstall-recursive
542
543 install-am: all-am
544 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
545
546 installcheck: installcheck-recursive
547 install-strip:
548 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
549 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
550 `test -z '$(STRIP)' || \
551 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
552 mostlyclean-generic:
553
554 clean-generic:
555
556 distclean-generic:
557 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
558 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
559
560 maintainer-clean-generic:
561 @echo "This command is intended for maintainers to use"
562 @echo "it deletes files that may require special tools to rebuild."
563 clean: clean-recursive
564
565 clean-am: clean-generic clean-libtool mostlyclean-am
566
567 distclean: distclean-recursive
568 -rm -f Makefile
569 distclean-am: clean-am distclean-generic distclean-tags
570
571 dvi: dvi-recursive
572
573 dvi-am:
574
575 html: html-recursive
576
577 html-am:
578
579 info: info-recursive
580
581 info-am:
582
583 install-data-am:
584
585 install-dvi: install-dvi-recursive
586
587 install-dvi-am:
588
589 install-exec-am:
590
591 install-html: install-html-recursive
592
593 install-html-am:
594
595 install-info: install-info-recursive
596
597 install-info-am:
598
599 install-man:
600
601 install-pdf: install-pdf-recursive
602
603 install-pdf-am:
604
605 install-ps: install-ps-recursive
606
607 install-ps-am:
608
609 installcheck-am:
610
611 maintainer-clean: maintainer-clean-recursive
612 -rm -f Makefile
613 maintainer-clean-am: distclean-am maintainer-clean-generic
614
615 mostlyclean: mostlyclean-recursive
616
617 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
618
619 pdf: pdf-recursive
620
621 pdf-am:
622
623 ps: ps-recursive
624
625 ps-am:
626
627 uninstall-am:
628
629 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
630 install-am install-strip tags-recursive
631
632 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
633 all all-am check check-am clean clean-generic clean-libtool \
634 ctags ctags-recursive distclean distclean-generic \
635 distclean-libtool distclean-tags distdir dvi dvi-am html \
636 html-am info info-am install install-am install-data \
637 install-data-am install-dvi install-dvi-am install-exec \
638 install-exec-am install-html install-html-am install-info \
639 install-info-am install-man install-pdf install-pdf-am \
640 install-ps install-ps-am install-strip installcheck \
641 installcheck-am installdirs installdirs-am maintainer-clean \
642 maintainer-clean-generic mostlyclean mostlyclean-generic \
643 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
644 uninstall uninstall-am
645
646
647 # Tell versions [3.59,3.63) of GNU make to not export all variables.
648 # Otherwise a system limit (for SysV at least) may be exceeded.
649 .NOEXPORT:
+0
-650
java/javax/security/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 ################################################################
18 # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
19 #
20 # Redistribution and use in source and binary forms, with or without
21 # modification, are permitted provided that the following conditions
22 # are met:
23 #
24 # 1. Redistributions of source code must retain the above copyright
25 # notice, this list of conditions and the following disclaimer.
26 #
27 # 2. Redistributions in binary form must reproduce the above copyright
28 # notice, this list of conditions and the following disclaimer in
29 # the documentation and/or other materials provided with the
30 # distribution.
31 #
32 # 3. The name "Carnegie Mellon University" must not be used to
33 # endorse or promote products derived from this software without
34 # prior written permission. For permission or any other legal
35 # details, please contact
36 # Office of Technology Transfer
37 # Carnegie Mellon University
38 # 5000 Forbes Avenue
39 # Pittsburgh, PA 15213-3890
40 # (412) 268-4387, fax: (412) 268-7395
41 # tech-transfer@andrew.cmu.edu
42 #
43 # 4. Redistributions of any form whatsoever must retain the following
44 # acknowledgment:
45 # "This product includes software developed by Computing Services
46 # at Carnegie Mellon University (http://www.cmu.edu/computing/)."
47 #
48 # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
49 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
50 # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
51 # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
52 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
53 # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
54 # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
55 #
56 ################################################################
57 VPATH = @srcdir@
58 pkgdatadir = $(datadir)/@PACKAGE@
59 pkgincludedir = $(includedir)/@PACKAGE@
60 pkglibdir = $(libdir)/@PACKAGE@
61 pkglibexecdir = $(libexecdir)/@PACKAGE@
62 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
63 install_sh_DATA = $(install_sh) -c -m 644
64 install_sh_PROGRAM = $(install_sh) -c
65 install_sh_SCRIPT = $(install_sh) -c
66 INSTALL_HEADER = $(INSTALL_DATA)
67 transform = $(program_transform_name)
68 NORMAL_INSTALL = :
69 PRE_INSTALL = :
70 POST_INSTALL = :
71 NORMAL_UNINSTALL = :
72 PRE_UNINSTALL = :
73 POST_UNINSTALL = :
74 build_triplet = @build@
75 host_triplet = @host@
76 target_triplet = @target@
77 subdir = java/javax/security
78 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
79 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
80 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
81 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
82 $(top_srcdir)/config/sasldb.m4 \
83 $(top_srcdir)/cmulocal/berkdb.m4 \
84 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
85 $(top_srcdir)/cmulocal/c-attribute.m4 \
86 $(top_srcdir)/cmulocal/common.m4 \
87 $(top_srcdir)/cmulocal/cyrus.m4 \
88 $(top_srcdir)/cmulocal/init_automake.m4 \
89 $(top_srcdir)/cmulocal/ipv6.m4 \
90 $(top_srcdir)/cmulocal/openldap.m4 \
91 $(top_srcdir)/cmulocal/openssl.m4 \
92 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
93 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
94 $(ACLOCAL_M4)
95 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
96 CONFIG_HEADER = $(top_builddir)/config.h
97 CONFIG_CLEAN_FILES =
98 CONFIG_CLEAN_VPATH_FILES =
99 SOURCES =
100 DIST_SOURCES =
101 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
102 html-recursive info-recursive install-data-recursive \
103 install-dvi-recursive install-exec-recursive \
104 install-html-recursive install-info-recursive \
105 install-pdf-recursive install-ps-recursive install-recursive \
106 installcheck-recursive installdirs-recursive pdf-recursive \
107 ps-recursive uninstall-recursive
108 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
109 distclean-recursive maintainer-clean-recursive
110 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
111 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
112 distdir
113 ETAGS = etags
114 CTAGS = ctags
115 DIST_SUBDIRS = $(SUBDIRS)
116 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
117 am__relativize = \
118 dir0=`pwd`; \
119 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
120 sed_rest='s,^[^/]*/*,,'; \
121 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
122 sed_butlast='s,/*[^/]*$$,,'; \
123 while test -n "$$dir1"; do \
124 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
125 if test "$$first" != "."; then \
126 if test "$$first" = ".."; then \
127 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
128 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
129 else \
130 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
131 if test "$$first2" = "$$first"; then \
132 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
133 else \
134 dir2="../$$dir2"; \
135 fi; \
136 dir0="$$dir0"/"$$first"; \
137 fi; \
138 fi; \
139 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
140 done; \
141 reldir="$$dir2"
142 ACLOCAL = @ACLOCAL@
143 AMTAR = @AMTAR@
144 AUTOCONF = @AUTOCONF@
145 AUTOHEADER = @AUTOHEADER@
146 AUTOMAKE = @AUTOMAKE@
147 AWK = @AWK@
148 CC = @CC@
149 CCDEPMODE = @CCDEPMODE@
150 CFLAGS = @CFLAGS@
151 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
152 CPP = @CPP@
153 CPPFLAGS = @CPPFLAGS@
154 CYGPATH_W = @CYGPATH_W@
155 DEFS = @DEFS@
156 DEPDIR = @DEPDIR@
157 DIRS = @DIRS@
158 DMALLOC_LIBS = @DMALLOC_LIBS@
159 ECHO_C = @ECHO_C@
160 ECHO_N = @ECHO_N@
161 ECHO_T = @ECHO_T@
162 EGREP = @EGREP@
163 EXEEXT = @EXEEXT@
164 GETADDRINFOOBJS = @GETADDRINFOOBJS@
165 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
166 GETSUBOPT = @GETSUBOPT@
167 GREP = @GREP@
168 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
169 GSSAPI_LIBS = @GSSAPI_LIBS@
170 INSTALL = @INSTALL@
171 INSTALL_DATA = @INSTALL_DATA@
172 INSTALL_PROGRAM = @INSTALL_PROGRAM@
173 INSTALL_SCRIPT = @INSTALL_SCRIPT@
174 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
175 IPCTYPE = @IPCTYPE@
176 JAVAC = @JAVAC@
177 JAVADOC = @JAVADOC@
178 JAVAH = @JAVAH@
179 JAVAROOT = @JAVAROOT@
180 JAVA_INCLUDES = @JAVA_INCLUDES@
181 LDFLAGS = @LDFLAGS@
182 LIBOBJS = @LIBOBJS@
183 LIBS = @LIBS@
184 LIBTOOL = @LIBTOOL@
185 LIB_CRYPT = @LIB_CRYPT@
186 LIB_DES = @LIB_DES@
187 LIB_DOOR = @LIB_DOOR@
188 LIB_LDAP = @LIB_LDAP@
189 LIB_MYSQL = @LIB_MYSQL@
190 LIB_PGSQL = @LIB_PGSQL@
191 LIB_SOCKET = @LIB_SOCKET@
192 LIB_SQLITE = @LIB_SQLITE@
193 LIB_SQLITE3 = @LIB_SQLITE3@
194 LN_S = @LN_S@
195 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
196 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
197 LTLIBOBJS = @LTLIBOBJS@
198 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
199 MAKEINFO = @MAKEINFO@
200 MKDIR_P = @MKDIR_P@
201 NM = @NM@
202 NTLM_LIBS = @NTLM_LIBS@
203 OBJEXT = @OBJEXT@
204 OTP_LIBS = @OTP_LIBS@
205 PACKAGE = @PACKAGE@
206 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
207 PACKAGE_NAME = @PACKAGE_NAME@
208 PACKAGE_STRING = @PACKAGE_STRING@
209 PACKAGE_TARNAME = @PACKAGE_TARNAME@
210 PACKAGE_VERSION = @PACKAGE_VERSION@
211 PASSDSS_LIBS = @PASSDSS_LIBS@
212 PATH_SEPARATOR = @PATH_SEPARATOR@
213 PLAIN_LIBS = @PLAIN_LIBS@
214 PURECOV = @PURECOV@
215 PURIFY = @PURIFY@
216 PWCHECKMETH = @PWCHECKMETH@
217 RANLIB = @RANLIB@
218 SASL_DB_BACKEND = @SASL_DB_BACKEND@
219 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
220 SASL_DB_INC = @SASL_DB_INC@
221 SASL_DB_LIB = @SASL_DB_LIB@
222 SASL_DB_MANS = @SASL_DB_MANS@
223 SASL_DB_UTILS = @SASL_DB_UTILS@
224 SASL_DL_LIB = @SASL_DL_LIB@
225 SASL_KRB_LIB = @SASL_KRB_LIB@
226 SASL_MECHS = @SASL_MECHS@
227 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
228 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
229 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
230 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
231 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
232 SCRAM_LIBS = @SCRAM_LIBS@
233 SET_MAKE = @SET_MAKE@
234 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
235 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
236 SHELL = @SHELL@
237 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
238 SNPRINTFOBJS = @SNPRINTFOBJS@
239 SRP_LIBS = @SRP_LIBS@
240 STRIP = @STRIP@
241 VERSION = @VERSION@
242 abs_builddir = @abs_builddir@
243 abs_srcdir = @abs_srcdir@
244 abs_top_builddir = @abs_top_builddir@
245 abs_top_srcdir = @abs_top_srcdir@
246 ac_ct_CC = @ac_ct_CC@
247 am__include = @am__include@
248 am__leading_dot = @am__leading_dot@
249 am__quote = @am__quote@
250 am__tar = @am__tar@
251 am__untar = @am__untar@
252 bindir = @bindir@
253 build = @build@
254 build_alias = @build_alias@
255 build_cpu = @build_cpu@
256 build_os = @build_os@
257 build_vendor = @build_vendor@
258 builddir = @builddir@
259 configdir = @configdir@
260 datadir = @datadir@
261 datarootdir = @datarootdir@
262 docdir = @docdir@
263 dvidir = @dvidir@
264 exec_prefix = @exec_prefix@
265 host = @host@
266 host_alias = @host_alias@
267 host_cpu = @host_cpu@
268 host_os = @host_os@
269 host_vendor = @host_vendor@
270 htmldir = @htmldir@
271 includedir = @includedir@
272 infodir = @infodir@
273 install_sh = @install_sh@
274 libdir = @libdir@
275 libexecdir = @libexecdir@
276 localedir = @localedir@
277 localstatedir = @localstatedir@
278 mandir = @mandir@
279 mkdir_p = @mkdir_p@
280 oldincludedir = @oldincludedir@
281 pdfdir = @pdfdir@
282 plugindir = @plugindir@
283 prefix = @prefix@
284 program_transform_name = @program_transform_name@
285 psdir = @psdir@
286 sbindir = @sbindir@
287 sharedstatedir = @sharedstatedir@
288 srcdir = @srcdir@
289 subdirs = @subdirs@
290 sysconfdir = @sysconfdir@
291 target = @target@
292 target_alias = @target_alias@
293 target_cpu = @target_cpu@
294 target_os = @target_os@
295 target_vendor = @target_vendor@
296 top_build_prefix = @top_build_prefix@
297 top_builddir = @top_builddir@
298 top_srcdir = @top_srcdir@
299 SUBDIRS = auth
300 all: all-recursive
301
302 .SUFFIXES:
303 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
304 @for dep in $?; do \
305 case '$(am__configure_deps)' in \
306 *$$dep*) \
307 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
308 && { if test -f $@; then exit 0; else break; fi; }; \
309 exit 1;; \
310 esac; \
311 done; \
312 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu java/javax/security/Makefile'; \
313 $(am__cd) $(top_srcdir) && \
314 $(AUTOMAKE) --gnu java/javax/security/Makefile
315 .PRECIOUS: Makefile
316 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
317 @case '$?' in \
318 *config.status*) \
319 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
320 *) \
321 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
322 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
323 esac;
324
325 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
326 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
327
328 $(top_srcdir)/configure: $(am__configure_deps)
329 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
330 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
331 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
332 $(am__aclocal_m4_deps):
333
334 mostlyclean-libtool:
335 -rm -f *.lo
336
337 clean-libtool:
338 -rm -rf .libs _libs
339
340 # This directory's subdirectories are mostly independent; you can cd
341 # into them and run `make' without going through this Makefile.
342 # To change the values of `make' variables: instead of editing Makefiles,
343 # (1) if the variable is set in `config.status', edit `config.status'
344 # (which will cause the Makefiles to be regenerated when you run `make');
345 # (2) otherwise, pass the desired values on the `make' command line.
346 $(RECURSIVE_TARGETS):
347 @failcom='exit 1'; \
348 for f in x $$MAKEFLAGS; do \
349 case $$f in \
350 *=* | --[!k]*);; \
351 *k*) failcom='fail=yes';; \
352 esac; \
353 done; \
354 dot_seen=no; \
355 target=`echo $@ | sed s/-recursive//`; \
356 list='$(SUBDIRS)'; for subdir in $$list; do \
357 echo "Making $$target in $$subdir"; \
358 if test "$$subdir" = "."; then \
359 dot_seen=yes; \
360 local_target="$$target-am"; \
361 else \
362 local_target="$$target"; \
363 fi; \
364 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
365 || eval $$failcom; \
366 done; \
367 if test "$$dot_seen" = "no"; then \
368 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
369 fi; test -z "$$fail"
370
371 $(RECURSIVE_CLEAN_TARGETS):
372 @failcom='exit 1'; \
373 for f in x $$MAKEFLAGS; do \
374 case $$f in \
375 *=* | --[!k]*);; \
376 *k*) failcom='fail=yes';; \
377 esac; \
378 done; \
379 dot_seen=no; \
380 case "$@" in \
381 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
382 *) list='$(SUBDIRS)' ;; \
383 esac; \
384 rev=''; for subdir in $$list; do \
385 if test "$$subdir" = "."; then :; else \
386 rev="$$subdir $$rev"; \
387 fi; \
388 done; \
389 rev="$$rev ."; \
390 target=`echo $@ | sed s/-recursive//`; \
391 for subdir in $$rev; do \
392 echo "Making $$target in $$subdir"; \
393 if test "$$subdir" = "."; then \
394 local_target="$$target-am"; \
395 else \
396 local_target="$$target"; \
397 fi; \
398 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
399 || eval $$failcom; \
400 done && test -z "$$fail"
401 tags-recursive:
402 list='$(SUBDIRS)'; for subdir in $$list; do \
403 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
404 done
405 ctags-recursive:
406 list='$(SUBDIRS)'; for subdir in $$list; do \
407 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
408 done
409
410 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
411 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
412 unique=`for i in $$list; do \
413 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
414 done | \
415 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
416 END { if (nonempty) { for (i in files) print i; }; }'`; \
417 mkid -fID $$unique
418 tags: TAGS
419
420 TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
421 $(TAGS_FILES) $(LISP)
422 set x; \
423 here=`pwd`; \
424 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
425 include_option=--etags-include; \
426 empty_fix=.; \
427 else \
428 include_option=--include; \
429 empty_fix=; \
430 fi; \
431 list='$(SUBDIRS)'; for subdir in $$list; do \
432 if test "$$subdir" = .; then :; else \
433 test ! -f $$subdir/TAGS || \
434 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
435 fi; \
436 done; \
437 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
438 unique=`for i in $$list; do \
439 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
440 done | \
441 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
442 END { if (nonempty) { for (i in files) print i; }; }'`; \
443 shift; \
444 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
445 test -n "$$unique" || unique=$$empty_fix; \
446 if test $$# -gt 0; then \
447 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
448 "$$@" $$unique; \
449 else \
450 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
451 $$unique; \
452 fi; \
453 fi
454 ctags: CTAGS
455 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
456 $(TAGS_FILES) $(LISP)
457 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
458 unique=`for i in $$list; do \
459 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
460 done | \
461 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
462 END { if (nonempty) { for (i in files) print i; }; }'`; \
463 test -z "$(CTAGS_ARGS)$$unique" \
464 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
465 $$unique
466
467 GTAGS:
468 here=`$(am__cd) $(top_builddir) && pwd` \
469 && $(am__cd) $(top_srcdir) \
470 && gtags -i $(GTAGS_ARGS) "$$here"
471
472 distclean-tags:
473 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
474
475 distdir: $(DISTFILES)
476 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
477 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
478 list='$(DISTFILES)'; \
479 dist_files=`for file in $$list; do echo $$file; done | \
480 sed -e "s|^$$srcdirstrip/||;t" \
481 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
482 case $$dist_files in \
483 */*) $(MKDIR_P) `echo "$$dist_files" | \
484 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
485 sort -u` ;; \
486 esac; \
487 for file in $$dist_files; do \
488 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
489 if test -d $$d/$$file; then \
490 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
491 if test -d "$(distdir)/$$file"; then \
492 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
493 fi; \
494 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
495 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
496 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
497 fi; \
498 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
499 else \
500 test -f "$(distdir)/$$file" \
501 || cp -p $$d/$$file "$(distdir)/$$file" \
502 || exit 1; \
503 fi; \
504 done
505 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
506 if test "$$subdir" = .; then :; else \
507 test -d "$(distdir)/$$subdir" \
508 || $(MKDIR_P) "$(distdir)/$$subdir" \
509 || exit 1; \
510 fi; \
511 done
512 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
513 if test "$$subdir" = .; then :; else \
514 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
515 $(am__relativize); \
516 new_distdir=$$reldir; \
517 dir1=$$subdir; dir2="$(top_distdir)"; \
518 $(am__relativize); \
519 new_top_distdir=$$reldir; \
520 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
521 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
522 ($(am__cd) $$subdir && \
523 $(MAKE) $(AM_MAKEFLAGS) \
524 top_distdir="$$new_top_distdir" \
525 distdir="$$new_distdir" \
526 am__remove_distdir=: \
527 am__skip_length_check=: \
528 am__skip_mode_fix=: \
529 distdir) \
530 || exit 1; \
531 fi; \
532 done
533 check-am: all-am
534 check: check-recursive
535 all-am: Makefile
536 installdirs: installdirs-recursive
537 installdirs-am:
538 install: install-recursive
539 install-exec: install-exec-recursive
540 install-data: install-data-recursive
541 uninstall: uninstall-recursive
542
543 install-am: all-am
544 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
545
546 installcheck: installcheck-recursive
547 install-strip:
548 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
549 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
550 `test -z '$(STRIP)' || \
551 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
552 mostlyclean-generic:
553
554 clean-generic:
555
556 distclean-generic:
557 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
558 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
559
560 maintainer-clean-generic:
561 @echo "This command is intended for maintainers to use"
562 @echo "it deletes files that may require special tools to rebuild."
563 clean: clean-recursive
564
565 clean-am: clean-generic clean-libtool mostlyclean-am
566
567 distclean: distclean-recursive
568 -rm -f Makefile
569 distclean-am: clean-am distclean-generic distclean-tags
570
571 dvi: dvi-recursive
572
573 dvi-am:
574
575 html: html-recursive
576
577 html-am:
578
579 info: info-recursive
580
581 info-am:
582
583 install-data-am:
584
585 install-dvi: install-dvi-recursive
586
587 install-dvi-am:
588
589 install-exec-am:
590
591 install-html: install-html-recursive
592
593 install-html-am:
594
595 install-info: install-info-recursive
596
597 install-info-am:
598
599 install-man:
600
601 install-pdf: install-pdf-recursive
602
603 install-pdf-am:
604
605 install-ps: install-ps-recursive
606
607 install-ps-am:
608
609 installcheck-am:
610
611 maintainer-clean: maintainer-clean-recursive
612 -rm -f Makefile
613 maintainer-clean-am: distclean-am maintainer-clean-generic
614
615 mostlyclean: mostlyclean-recursive
616
617 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
618
619 pdf: pdf-recursive
620
621 pdf-am:
622
623 ps: ps-recursive
624
625 ps-am:
626
627 uninstall-am:
628
629 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
630 install-am install-strip tags-recursive
631
632 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
633 all all-am check check-am clean clean-generic clean-libtool \
634 ctags ctags-recursive distclean distclean-generic \
635 distclean-libtool distclean-tags distdir dvi dvi-am html \
636 html-am info info-am install install-am install-data \
637 install-data-am install-dvi install-dvi-am install-exec \
638 install-exec-am install-html install-html-am install-info \
639 install-info-am install-man install-pdf install-pdf-am \
640 install-ps install-ps-am install-strip installcheck \
641 installcheck-am installdirs installdirs-am maintainer-clean \
642 maintainer-clean-generic mostlyclean mostlyclean-generic \
643 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
644 uninstall uninstall-am
645
646
647 # Tell versions [3.59,3.63) of GNU make to not export all variables.
648 # Otherwise a system limit (for SysV at least) may be exceeded.
649 .NOEXPORT:
+0
-650
java/javax/security/auth/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 ################################################################
18 # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
19 #
20 # Redistribution and use in source and binary forms, with or without
21 # modification, are permitted provided that the following conditions
22 # are met:
23 #
24 # 1. Redistributions of source code must retain the above copyright
25 # notice, this list of conditions and the following disclaimer.
26 #
27 # 2. Redistributions in binary form must reproduce the above copyright
28 # notice, this list of conditions and the following disclaimer in
29 # the documentation and/or other materials provided with the
30 # distribution.
31 #
32 # 3. The name "Carnegie Mellon University" must not be used to
33 # endorse or promote products derived from this software without
34 # prior written permission. For permission or any other legal
35 # details, please contact
36 # Office of Technology Transfer
37 # Carnegie Mellon University
38 # 5000 Forbes Avenue
39 # Pittsburgh, PA 15213-3890
40 # (412) 268-4387, fax: (412) 268-7395
41 # tech-transfer@andrew.cmu.edu
42 #
43 # 4. Redistributions of any form whatsoever must retain the following
44 # acknowledgment:
45 # "This product includes software developed by Computing Services
46 # at Carnegie Mellon University (http://www.cmu.edu/computing/)."
47 #
48 # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
49 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
50 # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
51 # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
52 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
53 # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
54 # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
55 #
56 ################################################################
57 VPATH = @srcdir@
58 pkgdatadir = $(datadir)/@PACKAGE@
59 pkgincludedir = $(includedir)/@PACKAGE@
60 pkglibdir = $(libdir)/@PACKAGE@
61 pkglibexecdir = $(libexecdir)/@PACKAGE@
62 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
63 install_sh_DATA = $(install_sh) -c -m 644
64 install_sh_PROGRAM = $(install_sh) -c
65 install_sh_SCRIPT = $(install_sh) -c
66 INSTALL_HEADER = $(INSTALL_DATA)
67 transform = $(program_transform_name)
68 NORMAL_INSTALL = :
69 PRE_INSTALL = :
70 POST_INSTALL = :
71 NORMAL_UNINSTALL = :
72 PRE_UNINSTALL = :
73 POST_UNINSTALL = :
74 build_triplet = @build@
75 host_triplet = @host@
76 target_triplet = @target@
77 subdir = java/javax/security/auth
78 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
79 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
80 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
81 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
82 $(top_srcdir)/config/sasldb.m4 \
83 $(top_srcdir)/cmulocal/berkdb.m4 \
84 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
85 $(top_srcdir)/cmulocal/c-attribute.m4 \
86 $(top_srcdir)/cmulocal/common.m4 \
87 $(top_srcdir)/cmulocal/cyrus.m4 \
88 $(top_srcdir)/cmulocal/init_automake.m4 \
89 $(top_srcdir)/cmulocal/ipv6.m4 \
90 $(top_srcdir)/cmulocal/openldap.m4 \
91 $(top_srcdir)/cmulocal/openssl.m4 \
92 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
93 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
94 $(ACLOCAL_M4)
95 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
96 CONFIG_HEADER = $(top_builddir)/config.h
97 CONFIG_CLEAN_FILES =
98 CONFIG_CLEAN_VPATH_FILES =
99 SOURCES =
100 DIST_SOURCES =
101 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
102 html-recursive info-recursive install-data-recursive \
103 install-dvi-recursive install-exec-recursive \
104 install-html-recursive install-info-recursive \
105 install-pdf-recursive install-ps-recursive install-recursive \
106 installcheck-recursive installdirs-recursive pdf-recursive \
107 ps-recursive uninstall-recursive
108 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
109 distclean-recursive maintainer-clean-recursive
110 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
111 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
112 distdir
113 ETAGS = etags
114 CTAGS = ctags
115 DIST_SUBDIRS = $(SUBDIRS)
116 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
117 am__relativize = \
118 dir0=`pwd`; \
119 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
120 sed_rest='s,^[^/]*/*,,'; \
121 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
122 sed_butlast='s,/*[^/]*$$,,'; \
123 while test -n "$$dir1"; do \
124 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
125 if test "$$first" != "."; then \
126 if test "$$first" = ".."; then \
127 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
128 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
129 else \
130 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
131 if test "$$first2" = "$$first"; then \
132 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
133 else \
134 dir2="../$$dir2"; \
135 fi; \
136 dir0="$$dir0"/"$$first"; \
137 fi; \
138 fi; \
139 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
140 done; \
141 reldir="$$dir2"
142 ACLOCAL = @ACLOCAL@
143 AMTAR = @AMTAR@
144 AUTOCONF = @AUTOCONF@
145 AUTOHEADER = @AUTOHEADER@
146 AUTOMAKE = @AUTOMAKE@
147 AWK = @AWK@
148 CC = @CC@
149 CCDEPMODE = @CCDEPMODE@
150 CFLAGS = @CFLAGS@
151 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
152 CPP = @CPP@
153 CPPFLAGS = @CPPFLAGS@
154 CYGPATH_W = @CYGPATH_W@
155 DEFS = @DEFS@
156 DEPDIR = @DEPDIR@
157 DIRS = @DIRS@
158 DMALLOC_LIBS = @DMALLOC_LIBS@
159 ECHO_C = @ECHO_C@
160 ECHO_N = @ECHO_N@
161 ECHO_T = @ECHO_T@
162 EGREP = @EGREP@
163 EXEEXT = @EXEEXT@
164 GETADDRINFOOBJS = @GETADDRINFOOBJS@
165 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
166 GETSUBOPT = @GETSUBOPT@
167 GREP = @GREP@
168 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
169 GSSAPI_LIBS = @GSSAPI_LIBS@
170 INSTALL = @INSTALL@
171 INSTALL_DATA = @INSTALL_DATA@
172 INSTALL_PROGRAM = @INSTALL_PROGRAM@
173 INSTALL_SCRIPT = @INSTALL_SCRIPT@
174 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
175 IPCTYPE = @IPCTYPE@
176 JAVAC = @JAVAC@
177 JAVADOC = @JAVADOC@
178 JAVAH = @JAVAH@
179 JAVAROOT = @JAVAROOT@
180 JAVA_INCLUDES = @JAVA_INCLUDES@
181 LDFLAGS = @LDFLAGS@
182 LIBOBJS = @LIBOBJS@
183 LIBS = @LIBS@
184 LIBTOOL = @LIBTOOL@
185 LIB_CRYPT = @LIB_CRYPT@
186 LIB_DES = @LIB_DES@
187 LIB_DOOR = @LIB_DOOR@
188 LIB_LDAP = @LIB_LDAP@
189 LIB_MYSQL = @LIB_MYSQL@
190 LIB_PGSQL = @LIB_PGSQL@
191 LIB_SOCKET = @LIB_SOCKET@
192 LIB_SQLITE = @LIB_SQLITE@
193 LIB_SQLITE3 = @LIB_SQLITE3@
194 LN_S = @LN_S@
195 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
196 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
197 LTLIBOBJS = @LTLIBOBJS@
198 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
199 MAKEINFO = @MAKEINFO@
200 MKDIR_P = @MKDIR_P@
201 NM = @NM@
202 NTLM_LIBS = @NTLM_LIBS@
203 OBJEXT = @OBJEXT@
204 OTP_LIBS = @OTP_LIBS@
205 PACKAGE = @PACKAGE@
206 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
207 PACKAGE_NAME = @PACKAGE_NAME@
208 PACKAGE_STRING = @PACKAGE_STRING@
209 PACKAGE_TARNAME = @PACKAGE_TARNAME@
210 PACKAGE_VERSION = @PACKAGE_VERSION@
211 PASSDSS_LIBS = @PASSDSS_LIBS@
212 PATH_SEPARATOR = @PATH_SEPARATOR@
213 PLAIN_LIBS = @PLAIN_LIBS@
214 PURECOV = @PURECOV@
215 PURIFY = @PURIFY@
216 PWCHECKMETH = @PWCHECKMETH@
217 RANLIB = @RANLIB@
218 SASL_DB_BACKEND = @SASL_DB_BACKEND@
219 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
220 SASL_DB_INC = @SASL_DB_INC@
221 SASL_DB_LIB = @SASL_DB_LIB@
222 SASL_DB_MANS = @SASL_DB_MANS@
223 SASL_DB_UTILS = @SASL_DB_UTILS@
224 SASL_DL_LIB = @SASL_DL_LIB@
225 SASL_KRB_LIB = @SASL_KRB_LIB@
226 SASL_MECHS = @SASL_MECHS@
227 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
228 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
229 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
230 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
231 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
232 SCRAM_LIBS = @SCRAM_LIBS@
233 SET_MAKE = @SET_MAKE@
234 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
235 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
236 SHELL = @SHELL@
237 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
238 SNPRINTFOBJS = @SNPRINTFOBJS@
239 SRP_LIBS = @SRP_LIBS@
240 STRIP = @STRIP@
241 VERSION = @VERSION@
242 abs_builddir = @abs_builddir@
243 abs_srcdir = @abs_srcdir@
244 abs_top_builddir = @abs_top_builddir@
245 abs_top_srcdir = @abs_top_srcdir@
246 ac_ct_CC = @ac_ct_CC@
247 am__include = @am__include@
248 am__leading_dot = @am__leading_dot@
249 am__quote = @am__quote@
250 am__tar = @am__tar@
251 am__untar = @am__untar@
252 bindir = @bindir@
253 build = @build@
254 build_alias = @build_alias@
255 build_cpu = @build_cpu@
256 build_os = @build_os@
257 build_vendor = @build_vendor@
258 builddir = @builddir@
259 configdir = @configdir@
260 datadir = @datadir@
261 datarootdir = @datarootdir@
262 docdir = @docdir@
263 dvidir = @dvidir@
264 exec_prefix = @exec_prefix@
265 host = @host@
266 host_alias = @host_alias@
267 host_cpu = @host_cpu@
268 host_os = @host_os@
269 host_vendor = @host_vendor@
270 htmldir = @htmldir@
271 includedir = @includedir@
272 infodir = @infodir@
273 install_sh = @install_sh@
274 libdir = @libdir@
275 libexecdir = @libexecdir@
276 localedir = @localedir@
277 localstatedir = @localstatedir@
278 mandir = @mandir@
279 mkdir_p = @mkdir_p@
280 oldincludedir = @oldincludedir@
281 pdfdir = @pdfdir@
282 plugindir = @plugindir@
283 prefix = @prefix@
284 program_transform_name = @program_transform_name@
285 psdir = @psdir@
286 sbindir = @sbindir@
287 sharedstatedir = @sharedstatedir@
288 srcdir = @srcdir@
289 subdirs = @subdirs@
290 sysconfdir = @sysconfdir@
291 target = @target@
292 target_alias = @target_alias@
293 target_cpu = @target_cpu@
294 target_os = @target_os@
295 target_vendor = @target_vendor@
296 top_build_prefix = @top_build_prefix@
297 top_builddir = @top_builddir@
298 top_srcdir = @top_srcdir@
299 SUBDIRS = callback
300 all: all-recursive
301
302 .SUFFIXES:
303 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
304 @for dep in $?; do \
305 case '$(am__configure_deps)' in \
306 *$$dep*) \
307 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
308 && { if test -f $@; then exit 0; else break; fi; }; \
309 exit 1;; \
310 esac; \
311 done; \
312 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu java/javax/security/auth/Makefile'; \
313 $(am__cd) $(top_srcdir) && \
314 $(AUTOMAKE) --gnu java/javax/security/auth/Makefile
315 .PRECIOUS: Makefile
316 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
317 @case '$?' in \
318 *config.status*) \
319 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
320 *) \
321 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
322 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
323 esac;
324
325 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
326 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
327
328 $(top_srcdir)/configure: $(am__configure_deps)
329 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
330 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
331 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
332 $(am__aclocal_m4_deps):
333
334 mostlyclean-libtool:
335 -rm -f *.lo
336
337 clean-libtool:
338 -rm -rf .libs _libs
339
340 # This directory's subdirectories are mostly independent; you can cd
341 # into them and run `make' without going through this Makefile.
342 # To change the values of `make' variables: instead of editing Makefiles,
343 # (1) if the variable is set in `config.status', edit `config.status'
344 # (which will cause the Makefiles to be regenerated when you run `make');
345 # (2) otherwise, pass the desired values on the `make' command line.
346 $(RECURSIVE_TARGETS):
347 @failcom='exit 1'; \
348 for f in x $$MAKEFLAGS; do \
349 case $$f in \
350 *=* | --[!k]*);; \
351 *k*) failcom='fail=yes';; \
352 esac; \
353 done; \
354 dot_seen=no; \
355 target=`echo $@ | sed s/-recursive//`; \
356 list='$(SUBDIRS)'; for subdir in $$list; do \
357 echo "Making $$target in $$subdir"; \
358 if test "$$subdir" = "."; then \
359 dot_seen=yes; \
360 local_target="$$target-am"; \
361 else \
362 local_target="$$target"; \
363 fi; \
364 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
365 || eval $$failcom; \
366 done; \
367 if test "$$dot_seen" = "no"; then \
368 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
369 fi; test -z "$$fail"
370
371 $(RECURSIVE_CLEAN_TARGETS):
372 @failcom='exit 1'; \
373 for f in x $$MAKEFLAGS; do \
374 case $$f in \
375 *=* | --[!k]*);; \
376 *k*) failcom='fail=yes';; \
377 esac; \
378 done; \
379 dot_seen=no; \
380 case "$@" in \
381 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
382 *) list='$(SUBDIRS)' ;; \
383 esac; \
384 rev=''; for subdir in $$list; do \
385 if test "$$subdir" = "."; then :; else \
386 rev="$$subdir $$rev"; \
387 fi; \
388 done; \
389 rev="$$rev ."; \
390 target=`echo $@ | sed s/-recursive//`; \
391 for subdir in $$rev; do \
392 echo "Making $$target in $$subdir"; \
393 if test "$$subdir" = "."; then \
394 local_target="$$target-am"; \
395 else \
396 local_target="$$target"; \
397 fi; \
398 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
399 || eval $$failcom; \
400 done && test -z "$$fail"
401 tags-recursive:
402 list='$(SUBDIRS)'; for subdir in $$list; do \
403 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
404 done
405 ctags-recursive:
406 list='$(SUBDIRS)'; for subdir in $$list; do \
407 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
408 done
409
410 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
411 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
412 unique=`for i in $$list; do \
413 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
414 done | \
415 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
416 END { if (nonempty) { for (i in files) print i; }; }'`; \
417 mkid -fID $$unique
418 tags: TAGS
419
420 TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
421 $(TAGS_FILES) $(LISP)
422 set x; \
423 here=`pwd`; \
424 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
425 include_option=--etags-include; \
426 empty_fix=.; \
427 else \
428 include_option=--include; \
429 empty_fix=; \
430 fi; \
431 list='$(SUBDIRS)'; for subdir in $$list; do \
432 if test "$$subdir" = .; then :; else \
433 test ! -f $$subdir/TAGS || \
434 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
435 fi; \
436 done; \
437 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
438 unique=`for i in $$list; do \
439 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
440 done | \
441 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
442 END { if (nonempty) { for (i in files) print i; }; }'`; \
443 shift; \
444 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
445 test -n "$$unique" || unique=$$empty_fix; \
446 if test $$# -gt 0; then \
447 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
448 "$$@" $$unique; \
449 else \
450 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
451 $$unique; \
452 fi; \
453 fi
454 ctags: CTAGS
455 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
456 $(TAGS_FILES) $(LISP)
457 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
458 unique=`for i in $$list; do \
459 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
460 done | \
461 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
462 END { if (nonempty) { for (i in files) print i; }; }'`; \
463 test -z "$(CTAGS_ARGS)$$unique" \
464 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
465 $$unique
466
467 GTAGS:
468 here=`$(am__cd) $(top_builddir) && pwd` \
469 && $(am__cd) $(top_srcdir) \
470 && gtags -i $(GTAGS_ARGS) "$$here"
471
472 distclean-tags:
473 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
474
475 distdir: $(DISTFILES)
476 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
477 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
478 list='$(DISTFILES)'; \
479 dist_files=`for file in $$list; do echo $$file; done | \
480 sed -e "s|^$$srcdirstrip/||;t" \
481 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
482 case $$dist_files in \
483 */*) $(MKDIR_P) `echo "$$dist_files" | \
484 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
485 sort -u` ;; \
486 esac; \
487 for file in $$dist_files; do \
488 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
489 if test -d $$d/$$file; then \
490 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
491 if test -d "$(distdir)/$$file"; then \
492 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
493 fi; \
494 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
495 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
496 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
497 fi; \
498 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
499 else \
500 test -f "$(distdir)/$$file" \
501 || cp -p $$d/$$file "$(distdir)/$$file" \
502 || exit 1; \
503 fi; \
504 done
505 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
506 if test "$$subdir" = .; then :; else \
507 test -d "$(distdir)/$$subdir" \
508 || $(MKDIR_P) "$(distdir)/$$subdir" \
509 || exit 1; \
510 fi; \
511 done
512 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
513 if test "$$subdir" = .; then :; else \
514 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
515 $(am__relativize); \
516 new_distdir=$$reldir; \
517 dir1=$$subdir; dir2="$(top_distdir)"; \
518 $(am__relativize); \
519 new_top_distdir=$$reldir; \
520 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
521 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
522 ($(am__cd) $$subdir && \
523 $(MAKE) $(AM_MAKEFLAGS) \
524 top_distdir="$$new_top_distdir" \
525 distdir="$$new_distdir" \
526 am__remove_distdir=: \
527 am__skip_length_check=: \
528 am__skip_mode_fix=: \
529 distdir) \
530 || exit 1; \
531 fi; \
532 done
533 check-am: all-am
534 check: check-recursive
535 all-am: Makefile
536 installdirs: installdirs-recursive
537 installdirs-am:
538 install: install-recursive
539 install-exec: install-exec-recursive
540 install-data: install-data-recursive
541 uninstall: uninstall-recursive
542
543 install-am: all-am
544 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
545
546 installcheck: installcheck-recursive
547 install-strip:
548 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
549 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
550 `test -z '$(STRIP)' || \
551 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
552 mostlyclean-generic:
553
554 clean-generic:
555
556 distclean-generic:
557 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
558 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
559
560 maintainer-clean-generic:
561 @echo "This command is intended for maintainers to use"
562 @echo "it deletes files that may require special tools to rebuild."
563 clean: clean-recursive
564
565 clean-am: clean-generic clean-libtool mostlyclean-am
566
567 distclean: distclean-recursive
568 -rm -f Makefile
569 distclean-am: clean-am distclean-generic distclean-tags
570
571 dvi: dvi-recursive
572
573 dvi-am:
574
575 html: html-recursive
576
577 html-am:
578
579 info: info-recursive
580
581 info-am:
582
583 install-data-am:
584
585 install-dvi: install-dvi-recursive
586
587 install-dvi-am:
588
589 install-exec-am:
590
591 install-html: install-html-recursive
592
593 install-html-am:
594
595 install-info: install-info-recursive
596
597 install-info-am:
598
599 install-man:
600
601 install-pdf: install-pdf-recursive
602
603 install-pdf-am:
604
605 install-ps: install-ps-recursive
606
607 install-ps-am:
608
609 installcheck-am:
610
611 maintainer-clean: maintainer-clean-recursive
612 -rm -f Makefile
613 maintainer-clean-am: distclean-am maintainer-clean-generic
614
615 mostlyclean: mostlyclean-recursive
616
617 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
618
619 pdf: pdf-recursive
620
621 pdf-am:
622
623 ps: ps-recursive
624
625 ps-am:
626
627 uninstall-am:
628
629 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
630 install-am install-strip tags-recursive
631
632 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
633 all all-am check check-am clean clean-generic clean-libtool \
634 ctags ctags-recursive distclean distclean-generic \
635 distclean-libtool distclean-tags distdir dvi dvi-am html \
636 html-am info info-am install install-am install-data \
637 install-data-am install-dvi install-dvi-am install-exec \
638 install-exec-am install-html install-html-am install-info \
639 install-info-am install-man install-pdf install-pdf-am \
640 install-ps install-ps-am install-strip installcheck \
641 installcheck-am installdirs installdirs-am maintainer-clean \
642 maintainer-clean-generic mostlyclean mostlyclean-generic \
643 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
644 uninstall uninstall-am
645
646
647 # Tell versions [3.59,3.63) of GNU make to not export all variables.
648 # Otherwise a system limit (for SysV at least) may be exceeded.
649 .NOEXPORT:
+0
-496
java/javax/security/auth/callback/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 ################################################################
18 # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
19 #
20 # Redistribution and use in source and binary forms, with or without
21 # modification, are permitted provided that the following conditions
22 # are met:
23 #
24 # 1. Redistributions of source code must retain the above copyright
25 # notice, this list of conditions and the following disclaimer.
26 #
27 # 2. Redistributions in binary form must reproduce the above copyright
28 # notice, this list of conditions and the following disclaimer in
29 # the documentation and/or other materials provided with the
30 # distribution.
31 #
32 # 3. The name "Carnegie Mellon University" must not be used to
33 # endorse or promote products derived from this software without
34 # prior written permission. For permission or any other legal
35 # details, please contact
36 # Office of Technology Transfer
37 # Carnegie Mellon University
38 # 5000 Forbes Avenue
39 # Pittsburgh, PA 15213-3890
40 # (412) 268-4387, fax: (412) 268-7395
41 # tech-transfer@andrew.cmu.edu
42 #
43 # 4. Redistributions of any form whatsoever must retain the following
44 # acknowledgment:
45 # "This product includes software developed by Computing Services
46 # at Carnegie Mellon University (http://www.cmu.edu/computing/)."
47 #
48 # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
49 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
50 # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
51 # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
52 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
53 # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
54 # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
55 #
56 ################################################################
57 VPATH = @srcdir@
58 pkgdatadir = $(datadir)/@PACKAGE@
59 pkgincludedir = $(includedir)/@PACKAGE@
60 pkglibdir = $(libdir)/@PACKAGE@
61 pkglibexecdir = $(libexecdir)/@PACKAGE@
62 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
63 install_sh_DATA = $(install_sh) -c -m 644
64 install_sh_PROGRAM = $(install_sh) -c
65 install_sh_SCRIPT = $(install_sh) -c
66 INSTALL_HEADER = $(INSTALL_DATA)
67 transform = $(program_transform_name)
68 NORMAL_INSTALL = :
69 PRE_INSTALL = :
70 POST_INSTALL = :
71 NORMAL_UNINSTALL = :
72 PRE_UNINSTALL = :
73 POST_UNINSTALL = :
74 build_triplet = @build@
75 host_triplet = @host@
76 target_triplet = @target@
77 subdir = java/javax/security/auth/callback
78 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
79 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
80 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
81 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
82 $(top_srcdir)/config/sasldb.m4 \
83 $(top_srcdir)/cmulocal/berkdb.m4 \
84 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
85 $(top_srcdir)/cmulocal/c-attribute.m4 \
86 $(top_srcdir)/cmulocal/common.m4 \
87 $(top_srcdir)/cmulocal/cyrus.m4 \
88 $(top_srcdir)/cmulocal/init_automake.m4 \
89 $(top_srcdir)/cmulocal/ipv6.m4 \
90 $(top_srcdir)/cmulocal/openldap.m4 \
91 $(top_srcdir)/cmulocal/openssl.m4 \
92 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
93 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
94 $(ACLOCAL_M4)
95 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
96 CONFIG_HEADER = $(top_builddir)/config.h
97 CONFIG_CLEAN_FILES =
98 CONFIG_CLEAN_VPATH_FILES =
99 SOURCES =
100 DIST_SOURCES =
101 CLASSPATH_ENV = CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT):$$CLASSPATH
102 am__installdirs = "$(DESTDIR)$(javasasldir)"
103 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
104 ACLOCAL = @ACLOCAL@
105 AMTAR = @AMTAR@
106 AUTOCONF = @AUTOCONF@
107 AUTOHEADER = @AUTOHEADER@
108 AUTOMAKE = @AUTOMAKE@
109 AWK = @AWK@
110 CC = @CC@
111 CCDEPMODE = @CCDEPMODE@
112 CFLAGS = @CFLAGS@
113 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
114 CPP = @CPP@
115 CPPFLAGS = @CPPFLAGS@
116 CYGPATH_W = @CYGPATH_W@
117 DEFS = @DEFS@
118 DEPDIR = @DEPDIR@
119 DIRS = @DIRS@
120 DMALLOC_LIBS = @DMALLOC_LIBS@
121 ECHO_C = @ECHO_C@
122 ECHO_N = @ECHO_N@
123 ECHO_T = @ECHO_T@
124 EGREP = @EGREP@
125 EXEEXT = @EXEEXT@
126 GETADDRINFOOBJS = @GETADDRINFOOBJS@
127 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
128 GETSUBOPT = @GETSUBOPT@
129 GREP = @GREP@
130 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
131 GSSAPI_LIBS = @GSSAPI_LIBS@
132 INSTALL = @INSTALL@
133 INSTALL_DATA = @INSTALL_DATA@
134 INSTALL_PROGRAM = @INSTALL_PROGRAM@
135 INSTALL_SCRIPT = @INSTALL_SCRIPT@
136 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
137 IPCTYPE = @IPCTYPE@
138 JAVAC = @JAVAC@
139 JAVADOC = @JAVADOC@
140 JAVAH = @JAVAH@
141 JAVAROOT = @JAVAROOT@
142 JAVA_INCLUDES = @JAVA_INCLUDES@
143 LDFLAGS = @LDFLAGS@
144 LIBOBJS = @LIBOBJS@
145 LIBS = @LIBS@
146 LIBTOOL = @LIBTOOL@
147 LIB_CRYPT = @LIB_CRYPT@
148 LIB_DES = @LIB_DES@
149 LIB_DOOR = @LIB_DOOR@
150 LIB_LDAP = @LIB_LDAP@
151 LIB_MYSQL = @LIB_MYSQL@
152 LIB_PGSQL = @LIB_PGSQL@
153 LIB_SOCKET = @LIB_SOCKET@
154 LIB_SQLITE = @LIB_SQLITE@
155 LIB_SQLITE3 = @LIB_SQLITE3@
156 LN_S = @LN_S@
157 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
158 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
159 LTLIBOBJS = @LTLIBOBJS@
160 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
161 MAKEINFO = @MAKEINFO@
162 MKDIR_P = @MKDIR_P@
163 NM = @NM@
164 NTLM_LIBS = @NTLM_LIBS@
165 OBJEXT = @OBJEXT@
166 OTP_LIBS = @OTP_LIBS@
167 PACKAGE = @PACKAGE@
168 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
169 PACKAGE_NAME = @PACKAGE_NAME@
170 PACKAGE_STRING = @PACKAGE_STRING@
171 PACKAGE_TARNAME = @PACKAGE_TARNAME@
172 PACKAGE_VERSION = @PACKAGE_VERSION@
173 PASSDSS_LIBS = @PASSDSS_LIBS@
174 PATH_SEPARATOR = @PATH_SEPARATOR@
175 PLAIN_LIBS = @PLAIN_LIBS@
176 PURECOV = @PURECOV@
177 PURIFY = @PURIFY@
178 PWCHECKMETH = @PWCHECKMETH@
179 RANLIB = @RANLIB@
180 SASL_DB_BACKEND = @SASL_DB_BACKEND@
181 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
182 SASL_DB_INC = @SASL_DB_INC@
183 SASL_DB_LIB = @SASL_DB_LIB@
184 SASL_DB_MANS = @SASL_DB_MANS@
185 SASL_DB_UTILS = @SASL_DB_UTILS@
186 SASL_DL_LIB = @SASL_DL_LIB@
187 SASL_KRB_LIB = @SASL_KRB_LIB@
188 SASL_MECHS = @SASL_MECHS@
189 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
190 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
191 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
192 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
193 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
194 SCRAM_LIBS = @SCRAM_LIBS@
195 SET_MAKE = @SET_MAKE@
196 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
197 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
198 SHELL = @SHELL@
199 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
200 SNPRINTFOBJS = @SNPRINTFOBJS@
201 SRP_LIBS = @SRP_LIBS@
202 STRIP = @STRIP@
203 VERSION = @VERSION@
204 abs_builddir = @abs_builddir@
205 abs_srcdir = @abs_srcdir@
206 abs_top_builddir = @abs_top_builddir@
207 abs_top_srcdir = @abs_top_srcdir@
208 ac_ct_CC = @ac_ct_CC@
209 am__include = @am__include@
210 am__leading_dot = @am__leading_dot@
211 am__quote = @am__quote@
212 am__tar = @am__tar@
213 am__untar = @am__untar@
214 bindir = @bindir@
215 build = @build@
216 build_alias = @build_alias@
217 build_cpu = @build_cpu@
218 build_os = @build_os@
219 build_vendor = @build_vendor@
220 builddir = @builddir@
221 configdir = @configdir@
222 datadir = @datadir@
223 datarootdir = @datarootdir@
224 docdir = @docdir@
225 dvidir = @dvidir@
226 exec_prefix = @exec_prefix@
227 host = @host@
228 host_alias = @host_alias@
229 host_cpu = @host_cpu@
230 host_os = @host_os@
231 host_vendor = @host_vendor@
232 htmldir = @htmldir@
233 includedir = @includedir@
234 infodir = @infodir@
235 install_sh = @install_sh@
236 libdir = @libdir@
237 libexecdir = @libexecdir@
238 localedir = @localedir@
239 localstatedir = @localstatedir@
240 mandir = @mandir@
241 mkdir_p = @mkdir_p@
242 oldincludedir = @oldincludedir@
243 pdfdir = @pdfdir@
244 plugindir = @plugindir@
245 prefix = @prefix@
246 program_transform_name = @program_transform_name@
247 psdir = @psdir@
248 sbindir = @sbindir@
249 sharedstatedir = @sharedstatedir@
250 srcdir = @srcdir@
251 subdirs = @subdirs@
252 sysconfdir = @sysconfdir@
253 target = @target@
254 target_alias = @target_alias@
255 target_cpu = @target_cpu@
256 target_os = @target_os@
257 target_vendor = @target_vendor@
258 top_build_prefix = @top_build_prefix@
259 top_builddir = @top_builddir@
260 top_srcdir = @top_srcdir@
261 javasasldir = $(prefix)/lib/java/classes/sasl/javax/security/auth/callback
262 javahtmldir = $(prefix)/html/sasl
263 javasasl_JAVA = PasswordCallback.java \
264 Callback.java \
265 RealmCallback.java \
266 CallbackHandler.java \
267 UnsupportedCallbackException.java \
268 NameCallback.java
269
270 EXTRA_DIST = $(javasasl_JAVA)
271 CLASSES = $(javasasl_JAVA:.java=.class)
272 all: all-am
273
274 .SUFFIXES:
275 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
276 @for dep in $?; do \
277 case '$(am__configure_deps)' in \
278 *$$dep*) \
279 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
280 && { if test -f $@; then exit 0; else break; fi; }; \
281 exit 1;; \
282 esac; \
283 done; \
284 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu java/javax/security/auth/callback/Makefile'; \
285 $(am__cd) $(top_srcdir) && \
286 $(AUTOMAKE) --gnu java/javax/security/auth/callback/Makefile
287 .PRECIOUS: Makefile
288 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
289 @case '$?' in \
290 *config.status*) \
291 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
292 *) \
293 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
294 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
295 esac;
296
297 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
298 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
299
300 $(top_srcdir)/configure: $(am__configure_deps)
301 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
302 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
303 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
304 $(am__aclocal_m4_deps):
305
306 mostlyclean-libtool:
307 -rm -f *.lo
308
309 clean-libtool:
310 -rm -rf .libs _libs
311
312 classjavasasl.stamp: $(javasasl_JAVA)
313 @list1='$?'; list2=; if test -n "$$list1"; then \
314 for p in $$list1; do \
315 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
316 list2="$$list2 $$d$$p"; \
317 done; \
318 echo '$(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) '"$$list2"; \
319 $(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) $$list2; \
320 else :; fi
321 echo timestamp > classjavasasl.stamp
322 install-javasaslJAVA: classjavasasl.stamp
323 @$(NORMAL_INSTALL)
324 test -z "$(javasasldir)" || $(MKDIR_P) "$(DESTDIR)$(javasasldir)"
325 @test -n "$(javasasl_JAVA)" && test -n "$(javasasldir)" || exit 0; \
326 set x *.class; shift; test "$$1" != "*.class" || exit 0; \
327 echo " $(INSTALL_DATA)" "$$@" "'$(DESTDIR)$(javasasldir)/$$p'"; \
328 $(INSTALL_DATA) "$$@" "$(DESTDIR)$(javasasldir)"
329
330 uninstall-javasaslJAVA:
331 @$(NORMAL_UNINSTALL)
332 @test -n "$(javasasl_JAVA)" && test -n "$(javasasldir)" || exit 0; \
333 set x *.class; shift; test "$$1" != "*.class" || exit 0; \
334 echo " ( cd '$(DESTDIR)$(javasasldir)' && rm -f" "$$@" ")"; \
335 cd "$(DESTDIR)$(javasasldir)" && rm -f "$$@"
336
337 clean-javasaslJAVA:
338 -rm -f *.class classjavasasl.stamp
339 tags: TAGS
340 TAGS:
341
342 ctags: CTAGS
343 CTAGS:
344
345
346 distdir: $(DISTFILES)
347 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
348 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
349 list='$(DISTFILES)'; \
350 dist_files=`for file in $$list; do echo $$file; done | \
351 sed -e "s|^$$srcdirstrip/||;t" \
352 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
353 case $$dist_files in \
354 */*) $(MKDIR_P) `echo "$$dist_files" | \
355 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
356 sort -u` ;; \
357 esac; \
358 for file in $$dist_files; do \
359 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
360 if test -d $$d/$$file; then \
361 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
362 if test -d "$(distdir)/$$file"; then \
363 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
364 fi; \
365 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
366 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
367 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
368 fi; \
369 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
370 else \
371 test -f "$(distdir)/$$file" \
372 || cp -p $$d/$$file "$(distdir)/$$file" \
373 || exit 1; \
374 fi; \
375 done
376 check-am: all-am
377 check: check-am
378 all-am: Makefile classjavasasl.stamp
379 installdirs:
380 for dir in "$(DESTDIR)$(javasasldir)"; do \
381 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
382 done
383 install: install-am
384 install-exec: install-exec-am
385 install-data: install-data-am
386 uninstall: uninstall-am
387
388 install-am: all-am
389 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
390
391 installcheck: installcheck-am
392 install-strip:
393 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
394 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
395 `test -z '$(STRIP)' || \
396 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
397 mostlyclean-generic:
398
399 clean-generic:
400
401 distclean-generic:
402 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
403 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
404
405 maintainer-clean-generic:
406 @echo "This command is intended for maintainers to use"
407 @echo "it deletes files that may require special tools to rebuild."
408 clean: clean-am
409
410 clean-am: clean-generic clean-javasaslJAVA clean-libtool \
411 mostlyclean-am
412
413 distclean: distclean-am
414 -rm -f Makefile
415 distclean-am: clean-am distclean-generic
416
417 dvi: dvi-am
418
419 dvi-am:
420
421 html: html-am
422
423 html-am:
424
425 info: info-am
426
427 info-am:
428
429 install-data-am: install-javasaslJAVA
430
431 install-dvi: install-dvi-am
432
433 install-dvi-am:
434
435 install-exec-am:
436
437 install-html: install-html-am
438
439 install-html-am:
440
441 install-info: install-info-am
442
443 install-info-am:
444
445 install-man:
446
447 install-pdf: install-pdf-am
448
449 install-pdf-am:
450
451 install-ps: install-ps-am
452
453 install-ps-am:
454
455 installcheck-am:
456
457 maintainer-clean: maintainer-clean-am
458 -rm -f Makefile
459 maintainer-clean-am: distclean-am maintainer-clean-generic
460
461 mostlyclean: mostlyclean-am
462
463 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
464
465 pdf: pdf-am
466
467 pdf-am:
468
469 ps: ps-am
470
471 ps-am:
472
473 uninstall-am: uninstall-javasaslJAVA
474
475 .MAKE: install-am install-strip
476
477 .PHONY: all all-am check check-am clean clean-generic \
478 clean-javasaslJAVA clean-libtool distclean distclean-generic \
479 distclean-libtool distdir dvi dvi-am html html-am info info-am \
480 install install-am install-data install-data-am install-dvi \
481 install-dvi-am install-exec install-exec-am install-html \
482 install-html-am install-info install-info-am \
483 install-javasaslJAVA install-man install-pdf install-pdf-am \
484 install-ps install-ps-am install-strip installcheck \
485 installcheck-am installdirs maintainer-clean \
486 maintainer-clean-generic mostlyclean mostlyclean-generic \
487 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
488 uninstall-javasaslJAVA
489
490
491 $(CLASSES): callback.stamp
492
493 # Tell versions [3.59,3.63) of GNU make to not export all variables.
494 # Otherwise a system limit (for SysV at least) may be exceeded.
495 .NOEXPORT:
0 Makefile.in
1 Makefile
2 .deps
3 .libs
4 *.l[ao]
5 plugin_common.[ch]
4444 # CURRENT:REVISION:AGE
4545 sasl_version = 3:0:0
4646
47 INCLUDES=-DLIBSASL_EXPORTS=1 -I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb
47 AM_CPPFLAGS=-DLIBSASL_EXPORTS=1 -I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb
4848
49 EXTRA_DIST = windlopen.c staticopen.h NTMakefile
49 EXTRA_DIST = windlopen.c dlopen.c staticopen.h NTMakefile
5050 EXTRA_LIBRARIES = libsasl2.a
5151 noinst_LIBRARIES = @SASL_STATIC_LIBS@
5252 libsasl2_a_SOURCES=
5353
5454 BUILT_SOURCES = $(SASL_STATIC_SRCS)
5555
56 if WINDOWS
57 DLOPEN_C = windlopen.c
58 else
59 DLOPEN_C = dlopen.c
60 endif
61
5662 common_headers = saslint.h
57 common_sources = auxprop.c canonusr.c checkpw.c client.c common.c config.c external.c md5.c saslutil.c server.c seterror.c dlopen.c ../plugins/plugin_common.c
63 common_sources = auxprop.c canonusr.c checkpw.c client.c common.c config.c external.c md5.c saslutil.c server.c seterror.c $(DLOPEN_C) ../plugins/plugin_common.c
5864
5965 LTLIBOBJS = @LTLIBOBJS@
60 LIBOBJS = @LIBOBJS@
6166 LIB_DOOR= @LIB_DOOR@
6267
6368 lib_LTLIBRARIES = libsasl2.la
69 noinst_LTLIBRARIES = libobj.la
70
71 libobj_la_SOURCES =
72 libobj_la_LIBADD = $(LTLIBOBJS)
6473
6574 libsasl2_la_SOURCES = $(common_sources) $(common_headers)
66 libsasl2_la_LDFLAGS = -version-info $(sasl_version)
67 libsasl2_la_DEPENDENCIES = $(LTLIBOBJS)
68 libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR)
75 libsasl2_la_LDFLAGS = -version-info $(sasl_version) -no-undefined
76 libsasl2_la_LIBADD = libobj.la $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR)
6977
7078 if MACOSX
7179 framedir = /Library/Frameworks/SASL2.framework
+0
-705
lib/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 # Makefile.am for the SASL library
18 # Rob Earhart
19 # $Id: Makefile.am,v 1.88 2011/09/05 14:18:10 murch Exp $
20 # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
21 #
22 # Redistribution and use in source and binary forms, with or without
23 # modification, are permitted provided that the following conditions
24 # are met:
25 #
26 # 1. Redistributions of source code must retain the above copyright
27 # notice, this list of conditions and the following disclaimer.
28 #
29 # 2. Redistributions in binary form must reproduce the above copyright
30 # notice, this list of conditions and the following disclaimer in
31 # the documentation and/or other materials provided with the
32 # distribution.
33 #
34 # 3. The name "Carnegie Mellon University" must not be used to
35 # endorse or promote products derived from this software without
36 # prior written permission. For permission or any other legal
37 # details, please contact
38 # Office of Technology Transfer
39 # Carnegie Mellon University
40 # 5000 Forbes Avenue
41 # Pittsburgh, PA 15213-3890
42 # (412) 268-4387, fax: (412) 268-7395
43 # tech-transfer@andrew.cmu.edu
44 #
45 # 4. Redistributions of any form whatsoever must retain the following
46 # acknowledgment:
47 # "This product includes software developed by Computing Services
48 # at Carnegie Mellon University (http://www.cmu.edu/computing/)."
49 #
50 # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
51 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
52 # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
53 # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
54 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
55 # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
56 # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
57 #
58
59
60 VPATH = @srcdir@
61 pkgdatadir = $(datadir)/@PACKAGE@
62 pkgincludedir = $(includedir)/@PACKAGE@
63 pkglibdir = $(libdir)/@PACKAGE@
64 pkglibexecdir = $(libexecdir)/@PACKAGE@
65 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
66 install_sh_DATA = $(install_sh) -c -m 644
67 install_sh_PROGRAM = $(install_sh) -c
68 install_sh_SCRIPT = $(install_sh) -c
69 INSTALL_HEADER = $(INSTALL_DATA)
70 transform = $(program_transform_name)
71 NORMAL_INSTALL = :
72 PRE_INSTALL = :
73 POST_INSTALL = :
74 NORMAL_UNINSTALL = :
75 PRE_UNINSTALL = :
76 POST_UNINSTALL = :
77 build_triplet = @build@
78 host_triplet = @host@
79 target_triplet = @target@
80 subdir = lib
81 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
82 getaddrinfo.c getnameinfo.c getsubopt.c snprintf.c
83 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
84 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
85 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
86 $(top_srcdir)/config/sasldb.m4 \
87 $(top_srcdir)/cmulocal/berkdb.m4 \
88 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
89 $(top_srcdir)/cmulocal/c-attribute.m4 \
90 $(top_srcdir)/cmulocal/common.m4 \
91 $(top_srcdir)/cmulocal/cyrus.m4 \
92 $(top_srcdir)/cmulocal/init_automake.m4 \
93 $(top_srcdir)/cmulocal/ipv6.m4 \
94 $(top_srcdir)/cmulocal/openldap.m4 \
95 $(top_srcdir)/cmulocal/openssl.m4 \
96 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
97 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
98 $(ACLOCAL_M4)
99 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
100 CONFIG_HEADER = $(top_builddir)/config.h
101 CONFIG_CLEAN_FILES =
102 CONFIG_CLEAN_VPATH_FILES =
103 LIBRARIES = $(noinst_LIBRARIES)
104 AR = ar
105 ARFLAGS = cru
106 libsasl2_a_AR = $(AR) $(ARFLAGS)
107 libsasl2_a_LIBADD =
108 am_libsasl2_a_OBJECTS =
109 libsasl2_a_OBJECTS = $(am_libsasl2_a_OBJECTS)
110 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
111 am__vpath_adj = case $$p in \
112 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
113 *) f=$$p;; \
114 esac;
115 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
116 am__install_max = 40
117 am__nobase_strip_setup = \
118 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
119 am__nobase_strip = \
120 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
121 am__nobase_list = $(am__nobase_strip_setup); \
122 for p in $$list; do echo "$$p $$p"; done | \
123 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
124 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
125 if (++n[$$2] == $(am__install_max)) \
126 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
127 END { for (dir in files) print dir, files[dir] }'
128 am__base_list = \
129 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
130 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
131 am__installdirs = "$(DESTDIR)$(libdir)"
132 LTLIBRARIES = $(lib_LTLIBRARIES)
133 am__DEPENDENCIES_1 =
134 am__objects_1 = auxprop.lo canonusr.lo checkpw.lo client.lo common.lo \
135 config.lo external.lo md5.lo saslutil.lo server.lo seterror.lo \
136 dlopen.lo plugin_common.lo
137 am__objects_2 =
138 am_libsasl2_la_OBJECTS = $(am__objects_1) $(am__objects_2)
139 libsasl2_la_OBJECTS = $(am_libsasl2_la_OBJECTS)
140 libsasl2_la_LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
141 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
142 $(libsasl2_la_LDFLAGS) $(LDFLAGS) -o $@
143 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
144 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
145 am__depfiles_maybe = depfiles
146 am__mv = mv -f
147 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
148 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
149 LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
150 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
151 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
152 CCLD = $(CC)
153 LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
154 $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
155 SOURCES = $(libsasl2_a_SOURCES) $(libsasl2_la_SOURCES)
156 DIST_SOURCES = $(libsasl2_a_SOURCES) $(libsasl2_la_SOURCES)
157 ETAGS = etags
158 CTAGS = ctags
159 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
160 ACLOCAL = @ACLOCAL@
161 AMTAR = @AMTAR@
162 AUTOCONF = @AUTOCONF@
163 AUTOHEADER = @AUTOHEADER@
164 AUTOMAKE = @AUTOMAKE@
165 AWK = @AWK@
166 CC = @CC@
167 CCDEPMODE = @CCDEPMODE@
168 CFLAGS = @CFLAGS@
169 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
170 CPP = @CPP@
171 CPPFLAGS = @CPPFLAGS@
172 CYGPATH_W = @CYGPATH_W@
173 DEFS = @DEFS@
174 DEPDIR = @DEPDIR@
175 DIRS = @DIRS@
176 DMALLOC_LIBS = @DMALLOC_LIBS@
177 ECHO_C = @ECHO_C@
178 ECHO_N = @ECHO_N@
179 ECHO_T = @ECHO_T@
180 EGREP = @EGREP@
181 EXEEXT = @EXEEXT@
182 GETADDRINFOOBJS = @GETADDRINFOOBJS@
183 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
184 GETSUBOPT = @GETSUBOPT@
185 GREP = @GREP@
186 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
187 GSSAPI_LIBS = @GSSAPI_LIBS@
188 INSTALL = @INSTALL@
189 INSTALL_DATA = @INSTALL_DATA@
190 INSTALL_PROGRAM = @INSTALL_PROGRAM@
191 INSTALL_SCRIPT = @INSTALL_SCRIPT@
192 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
193 IPCTYPE = @IPCTYPE@
194 JAVAC = @JAVAC@
195 JAVADOC = @JAVADOC@
196 JAVAH = @JAVAH@
197 JAVAROOT = @JAVAROOT@
198 JAVA_INCLUDES = @JAVA_INCLUDES@
199 LDFLAGS = @LDFLAGS@
200 LIBOBJS = @LIBOBJS@
201 LIBS = @LIBS@
202 LIBTOOL = @LIBTOOL@
203 LIB_CRYPT = @LIB_CRYPT@
204 LIB_DES = @LIB_DES@
205 LIB_DOOR = @LIB_DOOR@
206 LIB_LDAP = @LIB_LDAP@
207 LIB_MYSQL = @LIB_MYSQL@
208 LIB_PGSQL = @LIB_PGSQL@
209 LIB_SOCKET = @LIB_SOCKET@
210 LIB_SQLITE = @LIB_SQLITE@
211 LIB_SQLITE3 = @LIB_SQLITE3@
212 LN_S = @LN_S@
213 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
214 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
215 LTLIBOBJS = @LTLIBOBJS@
216 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
217 MAKEINFO = @MAKEINFO@
218 MKDIR_P = @MKDIR_P@
219 NM = @NM@
220 NTLM_LIBS = @NTLM_LIBS@
221 OBJEXT = @OBJEXT@
222 OTP_LIBS = @OTP_LIBS@
223 PACKAGE = @PACKAGE@
224 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
225 PACKAGE_NAME = @PACKAGE_NAME@
226 PACKAGE_STRING = @PACKAGE_STRING@
227 PACKAGE_TARNAME = @PACKAGE_TARNAME@
228 PACKAGE_VERSION = @PACKAGE_VERSION@
229 PASSDSS_LIBS = @PASSDSS_LIBS@
230 PATH_SEPARATOR = @PATH_SEPARATOR@
231 PLAIN_LIBS = @PLAIN_LIBS@
232 PURECOV = @PURECOV@
233 PURIFY = @PURIFY@
234 PWCHECKMETH = @PWCHECKMETH@
235 RANLIB = @RANLIB@
236 SASL_DB_BACKEND = @SASL_DB_BACKEND@
237 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
238 SASL_DB_INC = @SASL_DB_INC@
239 SASL_DB_LIB = @SASL_DB_LIB@
240 SASL_DB_MANS = @SASL_DB_MANS@
241 SASL_DB_UTILS = @SASL_DB_UTILS@
242 SASL_DL_LIB = @SASL_DL_LIB@
243 SASL_KRB_LIB = @SASL_KRB_LIB@
244 SASL_MECHS = @SASL_MECHS@
245 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
246 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
247 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
248 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
249 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
250 SCRAM_LIBS = @SCRAM_LIBS@
251 SET_MAKE = @SET_MAKE@
252 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
253 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
254 SHELL = @SHELL@
255 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
256 SNPRINTFOBJS = @SNPRINTFOBJS@
257 SRP_LIBS = @SRP_LIBS@
258 STRIP = @STRIP@
259 VERSION = @VERSION@
260 abs_builddir = @abs_builddir@
261 abs_srcdir = @abs_srcdir@
262 abs_top_builddir = @abs_top_builddir@
263 abs_top_srcdir = @abs_top_srcdir@
264 ac_ct_CC = @ac_ct_CC@
265 am__include = @am__include@
266 am__leading_dot = @am__leading_dot@
267 am__quote = @am__quote@
268 am__tar = @am__tar@
269 am__untar = @am__untar@
270 bindir = @bindir@
271 build = @build@
272 build_alias = @build_alias@
273 build_cpu = @build_cpu@
274 build_os = @build_os@
275 build_vendor = @build_vendor@
276 builddir = @builddir@
277 configdir = @configdir@
278 datadir = @datadir@
279 datarootdir = @datarootdir@
280 docdir = @docdir@
281 dvidir = @dvidir@
282 exec_prefix = @exec_prefix@
283 host = @host@
284 host_alias = @host_alias@
285 host_cpu = @host_cpu@
286 host_os = @host_os@
287 host_vendor = @host_vendor@
288 htmldir = @htmldir@
289 includedir = @includedir@
290 infodir = @infodir@
291 install_sh = @install_sh@
292 libdir = @libdir@
293 libexecdir = @libexecdir@
294 localedir = @localedir@
295 localstatedir = @localstatedir@
296 mandir = @mandir@
297 mkdir_p = @mkdir_p@
298 oldincludedir = @oldincludedir@
299 pdfdir = @pdfdir@
300 plugindir = @plugindir@
301 prefix = @prefix@
302 program_transform_name = @program_transform_name@
303 psdir = @psdir@
304 sbindir = @sbindir@
305 sharedstatedir = @sharedstatedir@
306 srcdir = @srcdir@
307 subdirs = @subdirs@
308 sysconfdir = @sysconfdir@
309 target = @target@
310 target_alias = @target_alias@
311 target_cpu = @target_cpu@
312 target_os = @target_os@
313 target_vendor = @target_vendor@
314 top_build_prefix = @top_build_prefix@
315 top_builddir = @top_builddir@
316 top_srcdir = @top_srcdir@
317
318 # Library version info - here at the top, for sanity
319 # See <http://www.gnu.org/software/libtool/manual/libtool.html#Versioning>
320 # CURRENT:REVISION:AGE
321 sasl_version = 3:0:0
322 INCLUDES = -DLIBSASL_EXPORTS=1 -I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb
323 EXTRA_DIST = windlopen.c staticopen.h NTMakefile
324 EXTRA_LIBRARIES = libsasl2.a
325 noinst_LIBRARIES = @SASL_STATIC_LIBS@
326 libsasl2_a_SOURCES =
327 BUILT_SOURCES = $(SASL_STATIC_SRCS)
328 common_headers = saslint.h
329 common_sources = auxprop.c canonusr.c checkpw.c client.c common.c config.c external.c md5.c saslutil.c server.c seterror.c dlopen.c ../plugins/plugin_common.c
330 lib_LTLIBRARIES = libsasl2.la
331 libsasl2_la_SOURCES = $(common_sources) $(common_headers)
332 libsasl2_la_LDFLAGS = -version-info $(sasl_version)
333 libsasl2_la_DEPENDENCIES = $(LTLIBOBJS)
334 libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR)
335 @MACOSX_TRUE@framedir = /Library/Frameworks/SASL2.framework
336 all: $(BUILT_SOURCES)
337 $(MAKE) $(AM_MAKEFLAGS) all-am
338
339 .SUFFIXES:
340 .SUFFIXES: .c .lo .o .obj
341 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
342 @for dep in $?; do \
343 case '$(am__configure_deps)' in \
344 *$$dep*) \
345 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
346 && { if test -f $@; then exit 0; else break; fi; }; \
347 exit 1;; \
348 esac; \
349 done; \
350 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \
351 $(am__cd) $(top_srcdir) && \
352 $(AUTOMAKE) --gnu lib/Makefile
353 .PRECIOUS: Makefile
354 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
355 @case '$?' in \
356 *config.status*) \
357 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
358 *) \
359 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
360 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
361 esac;
362
363 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
364 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
365
366 $(top_srcdir)/configure: $(am__configure_deps)
367 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
368 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
369 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
370 $(am__aclocal_m4_deps):
371
372 clean-noinstLIBRARIES:
373 -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
374 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
375 @$(NORMAL_INSTALL)
376 test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
377 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
378 list2=; for p in $$list; do \
379 if test -f $$p; then \
380 list2="$$list2 $$p"; \
381 else :; fi; \
382 done; \
383 test -z "$$list2" || { \
384 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
385 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
386 }
387
388 uninstall-libLTLIBRARIES:
389 @$(NORMAL_UNINSTALL)
390 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
391 for p in $$list; do \
392 $(am__strip_dir) \
393 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
394 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
395 done
396
397 clean-libLTLIBRARIES:
398 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
399 @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
400 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
401 test "$$dir" != "$$p" || dir=.; \
402 echo "rm -f \"$${dir}/so_locations\""; \
403 rm -f "$${dir}/so_locations"; \
404 done
405 libsasl2.la: $(libsasl2_la_OBJECTS) $(libsasl2_la_DEPENDENCIES)
406 $(libsasl2_la_LINK) -rpath $(libdir) $(libsasl2_la_OBJECTS) $(libsasl2_la_LIBADD) $(LIBS)
407
408 mostlyclean-compile:
409 -rm -f *.$(OBJEXT)
410
411 distclean-compile:
412 -rm -f *.tab.c
413
414 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getaddrinfo.Plo@am__quote@
415 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getnameinfo.Plo@am__quote@
416 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getsubopt.Plo@am__quote@
417 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.Plo@am__quote@
418 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auxprop.Plo@am__quote@
419 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonusr.Plo@am__quote@
420 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkpw.Plo@am__quote@
421 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Plo@am__quote@
422 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@
423 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Plo@am__quote@
424 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlopen.Plo@am__quote@
425 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/external.Plo@am__quote@
426 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Plo@am__quote@
427 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_common.Plo@am__quote@
428 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/saslutil.Plo@am__quote@
429 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server.Plo@am__quote@
430 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seterror.Plo@am__quote@
431
432 .c.o:
433 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
434 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
435 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
436 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
437 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
438
439 .c.obj:
440 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
441 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
442 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
443 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
444 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
445
446 .c.lo:
447 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
448 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
449 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
450 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
451 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
452
453 plugin_common.lo: ../plugins/plugin_common.c
454 @am__fastdepCC_TRUE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT plugin_common.lo -MD -MP -MF $(DEPDIR)/plugin_common.Tpo -c -o plugin_common.lo `test -f '../plugins/plugin_common.c' || echo '$(srcdir)/'`../plugins/plugin_common.c
455 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/plugin_common.Tpo $(DEPDIR)/plugin_common.Plo
456 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../plugins/plugin_common.c' object='plugin_common.lo' libtool=yes @AMDEPBACKSLASH@
457 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
458 @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o plugin_common.lo `test -f '../plugins/plugin_common.c' || echo '$(srcdir)/'`../plugins/plugin_common.c
459
460 mostlyclean-libtool:
461 -rm -f *.lo
462
463 clean-libtool:
464 -rm -rf .libs _libs
465
466 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
467 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
468 unique=`for i in $$list; do \
469 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
470 done | \
471 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
472 END { if (nonempty) { for (i in files) print i; }; }'`; \
473 mkid -fID $$unique
474 tags: TAGS
475
476 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
477 $(TAGS_FILES) $(LISP)
478 set x; \
479 here=`pwd`; \
480 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
481 unique=`for i in $$list; do \
482 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
483 done | \
484 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
485 END { if (nonempty) { for (i in files) print i; }; }'`; \
486 shift; \
487 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
488 test -n "$$unique" || unique=$$empty_fix; \
489 if test $$# -gt 0; then \
490 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
491 "$$@" $$unique; \
492 else \
493 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
494 $$unique; \
495 fi; \
496 fi
497 ctags: CTAGS
498 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
499 $(TAGS_FILES) $(LISP)
500 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
501 unique=`for i in $$list; do \
502 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
503 done | \
504 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
505 END { if (nonempty) { for (i in files) print i; }; }'`; \
506 test -z "$(CTAGS_ARGS)$$unique" \
507 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
508 $$unique
509
510 GTAGS:
511 here=`$(am__cd) $(top_builddir) && pwd` \
512 && $(am__cd) $(top_srcdir) \
513 && gtags -i $(GTAGS_ARGS) "$$here"
514
515 distclean-tags:
516 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
517
518 distdir: $(DISTFILES)
519 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
520 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
521 list='$(DISTFILES)'; \
522 dist_files=`for file in $$list; do echo $$file; done | \
523 sed -e "s|^$$srcdirstrip/||;t" \
524 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
525 case $$dist_files in \
526 */*) $(MKDIR_P) `echo "$$dist_files" | \
527 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
528 sort -u` ;; \
529 esac; \
530 for file in $$dist_files; do \
531 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
532 if test -d $$d/$$file; then \
533 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
534 if test -d "$(distdir)/$$file"; then \
535 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
536 fi; \
537 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
538 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
539 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
540 fi; \
541 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
542 else \
543 test -f "$(distdir)/$$file" \
544 || cp -p $$d/$$file "$(distdir)/$$file" \
545 || exit 1; \
546 fi; \
547 done
548 check-am: all-am
549 check: $(BUILT_SOURCES)
550 $(MAKE) $(AM_MAKEFLAGS) check-am
551 all-am: Makefile $(LIBRARIES) $(LTLIBRARIES)
552 installdirs:
553 for dir in "$(DESTDIR)$(libdir)"; do \
554 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
555 done
556 install: $(BUILT_SOURCES)
557 $(MAKE) $(AM_MAKEFLAGS) install-am
558 install-exec: install-exec-am
559 install-data: install-data-am
560 uninstall: uninstall-am
561
562 install-am: all-am
563 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
564
565 installcheck: installcheck-am
566 install-strip:
567 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
568 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
569 `test -z '$(STRIP)' || \
570 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
571 mostlyclean-generic:
572
573 clean-generic:
574
575 distclean-generic:
576 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
577 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
578
579 maintainer-clean-generic:
580 @echo "This command is intended for maintainers to use"
581 @echo "it deletes files that may require special tools to rebuild."
582 -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
583 clean: clean-am
584
585 clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
586 clean-noinstLIBRARIES mostlyclean-am
587
588 distclean: distclean-am
589 -rm -rf $(DEPDIR) ./$(DEPDIR)
590 -rm -f Makefile
591 distclean-am: clean-am distclean-compile distclean-generic \
592 distclean-tags
593
594 dvi: dvi-am
595
596 dvi-am:
597
598 html: html-am
599
600 html-am:
601
602 info: info-am
603
604 info-am:
605
606 install-data-am:
607
608 install-dvi: install-dvi-am
609
610 install-dvi-am:
611
612 install-exec-am: install-libLTLIBRARIES
613 @$(NORMAL_INSTALL)
614 $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
615 install-html: install-html-am
616
617 install-html-am:
618
619 install-info: install-info-am
620
621 install-info-am:
622
623 install-man:
624
625 install-pdf: install-pdf-am
626
627 install-pdf-am:
628
629 install-ps: install-ps-am
630
631 install-ps-am:
632
633 installcheck-am:
634
635 maintainer-clean: maintainer-clean-am
636 -rm -rf $(DEPDIR) ./$(DEPDIR)
637 -rm -f Makefile
638 maintainer-clean-am: distclean-am maintainer-clean-generic
639
640 mostlyclean: mostlyclean-am
641
642 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
643 mostlyclean-libtool
644
645 pdf: pdf-am
646
647 pdf-am:
648
649 ps: ps-am
650
651 ps-am:
652
653 uninstall-am: uninstall-libLTLIBRARIES
654
655 .MAKE: all check install install-am install-exec-am install-strip
656
657 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
658 clean-libLTLIBRARIES clean-libtool clean-noinstLIBRARIES ctags \
659 distclean distclean-compile distclean-generic \
660 distclean-libtool distclean-tags distdir dvi dvi-am html \
661 html-am info info-am install install-am install-data \
662 install-data-am install-dvi install-dvi-am install-exec \
663 install-exec-am install-exec-hook install-html install-html-am \
664 install-info install-info-am install-libLTLIBRARIES \
665 install-man install-pdf install-pdf-am install-ps \
666 install-ps-am install-strip installcheck installcheck-am \
667 installdirs maintainer-clean maintainer-clean-generic \
668 mostlyclean mostlyclean-compile mostlyclean-generic \
669 mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
670 uninstall-am uninstall-libLTLIBRARIES
671
672 @MACOSX_TRUE@install-exec-hook:
673 @MACOSX_TRUE@ $(mkinstalldirs) $(framedir)/Versions/A
674 @MACOSX_TRUE@ ln -fs $(libdir)/libsasl2.dylib $(framedir)/Versions/A/SASL2
675 @MACOSX_TRUE@ cd $(framedir) ; ln -fs Versions/A/SASL2 .
676 @MACOSX_FALSE@install-exec-hook:
677
678 libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS)
679 @echo adding static plugins and dependencies
680 $(AR) cru .libs/$@ $(SASL_STATIC_OBJS)
681 @for i in ./libsasl2.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \
682 if test ! -f $$i; then continue; fi; . $$i; \
683 for j in $$dependency_libs foo; do \
684 case $$j in foo) ;; \
685 -L*) for k in $$depdirs foo; do \
686 if test $$k = $$j; then break; fi; done; \
687 if test $$k = foo; then depdirs="$$depdirs $$j"; fi ;; \
688 -l*) for k in $$deplibs foo; do \
689 if test $$k = $$j; then break; fi; done; \
690 if test $$k = foo; then deplibs="$$deplibs $$j"; fi ;; \
691 esac; done; dependency_libs=""; done; \
692 sed -e "/^dependency_libs=/s%=.*%='$${depdirs}$${deplibs}'%" \
693 libsasl2.la >TMP.$$ && mv TMP.$$ libsasl2.la
694 rm -f $@
695 ln -s .libs/$@ $@
696
697 $(SASL_STATIC_SRCS): linksrcs
698
699 linksrcs:
700 -ln -s $(SASL_STATIC_SRCS) .
701
702 # Tell versions [3.59,3.63) of GNU make to not export all variables.
703 # Otherwise a system limit (for SysV at least) may be exceeded.
704 .NOEXPORT:
115115 }
116116
117117 _sasl_MD5Init(&ctx);
118 _sasl_MD5Update(&ctx, salt, 16);
119 _sasl_MD5Update(&ctx, "sasldb", 6);
120 _sasl_MD5Update(&ctx, passwd, (unsigned int) passlen);
118 _sasl_MD5Update(&ctx, (const unsigned char *) salt, 16);
119 _sasl_MD5Update(&ctx, (const unsigned char *) "sasldb", 6);
120 _sasl_MD5Update(&ctx, (const unsigned char *) passwd, (unsigned int) passlen);
121121 memcpy((*secret)->data, salt, 16);
122122 (*secret)->data[16] = '\0';
123123 _sasl_MD5Final((*secret)->data + 17, &ctx);
367367 }
368368
369369 _sasl_MD5Init(&ctx);
370 _sasl_MD5Update(&ctx, challenge, strlen(challenge));
371 _sasl_MD5Update(&ctx, auxprop_values[0].values[0],
370 _sasl_MD5Update(&ctx, (const unsigned char *) challenge, strlen(challenge));
371 _sasl_MD5Update(&ctx, (const unsigned char *) auxprop_values[0].values[0],
372372 strlen(auxprop_values[0].values[0]));
373373 _sasl_MD5Final(digest, &ctx);
374374
658658 #endif
659659
660660 /* check to see if the user configured a rundir */
661 if (_sasl_getcallback(conn, SASL_CB_GETOPT, &getopt, &context) == SASL_OK) {
661 if (_sasl_getcallback(conn, SASL_CB_GETOPT,
662 (sasl_callback_ft *)&getopt, &context) == SASL_OK) {
662663 getopt(context, NULL, "saslauthd_path", &p, NULL);
663664 }
664665 if (p) {
10401041 int sock = -1;
10411042
10421043 /* check to see if the user configured a rundir */
1043 if (_sasl_getcallback(conn, SASL_CB_GETOPT, &getopt, &context) == SASL_OK) {
1044 if (_sasl_getcallback(conn, SASL_CB_GETOPT,
1045 (sasl_callback_ft *)&getopt, &context) == SASL_OK) {
10441046 getopt(context, NULL, "authdaemond_path", &p, NULL);
10451047 }
10461048 if (!p) {
657657 return SASL_OK;
658658 }
659659
660 static int
661 _sasl_are_current_security_flags_worse_then_best(unsigned best_security_flags,
662 unsigned current_security_flags)
663 {
664 /* We don't qualify SASL_SEC_PASS_CREDENTIALS as "secure" flag */
665 best_security_flags &= ~SASL_SEC_PASS_CREDENTIALS;
666
667 if ((current_security_flags ^ best_security_flags) & best_security_flags) {
668 return 1;
669 } else {
670 return 0;
671 }
672 }
673
660674 /* select a mechanism for a connection
661675 * mechlist -- mechanisms server has available (punctuation ignored)
662676 * secret -- optional secret from previous session
822836 */
823837
824838 if (bestm &&
825 ((m->m.plug->security_flags ^ bestm->m.plug->security_flags) &
826 bestm->m.plug->security_flags)) {
839 _sasl_are_current_security_flags_worse_then_best(
840 bestm->m.plug->security_flags,
841 m->m.plug->security_flags)) {
827842 break;
828843 }
829844
10441044 break;
10451045 case SASL_GSS_CREDS:
10461046 if(conn->type == SASL_CONN_CLIENT)
1047 *(void **)pvalue =
1047 *(const void **)pvalue =
10481048 ((sasl_client_conn_t *)conn)->cparams->gss_creds;
10491049 else
1050 *(void **)pvalue =
1050 *(const void **)pvalue =
10511051 ((sasl_server_conn_t *)conn)->sparams->gss_creds;
10521052 break;
10531053 case SASL_HTTP_REQUEST: {
13611361 case SASL_CONSTRAINT_VIOLAT: return "sasl_setpass can't store a property because "
13621362 "of a constraint violation";
13631363 case SASL_BADBINDING: return "channel binding failure";
1364 case SASL_CONFIGERR: return "error when parsing configuration file";
13641365
13651366 default: return "undefined error!";
13661367 }
15241525 size_t *len)
15251526 {
15261527 const char *userid;
1527 sasl_conn_t *conn;
15281528
15291529 if (! context || ! result) return SASL_BADPARAM;
1530
1531 conn = (sasl_conn_t *)context;
15321530
15331531 switch(id) {
15341532 case SASL_CB_AUTHNAME:
24272425 *plus = 0;
24282426 }
24292427
2428 if (n < strlen(plug_mech)) {
2429 /* Don't allow arbitrary prefix match */
2430 return 0;
2431 }
2432
24302433 return (strncasecmp(req_mech, plug_mech, n) == 0);
24312434 }
24322435
9090 }
9191 if (*p != ':') {
9292 fclose(infile);
93 return SASL_FAIL;
93 return SASL_CONFIGERR;
9494 }
9595 *p++ = '\0';
9696
9898
9999 if (!*p) {
100100 fclose(infile);
101 return SASL_FAIL;
101 return SASL_CONFIGERR;
102102 }
103103
104104 /* Now strip trailing spaces, if any */
130130 const unsigned char *in = (const unsigned char *)_in;
131131 unsigned char *out = (unsigned char *)_out;
132132 unsigned char oval;
133 char *blah;
134133 unsigned olen;
135134
136135 /* check params */
146145 }
147146
148147 /* Do the work... */
149 blah = (char *) out;
150148 while (inlen >= 3) {
151149 /* user provided max buffer size; make sure we don't go over it */
152150 *out++ = basis_64[in[0] >> 2];
606604 return (0);
607605 }
608606
609 #ifdef WIN32
607 #if defined(WIN32) && !defined(__MINGW64_VERSION_MAJOR)
610608 /*****************************************************************************
611609 *
612610 * MODULE NAME : GETOPT.C
649649 goto done;
650650 }
651651
652 snprintf(config_filename, len, "%.*s%c%s.conf", path_len, path_to_config,
652 snprintf(config_filename, len, "%.*s%c%s.conf", (int)path_len, path_to_config,
653653 HIER_DELIMITER, global_callbacks.appname);
654654
655655 /* Ask the application if it's safe to use this file */
0 libdir = @libdir@
0 prefix=@prefix@
1 exec_prefix=@exec_prefix@
2 libdir=@libdir@
3 includedir=@includedir@
14
25 Name: Cyrus SASL
36 Description: Cyrus SASL implementation
47 URL: http://www.cyrussasl.org/
58 Version: @VERSION@
9 Cflags: -I${includedir}
610 Libs: -L${libdir} -lsasl2
711 Libs.private: @LIB_DOOR@ @SASL_DL_LIB@ @LIBS@
0 # ===========================================================================
1 # http://www.gnu.org/software/autoconf-archive/ax_prog_cc_for_build.html
2 # ===========================================================================
3 #
4 # SYNOPSIS
5 #
6 # AX_PROG_CC_FOR_BUILD
7 #
8 # DESCRIPTION
9 #
10 # This macro searches for a C compiler that generates native executables,
11 # that is a C compiler that surely is not a cross-compiler. This can be
12 # useful if you have to generate source code at compile-time like for
13 # example GCC does.
14 #
15 # The macro sets the CC_FOR_BUILD and CPP_FOR_BUILD macros to anything
16 # needed to compile or link (CC_FOR_BUILD) and preprocess (CPP_FOR_BUILD).
17 # The value of these variables can be overridden by the user by specifying
18 # a compiler with an environment variable (like you do for standard CC).
19 #
20 # It also sets BUILD_EXEEXT and BUILD_OBJEXT to the executable and object
21 # file extensions for the build platform, and GCC_FOR_BUILD to `yes' if
22 # the compiler we found is GCC. All these variables but GCC_FOR_BUILD are
23 # substituted in the Makefile.
24 #
25 # LICENSE
26 #
27 # Copyright (c) 2008 Paolo Bonzini <bonzini@gnu.org>
28 #
29 # Copying and distribution of this file, with or without modification, are
30 # permitted in any medium without royalty provided the copyright notice
31 # and this notice are preserved. This file is offered as-is, without any
32 # warranty.
33
34 #serial 8
35
36 AU_ALIAS([AC_PROG_CC_FOR_BUILD], [AX_PROG_CC_FOR_BUILD])
37 AC_DEFUN([AX_PROG_CC_FOR_BUILD], [dnl
38 AC_REQUIRE([AC_PROG_CC])dnl
39 AC_REQUIRE([AC_PROG_CPP])dnl
40 AC_REQUIRE([AC_EXEEXT])dnl
41 AC_REQUIRE([AC_CANONICAL_HOST])dnl
42
43 dnl Use the standard macros, but make them use other variable names
44 dnl
45 pushdef([ac_cv_prog_CPP], ac_cv_build_prog_CPP)dnl
46 pushdef([ac_cv_prog_gcc], ac_cv_build_prog_gcc)dnl
47 pushdef([ac_cv_prog_cc_works], ac_cv_build_prog_cc_works)dnl
48 pushdef([ac_cv_prog_cc_cross], ac_cv_build_prog_cc_cross)dnl
49 pushdef([ac_cv_prog_cc_g], ac_cv_build_prog_cc_g)dnl
50 pushdef([ac_cv_exeext], ac_cv_build_exeext)dnl
51 pushdef([ac_cv_objext], ac_cv_build_objext)dnl
52 pushdef([ac_exeext], ac_build_exeext)dnl
53 pushdef([ac_objext], ac_build_objext)dnl
54 pushdef([CC], CC_FOR_BUILD)dnl
55 pushdef([CPP], CPP_FOR_BUILD)dnl
56 pushdef([CFLAGS], CFLAGS_FOR_BUILD)dnl
57 pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl
58 pushdef([LDFLAGS], LDFLAGS_FOR_BUILD)dnl
59 pushdef([host], build)dnl
60 pushdef([host_alias], build_alias)dnl
61 pushdef([host_cpu], build_cpu)dnl
62 pushdef([host_vendor], build_vendor)dnl
63 pushdef([host_os], build_os)dnl
64 pushdef([ac_cv_host], ac_cv_build)dnl
65 pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl
66 pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl
67 pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl
68 pushdef([ac_cv_host_os], ac_cv_build_os)dnl
69 pushdef([ac_cpp], ac_build_cpp)dnl
70 pushdef([ac_compile], ac_build_compile)dnl
71 pushdef([ac_link], ac_build_link)dnl
72
73 save_cross_compiling=$cross_compiling
74 save_ac_tool_prefix=$ac_tool_prefix
75 cross_compiling=no
76 ac_tool_prefix=
77
78 AC_PROG_CC
79 AC_PROG_CPP
80 AC_EXEEXT
81
82 ac_tool_prefix=$save_ac_tool_prefix
83 cross_compiling=$save_cross_compiling
84
85 dnl Restore the old definitions
86 dnl
87 popdef([ac_link])dnl
88 popdef([ac_compile])dnl
89 popdef([ac_cpp])dnl
90 popdef([ac_cv_host_os])dnl
91 popdef([ac_cv_host_vendor])dnl
92 popdef([ac_cv_host_cpu])dnl
93 popdef([ac_cv_host_alias])dnl
94 popdef([ac_cv_host])dnl
95 popdef([host_os])dnl
96 popdef([host_vendor])dnl
97 popdef([host_cpu])dnl
98 popdef([host_alias])dnl
99 popdef([host])dnl
100 popdef([LDFLAGS])dnl
101 popdef([CPPFLAGS])dnl
102 popdef([CFLAGS])dnl
103 popdef([CPP])dnl
104 popdef([CC])dnl
105 popdef([ac_objext])dnl
106 popdef([ac_exeext])dnl
107 popdef([ac_cv_objext])dnl
108 popdef([ac_cv_exeext])dnl
109 popdef([ac_cv_prog_cc_g])dnl
110 popdef([ac_cv_prog_cc_cross])dnl
111 popdef([ac_cv_prog_cc_works])dnl
112 popdef([ac_cv_prog_gcc])dnl
113 popdef([ac_cv_prog_CPP])dnl
114
115 dnl Finally, set Makefile variables
116 dnl
117 BUILD_EXEEXT=$ac_build_exeext
118 BUILD_OBJEXT=$ac_build_objext
119 AC_SUBST(BUILD_EXEEXT)dnl
120 AC_SUBST(BUILD_OBJEXT)dnl
121 AC_SUBST([CFLAGS_FOR_BUILD])dnl
122 AC_SUBST([CPPFLAGS_FOR_BUILD])dnl
123 AC_SUBST([LDFLAGS_FOR_BUILD])dnl
124 ])
0 dnl $Id: berkdb.m4,v 1.24 2010/01/06 17:01:27 murch Exp $
1
2 AC_DEFUN([CMU_DB_INC_WHERE1], [
3 saved_CPPFLAGS=$CPPFLAGS
4 CPPFLAGS="$saved_CPPFLAGS -I$1"
5 AC_TRY_COMPILE([#include <db.h>],
6 [DB *db;
7 db_create(&db, NULL, 0);
8 db->open(db, "foo.db", NULL, DB_UNKNOWN, DB_RDONLY, 0644);],
9 ac_cv_found_db_inc=yes,
10 ac_cv_found_db_inc=no)
11 CPPFLAGS=$saved_CPPFLAGS
12 ])
13
14 AC_DEFUN([CMU_DB_INC_WHERE], [
15 for i in $1; do
16 AC_MSG_CHECKING(for db headers in $i)
17 CMU_DB_INC_WHERE1($i)
18 CMU_TEST_INCPATH($i, db)
19 if test "$ac_cv_found_db_inc" = "yes"; then
20 ac_cv_db_where_inc=$i
21 AC_MSG_RESULT(found)
22 break
23 else
24 AC_MSG_RESULT(not found)
25 fi
26 done
27 ])
28
29 #
30 # Test for lib files
31 #
32
33 AC_DEFUN([CMU_DB3_LIB_WHERE1], [
34 AC_REQUIRE([CMU_AFS])
35 AC_REQUIRE([CMU_KRB4])
36 saved_LIBS=$LIBS
37 LIBS="$saved_LIBS -L$1 -ldb-3"
38 AC_TRY_LINK([#include <db.h>],
39 [db_env_create(NULL, 0);],
40 [ac_cv_found_db_3_lib=yes],
41 ac_cv_found_db_3_lib=no)
42 LIBS=$saved_LIBS
43 ])
44 AC_DEFUN([CMU_DB4_LIB_WHERE1], [
45 AC_REQUIRE([CMU_AFS])
46 AC_REQUIRE([CMU_KRB4])
47 saved_LIBS=$LIBS
48 LIBS="$saved_LIBS -L$1 -ldb-4"
49 AC_TRY_LINK([#include <db.h>],
50 [db_env_create(NULL, 0);],
51 [ac_cv_found_db_4_lib=yes],
52 ac_cv_found_db_4_lib=no)
53 LIBS=$saved_LIBS
54 ])
55
56 AC_DEFUN([CMU_DB_LIB_WHERE], [
57 for i in $1; do
58 AC_MSG_CHECKING(for db libraries in $i)
59 if test "$enable_db4" = "yes"; then
60 CMU_DB4_LIB_WHERE1($i)
61 CMU_TEST_LIBPATH($i, [db-4])
62 ac_cv_found_db_lib=$ac_cv_found_db_4_lib
63 else
64 CMU_DB3_LIB_WHERE1($i)
65 CMU_TEST_LIBPATH($i, [db-3])
66 ac_cv_found_db_lib=$ac_cv_found_db_3_lib
67 fi
68 if test "$ac_cv_found_db_lib" = "yes" ; then
69 ac_cv_db_where_lib=$i
70 AC_MSG_RESULT(found)
71 break
72 else
73 AC_MSG_RESULT(not found)
74 fi
75 done
76 ])
77
78 AC_DEFUN([CMU_USE_DB], [
79 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
80 AC_ARG_WITH(db,
81 [ --with-db=PREFIX Compile with db support],
82 [if test "X$with_db" = "X"; then
83 with_db=yes
84 fi])
85 AC_ARG_WITH(db-lib,
86 [ --with-db-lib=dir use db libraries in dir],
87 [if test "$withval" = "yes" -o "$withval" = "no"; then
88 AC_MSG_ERROR([No argument for --with-db-lib])
89 fi])
90 AC_ARG_WITH(db-include,
91 [ --with-db-include=dir use db headers in dir],
92 [if test "$withval" = "yes" -o "$withval" = "no"; then
93 AC_MSG_ERROR([No argument for --with-db-include])
94 fi])
95 AC_ARG_ENABLE(db4,
96 [ --enable-db4 use db 4.x libraries])
97
98 if test "X$with_db" != "X"; then
99 if test "$with_db" != "yes"; then
100 ac_cv_db_where_lib=$with_db/$CMU_LIB_SUBDIR
101 ac_cv_db_where_inc=$with_db/include
102 fi
103 fi
104
105 if test "X$with_db_lib" != "X"; then
106 ac_cv_db_where_lib=$with_db_lib
107 fi
108 if test "X$ac_cv_db_where_lib" = "X"; then
109 CMU_DB_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR)
110 fi
111
112 if test "X$with_db_include" != "X"; then
113 ac_cv_db_where_inc=$with_db_include
114 fi
115 if test "X$ac_cv_db_where_inc" = "X"; then
116 CMU_DB_INC_WHERE(/usr/athena/include /usr/local/include)
117 fi
118
119 AC_MSG_CHECKING(whether to include db)
120 if test "X$ac_cv_db_where_lib" = "X" -o "X$ac_cv_db_where_inc" = "X"; then
121 ac_cv_found_db=no
122 AC_MSG_RESULT(no)
123 else
124 ac_cv_found_db=yes
125 AC_MSG_RESULT(yes)
126 DB_INC_DIR=$ac_cv_db_where_inc
127 DB_LIB_DIR=$ac_cv_db_where_lib
128 DB_INC_FLAGS="-I${DB_INC_DIR}"
129 if test "$enable_db4" = "yes"; then
130 DB_LIB_FLAGS="-L${DB_LIB_DIR} -ldb-4"
131 else
132 DB_LIB_FLAGS="-L${DB_LIB_DIR} -ldb-3"
133 fi
134 dnl Do not force configure.in to put these in CFLAGS and LIBS unconditionally
135 dnl Allow makefile substitutions....
136 AC_SUBST(DB_INC_FLAGS)
137 AC_SUBST(DB_LIB_FLAGS)
138 if test "X$RPATH" = "X"; then
139 RPATH=""
140 fi
141 case "${host}" in
142 *-*-linux*)
143 if test "X$RPATH" = "X"; then
144 RPATH="-Wl,-rpath,${DB_LIB_DIR}"
145 else
146 RPATH="${RPATH}:${DB_LIB_DIR}"
147 fi
148 ;;
149 *-*-hpux*)
150 if test "X$RPATH" = "X"; then
151 RPATH="-Wl,+b${DB_LIB_DIR}"
152 else
153 RPATH="${RPATH}:${DB_LIB_DIR}"
154 fi
155 ;;
156 *-*-irix*)
157 if test "X$RPATH" = "X"; then
158 RPATH="-Wl,-rpath,${DB_LIB_DIR}"
159 else
160 RPATH="${RPATH}:${DB_LIB_DIR}"
161 fi
162 ;;
163 *-*-solaris2*)
164 if test "$ac_cv_prog_gcc" = yes; then
165 if test "X$RPATH" = "X"; then
166 RPATH="-Wl,-R${DB_LIB_DIR}"
167 else
168 RPATH="${RPATH}:${DB_LIB_DIR}"
169 fi
170 else
171 RPATH="${RPATH} -R${DB_LIB_DIR}"
172 fi
173 ;;
174 esac
175 AC_SUBST(RPATH)
176 fi
177 ])
178
179
180
181 dnl ---- CUT HERE ---
182
183 dnl These are the Cyrus Berkeley DB macros. In an ideal world these would be
184 dnl identical to the above.
185
186 dnl They are here so that they can be shared between Cyrus IMAPd
187 dnl and Cyrus SASL with relative ease.
188
189 dnl The big difference between this and the ones above is that we don't assume
190 dnl that we know the name of the library, and we try a lot of permutations
191 dnl instead. We also assume that DB4 is acceptable.
192
193 dnl When we're done, there will be a BDB_LIBADD and a BDB_INCADD which should
194 dnl be used when necessary. We should probably be smarter about our RPATH
195 dnl handling.
196
197 dnl Call these with BERKELEY_DB_CHK.
198
199 dnl We will also set $dblib to "berkeley" if we are successful, "no" otherwise.
200
201 dnl this is unbelievably painful due to confusion over what db-3 should be
202 dnl named and where the db-3 header file is located. arg.
203 AC_DEFUN([CYRUS_BERKELEY_DB_CHK_LIB],
204 [
205 BDB_SAVE_LDFLAGS=$LDFLAGS
206
207 if test -d $with_bdb_lib; then
208 CMU_ADD_LIBPATH_TO($with_bdb_lib, LDFLAGS)
209 CMU_ADD_LIBPATH_TO($with_bdb_lib, BDB_LIBADD)
210 else
211 BDB_LIBADD=""
212 fi
213
214 saved_LIBS=$LIBS
215 for dbname in ${with_bdb} \
216 db-5.2 db5.2 db52 \
217 db-5.1 db5.2 db51 \
218 db-5.0 db5.2 db50 \
219 db-4.8 db4.8 db48 \
220 db-4.7 db4.7 db47 \
221 db-4.6 db4.6 db46 \
222 db-4.5 db4.5 db45 \
223 db-4.4 db4.4 db44 \
224 db-4.3 db4.3 db43 \
225 db-4.2 db4.2 db42 \
226 db-4.1 db4.1 db41 \
227 db-4.0 db4.0 db40 db-4 db4 \
228 db-3.3 db3.3 db33 \
229 db-3.2 db3.2 db32 \
230 db-3.1 db3.1 db31 \
231 db-3.0 db3.0 db30 db-3 db3 \
232 db
233 do
234 LIBS="$saved_LIBS -l$dbname"
235 AC_TRY_LINK([#include <stdio.h>
236 #include <db.h>],
237 [db_create(NULL, NULL, 0);],
238 BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db,
239 dblib="no")
240 if test "$dblib" = "berkeley"; then break; fi
241 done
242 if test "$dblib" = "no"; then
243 LIBS="$saved_LIBS -ldb"
244 AC_TRY_LINK([#include <stdio.h>
245 #include <db.h>],
246 [db_open(NULL, 0, 0, 0, NULL, NULL, NULL);],
247 BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db,
248 dblib="no")
249 fi
250 LIBS=$saved_LIBS
251
252 LDFLAGS=$BDB_SAVE_LDFLAGS
253 ])
254
255 AC_DEFUN([CYRUS_BERKELEY_DB_OPTS],
256 [
257 AC_ARG_WITH(bdb-libdir,
258 [ --with-bdb-libdir=DIR Berkeley DB lib files are in DIR],
259 with_bdb_lib=$withval,
260 [ test "${with_bdb_lib+set}" = set || with_bdb_lib=none])
261 AC_ARG_WITH(bdb-incdir,
262 [ --with-bdb-incdir=DIR Berkeley DB include files are in DIR],
263 with_bdb_inc=$withval,
264 [ test "${with_bdb_inc+set}" = set || with_bdb_inc=none ])
265 ])
266
267 AC_DEFUN([CYRUS_BERKELEY_DB_CHK],
268 [
269 AC_REQUIRE([CYRUS_BERKELEY_DB_OPTS])
270
271 cmu_save_CPPFLAGS=$CPPFLAGS
272
273 if test -d $with_bdb_inc; then
274 CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
275 BDB_INCADD="-I$with_bdb_inc"
276 else
277 BDB_INCADD=""
278 fi
279
280 dnl Note that FreeBSD puts it in a wierd place
281 dnl (but they should use with-bdb-incdir)
282 AC_CHECK_HEADER(db.h,
283 [CYRUS_BERKELEY_DB_CHK_LIB()],
284 dblib="no")
285
286 CPPFLAGS=$cmu_save_CPPFLAGS
287 ])
0 dnl bsd_sockets.m4--which socket libraries do we need?
1 dnl Derrick Brashear
2 dnl from Zephyr
3
4 dnl Hacked on by Rob Earhart to not just toss stuff in LIBS
5 dnl It now puts everything required for sockets into LIB_SOCKET
6
7 AC_DEFUN([CMU_SOCKETS], [
8 save_LIBS="$LIBS"
9 AC_CHECK_HEADERS([sys/socket.h ws2tcpip.h])
10 AC_CHECK_FUNC(socket, , [
11 AC_CHECK_LIB(socket, socket, [LIB_SOCKET=-lsocket], [
12 LIBS="$LIBS -lws2_32"
13 AC_LINK_IFELSE([
14 AC_LANG_PROGRAM([[
15 #ifdef HAVE_SYS_SOCKET_H
16 # include <sys/socket.h>
17 #endif
18 #ifdef HAVE_WS2TCPIP_H
19 # include <ws2tcpip.h>
20 #endif
21 ]], [[return socket(0, 0, 0);]])
22 ],
23 [LIB_SOCKET=-lws2_32
24 AC_MSG_RESULT(yes)],
25 [AC_MSG_ERROR([socket not found])])
26 ])
27 ])
28 LIBS="$save_LIBS"
29 AC_CHECK_FUNC(connect, :,
30 [AC_CHECK_LIB(nsl, gethostbyname,
31 LIB_SOCKET="-lnsl $LIB_SOCKET")
32 AC_CHECK_LIB(socket, connect,
33 LIB_SOCKET="-lsocket $LIB_SOCKET")]
34 )
35 LIBS="$LIB_SOCKET $save_LIBS"
36 AC_CHECK_FUNC(res_search, :,
37 [LIBS="-lresolv $LIB_SOCKET $save_LIBS"
38 AC_TRY_LINK([[
39 #include <sys/types.h>
40 #include <netinet/in.h>
41 #include <arpa/nameser.h>
42 #ifdef HAVE_ARPA_NAMESER_COMPAT_H
43 #include <arpa/nameser_compat.h>
44 #endif
45 #include <resolv.h>]],[[
46 const char host[12]="openafs.org";
47 u_char ans[1024];
48 res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans));
49 return 0;
50 ]], LIB_SOCKET="-lresolv $LIB_SOCKET")
51 ])
52 LIBS="$LIB_SOCKET $save_LIBS"
53 AC_CHECK_FUNCS(dn_expand dns_lookup)
54 LIBS="$save_LIBS"
55 AC_SUBST(LIB_SOCKET)
56 ])
0 dnl
1 dnl Test for __attribute__
2 dnl
3
4 AC_DEFUN([CMU_C___ATTRIBUTE__], [
5 AC_MSG_CHECKING(for __attribute__)
6 AC_CACHE_VAL(ac_cv___attribute__, [
7 AC_TRY_COMPILE([
8 #include <stdlib.h>
9 static void foo(void) __attribute__ ((noreturn));
10
11 static void
12 foo(void)
13 {
14 exit(1);
15 }
16 ],
17 [
18 ],
19 ac_cv___attribute__=yes,
20 ac_cv___attribute__=no)])
21 if test "$ac_cv___attribute__" = "yes"; then
22 AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
23 fi
24 AC_MSG_RESULT($ac_cv___attribute__)
25 ])
0 AC_DEFUN([CMU_TEST_LIBPATH], [
1 changequote(<<, >>)
2 define(<<CMU_AC_CV_FOUND>>, translit(ac_cv_found_$2_lib, <<- *>>, <<__p>>))
3 changequote([, ])
4 if test "$CMU_AC_CV_FOUND" = "yes"; then
5 if test \! -r "$1/lib$2.a" -a \! -r "$1/lib$2.so" -a \! -r "$1/lib$2.sl" -a \! -r "$1/lib$2.dylib"; then
6 CMU_AC_CV_FOUND=no
7 fi
8 fi
9 ])
10
11 AC_DEFUN([CMU_TEST_INCPATH], [
12 changequote(<<, >>)
13 define(<<CMU_AC_CV_FOUND>>, translit(ac_cv_found_$2_inc, [ *], [_p]))
14 changequote([, ])
15 if test "$CMU_AC_CV_FOUND" = "yes"; then
16 if test \! -r "$1/$2.h"; then
17 CMU_AC_CV_FOUND=no
18 fi
19 fi
20 ])
21
22 dnl CMU_CHECK_HEADER_NOCACHE(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
23 AC_DEFUN([CMU_CHECK_HEADER_NOCACHE],
24 [dnl Do the transliteration at runtime so arg 1 can be a shell variable.
25 ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
26 AC_MSG_CHECKING([for $1])
27 AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes",
28 eval "ac_cv_header_$ac_safe=no")
29 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
30 AC_MSG_RESULT(yes)
31 ifelse([$2], , :, [$2])
32 else
33 AC_MSG_RESULT(no)
34 ifelse([$3], , , [$3
35 ])dnl
36 fi
37 ])
38
39 AC_DEFUN([CMU_FIND_LIB_SUBDIR],
40 [dnl
41 AC_ARG_WITH([lib-subdir], AC_HELP_STRING([--with-lib-subdir=DIR],[Find libraries in DIR instead of lib]))
42 AC_CHECK_SIZEOF(long)
43 AC_CACHE_CHECK([what directory libraries are found in], [ac_cv_cmu_lib_subdir],
44 [test "X$with_lib_subdir" = "Xyes" && with_lib_subdir=
45 test "X$with_lib_subdir" = "Xno" && with_lib_subdir=
46 if test "X$with_lib_subdir" = "X" ; then
47 ac_cv_cmu_lib_subdir=lib
48 if test $ac_cv_sizeof_long -eq 4 ; then
49 test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32
50 fi
51 if test $ac_cv_sizeof_long -eq 8 ; then
52 test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64
53 fi
54 else
55 ac_cv_cmu_lib_subdir=$with_lib_subdir
56 fi])
57 AC_SUBST(CMU_LIB_SUBDIR, $ac_cv_cmu_lib_subdir)
58 ])
0 dnl
1 dnl Additional macros for configure.in packaged up for easier theft.
2 dnl tjs@andrew.cmu.edu 6-may-1998
3 dnl
4
5 dnl It would be good if ANDREW_ADD_LIBPATH could detect if something was
6 dnl already there and not redundantly add it if it is.
7
8 dnl add -L(arg), and possibly (runpath switch)(arg), to LDFLAGS
9 dnl (so the runpath for shared libraries is set).
10 AC_DEFUN([CMU_ADD_LIBPATH], [
11 # this is CMU ADD LIBPATH
12 if test "$andrew_cv_runpath_switch" = "none" ; then
13 LDFLAGS="-L$1 ${LDFLAGS}"
14 else
15 LDFLAGS="-L$1 $andrew_cv_runpath_switch$1 ${LDFLAGS}"
16 fi
17 ])
18
19 dnl add -L(1st arg), and possibly (runpath switch)(1st arg), to (2nd arg)
20 dnl (so the runpath for shared libraries is set).
21 AC_DEFUN([CMU_ADD_LIBPATH_TO], [
22 # this is CMU ADD LIBPATH TO
23 if test "$andrew_cv_runpath_switch" = "none" ; then
24 $2="-L$1 ${$2}"
25 else
26 $2="-L$1 ${$2} $andrew_cv_runpath_switch$1"
27 fi
28 ])
29
30 dnl runpath initialization
31 AC_DEFUN([CMU_GUESS_RUNPATH_SWITCH], [
32 # CMU GUESS RUNPATH SWITCH
33 AC_CACHE_CHECK(for runpath switch, andrew_cv_runpath_switch, [
34 # first, try -R
35 SAVE_LDFLAGS="${LDFLAGS}"
36 LDFLAGS="-R /usr/lib"
37 AC_TRY_LINK([],[],[andrew_cv_runpath_switch="-R"], [
38 LDFLAGS="-Wl,-rpath,/usr/lib"
39 AC_TRY_LINK([],[],[andrew_cv_runpath_switch="-Wl,-rpath,"],
40 [andrew_cv_runpath_switch="none"])
41 ])
42 LDFLAGS="${SAVE_LDFLAGS}"
43 ])])
0 dnl See whether we can use IPv6 related functions
1 dnl contributed by Hajimu UMEMOTO
2
3 AC_DEFUN([IPv6_CHECK_FUNC], [
4 AC_CHECK_FUNC($1, [dnl
5 ac_cv_lib_socket_$1=no
6 ac_cv_lib_inet6_$1=no
7 ], [dnl
8 AC_CHECK_LIB(socket, $1, [dnl
9 LIBS="$LIBS -lsocket"
10 ac_cv_lib_inet6_$1=no
11 ], [dnl
12 AC_MSG_CHECKING([whether your system has IPv6 directory])
13 AC_CACHE_VAL(ipv6_cv_dir, [dnl
14 for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
15 if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
16 break
17 fi
18 done])dnl
19 AC_MSG_RESULT($ipv6_cv_dir)
20 if test $ipv6_cv_dir = no; then
21 ac_cv_lib_inet6_$1=no
22 else
23 if test x$ipv6_libinet6 = x; then
24 ipv6_libinet6=no
25 SAVELDFLAGS="$LDFLAGS"
26 LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
27 fi
28 AC_CHECK_LIB(inet6, $1, [dnl
29 if test $ipv6_libinet6 = no; then
30 ipv6_libinet6=yes
31 LIBS="$LIBS -linet6"
32 fi],)dnl
33 if test $ipv6_libinet6 = no; then
34 LDFLAGS="$SAVELDFLAGS"
35 fi
36 fi])dnl
37 ])dnl
38 ipv6_cv_$1=no
39 if test $ac_cv_func_$1 = yes -o $ac_cv_lib_socket_$1 = yes \
40 -o $ac_cv_lib_inet6_$1 = yes
41 then
42 ipv6_cv_$1=yes
43 fi
44 if test $ipv6_cv_$1 = no; then
45 if test $1 = getaddrinfo; then
46 for ipv6_cv_pfx in o n; do
47 AC_EGREP_HEADER(${ipv6_cv_pfx}$1, netdb.h,
48 [AC_CHECK_FUNC(${ipv6_cv_pfx}$1)])
49 if eval test X\$ac_cv_func_${ipv6_cv_pfx}$1 = Xyes; then
50 AC_DEFINE(HAVE_GETADDRINFO,[],[Do we have a getaddrinfo?])
51 ipv6_cv_$1=yes
52 break
53 fi
54 done
55 fi
56 fi
57 if test $ipv6_cv_$1 = yes; then
58 ifelse([$2], , :, [$2])
59 else
60 ifelse([$3], , :, [$3])
61 fi])
62
63
64 dnl See whether we have ss_family in sockaddr_storage
65 AC_DEFUN([IPv6_CHECK_SS_FAMILY], [
66 AC_MSG_CHECKING([whether you have ss_family in struct sockaddr_storage])
67 AC_CACHE_VAL(ipv6_cv_ss_family, [dnl
68 AC_TRY_COMPILE([#include <sys/types.h>
69 #include <sys/socket.h>],
70 [struct sockaddr_storage ss; int i = ss.ss_family;],
71 [ipv6_cv_ss_family=yes], [ipv6_cv_ss_family=no])])dnl
72 if test $ipv6_cv_ss_family = yes; then
73 ifelse([$1], , AC_DEFINE(HAVE_SS_FAMILY,[],[Is there an ss_family in sockaddr_storage?]), [$1])
74 else
75 ifelse([$2], , :, [$2])
76 fi
77 AC_MSG_RESULT($ipv6_cv_ss_family)])
78
79
80 dnl whether you have sa_len in struct sockaddr
81 AC_DEFUN([IPv6_CHECK_SA_LEN], [
82 AC_MSG_CHECKING([whether you have sa_len in struct sockaddr])
83 AC_CACHE_VAL(ipv6_cv_sa_len, [dnl
84 AC_TRY_COMPILE([#include <sys/types.h>
85 #include <sys/socket.h>],
86 [struct sockaddr sa; int i = sa.sa_len;],
87 [ipv6_cv_sa_len=yes], [ipv6_cv_sa_len=no])])dnl
88 if test $ipv6_cv_sa_len = yes; then
89 ifelse([$1], , AC_DEFINE(HAVE_SOCKADDR_SA_LEN,[],[Does sockaddr have an sa_len?]), [$1])
90 else
91 ifelse([$2], , :, [$2])
92 fi
93 AC_MSG_RESULT($ipv6_cv_sa_len)])
94
95
96 dnl See whether sys/socket.h has socklen_t
97 AC_DEFUN([IPv6_CHECK_SOCKLEN_T], [
98 AC_MSG_CHECKING(for socklen_t)
99 AC_CACHE_VAL(ipv6_cv_socklen_t, [dnl
100 AC_TRY_LINK([#include <sys/types.h>
101 #include <sys/socket.h>],
102 [socklen_t len = 0;],
103 [ipv6_cv_socklen_t=yes], [ipv6_cv_socklen_t=no])])dnl
104 if test $ipv6_cv_socklen_t = yes; then
105 ifelse([$1], , AC_DEFINE(HAVE_SOCKLEN_T,[],[Do we have a socklen_t?]), [$1])
106 else
107 ifelse([$2], , :, [$2])
108 fi
109 AC_MSG_RESULT($ipv6_cv_socklen_t)])
110
0 dnl checking for kerberos 4 libraries (and DES)
1
2 AC_DEFUN([SASL_DES_CHK], [
3 AC_ARG_WITH(des, [ --with-des=DIR with DES (look in DIR) [yes] ],
4 with_des=$withval,
5 with_des=yes)
6
7 LIB_DES=""
8 if test "$with_des" != no; then
9 if test -d $with_des; then
10 CPPFLAGS="$CPPFLAGS -I${with_des}/include"
11 LDFLAGS="$LDFLAGS -L${with_des}/lib"
12 fi
13
14 if test "$with_openssl" != no; then
15 dnl check for openssl installing -lcrypto, then make vanilla check
16 AC_CHECK_LIB(crypto, des_cbc_encrypt, [
17 AC_CHECK_HEADER(openssl/des.h, [AC_DEFINE(WITH_SSL_DES,[],[Use OpenSSL DES Implementation])
18 LIB_DES="-lcrypto";
19 with_des=yes],
20 with_des=no)],
21 with_des=no, $LIB_RSAREF)
22
23 dnl same test again, different symbol name
24 if test "$with_des" = no; then
25 AC_CHECK_LIB(crypto, DES_cbc_encrypt, [
26 AC_CHECK_HEADER(openssl/des.h, [AC_DEFINE(WITH_SSL_DES,[],[Use OpenSSL DES Implementation])
27 LIB_DES="-lcrypto";
28 with_des=yes],
29 with_des=no)],
30 with_des=no, $LIB_RSAREF)
31 fi
32 fi
33
34 if test "$with_des" = no; then
35 AC_CHECK_LIB(des, des_cbc_encrypt, [LIB_DES="-ldes";
36 with_des=yes], with_des=no)
37 fi
38
39 if test "$with_des" = no; then
40 AC_CHECK_LIB(des425, des_cbc_encrypt, [LIB_DES="-ldes425";
41 with_des=yes], with_des=no)
42 fi
43
44 if test "$with_des" = no; then
45 AC_CHECK_LIB(des524, des_cbc_encrypt, [LIB_DES="-ldes524";
46 with_des=yes], with_des=no)
47 fi
48
49 if test "$with_des" = no; then
50 dnl if openssl is around, we might be able to use that for des
51
52 dnl if openssl has been compiled with the rsaref2 libraries,
53 dnl we need to include the rsaref libraries in the crypto check
54 LIB_RSAREF=""
55 AC_CHECK_LIB(rsaref, RSAPublicEncrypt,
56 LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes,
57 cmu_have_rsaref=no)
58
59 AC_CHECK_LIB(crypto, des_cbc_encrypt, [
60 AC_CHECK_HEADER(openssl/des.h, [AC_DEFINE(WITH_SSL_DES,[],[Use OpenSSL DES Implementation])
61 LIB_DES="-lcrypto";
62 with_des=yes],
63 with_des=no)],
64 with_des=no, $LIB_RSAREF)
65 fi
66 fi
67
68 if test "$with_des" != no; then
69 AC_DEFINE(WITH_DES,[],[Use DES])
70 fi
71
72 AC_SUBST(LIB_DES)
73 ])
74
75 AC_DEFUN([SASL_KERBEROS_V4_CHK], [
76 AC_REQUIRE([SASL_DES_CHK])
77
78 AC_ARG_ENABLE(krb4, [ --enable-krb4 enable KERBEROS_V4 authentication [[no]] ],
79 krb4=$enableval,
80 krb4=no)
81
82 if test "$krb4" != no; then
83 dnl In order to compile kerberos4, we need libkrb and libdes.
84 dnl (We've already gotten libdes from SASL_DES_CHK)
85 dnl we might need -lresolv for kerberos
86 AC_CHECK_LIB(resolv,res_search)
87
88 dnl if we were ambitious, we would look more aggressively for the
89 dnl krb4 install
90 if test -d ${krb4}; then
91 AC_CACHE_CHECK(for Kerberos includes, cyrus_cv_krbinclude, [
92 for krbhloc in include/kerberosIV include/kerberos include
93 do
94 if test -f ${krb4}/${krbhloc}/krb.h ; then
95 cyrus_cv_krbinclude=${krb4}/${krbhloc}
96 break
97 fi
98 done
99 ])
100
101 if test -n "${cyrus_cv_krbinclude}"; then
102 CPPFLAGS="$CPPFLAGS -I${cyrus_cv_krbinclude}"
103 fi
104 LDFLAGS="$LDFLAGS -L$krb4/lib"
105 fi
106
107 if test "$with_des" != no; then
108 AC_CHECK_HEADER(krb.h, [
109 AC_CHECK_LIB(com_err, com_err, [
110 AC_CHECK_LIB(krb, krb_mk_priv,
111 [COM_ERR="-lcom_err"; SASL_KRB_LIB="-lkrb"; krb4lib="yes"],
112 krb4lib=no, $LIB_DES -lcom_err)], [
113 AC_CHECK_LIB(krb, krb_mk_priv,
114 [COM_ERR=""; SASL_KRB_LIB="-lkrb"; krb4lib="yes"],
115 krb4lib=no, $LIB_DES)])], krb4="no")
116
117 if test "$krb4" != "no" -a "$krb4lib" = "no"; then
118 AC_CHECK_LIB(krb4, krb_mk_priv,
119 [COM_ERR=""; SASL_KRB_LIB="-lkrb4"; krb4=yes],
120 krb4=no, $LIB_DES)
121 fi
122 if test "$krb4" = no; then
123 AC_WARN(No Kerberos V4 found)
124 fi
125 else
126 AC_WARN(No DES library found for Kerberos V4 support)
127 krb4=no
128 fi
129 fi
130
131 if test "$krb4" != no; then
132 cmu_save_LIBS="$LIBS"
133 LIBS="$LIBS $SASL_KRB_LIB"
134 AC_CHECK_FUNCS(krb_get_err_text)
135 LIBS="$cmu_save_LIBS"
136 fi
137
138 AC_MSG_CHECKING(KERBEROS_V4)
139 if test "$krb4" != no; then
140 AC_MSG_RESULT(enabled)
141 SASL_MECHS="$SASL_MECHS libkerberos4.la"
142 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/kerberos4.c"
143 SASL_STATIC_OBJS="$SASL_STATIC_OBJS kerberos4.o"
144 AC_DEFINE(STATIC_KERBEROS4,[],[User KERBEROS_V4 Staticly])
145 AC_DEFINE(HAVE_KRB,[],[Do we have Kerberos 4 Support?])
146 SASL_KRB_LIB="$SASL_KRB_LIB $LIB_DES $COM_ERR"
147 else
148 AC_MSG_RESULT(disabled)
149 fi
150 AC_SUBST(SASL_KRB_LIB)
151 ])
152
0 dnl
1 dnl macros for configure.in to detect openldap
2 dnl
3
4 dnl
5 dnl Check for OpenLDAP version compatility
6 AC_DEFUN([CMU_OPENLDAP_API],
7 [AC_CACHE_CHECK([OpenLDAP api], [cmu_cv_openldap_api],[
8 AC_EGREP_CPP(__openldap_api,[
9 #include <ldap.h>
10
11 #ifdef LDAP_API_FEATURE_X_OPENLDAP
12 char *__openldap_api = LDAP_API_FEATURE_X_OPENLDAP;
13 #endif
14 ], [cmu_cv_openldap_api=yes], [cmu_cv_openldap_api=no])])
15 ])
16
17 dnl
18 dnl Check for OpenLDAP version compatility
19 AC_DEFUN([CMU_OPENLDAP_COMPAT],
20 [AC_CACHE_CHECK([OpenLDAP version], [cmu_cv_openldap_compat],[
21 AC_EGREP_CPP(__openldap_compat,[
22 #include <ldap.h>
23
24 /* Require 2.1.27+ and 2.2.6+ */
25 #if LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR == 1 && LDAP_VENDOR_VERSION_PATCH > 26
26 char *__openldap_compat = "2.1.27 or better okay";
27 #elif LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR == 2 && LDAP_VENDOR_VERSION_PATCH > 5
28 char *__openldap_compat = "2.2.6 or better okay";
29 #elif LDAP_VENDOR_VERSION_MAJOR == 2 && LDAP_VENDOR_VERSION_MINOR > 2
30 char *__openldap_compat = "2.3 or better okay"
31 #endif
32 ], [cmu_cv_openldap_compat=yes], [cmu_cv_openldap_compat=no])])
33 ])
34
0 dnl
1 dnl macros for configure.in to detect openssl
2 dnl
3
4 AC_DEFUN([CMU_HAVE_OPENSSL], [
5 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
6 AC_ARG_WITH(openssl,
7 [AS_HELP_STRING([--with-openssl=DIR], [use OpenSSL from DIR])],
8 with_openssl=$withval, with_openssl="yes")
9
10 save_CPPFLAGS=$CPPFLAGS
11 save_LDFLAGS=$LDFLAGS
12
13 if test -d $with_openssl; then
14 CPPFLAGS="${CPPFLAGS} -I${with_openssl}/include"
15 CMU_ADD_LIBPATH(${with_openssl}/$CMU_LIB_SUBDIR)
16 fi
17
18 case "$with_openssl" in
19 no)
20 with_openssl="no";;
21 *)
22 dnl if openssl has been compiled with the rsaref2 libraries,
23 dnl we need to include the rsaref libraries in the crypto check
24 LIB_RSAREF=""
25 AC_CHECK_LIB(rsaref, RSAPublicEncrypt,
26 cmu_have_rsaref=yes;
27 [AC_CHECK_LIB(RSAglue, RSAPublicEncrypt,
28 LIB_RSAREF="-lRSAglue -lrsaref",
29 LIB_RSAREF="-lrsaref")],
30 cmu_have_rsaref=no)
31
32 AC_CHECK_HEADER(openssl/evp.h, [
33 AC_CHECK_LIB(crypto, EVP_DigestInit,
34 with_openssl="yes",
35 with_openssl="no", $LIB_RSAREF)],
36 with_openssl=no)
37 ;;
38 esac
39
40 if test "$with_openssl" != "no"; then
41 AC_DEFINE(HAVE_OPENSSL,[],[Do we have OpenSSL?])
42 else
43 CPPFLAGS=$save_CPPFLAGS
44 LDFLAGS=$save_LDFLAGS
45 fi
46 ])
0 dnl Check for PLAIN (and therefore crypt)
1
2 AC_DEFUN([SASL_PLAIN_CHK],[
3 AC_REQUIRE([SASL2_CRYPT_CHK])
4
5 dnl PLAIN
6 AC_ARG_ENABLE(plain, [ --enable-plain enable PLAIN authentication [yes] ],
7 plain=$enableval,
8 plain=yes)
9
10 PLAIN_LIBS=""
11 if test "$plain" != no; then
12 dnl In order to compile plain, we need crypt.
13 if test "$cmu_have_crypt" = yes; then
14 PLAIN_LIBS=$LIB_CRYPT
15 fi
16 fi
17 AC_SUBST(PLAIN_LIBS)
18
19 AC_MSG_CHECKING(PLAIN)
20 if test "$plain" != no; then
21 AC_MSG_RESULT(enabled)
22 SASL_MECHS="$SASL_MECHS libplain.la"
23 if test "$enable_static" = yes; then
24 SASL_STATIC_OBJS="$SASL_STATIC_OBJS plain.o"
25 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/plain.c"
26 AC_DEFINE(STATIC_PLAIN,[],[Link PLAIN Staticly])
27 fi
28 else
29 AC_MSG_RESULT(disabled)
30 fi
31 ])
0 # sasl2.m4--sasl2 libraries and includes
1 # Rob Siemborski
2
3 # SASL2_CRYPT_CHK
4 # ---------------
5 AC_DEFUN([SASL_GSSAPI_CHK],
6 [AC_REQUIRE([SASL2_CRYPT_CHK])
7 AC_REQUIRE([CMU_SOCKETS])
8 AC_ARG_ENABLE([gssapi],
9 [AC_HELP_STRING([--enable-gssapi=<DIR>],
10 [enable GSSAPI authentication [yes]])],
11 [gssapi=$enableval],
12 [gssapi=yes])
13 AC_ARG_WITH([gss_impl],
14 [AC_HELP_STRING([--with-gss_impl={heimdal|mit|cybersafe|seam|auto}],
15 [choose specific GSSAPI implementation [[auto]]])],
16 [gss_impl=$withval],
17 [gss_impl=auto])
18
19 if test "$gssapi" != no; then
20 platform=
21 case "${host}" in
22 *-*-linux*)
23 platform=__linux
24 ;;
25 *-*-hpux*)
26 platform=__hpux
27 ;;
28 *-*-irix*)
29 platform=__irix
30 ;;
31 *-*-solaris2*)
32 # When should we use __sunos?
33 platform=__solaris
34 ;;
35 *-*-aix*)
36 ###_AIX
37 platform=__aix
38 ;;
39 *)
40 AC_WARN([The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script])
41 if test "$gss_impl" = "cybersafe"; then
42 AC_MSG_ERROR([CyberSafe was forced, cannot continue as platform is not supported])
43 fi
44 ;;
45 esac
46
47 cmu_saved_CPPFLAGS=$CPPFLAGS
48
49 if test -d ${gssapi}; then
50 CPPFLAGS="$CPPFLAGS -I$gssapi/include"
51 # We want to keep -I in our CPPFLAGS, but only if we succeed
52 cmu_saved_CPPFLAGS=$CPPFLAGS
53 ### I am not sure how useful is this (and whether this is required at all
54 ### especially when we have to provide two -L flags for new CyberSafe
55 LDFLAGS="$LDFLAGS -L$gssapi/lib"
56
57 if test -n "$platform"; then
58 if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
59 CPPFLAGS="$CPPFLAGS -D$platform"
60 if test -d "${gssapi}/appsec-sdk/include"; then
61 CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
62 fi
63 fi
64 fi
65 fi
66 AC_CHECK_HEADER([gssapi.h],,
67 [AC_CHECK_HEADER([gssapi/gssapi.h],, [gssapi=no])])
68 AC_CHECK_HEADERS(gssapi/gssapi_ext.h)
69 CPPFLAGS=$cmu_saved_CPPFLAGS
70
71 fi
72
73 if test "$gssapi" != no; then
74 if test "$ac_cv_header_gssapi_h" = "yes" -o "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
75 AC_DEFINE(HAVE_GSSAPI_H,,[Define if you have the gssapi.h header file])
76 fi
77
78 # We need to find out which gssapi implementation we are
79 # using. Supported alternatives are: MIT Kerberos 5,
80 # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal),
81 # CyberSafe Kerberos 5 (http://www.cybersafe.com/)
82 # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/)
83 #
84 # The choice is reflected in GSSAPIBASE_LIBS
85
86 AC_CHECK_LIB(resolv,res_search)
87 if test -d ${gssapi}; then
88 gssapi_dir="${gssapi}/lib"
89 GSSAPIBASE_LIBS="-L$gssapi_dir"
90 GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir"
91 else
92 # FIXME: This is only used for building cyrus, and then only as
93 # a real hack. it needs to be fixed.
94 gssapi_dir="/usr/local/lib"
95 fi
96
97 # Check a full link against the Heimdal libraries.
98 # If this fails, check a full link against the MIT libraries.
99 # If this fails, check a full link against the CyberSafe libraries.
100 # If this fails, check a full link against the Solaris 8 and up libgss.
101
102 if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then
103 gss_failed=0
104 AC_CHECK_LIB(gssapi,gss_unwrap,gss_impl="heimdal",gss_failed=1,
105 ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET})
106 if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
107 gss_impl="failed"
108 fi
109 fi
110
111 if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
112 # check for libkrb5support first
113 AC_CHECK_LIB(krb5support,krb5int_getspecific,K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a,,${LIB_SOCKET})
114
115 gss_failed=0
116 AC_CHECK_LIB(gssapi_krb5,gss_unwrap,gss_impl="mit",gss_failed=1,
117 ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET})
118 if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
119 gss_impl="failed"
120 fi
121 fi
122
123 # For Cybersafe one has to set a platform define in order to make compilation work
124 if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
125
126 cmu_saved_CPPFLAGS=$CPPFLAGS
127 cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS
128 # FIXME - Note that the libraries are in .../lib64 for 64bit kernels
129 if test -d "${gssapi}/appsec-rt/lib"; then
130 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib"
131 fi
132 CPPFLAGS="$CPPFLAGS -D$platform"
133 if test -d "${gssapi}/appsec-sdk/include"; then
134 CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
135 fi
136
137 gss_failed=0
138
139 # Check for CyberSafe with two libraries first, than fall back to a single
140 # library (older CyberSafe)
141
142 unset ac_cv_lib_gss_csf_gss_acq_user
143 AC_CHECK_LIB(gss,csf_gss_acq_user,gss_impl="cybersafe03",
144 [unset ac_cv_lib_gss_csf_gss_acq_user;
145 AC_CHECK_LIB(gss,csf_gss_acq_user,gss_impl="cybersafe",
146 gss_failed=1,$GSSAPIBASE_LIBS -lgss)],
147 [${GSSAPIBASE_LIBS} -lgss -lcstbk5])
148
149 if test "$gss_failed" = "1"; then
150 # Restore variables
151 GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS
152 CPPFLAGS=$cmu_saved_CPPFLAGS
153
154 if test "$gss_impl" != "auto"; then
155 gss_impl="failed"
156 fi
157 fi
158 fi
159
160 if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then
161 gss_failed=0
162 AC_CHECK_LIB(gss,gss_unwrap,gss_impl="seam",gss_failed=1,-lgss)
163 if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
164 gss_impl="failed"
165 fi
166 fi
167
168 if test "$gss_impl" = "mit"; then
169 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}"
170 GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
171 elif test "$gss_impl" = "heimdal"; then
172 CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
173 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
174 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}"
175 elif test "$gss_impl" = "cybersafe03"; then
176 # Version of CyberSafe with two libraries
177 CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
178 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5"
179 # there is no static libgss for CyberSafe
180 GSSAPIBASE_STATIC_LIBS=none
181 elif test "$gss_impl" = "cybersafe"; then
182 CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
183 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss"
184 # there is no static libgss for CyberSafe
185 GSSAPIBASE_STATIC_LIBS=none
186 elif test "$gss_impl" = "seam"; then
187 GSSAPIBASE_LIBS=-lgss
188 # there is no static libgss on Solaris 8 and up
189 GSSAPIBASE_STATIC_LIBS=none
190 elif test "$gss_impl" = "failed"; then
191 gssapi="no"
192 GSSAPIBASE_LIBS=
193 GSSAPIBASE_STATIC_LIBS=
194 AC_WARN([Disabling GSSAPI - specified library not found])
195 else
196 gssapi="no"
197 GSSAPIBASE_LIBS=
198 GSSAPIBASE_STATIC_LIBS=
199 AC_WARN([Disabling GSSAPI - no library])
200 fi
201 fi
202
203 #
204 # Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME
205 # in gssapi\rfckrb5.h
206 #
207 if test "$gssapi" != "no"; then
208 if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
209 AC_EGREP_CPP(hostbased_service_gss_nt_yes,
210 [#include <gssapi/gssapi.h>
211 #ifdef GSS_C_NT_HOSTBASED_SERVICE
212 hostbased_service_gss_nt_yes
213 #endif],
214 [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
215 [Define if your GSSAPI implementation defines GSS_C_NT_HOSTBASED_SERVICE])],
216 [AC_WARN([Cybersafe define not found])])
217
218 elif test "$ac_cv_header_gssapi_h" = "yes"; then
219 AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi.h,
220 [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
221 [Define if your GSSAPI implementation defines GSS_C_NT_HOSTBASED_SERVICE])])
222 elif test "$ac_cv_header_gssapi_gssapi_h"; then
223 AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi/gssapi.h,
224 [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,,
225 [Define if your GSSAPI implementation defines GSS_C_NT_HOSTBASED_SERVICE])])
226 fi
227
228 if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
229 AC_EGREP_CPP(user_name_yes_gss_nt,
230 [#include <gssapi/gssapi.h>
231 #ifdef GSS_C_NT_USER_NAME
232 user_name_yes_gss_nt
233 #endif],
234 [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,,
235 [Define if your GSSAPI implementation defines GSS_C_NT_USER_NAME])],
236 [AC_WARN([Cybersafe define not found])])
237 elif test "$ac_cv_header_gssapi_h" = "yes"; then
238 AC_EGREP_HEADER(GSS_C_NT_USER_NAME, gssapi.h,
239 [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,,
240 [Define if your GSSAPI implementation defines GSS_C_NT_USER_NAME])])
241 AC_EGREP_HEADER(gss_inquire_attrs_for_mech, gssapi.h, rfc5587=yes)
242 AC_EGREP_HEADER(gss_inquire_mech_for_saslname, gssapi.h, rfc5801=yes)
243 elif test "$ac_cv_header_gssapi_gssapi_h"; then
244 AC_EGREP_HEADER(GSS_C_NT_USER_NAME, gssapi/gssapi.h,
245 [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,,
246 [Define if your GSSAPI implementation defines GSS_C_NT_USER_NAME])])
247 AC_EGREP_HEADER(gss_inquire_attrs_for_mech, gssapi/gssapi.h, rfc5587=yes)
248 AC_EGREP_HEADER(gss_inquire_mech_for_saslname, gssapi.h, rfc5801=yes)
249 fi
250 fi
251
252 AC_MSG_CHECKING([GSSAPI])
253 if test "$gssapi" != no; then
254 AC_MSG_RESULT([with implementation ${gss_impl}])
255 AC_CHECK_LIB(resolv,res_search,GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv")
256 SASL_MECHS="$SASL_MECHS libgssapiv2.la"
257 SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o"
258 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/gssapi.c"
259 if test "$rfc5587" = "yes" -a "$rfc5801" = "yes"; then
260 SASL_MECHS="$SASL_MECHS libgs2.la"
261 SASL_STATIC_OBJS="$SASL_STATIC_OBJS gs2.o"
262 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/gs2.c"
263 fi
264
265 cmu_save_LIBS="$LIBS"
266 LIBS="$LIBS $GSSAPIBASE_LIBS"
267 AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity)
268 if test "$ac_cv_func_gsskrb5_register_acceptor_identity" = no ; then
269 AC_CHECK_HEADERS(gssapi/gssapi_krb5.h)
270 if test "$ac_cv_header_gssapi_gssapi_krb5_h" = "yes"; then
271 AC_CHECK_DECL(gsskrb5_register_acceptor_identity,
272 [AC_DEFINE(HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY,1,
273 [Define if your GSSAPI implementation defines gsskrb5_register_acceptor_identity])],,
274 [
275 AC_INCLUDES_DEFAULT
276 #include <gssapi/gssapi_krb5.h>
277 ])
278 fi
279 fi
280 AC_CHECK_FUNCS(gss_decapsulate_token)
281 AC_CHECK_FUNCS(gss_encapsulate_token)
282 AC_CHECK_FUNCS(gss_oid_equal)
283 LIBS="$cmu_save_LIBS"
284
285 cmu_save_LIBS="$LIBS"
286 LIBS="$LIBS $GSSAPIBASE_LIBS"
287 AC_CHECK_FUNCS(gss_get_name_attribute)
288 LIBS="$cmu_save_LIBS"
289
290 cmu_save_LIBS="$LIBS"
291 LIBS="$LIBS $GSSAPIBASE_LIBS"
292 AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries])
293 AC_TRY_RUN([
294 #ifdef HAVE_GSSAPI_H
295 #include <gssapi.h>
296 #else
297 #include <gssapi/gssapi.h>
298 #endif
299
300 int main(void)
301 {
302 gss_OID_desc spnego_oid = { 6, (void *) "\x2b\x06\x01\x05\x05\x02" };
303 gss_OID_set mech_set;
304 OM_uint32 min_stat;
305 int have_spnego = 0;
306
307 if (gss_indicate_mechs(&min_stat, &mech_set) == GSS_S_COMPLETE) {
308 gss_test_oid_set_member(&min_stat, &spnego_oid, mech_set, &have_spnego);
309 gss_release_oid_set(&min_stat, &mech_set);
310 }
311
312 return (!have_spnego); // 0 = success, 1 = failure
313 }
314 ],
315 [ AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO])
316 AC_MSG_RESULT(yes) ],
317 AC_MSG_RESULT(no))
318 LIBS="$cmu_save_LIBS"
319
320 else
321 AC_MSG_RESULT([disabled])
322 fi
323 AC_SUBST(GSSAPIBASE_LIBS)
324 ])# SASL_GSSAPI_CHK
325
326
327 # SASL_SET_GSSAPI_LIBS
328 # --------------------
329 AC_DEFUN([SASL_SET_GSSAPI_LIBS],
330 [SASL_GSSAPI_LIBS_SET="yes"
331 ])
332
333
334 # CMU_SASL2
335 # ---------
336 # What we want to do here is setup LIB_SASL with what one would
337 # generally want to have (e.g. if static is requested, make it that,
338 # otherwise make it dynamic.
339 #
340 # We also want to create LIB_DYN_SASL and DYNSASLFLAGS.
341 #
342 # Also sets using_static_sasl to "no" "static" or "staticonly"
343 #
344 AC_DEFUN([CMU_SASL2],
345 [AC_REQUIRE([SASL_GSSAPI_CHK])
346
347 AC_ARG_WITH(sasl,
348 [AC_HELP_STRING([--with-sasl=DIR],[Compile with libsasl2 in <DIR>])],
349 with_sasl="$withval",
350 with_sasl="yes")
351
352 AC_ARG_WITH(staticsasl,
353 [AC_HELP_STRING([--with-staticsasl=DIR],
354 [Compile with staticly linked libsasl2 in <DIR>])],
355 [with_staticsasl="$withval";
356 if test $with_staticsasl != "no"; then
357 using_static_sasl="static"
358 fi],
359 [with_staticsasl="no"; using_static_sasl="no"])
360
361 SASLFLAGS=""
362 LIB_SASL=""
363
364 cmu_saved_CPPFLAGS=$CPPFLAGS
365 cmu_saved_LDFLAGS=$LDFLAGS
366 cmu_saved_LIBS=$LIBS
367
368 if test ${with_staticsasl} != "no"; then
369 if test -d ${with_staticsasl}; then
370 if test -d ${with_staticsasl}/lib64 ; then
371 ac_cv_sasl_where_lib=${with_staticsasl}/lib64
372 else
373 ac_cv_sasl_where_lib=${with_staticsasl}/lib
374 fi
375 ac_cv_sasl_where_lib=${with_staticsasl}/lib
376 ac_cv_sasl_where_inc=${with_staticsasl}/include
377
378 SASLFLAGS="-I$ac_cv_sasl_where_inc"
379 LIB_SASL="-L$ac_cv_sasl_where_lib"
380 CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
381 LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
382 else
383 with_staticsasl="/usr"
384 fi
385
386 AC_CHECK_HEADER(sasl/sasl.h,
387 [AC_CHECK_HEADER(sasl/saslutil.h,
388 [for i42 in lib64 lib; do
389 if test -r ${with_staticsasl}/$i42/libsasl2.a; then
390 ac_cv_found_sasl=yes
391 AC_MSG_CHECKING([for static libsasl])
392 LIB_SASL="$LIB_SASL ${with_staticsasl}/$i42/libsasl2.a"
393 fi
394 done
395 AC_CHECK_FUNC(dlopen,,[AC_CHECK_LIB(dl, dlopen, [LIB_SASL+="$LIB_SASL -ldl"])])
396 if test ! "$ac_cv_found_sasl" = "yes"; then
397 AC_MSG_CHECKING([for static libsasl])
398 AC_MSG_ERROR([Could not find ${with_staticsasl}/lib*/libsasl2.a])
399 fi])])
400
401 AC_MSG_RESULT([found])
402
403 if test "x$SASL_GSSAPI_LIBS_SET" = "x"; then
404 LIB_SASL="$LIB_SASL $GSSAPIBASE_STATIC_LIBS"
405 else
406 SASL_GSSAPI_LIBS_SET=""
407 cmu_saved_LIBS="$GSSAPIBASE_STATIC_LIBS $cmu_saved_LIBS"
408 fi
409 fi
410
411 if test -d ${with_sasl}; then
412 ac_cv_sasl_where_lib=${with_sasl}/lib
413 ac_cv_sasl_where_inc=${with_sasl}/include
414
415 DYNSASLFLAGS="-I$ac_cv_sasl_where_inc"
416 if test "$ac_cv_sasl_where_lib" != ""; then
417 CMU_ADD_LIBPATH_TO($ac_cv_sasl_where_lib, LIB_DYN_SASL)
418 fi
419 LIB_DYN_SASL="$LIB_DYN_SASL -lsasl2"
420 CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}"
421 LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}"
422 fi
423
424 # be sure to check for a SASLv2 specific function
425 AC_CHECK_HEADER(sasl/sasl.h,
426 [AC_CHECK_HEADER(sasl/saslutil.h,
427 [AC_CHECK_LIB(sasl2, prop_get,
428 ac_cv_found_sasl=yes,
429 ac_cv_found_sasl=no)],
430 ac_cv_found_sasl=no)],
431 ac_cv_found_sasl=no)
432
433 if test "$ac_cv_found_sasl" = "yes"; then
434 if test "$ac_cv_sasl_where_lib" != ""; then
435 CMU_ADD_LIBPATH_TO($ac_cv_sasl_where_lib, DYNLIB_SASL)
436 fi
437 DYNLIB_SASL="$DYNLIB_SASL -lsasl2"
438 if test "$using_static_sasl" != "static"; then
439 LIB_SASL=$DYNLIB_SASL
440 SASLFLAGS=$DYNSASLFLAGS
441 fi
442 else
443 DYNLIB_SASL=""
444 DYNSASLFLAGS=""
445 using_static_sasl="staticonly"
446 fi
447
448 if test "x$SASL_GSSAPI_LIBS_SET" != "x"; then
449 SASL_GSSAPI_LIBS_SET=""
450 cmu_saved_LIBS="$GSSAPIBASE_LIBS $cmu_saved_LIBS"
451 fi
452
453 LIBS="$cmu_saved_LIBS"
454 LDFLAGS="$cmu_saved_LDFLAGS"
455 CPPFLAGS="$cmu_saved_CPPFLAGS"
456
457 AC_SUBST(LIB_DYN_SASL)
458 AC_SUBST(DYNSASLFLAGS)
459 AC_SUBST(LIB_SASL)
460 AC_SUBST(SASLFLAGS)
461 ])# CMU_SASL2
462
463
464 # CMU_SASL2_REQUIRED
465 # ------------------
466 AC_DEFUN([CMU_SASL2_REQUIRED],
467 [AC_REQUIRE([CMU_SASL2])
468 if test "$ac_cv_found_sasl" != "yes"; then
469 AC_MSG_ERROR([Cannot continue without libsasl2.
470 Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.])
471 fi])
472
473
474 # CMU_SASL2_REQUIRE_VER
475 # ---------------------
476 AC_DEFUN([CMU_SASL2_REQUIRE_VER],
477 [AC_REQUIRE([CMU_SASL2_REQUIRED])
478
479 cmu_saved_CPPFLAGS=$CPPFLAGS
480 CPPFLAGS="$CPPFLAGS $SASLFLAGS"
481
482 AC_TRY_CPP([
483 #include <sasl/sasl.h>
484
485 #ifndef SASL_VERSION_MAJOR
486 #error SASL_VERSION_MAJOR not defined
487 #endif
488 #ifndef SASL_VERSION_MINOR
489 #error SASL_VERSION_MINOR not defined
490 #endif
491 #ifndef SASL_VERSION_STEP
492 #error SASL_VERSION_STEP not defined
493 #endif
494
495 #if SASL_VERSION_MAJOR < $1 || SASL_VERSION_MINOR < $2 || SASL_VERSION_STEP < $3
496 #error SASL version is less than $1.$2.$3
497 #endif
498 ],,
499 [AC_MSG_ERROR([Incorrect SASL headers found. This package requires SASL $1.$2.$3 or newer.])])
500
501 CPPFLAGS=$cmu_saved_CPPFLAGS
502 ])# CMU_SASL2_REQUIRE_VER
503
504
505 # CMU_SASL2_CHECKAPOP_REQUIRED
506 # ----------------------------
507 AC_DEFUN([CMU_SASL2_CHECKAPOP_REQUIRED],
508 [AC_REQUIRE([CMU_SASL2_REQUIRED])
509
510 cmu_saved_LDFLAGS=$LDFLAGS
511
512 LDFLAGS="$LDFLAGS $LIB_SASL"
513
514 AC_CHECK_LIB(sasl2, sasl_checkapop,
515 [AC_DEFINE(HAVE_APOP,[],[Does SASL support APOP?])],
516 [AC_MSG_ERROR([libsasl2 without working sasl_checkapop. Cannot continue.])])
517
518 LDFLAGS=$cmu_saved_LDFLAGS
519 ])# CMU_SASL2_CHECKAPOP_REQUIRED
520
521
522 # SASL2_CRYPT_CHK
523 # ---------------
524 AC_DEFUN([SASL2_CRYPT_CHK],
525 [AC_CHECK_FUNC(crypt, cmu_have_crypt=yes,
526 [AC_CHECK_LIB(crypt, crypt,
527 LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes,
528 cmu_have_crypt=no)])
529 AC_SUBST(LIB_CRYPT)
530 ])# SASL2_CRYPT_CHK
0 dnl Functions to check what database to use for libsasldb
1
2 dnl Berkeley DB specific checks first..
3
4 dnl Figure out what database type we're using
5 AC_DEFUN([SASL_DB_CHECK], [
6 cmu_save_LIBS="$LIBS"
7 AC_ARG_WITH(dblib,
8 [AC_HELP_STRING([--with-dblib={berkeley|gdbm|lmdb|ndbm|none|auto_detect}],
9 [set the DB library to use [[berkeley]]])],
10 dblib=$withval,
11 dblib=auto_detect)
12
13 CYRUS_BERKELEY_DB_OPTS()
14
15 SASL_DB_LIB=""
16
17 case "$dblib" in
18 dnl this is unbelievably painful due to confusion over what db-3 should be
19 dnl named. arg.
20 berkeley)
21 CYRUS_BERKELEY_DB_CHK()
22 CPPFLAGS="${CPPFLAGS} ${BDB_INCADD}"
23 SASL_DB_INC=$BDB_INCADD
24 SASL_DB_LIB="${BDB_LIBADD}"
25 ;;
26 gdbm)
27 AC_ARG_WITH(gdbm,[ --with-gdbm=PATH use gdbm from PATH],
28 with_gdbm="${withval}")
29
30 case "$with_gdbm" in
31 ""|yes)
32 AC_CHECK_HEADER(gdbm.h, [
33 AC_CHECK_LIB(gdbm, gdbm_open, SASL_DB_LIB="-lgdbm",
34 dblib="no")],
35 dblib="no")
36 ;;
37 *)
38 if test -d $with_gdbm; then
39 CPPFLAGS="${CPPFLAGS} -I${with_gdbm}/include"
40 LDFLAGS="${LDFLAGS} -L${with_gdbm}/lib"
41 SASL_DB_LIB="-lgdbm"
42 else
43 with_gdbm="no"
44 fi
45 esac
46 ;;
47 lmdb)
48 AC_CHECK_HEADER(lmdb.h, [
49 AC_CHECK_LIB(lmdb, mdb_env_create, SASL_DB_LIB="-llmdb"; enable_keep_db_open=yes, dblib="no")],
50 dblib="no")
51 ;;
52 ndbm)
53 dnl We want to attempt to use -lndbm if we can, just in case
54 dnl there's some version of it installed and overriding libc
55 AC_CHECK_HEADER(ndbm.h, [
56 AC_CHECK_LIB(ndbm, dbm_open, SASL_DB_LIB="-lndbm", [
57 AC_CHECK_FUNC(dbm_open,,dblib="no")])],
58 dblib="no")
59 ;;
60 auto_detect)
61 dnl How about berkeley db?
62 CYRUS_BERKELEY_DB_CHK()
63 if test "$dblib" = no; then
64 dnl How about OpenLDAP's mdb?
65 AC_CHECK_HEADER(lmdb.h, [
66 AC_CHECK_LIB(lmdb, mdb_env_create, SASL_DB_LIB="-llmdb"; enable_keep_db_open=yes, dblib="no")],
67 dblib="no")
68 fi
69 if test "$dblib" = no; then
70 dnl How about ndbm?
71 AC_CHECK_HEADER(ndbm.h, [
72 AC_CHECK_LIB(ndbm, dbm_open,
73 dblib="ndbm"; SASL_DB_LIB="-lndbm",
74 dblib="weird")],
75 dblib="no")
76 if test "$dblib" = "weird"; then
77 dnl Is ndbm in the standard library?
78 AC_CHECK_FUNC(dbm_open, dblib="ndbm", dblib="no")
79 fi
80
81 if test "$dblib" = no; then
82 dnl Can we use gdbm?
83 AC_CHECK_HEADER(gdbm.h, [
84 AC_CHECK_LIB(gdbm, gdbm_open, dblib="gdbm";
85 SASL_DB_LIB="-lgdbm", dblib="no")],
86 dblib="no")
87 fi
88 else
89 dnl we took Berkeley
90 CPPFLAGS="${CPPFLAGS} ${BDB_INCADD}"
91 SASL_DB_INC=$BDB_INCADD
92 SASL_DB_LIB="${BDB_LIBADD}"
93 fi
94 ;;
95 none)
96 ;;
97 no)
98 ;;
99 *)
100 AC_MSG_WARN([Bad DB library implementation specified;])
101 AC_ERROR([Use either \"berkeley\", \"gdbm\", \"lmdb\", \"ndbm\" or \"none\"])
102 dblib=no
103 ;;
104 esac
105 LIBS="$cmu_save_LIBS"
106
107 AC_MSG_CHECKING(DB library to use)
108 AC_MSG_RESULT($dblib)
109
110 SASL_DB_BACKEND="db_${dblib}.lo"
111 SASL_DB_BACKEND_STATIC="db_${dblib}.o allockey.o"
112 SASL_DB_BACKEND_STATIC_SRCS="\$(top_srcdir)/sasldb/db_${dblib}.c \$(top_srcdir)/sasldb/allockey.c"
113 SASL_DB_UTILS="saslpasswd2 sasldblistusers2"
114 SASL_DB_MANS="saslpasswd2.8 sasldblistusers2.8"
115
116 case "$dblib" in
117 gdbm)
118 SASL_MECHS="$SASL_MECHS libsasldb.la"
119 AC_DEFINE(SASL_GDBM,[],[Use GDBM for SASLdb])
120 ;;
121 lmdb)
122 SASL_MECHS="$SASL_MECHS libsasldb.la"
123 AC_DEFINE(SASL_LMDB,[],[Use LMDB for SASLdb])
124 ;;
125 ndbm)
126 SASL_MECHS="$SASL_MECHS libsasldb.la"
127 AC_DEFINE(SASL_NDBM,[],[Use NDBM for SASLdb])
128 ;;
129 berkeley)
130 SASL_MECHS="$SASL_MECHS libsasldb.la"
131 AC_DEFINE(SASL_BERKELEYDB,[],[Use BerkeleyDB for SASLdb])
132 ;;
133 *)
134 AC_MSG_WARN([Disabling SASL authentication database support])
135 dnl note that we do not add libsasldb.la to SASL_MECHS, since it
136 dnl will just fail to load anyway.
137 SASL_DB_BACKEND="db_none.lo"
138 SASL_DB_BACKEND_STATIC="db_none.o"
139 SASL_DB_BACKEND_STATIC_SRCS="\$(top_srcdir)/sasldb/db_none.c"
140 SASL_DB_UTILS=""
141 SASL_DB_MANS=""
142 SASL_DB_LIB=""
143 ;;
144 esac
145
146 if test "$enable_static" = yes; then
147 if test "$dblib" != "none"; then
148 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/sasldb.c $SASL_DB_BACKEND_STATIC_SRCS"
149 SASL_STATIC_OBJS="$SASL_STATIC_OBJS sasldb.o $SASL_DB_BACKEND_STATIC"
150 AC_DEFINE(STATIC_SASLDB,[],[Link SASLdb Staticly])
151 else
152 SASL_STATIC_OBJS="$SASL_STATIC_OBJS $SASL_DB_BACKEND_STATIC"
153 SASL_STATIC_SRCS="$SASL_STATIC_SRCS $SASL_DB_BACKEND_STATIC_SRCS"
154 fi
155 fi
156
157 AC_SUBST(SASL_DB_UTILS)
158 AC_SUBST(SASL_DB_MANS)
159 AC_SUBST(SASL_DB_BACKEND)
160 AC_SUBST(SASL_DB_BACKEND_STATIC)
161 AC_SUBST(SASL_DB_INC)
162 AC_SUBST(SASL_DB_LIB)
163 ])
164
165 dnl Figure out what database path we're using
166 AC_DEFUN([SASL_DB_PATH_CHECK], [
167 AC_ARG_WITH(dbpath, [ --with-dbpath=PATH set the DB path to use [/etc/sasldb2] ],
168 dbpath=$withval,
169 dbpath=/etc/sasldb2)
170 AC_MSG_CHECKING(DB path to use)
171 AC_MSG_RESULT($dbpath)
172 AC_DEFINE_UNQUOTED(SASL_DB_PATH, "$dbpath", [Path to default SASLdb database])])
0 /*
1 * TicketKeeperMenuStateProcotol.h
2 *
3 * Declarations of types for constants used in the Process-to-Process Communication
4 * protocol used between TicketKeeperLib and TicketKeeper. This should not be used
5 * by others
6 *
7 */
8
9 #ifndef TicketKeeperMenuStateProcotol_h
10 #define TicketKeeperMenuStateProcotol_h
11
12 #if PRAGMA_STRUCT_ALIGN
13 #pragma options align=mac68k
14 #elif PRAGMA_STRUCT_PACKPUSH
15 #pragma pack(push, 2)
16 #elif PRAGMA_STRUCT_PACK
17 #pragma pack(2)
18 #endif
19
20 /* Use these to find the PPC port for TicketKeeper */
21 enum {
22 mkPort_Creator = FOUR_CHAR_CODE ('MnuK'),
23 mkPort_Type = FOUR_CHAR_CODE ('appe')
24 };
25
26 /* Use these on PPC blocks sent to TK. The block type determines what command you are sending */
27 enum {
28 mkBlock_Creator = FOUR_CHAR_CODE ('MnuK'),
29 mkBlock_Type_MenuState = FOUR_CHAR_CODE ('Menu'),
30 mkBlock_Type_SetDefault = FOUR_CHAR_CODE ('SDef'),
31 mkBlock_Type_Logout = FOUR_CHAR_CODE ('LotP'),
32 mkBlock_Type_LogoutDefault = FOUR_CHAR_CODE ('Lout'),
33 mkBlock_Type_NewLogin = FOUR_CHAR_CODE ('Logn'),
34 mkBlock_Type_Renew = FOUR_CHAR_CODE ('RnwP'),
35 mkBlock_Type_RenewDefault = FOUR_CHAR_CODE ('Renw'),
36 mkBlock_Type_ChangePassword = FOUR_CHAR_CODE ('ChpP'),
37 mkBlock_Type_ChangePasswordDefault = FOUR_CHAR_CODE ('Chps'),
38 mkBlock_Type_MoveFloaterStructureRegion = FOUR_CHAR_CODE ('MFst'),
39 mkBlock_Type_SetDrawPies = FOUR_CHAR_CODE ('pie?'),
40 mkBlock_Type_SetHasCloseBox = FOUR_CHAR_CODE ('cls?'),
41 mkBlock_Type_SetIsVisible = FOUR_CHAR_CODE ('vis?'),
42 mkBlock_Type_SetIsZoomedOut = FOUR_CHAR_CODE ('zum?'),
43 mkBlock_Type_GetIsVisible = FOUR_CHAR_CODE ('?vis'),
44 mkBlock_Type_GetDrawPies = FOUR_CHAR_CODE ('?pie'),
45 mkBlock_Type_GetHasCloseBox = FOUR_CHAR_CODE ('?cls'),
46 mkBlock_Type_GetIsZoomedOut = FOUR_CHAR_CODE ('?zum'),
47 mkBlock_Type_OpenKerberosControlPanel = FOUR_CHAR_CODE ('OKCP')
48 };
49
50 /* Version number for menu state command */
51 enum {
52 mkReply_MenuState_CurrentVersion = 2
53 };
54
55 /*
56 * MenuState ('Menu') command returns a blob of data in the following format:
57 * (but you should really use the functions in TickerKeeperLib.h to parse it)
58 *
59 * [4 Bytes] Size of the structure
60 * [4 Bytes] Version of the structure (current = 2)
61 *
62 * [4 Bytes] Last change time for the default cache information
63 * [4 Bytes] Last change time for the cache list information
64 * [4 Bytes] 1 if default cache has valid tickets, 0 otherwise
65 * [4 bytes] Expiration time of the default cache in Mac epoch
66 * [PString] Principal of the default cache
67 * [PString] Display principal of the default cache (quoting removed)
68 * [PString] Short display principal of the default cache (quoting and default realm removed)
69 *
70 * [4 Bytes] Number of caches
71 *
72 * [4 Bytes] 1 if the first cache is default
73 * [4 Bytes] Version of the first cache
74 * [4 Bytes] 1 if the first cache has valid tickets
75 * [4 Bytes] start time of the first cache
76 * [4 Bytes] expiration time of the first cache
77 * [PString] Principal of the 1st cache
78 * [PString] Display principal if the 1st cache (quoting removed)
79 * [PString] Short display principal if the 1st cache (quoting and default realm removed)
80 *
81 * ...
82 *
83 * [4 Bytes] 1 if the last cache is default
84 * [4 Bytes] Version of the last cache
85 * [4 Bytes] 1 if the last cache has valid tickets
86 * [4 Bytes] start time of the last cache
87 * [4 Bytes] expiration time of the last cache
88 * [PString] Principal of the last cache
89 * [PString] Display principal if the nth cache (quoting removed)
90 * [PString] Short display principal if the nth cache (quoting and default realm removed)
91 */
92
93 struct MenuStateHeader {
94 UInt32 version;
95 UInt32 defaultCacheLastChangeTime;
96 UInt32 cacheListLastChangeTime;
97 UInt32 defaultCacheHasValidTickets;
98 UInt32 defaultCacheExpiration;
99 Str255 defaultCachePrincipal;
100 };
101
102 struct CacheEntry {
103 UInt32 isDefault;
104 UInt32 version;
105 UInt32 isValid;
106 UInt32 startTime;
107 UInt32 expirationTime;
108 Str255 principal;
109 };
110
111 struct CacheList {
112 UInt32 numCaches;
113 CacheEntry cacheList;
114 };
115
116 /*
117 * SetDefaultPrincipal, Logout, and Renew commands take a blob of data which contains the
118 * new principal to be made default (version + string format)
119 */
120
121 struct PrincipalParam {
122 UInt32 version;
123 Str255 principal;
124 };
125
126 struct MoveFloaterStructureRegionParam {
127 Rect bounds;
128 };
129
130 typedef PrincipalParam SetDefaultParam;
131 typedef PrincipalParam LogoutParam;
132 typedef PrincipalParam RenewParam;
133 typedef PrincipalParam ChangePasswordParam;
134
135 typedef Boolean SetDrawPiesParam;
136 typedef Boolean SetHasCloseBoxParam;
137 typedef Boolean SetIsVisibleParam;
138 typedef Boolean SetIsZoomedOutParam;
139
140 #if PRAGMA_STRUCT_ALIGN
141 #pragma options align=reset
142 #elif PRAGMA_STRUCT_PACKPUSH
143 #pragma pack(pop)
144 #elif PRAGMA_STRUCT_PACK
145 #pragma pack()
146 #endif
147
148 #endif /* TicketKeeperMenuStateProcotol_h */
+0
-547
man/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 # Makefile.am for SASL documentation
18 #
19 ################################################################
20 # Copyright (c) 2001 Carnegie Mellon University. All rights reserved.
21 #
22 # Redistribution and use in source and binary forms, with or without
23 # modification, are permitted provided that the following conditions
24 # are met:
25 #
26 # 1. Redistributions of source code must retain the above copyright
27 # notice, this list of conditions and the following disclaimer.
28 #
29 # 2. Redistributions in binary form must reproduce the above copyright
30 # notice, this list of conditions and the following disclaimer in
31 # the documentation and/or other materials provided with the
32 # distribution.
33 #
34 # 3. The name "Carnegie Mellon University" must not be used to
35 # endorse or promote products derived from this software without
36 # prior written permission. For permission or any other legal
37 # details, please contact
38 # Office of Technology Transfer
39 # Carnegie Mellon University
40 # 5000 Forbes Avenue
41 # Pittsburgh, PA 15213-3890
42 # (412) 268-4387, fax: (412) 268-7395
43 # tech-transfer@andrew.cmu.edu
44 #
45 # 4. Redistributions of any form whatsoever must retain the following
46 # acknowledgment:
47 # "This product includes software developed by Computing Services
48 # at Carnegie Mellon University (http://www.cmu.edu/computing/)."
49 #
50 # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
51 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
52 # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
53 # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
54 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
55 # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
56 # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
57 #
58 ################################################################
59 VPATH = @srcdir@
60 pkgdatadir = $(datadir)/@PACKAGE@
61 pkgincludedir = $(includedir)/@PACKAGE@
62 pkglibdir = $(libdir)/@PACKAGE@
63 pkglibexecdir = $(libexecdir)/@PACKAGE@
64 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
65 install_sh_DATA = $(install_sh) -c -m 644
66 install_sh_PROGRAM = $(install_sh) -c
67 install_sh_SCRIPT = $(install_sh) -c
68 INSTALL_HEADER = $(INSTALL_DATA)
69 transform = $(program_transform_name)
70 NORMAL_INSTALL = :
71 PRE_INSTALL = :
72 POST_INSTALL = :
73 NORMAL_UNINSTALL = :
74 PRE_UNINSTALL = :
75 POST_UNINSTALL = :
76 build_triplet = @build@
77 host_triplet = @host@
78 target_triplet = @target@
79 subdir = man
80 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
81 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
82 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
83 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
84 $(top_srcdir)/config/sasldb.m4 \
85 $(top_srcdir)/cmulocal/berkdb.m4 \
86 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
87 $(top_srcdir)/cmulocal/c-attribute.m4 \
88 $(top_srcdir)/cmulocal/common.m4 \
89 $(top_srcdir)/cmulocal/cyrus.m4 \
90 $(top_srcdir)/cmulocal/init_automake.m4 \
91 $(top_srcdir)/cmulocal/ipv6.m4 \
92 $(top_srcdir)/cmulocal/openldap.m4 \
93 $(top_srcdir)/cmulocal/openssl.m4 \
94 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
95 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
96 $(ACLOCAL_M4)
97 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
98 CONFIG_HEADER = $(top_builddir)/config.h
99 CONFIG_CLEAN_FILES =
100 CONFIG_CLEAN_VPATH_FILES =
101 SOURCES =
102 DIST_SOURCES =
103 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
104 am__vpath_adj = case $$p in \
105 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
106 *) f=$$p;; \
107 esac;
108 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
109 am__install_max = 40
110 am__nobase_strip_setup = \
111 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
112 am__nobase_strip = \
113 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
114 am__nobase_list = $(am__nobase_strip_setup); \
115 for p in $$list; do echo "$$p $$p"; done | \
116 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
117 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
118 if (++n[$$2] == $(am__install_max)) \
119 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
120 END { for (dir in files) print dir, files[dir] }'
121 am__base_list = \
122 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
123 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
124 man3dir = $(mandir)/man3
125 am__installdirs = "$(DESTDIR)$(man3dir)"
126 NROFF = nroff
127 MANS = $(man_MANS)
128 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
129 ACLOCAL = @ACLOCAL@
130 AMTAR = @AMTAR@
131 AUTOCONF = @AUTOCONF@
132 AUTOHEADER = @AUTOHEADER@
133 AUTOMAKE = @AUTOMAKE@
134 AWK = @AWK@
135 CC = @CC@
136 CCDEPMODE = @CCDEPMODE@
137 CFLAGS = @CFLAGS@
138 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
139 CPP = @CPP@
140 CPPFLAGS = @CPPFLAGS@
141 CYGPATH_W = @CYGPATH_W@
142 DEFS = @DEFS@
143 DEPDIR = @DEPDIR@
144 DIRS = @DIRS@
145 DMALLOC_LIBS = @DMALLOC_LIBS@
146 ECHO_C = @ECHO_C@
147 ECHO_N = @ECHO_N@
148 ECHO_T = @ECHO_T@
149 EGREP = @EGREP@
150 EXEEXT = @EXEEXT@
151 GETADDRINFOOBJS = @GETADDRINFOOBJS@
152 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
153 GETSUBOPT = @GETSUBOPT@
154 GREP = @GREP@
155 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
156 GSSAPI_LIBS = @GSSAPI_LIBS@
157 INSTALL = @INSTALL@
158 INSTALL_DATA = @INSTALL_DATA@
159 INSTALL_PROGRAM = @INSTALL_PROGRAM@
160 INSTALL_SCRIPT = @INSTALL_SCRIPT@
161 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
162 IPCTYPE = @IPCTYPE@
163 JAVAC = @JAVAC@
164 JAVADOC = @JAVADOC@
165 JAVAH = @JAVAH@
166 JAVAROOT = @JAVAROOT@
167 JAVA_INCLUDES = @JAVA_INCLUDES@
168 LDFLAGS = @LDFLAGS@
169 LIBOBJS = @LIBOBJS@
170 LIBS = @LIBS@
171 LIBTOOL = @LIBTOOL@
172 LIB_CRYPT = @LIB_CRYPT@
173 LIB_DES = @LIB_DES@
174 LIB_DOOR = @LIB_DOOR@
175 LIB_LDAP = @LIB_LDAP@
176 LIB_MYSQL = @LIB_MYSQL@
177 LIB_PGSQL = @LIB_PGSQL@
178 LIB_SOCKET = @LIB_SOCKET@
179 LIB_SQLITE = @LIB_SQLITE@
180 LIB_SQLITE3 = @LIB_SQLITE3@
181 LN_S = @LN_S@
182 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
183 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
184 LTLIBOBJS = @LTLIBOBJS@
185 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
186 MAKEINFO = @MAKEINFO@
187 MKDIR_P = @MKDIR_P@
188 NM = @NM@
189 NTLM_LIBS = @NTLM_LIBS@
190 OBJEXT = @OBJEXT@
191 OTP_LIBS = @OTP_LIBS@
192 PACKAGE = @PACKAGE@
193 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
194 PACKAGE_NAME = @PACKAGE_NAME@
195 PACKAGE_STRING = @PACKAGE_STRING@
196 PACKAGE_TARNAME = @PACKAGE_TARNAME@
197 PACKAGE_VERSION = @PACKAGE_VERSION@
198 PASSDSS_LIBS = @PASSDSS_LIBS@
199 PATH_SEPARATOR = @PATH_SEPARATOR@
200 PLAIN_LIBS = @PLAIN_LIBS@
201 PURECOV = @PURECOV@
202 PURIFY = @PURIFY@
203 PWCHECKMETH = @PWCHECKMETH@
204 RANLIB = @RANLIB@
205 SASL_DB_BACKEND = @SASL_DB_BACKEND@
206 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
207 SASL_DB_INC = @SASL_DB_INC@
208 SASL_DB_LIB = @SASL_DB_LIB@
209 SASL_DB_MANS = @SASL_DB_MANS@
210 SASL_DB_UTILS = @SASL_DB_UTILS@
211 SASL_DL_LIB = @SASL_DL_LIB@
212 SASL_KRB_LIB = @SASL_KRB_LIB@
213 SASL_MECHS = @SASL_MECHS@
214 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
215 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
216 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
217 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
218 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
219 SCRAM_LIBS = @SCRAM_LIBS@
220 SET_MAKE = @SET_MAKE@
221 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
222 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
223 SHELL = @SHELL@
224 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
225 SNPRINTFOBJS = @SNPRINTFOBJS@
226 SRP_LIBS = @SRP_LIBS@
227 STRIP = @STRIP@
228 VERSION = @VERSION@
229 abs_builddir = @abs_builddir@
230 abs_srcdir = @abs_srcdir@
231 abs_top_builddir = @abs_top_builddir@
232 abs_top_srcdir = @abs_top_srcdir@
233 ac_ct_CC = @ac_ct_CC@
234 am__include = @am__include@
235 am__leading_dot = @am__leading_dot@
236 am__quote = @am__quote@
237 am__tar = @am__tar@
238 am__untar = @am__untar@
239 bindir = @bindir@
240 build = @build@
241 build_alias = @build_alias@
242 build_cpu = @build_cpu@
243 build_os = @build_os@
244 build_vendor = @build_vendor@
245 builddir = @builddir@
246 configdir = @configdir@
247 datadir = @datadir@
248 datarootdir = @datarootdir@
249 docdir = @docdir@
250 dvidir = @dvidir@
251 exec_prefix = @exec_prefix@
252 host = @host@
253 host_alias = @host_alias@
254 host_cpu = @host_cpu@
255 host_os = @host_os@
256 host_vendor = @host_vendor@
257 htmldir = @htmldir@
258 includedir = @includedir@
259 infodir = @infodir@
260 install_sh = @install_sh@
261 libdir = @libdir@
262 libexecdir = @libexecdir@
263 localedir = @localedir@
264 localstatedir = @localstatedir@
265 mandir = @mandir@
266 mkdir_p = @mkdir_p@
267 oldincludedir = @oldincludedir@
268 pdfdir = @pdfdir@
269 plugindir = @plugindir@
270 prefix = @prefix@
271 program_transform_name = @program_transform_name@
272 psdir = @psdir@
273 sbindir = @sbindir@
274 sharedstatedir = @sharedstatedir@
275 srcdir = @srcdir@
276 subdirs = @subdirs@
277 sysconfdir = @sysconfdir@
278 target = @target@
279 target_alias = @target_alias@
280 target_cpu = @target_cpu@
281 target_os = @target_os@
282 target_vendor = @target_vendor@
283 top_build_prefix = @top_build_prefix@
284 top_builddir = @top_builddir@
285 top_srcdir = @top_srcdir@
286 man_MANS = sasl_authorize_t.3 sasl_done.3 sasl_listmech.3 sasl_callbacks.3 \
287 sasl_encode.3 sasl_encodev.3 sasl_log_t.3 sasl_checkpass.3 \
288 sasl_errstring.3 sasl_dispose.3 sasl_canon_user_t.3 \
289 sasl_server_init.3 sasl_client_init.3 sasl_getopt_t.3 \
290 sasl_server_new.3 sasl_client_new.3 sasl_getpath_t.3 \
291 sasl_server_start.3 sasl_client_start.3 sasl_getprop.3 \
292 sasl_server_step.3 sasl_client_step.3 sasl_getsecret_t.3 \
293 sasl_setprop.3 sasl_decode.3 sasl_getsimple_t.3 sasl.3 \
294 sasl_checkapop.3 sasl_errors.3 sasl_verifyfile_t.3 \
295 sasl_getrealm_t.3 sasl_chalprompt_t.3 sasl_auxprop_request.3 \
296 sasl_auxprop_getctx.3 sasl_auxprop.3 sasl_idle.3 \
297 sasl_errdetail.3 sasl_user_exists.3 sasl_setpass.3 \
298 sasl_server_userdb_checkpass_t.3 sasl_server_userdb_setpass_t.3 \
299 sasl_global_listmech.3 sasl_getconfpath_t.3
300
301 EXTRA_DIST = $(man_MANS)
302 all: all-am
303
304 .SUFFIXES:
305 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
306 @for dep in $?; do \
307 case '$(am__configure_deps)' in \
308 *$$dep*) \
309 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
310 && { if test -f $@; then exit 0; else break; fi; }; \
311 exit 1;; \
312 esac; \
313 done; \
314 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \
315 $(am__cd) $(top_srcdir) && \
316 $(AUTOMAKE) --gnu man/Makefile
317 .PRECIOUS: Makefile
318 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
319 @case '$?' in \
320 *config.status*) \
321 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
322 *) \
323 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
324 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
325 esac;
326
327 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
328 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
329
330 $(top_srcdir)/configure: $(am__configure_deps)
331 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
332 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
333 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
334 $(am__aclocal_m4_deps):
335
336 mostlyclean-libtool:
337 -rm -f *.lo
338
339 clean-libtool:
340 -rm -rf .libs _libs
341 install-man3: $(man_MANS)
342 @$(NORMAL_INSTALL)
343 test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
344 @list=''; test -n "$(man3dir)" || exit 0; \
345 { for i in $$list; do echo "$$i"; done; \
346 l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
347 sed -n '/\.3[a-z]*$$/p'; \
348 } | while read p; do \
349 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
350 echo "$$d$$p"; echo "$$p"; \
351 done | \
352 sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
353 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
354 sed 'N;N;s,\n, ,g' | { \
355 list=; while read file base inst; do \
356 if test "$$base" = "$$inst"; then list="$$list $$file"; else \
357 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
358 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
359 fi; \
360 done; \
361 for i in $$list; do echo "$$i"; done | $(am__base_list) | \
362 while read files; do \
363 test -z "$$files" || { \
364 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
365 $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
366 done; }
367
368 uninstall-man3:
369 @$(NORMAL_UNINSTALL)
370 @list=''; test -n "$(man3dir)" || exit 0; \
371 files=`{ for i in $$list; do echo "$$i"; done; \
372 l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
373 sed -n '/\.3[a-z]*$$/p'; \
374 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
375 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
376 test -z "$$files" || { \
377 echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \
378 cd "$(DESTDIR)$(man3dir)" && rm -f $$files; }
379 tags: TAGS
380 TAGS:
381
382 ctags: CTAGS
383 CTAGS:
384
385
386 distdir: $(DISTFILES)
387 @list='$(MANS)'; if test -n "$$list"; then \
388 list=`for p in $$list; do \
389 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
390 if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
391 if test -n "$$list" && \
392 grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
393 echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
394 grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
395 echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
396 echo " typically \`make maintainer-clean' will remove them" >&2; \
397 exit 1; \
398 else :; fi; \
399 else :; fi
400 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
401 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
402 list='$(DISTFILES)'; \
403 dist_files=`for file in $$list; do echo $$file; done | \
404 sed -e "s|^$$srcdirstrip/||;t" \
405 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
406 case $$dist_files in \
407 */*) $(MKDIR_P) `echo "$$dist_files" | \
408 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
409 sort -u` ;; \
410 esac; \
411 for file in $$dist_files; do \
412 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
413 if test -d $$d/$$file; then \
414 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
415 if test -d "$(distdir)/$$file"; then \
416 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
417 fi; \
418 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
419 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
420 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
421 fi; \
422 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
423 else \
424 test -f "$(distdir)/$$file" \
425 || cp -p $$d/$$file "$(distdir)/$$file" \
426 || exit 1; \
427 fi; \
428 done
429 check-am: all-am
430 check: check-am
431 all-am: Makefile $(MANS)
432 installdirs:
433 for dir in "$(DESTDIR)$(man3dir)"; do \
434 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
435 done
436 install: install-am
437 install-exec: install-exec-am
438 install-data: install-data-am
439 uninstall: uninstall-am
440
441 install-am: all-am
442 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
443
444 installcheck: installcheck-am
445 install-strip:
446 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
447 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
448 `test -z '$(STRIP)' || \
449 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
450 mostlyclean-generic:
451
452 clean-generic:
453
454 distclean-generic:
455 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
456 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
457
458 maintainer-clean-generic:
459 @echo "This command is intended for maintainers to use"
460 @echo "it deletes files that may require special tools to rebuild."
461 clean: clean-am
462
463 clean-am: clean-generic clean-libtool mostlyclean-am
464
465 distclean: distclean-am
466 -rm -f Makefile
467 distclean-am: clean-am distclean-generic
468
469 dvi: dvi-am
470
471 dvi-am:
472
473 html: html-am
474
475 html-am:
476
477 info: info-am
478
479 info-am:
480
481 install-data-am: install-man
482
483 install-dvi: install-dvi-am
484
485 install-dvi-am:
486
487 install-exec-am:
488
489 install-html: install-html-am
490
491 install-html-am:
492
493 install-info: install-info-am
494
495 install-info-am:
496
497 install-man: install-man3
498
499 install-pdf: install-pdf-am
500
501 install-pdf-am:
502
503 install-ps: install-ps-am
504
505 install-ps-am:
506
507 installcheck-am:
508
509 maintainer-clean: maintainer-clean-am
510 -rm -f Makefile
511 maintainer-clean-am: distclean-am maintainer-clean-generic
512
513 mostlyclean: mostlyclean-am
514
515 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
516
517 pdf: pdf-am
518
519 pdf-am:
520
521 ps: ps-am
522
523 ps-am:
524
525 uninstall-am: uninstall-man
526
527 uninstall-man: uninstall-man3
528
529 .MAKE: install-am install-strip
530
531 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
532 distclean distclean-generic distclean-libtool distdir dvi \
533 dvi-am html html-am info info-am install install-am \
534 install-data install-data-am install-dvi install-dvi-am \
535 install-exec install-exec-am install-html install-html-am \
536 install-info install-info-am install-man install-man3 \
537 install-pdf install-pdf-am install-ps install-ps-am \
538 install-strip installcheck installcheck-am installdirs \
539 maintainer-clean maintainer-clean-generic mostlyclean \
540 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
541 uninstall uninstall-am uninstall-man uninstall-man3
542
543
544 # Tell versions [3.59,3.63) of GNU make to not export all variables.
545 # Otherwise a system limit (for SysV at least) may be exceeded.
546 .NOEXPORT:
0 Makefile.in
1 Makefile
2 .deps
3 .libs
4 *.l[ao]
5 *_init.c
4848 # CURRENT:REVISION:AGE
4949 plugin_version = 3:0:0
5050
51 INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include
52 AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version)
51 AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include
52 AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version) -no-undefined
5353
54 COMPAT_OBJS = @LTGETADDRINFOOBJS@ @LTGETNAMEINFOOBJS@ @LTSNPRINTFOBJS@
54 COMPAT_OBJS = $(top_builddir)/lib/libobj.la
5555
5656 EXTRA_DIST = makeinit.sh NTMakefile
5757 noinst_SCRIPTS = makeinit.sh
7070
7171 libplain_la_SOURCES = plain.c plain_init.c $(common_sources)
7272 libplain_la_DEPENDENCIES = $(COMPAT_OBJS)
73 libplain_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS)
73 libplain_la_LIBADD = $(PLAIN_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
7474
7575 libanonymous_la_SOURCES = anonymous.c anonymous_init.c $(common_sources)
7676 libanonymous_la_DEPENDENCIES = $(COMPAT_OBJS)
77 libanonymous_la_LIBADD = $(COMPAT_OBJS)
77 libanonymous_la_LIBADD = $(LIB_SOCKET) $(COMPAT_OBJS)
7878
7979 libkerberos4_la_SOURCES = kerberos4.c kerberos4_init.c $(common_sources)
8080 libkerberos4_la_DEPENDENCIES = $(COMPAT_OBJS)
9090
9191 libcrammd5_la_SOURCES = cram.c crammd5_init.c $(common_sources)
9292 libcrammd5_la_DEPENDENCIES = $(COMPAT_OBJS)
93 libcrammd5_la_LIBADD = $(COMPAT_OBJS)
93 libcrammd5_la_LIBADD = $(LIB_SOCKET) $(COMPAT_OBJS)
9494
9595 libdigestmd5_la_SOURCES = digestmd5.c digestmd5_init.c $(common_sources)
9696 libdigestmd5_la_DEPENDENCIES = $(COMPAT_OBJS)
9898
9999 libscram_la_SOURCES = scram.c scram_init.c $(common_sources)
100100 libscram_la_DEPENDENCIES = $(COMPAT_OBJS)
101 libscram_la_LIBADD = $(SCRAM_LIBS) $(COMPAT_OBJS)
101 libscram_la_LIBADD = $(SCRAM_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
102102
103103 liblogin_la_SOURCES = login.c login_init.c $(common_sources)
104104 liblogin_la_DEPENDENCIES = $(COMPAT_OBJS)
105 liblogin_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS)
105 liblogin_la_LIBADD = $(PLAIN_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
106106
107107 libsrp_la_SOURCES = srp.c srp_init.c $(common_sources)
108108 libsrp_la_DEPENDENCIES = $(COMPAT_OBJS)
109 libsrp_la_LIBADD = $(SRP_LIBS) $(COMPAT_OBJS)
109 libsrp_la_LIBADD = $(SRP_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
110110
111111 libotp_la_SOURCES = otp.c otp_init.c otp.h $(common_sources)
112112 libotp_la_DEPENDENCIES = $(COMPAT_OBJS)
113 libotp_la_LIBADD = $(OTP_LIBS) $(COMPAT_OBJS)
113 libotp_la_LIBADD = $(OTP_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
114114
115115 libntlm_la_SOURCES = ntlm.c ntlm_init.c $(common_sources)
116116 libntlm_la_DEPENDENCIES = $(COMPAT_OBJS)
117 libntlm_la_LIBADD = $(NTLM_LIBS) $(COMPAT_OBJS)
117 libntlm_la_LIBADD = $(NTLM_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
118118
119119 libpassdss_la_SOURCES = passdss.c passdss_init.c $(common_sources)
120120 libpassdss_la_DEPENDENCIES = $(COMPAT_OBJS)
121 libpassdss_la_LIBADD = $(PASSDSS_LIBS) $(COMPAT_OBJS)
121 libpassdss_la_LIBADD = $(PASSDSS_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
122122
123123 # Auxprop Plugins
124124 libsasldb_la_SOURCES = sasldb.c sasldb_init.c $(common_sources)
125125 libsasldb_la_DEPENDENCIES = $(COMPAT_OBJS)
126 libsasldb_la_LIBADD = ../sasldb/libsasldb.la $(SASL_DB_LIB) $(COMPAT_OBJS)
126 libsasldb_la_LIBADD = ../sasldb/libsasldb.la $(SASL_DB_LIB) $(LIB_SOCKET) $(COMPAT_OBJS)
127127
128128 libldapdb_la_SOURCES = ldapdb.c ldapdb_init.c $(common_sources)
129129 libldapdb_la_DEPENDENCIES = $(COMPAT_OBJS)
147147
148148 ${init_src}: $(srcdir)/makeinit.sh
149149 $(SHELL) $(srcdir)/makeinit.sh
150
151 # Compatibility function build rules (they build in lib/)
152 $(COMPAT_OBJS):
153 rm -f $(COMPAT_OBJS)
154 cd ../lib; $(MAKE) $(COMPAT_OBJS)
155 for file in $(COMPAT_OBJS); do ln -s ../lib/$$file .; done
156
157
+0
-818
plugins/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 # Makefile.am for the SASL plugins
18 # Rob Siemborski
19 # Rob Earhart
20 # $Id: Makefile.am,v 1.86 2011/09/05 14:18:10 murch Exp $
21 #
22 ################################################################
23 # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
24 #
25 # Redistribution and use in source and binary forms, with or without
26 # modification, are permitted provided that the following conditions
27 # are met:
28 #
29 # 1. Redistributions of source code must retain the above copyright
30 # notice, this list of conditions and the following disclaimer.
31 #
32 # 2. Redistributions in binary form must reproduce the above copyright
33 # notice, this list of conditions and the following disclaimer in
34 # the documentation and/or other materials provided with the
35 # distribution.
36 #
37 # 3. The name "Carnegie Mellon University" must not be used to
38 # endorse or promote products derived from this software without
39 # prior written permission. For permission or any other legal
40 # details, please contact
41 # Office of Technology Transfer
42 # Carnegie Mellon University
43 # 5000 Forbes Avenue
44 # Pittsburgh, PA 15213-3890
45 # (412) 268-4387, fax: (412) 268-7395
46 # tech-transfer@andrew.cmu.edu
47 #
48 # 4. Redistributions of any form whatsoever must retain the following
49 # acknowledgment:
50 # "This product includes software developed by Computing Services
51 # at Carnegie Mellon University (http://www.cmu.edu/computing/)."
52 #
53 # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
54 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
55 # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
56 # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
57 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
58 # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
59 # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
60 #
61 ################################################################
62
63
64 VPATH = @srcdir@
65 pkgdatadir = $(datadir)/@PACKAGE@
66 pkgincludedir = $(includedir)/@PACKAGE@
67 pkglibdir = $(libdir)/@PACKAGE@
68 pkglibexecdir = $(libexecdir)/@PACKAGE@
69 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
70 install_sh_DATA = $(install_sh) -c -m 644
71 install_sh_PROGRAM = $(install_sh) -c
72 install_sh_SCRIPT = $(install_sh) -c
73 INSTALL_HEADER = $(INSTALL_DATA)
74 transform = $(program_transform_name)
75 NORMAL_INSTALL = :
76 PRE_INSTALL = :
77 POST_INSTALL = :
78 NORMAL_UNINSTALL = :
79 PRE_UNINSTALL = :
80 POST_UNINSTALL = :
81 build_triplet = @build@
82 host_triplet = @host@
83 target_triplet = @target@
84 subdir = plugins
85 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
86 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
87 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
88 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
89 $(top_srcdir)/config/sasldb.m4 \
90 $(top_srcdir)/cmulocal/berkdb.m4 \
91 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
92 $(top_srcdir)/cmulocal/c-attribute.m4 \
93 $(top_srcdir)/cmulocal/common.m4 \
94 $(top_srcdir)/cmulocal/cyrus.m4 \
95 $(top_srcdir)/cmulocal/init_automake.m4 \
96 $(top_srcdir)/cmulocal/ipv6.m4 \
97 $(top_srcdir)/cmulocal/openldap.m4 \
98 $(top_srcdir)/cmulocal/openssl.m4 \
99 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
100 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
101 $(ACLOCAL_M4)
102 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
103 CONFIG_HEADER = $(top_builddir)/config.h
104 CONFIG_CLEAN_FILES =
105 CONFIG_CLEAN_VPATH_FILES =
106 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
107 am__vpath_adj = case $$p in \
108 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
109 *) f=$$p;; \
110 esac;
111 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
112 am__install_max = 40
113 am__nobase_strip_setup = \
114 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
115 am__nobase_strip = \
116 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
117 am__nobase_list = $(am__nobase_strip_setup); \
118 for p in $$list; do echo "$$p $$p"; done | \
119 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
120 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
121 if (++n[$$2] == $(am__install_max)) \
122 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
123 END { for (dir in files) print dir, files[dir] }'
124 am__base_list = \
125 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
126 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
127 am__installdirs = "$(DESTDIR)$(sasldir)"
128 LTLIBRARIES = $(sasl_LTLIBRARIES)
129 am__DEPENDENCIES_1 =
130 am__objects_1 = plugin_common.lo
131 am_libanonymous_la_OBJECTS = anonymous.lo anonymous_init.lo \
132 $(am__objects_1)
133 libanonymous_la_OBJECTS = $(am_libanonymous_la_OBJECTS)
134 am_libcrammd5_la_OBJECTS = cram.lo crammd5_init.lo $(am__objects_1)
135 libcrammd5_la_OBJECTS = $(am_libcrammd5_la_OBJECTS)
136 am_libdigestmd5_la_OBJECTS = digestmd5.lo digestmd5_init.lo \
137 $(am__objects_1)
138 libdigestmd5_la_OBJECTS = $(am_libdigestmd5_la_OBJECTS)
139 am_libgs2_la_OBJECTS = gs2.lo gs2_init.lo gs2_token.lo \
140 $(am__objects_1)
141 libgs2_la_OBJECTS = $(am_libgs2_la_OBJECTS)
142 am_libgssapiv2_la_OBJECTS = gssapi.lo gssapiv2_init.lo \
143 $(am__objects_1)
144 libgssapiv2_la_OBJECTS = $(am_libgssapiv2_la_OBJECTS)
145 am_libkerberos4_la_OBJECTS = kerberos4.lo kerberos4_init.lo \
146 $(am__objects_1)
147 libkerberos4_la_OBJECTS = $(am_libkerberos4_la_OBJECTS)
148 am_libldapdb_la_OBJECTS = ldapdb.lo ldapdb_init.lo $(am__objects_1)
149 libldapdb_la_OBJECTS = $(am_libldapdb_la_OBJECTS)
150 am_liblogin_la_OBJECTS = login.lo login_init.lo $(am__objects_1)
151 liblogin_la_OBJECTS = $(am_liblogin_la_OBJECTS)
152 am_libntlm_la_OBJECTS = ntlm.lo ntlm_init.lo $(am__objects_1)
153 libntlm_la_OBJECTS = $(am_libntlm_la_OBJECTS)
154 am_libotp_la_OBJECTS = otp.lo otp_init.lo $(am__objects_1)
155 libotp_la_OBJECTS = $(am_libotp_la_OBJECTS)
156 am_libpassdss_la_OBJECTS = passdss.lo passdss_init.lo $(am__objects_1)
157 libpassdss_la_OBJECTS = $(am_libpassdss_la_OBJECTS)
158 am_libplain_la_OBJECTS = plain.lo plain_init.lo $(am__objects_1)
159 libplain_la_OBJECTS = $(am_libplain_la_OBJECTS)
160 am_libsasldb_la_OBJECTS = sasldb.lo sasldb_init.lo $(am__objects_1)
161 libsasldb_la_OBJECTS = $(am_libsasldb_la_OBJECTS)
162 am_libscram_la_OBJECTS = scram.lo scram_init.lo $(am__objects_1)
163 libscram_la_OBJECTS = $(am_libscram_la_OBJECTS)
164 am_libsql_la_OBJECTS = sql.lo sql_init.lo $(am__objects_1)
165 libsql_la_OBJECTS = $(am_libsql_la_OBJECTS)
166 libsql_la_LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
167 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
168 $(libsql_la_LDFLAGS) $(LDFLAGS) -o $@
169 am_libsrp_la_OBJECTS = srp.lo srp_init.lo $(am__objects_1)
170 libsrp_la_OBJECTS = $(am_libsrp_la_OBJECTS)
171 SCRIPTS = $(noinst_SCRIPTS)
172 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
173 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
174 am__depfiles_maybe = depfiles
175 am__mv = mv -f
176 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
177 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
178 LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
179 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
180 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
181 CCLD = $(CC)
182 LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
183 $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
184 SOURCES = $(libanonymous_la_SOURCES) $(libcrammd5_la_SOURCES) \
185 $(libdigestmd5_la_SOURCES) $(libgs2_la_SOURCES) \
186 $(libgssapiv2_la_SOURCES) $(libkerberos4_la_SOURCES) \
187 $(libldapdb_la_SOURCES) $(liblogin_la_SOURCES) \
188 $(libntlm_la_SOURCES) $(libotp_la_SOURCES) \
189 $(libpassdss_la_SOURCES) $(libplain_la_SOURCES) \
190 $(libsasldb_la_SOURCES) $(libscram_la_SOURCES) \
191 $(libsql_la_SOURCES) $(libsrp_la_SOURCES)
192 DIST_SOURCES = $(libanonymous_la_SOURCES) $(libcrammd5_la_SOURCES) \
193 $(libdigestmd5_la_SOURCES) $(libgs2_la_SOURCES) \
194 $(libgssapiv2_la_SOURCES) $(libkerberos4_la_SOURCES) \
195 $(libldapdb_la_SOURCES) $(liblogin_la_SOURCES) \
196 $(libntlm_la_SOURCES) $(libotp_la_SOURCES) \
197 $(libpassdss_la_SOURCES) $(libplain_la_SOURCES) \
198 $(libsasldb_la_SOURCES) $(libscram_la_SOURCES) \
199 $(libsql_la_SOURCES) $(libsrp_la_SOURCES)
200 ETAGS = etags
201 CTAGS = ctags
202 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
203 ACLOCAL = @ACLOCAL@
204 AMTAR = @AMTAR@
205 AUTOCONF = @AUTOCONF@
206 AUTOHEADER = @AUTOHEADER@
207 AUTOMAKE = @AUTOMAKE@
208 AWK = @AWK@
209 CC = @CC@
210 CCDEPMODE = @CCDEPMODE@
211 CFLAGS = @CFLAGS@
212 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
213 CPP = @CPP@
214 CPPFLAGS = @CPPFLAGS@
215 CYGPATH_W = @CYGPATH_W@
216 DEFS = @DEFS@
217 DEPDIR = @DEPDIR@
218 DIRS = @DIRS@
219 DMALLOC_LIBS = @DMALLOC_LIBS@
220 ECHO_C = @ECHO_C@
221 ECHO_N = @ECHO_N@
222 ECHO_T = @ECHO_T@
223 EGREP = @EGREP@
224 EXEEXT = @EXEEXT@
225 GETADDRINFOOBJS = @GETADDRINFOOBJS@
226 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
227 GETSUBOPT = @GETSUBOPT@
228 GREP = @GREP@
229 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
230 GSSAPI_LIBS = @GSSAPI_LIBS@
231 INSTALL = @INSTALL@
232 INSTALL_DATA = @INSTALL_DATA@
233 INSTALL_PROGRAM = @INSTALL_PROGRAM@
234 INSTALL_SCRIPT = @INSTALL_SCRIPT@
235 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
236 IPCTYPE = @IPCTYPE@
237 JAVAC = @JAVAC@
238 JAVADOC = @JAVADOC@
239 JAVAH = @JAVAH@
240 JAVAROOT = @JAVAROOT@
241 JAVA_INCLUDES = @JAVA_INCLUDES@
242 LDFLAGS = @LDFLAGS@
243 LIBOBJS = @LIBOBJS@
244 LIBS = @LIBS@
245 LIBTOOL = @LIBTOOL@
246 LIB_CRYPT = @LIB_CRYPT@
247 LIB_DES = @LIB_DES@
248 LIB_DOOR = @LIB_DOOR@
249 LIB_LDAP = @LIB_LDAP@
250 LIB_MYSQL = @LIB_MYSQL@
251 LIB_PGSQL = @LIB_PGSQL@
252 LIB_SOCKET = @LIB_SOCKET@
253 LIB_SQLITE = @LIB_SQLITE@
254 LIB_SQLITE3 = @LIB_SQLITE3@
255 LN_S = @LN_S@
256 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
257 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
258 LTLIBOBJS = @LTLIBOBJS@
259 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
260 MAKEINFO = @MAKEINFO@
261 MKDIR_P = @MKDIR_P@
262 NM = @NM@
263 NTLM_LIBS = @NTLM_LIBS@
264 OBJEXT = @OBJEXT@
265 OTP_LIBS = @OTP_LIBS@
266 PACKAGE = @PACKAGE@
267 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
268 PACKAGE_NAME = @PACKAGE_NAME@
269 PACKAGE_STRING = @PACKAGE_STRING@
270 PACKAGE_TARNAME = @PACKAGE_TARNAME@
271 PACKAGE_VERSION = @PACKAGE_VERSION@
272 PASSDSS_LIBS = @PASSDSS_LIBS@
273 PATH_SEPARATOR = @PATH_SEPARATOR@
274 PLAIN_LIBS = @PLAIN_LIBS@
275 PURECOV = @PURECOV@
276 PURIFY = @PURIFY@
277 PWCHECKMETH = @PWCHECKMETH@
278 RANLIB = @RANLIB@
279 SASL_DB_BACKEND = @SASL_DB_BACKEND@
280 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
281 SASL_DB_INC = @SASL_DB_INC@
282 SASL_DB_LIB = @SASL_DB_LIB@
283 SASL_DB_MANS = @SASL_DB_MANS@
284 SASL_DB_UTILS = @SASL_DB_UTILS@
285 SASL_DL_LIB = @SASL_DL_LIB@
286 SASL_KRB_LIB = @SASL_KRB_LIB@
287 SASL_MECHS = @SASL_MECHS@
288 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
289 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
290 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
291 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
292 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
293 SCRAM_LIBS = @SCRAM_LIBS@
294 SET_MAKE = @SET_MAKE@
295 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
296 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
297 SHELL = @SHELL@
298 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
299 SNPRINTFOBJS = @SNPRINTFOBJS@
300 SRP_LIBS = @SRP_LIBS@
301 STRIP = @STRIP@
302 VERSION = @VERSION@
303 abs_builddir = @abs_builddir@
304 abs_srcdir = @abs_srcdir@
305 abs_top_builddir = @abs_top_builddir@
306 abs_top_srcdir = @abs_top_srcdir@
307 ac_ct_CC = @ac_ct_CC@
308 am__include = @am__include@
309 am__leading_dot = @am__leading_dot@
310 am__quote = @am__quote@
311 am__tar = @am__tar@
312 am__untar = @am__untar@
313 bindir = @bindir@
314 build = @build@
315 build_alias = @build_alias@
316 build_cpu = @build_cpu@
317 build_os = @build_os@
318 build_vendor = @build_vendor@
319 builddir = @builddir@
320 configdir = @configdir@
321 datadir = @datadir@
322 datarootdir = @datarootdir@
323 docdir = @docdir@
324 dvidir = @dvidir@
325 exec_prefix = @exec_prefix@
326 host = @host@
327 host_alias = @host_alias@
328 host_cpu = @host_cpu@
329 host_os = @host_os@
330 host_vendor = @host_vendor@
331 htmldir = @htmldir@
332 includedir = @includedir@
333 infodir = @infodir@
334 install_sh = @install_sh@
335 libdir = @libdir@
336 libexecdir = @libexecdir@
337 localedir = @localedir@
338 localstatedir = @localstatedir@
339 mandir = @mandir@
340 mkdir_p = @mkdir_p@
341 oldincludedir = @oldincludedir@
342 pdfdir = @pdfdir@
343 plugindir = @plugindir@
344 prefix = @prefix@
345 program_transform_name = @program_transform_name@
346 psdir = @psdir@
347 sbindir = @sbindir@
348 sharedstatedir = @sharedstatedir@
349 srcdir = @srcdir@
350 subdirs = @subdirs@
351 sysconfdir = @sysconfdir@
352 target = @target@
353 target_alias = @target_alias@
354 target_cpu = @target_cpu@
355 target_os = @target_os@
356 target_vendor = @target_vendor@
357 top_build_prefix = @top_build_prefix@
358 top_builddir = @top_builddir@
359 top_srcdir = @top_srcdir@
360
361 # Library version info - here at the top, for sanity
362 # See <http://www.gnu.org/software/libtool/manual/libtool.html#Versioning>
363 # CURRENT:REVISION:AGE
364 plugin_version = 3:0:0
365 INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_srcdir)/sasldb -I$(top_builddir)/include
366 AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir) -version-info $(plugin_version)
367 COMPAT_OBJS = @LTGETADDRINFOOBJS@ @LTGETNAMEINFOOBJS@ @LTSNPRINTFOBJS@
368 EXTRA_DIST = makeinit.sh NTMakefile
369 noinst_SCRIPTS = makeinit.sh
370 common_sources = plugin_common.c plugin_common.h
371 sasldir = $(prefix)/lib/sasl2
372 sasl_LTLIBRARIES = @SASL_MECHS@
373 EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
374 libgs2.la libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \
375 libscram.la libntlm.la libpassdss.la libsasldb.la libsql.la libldapdb.la
376
377 libplain_la_SOURCES = plain.c plain_init.c $(common_sources)
378 libplain_la_DEPENDENCIES = $(COMPAT_OBJS)
379 libplain_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS)
380 libanonymous_la_SOURCES = anonymous.c anonymous_init.c $(common_sources)
381 libanonymous_la_DEPENDENCIES = $(COMPAT_OBJS)
382 libanonymous_la_LIBADD = $(COMPAT_OBJS)
383 libkerberos4_la_SOURCES = kerberos4.c kerberos4_init.c $(common_sources)
384 libkerberos4_la_DEPENDENCIES = $(COMPAT_OBJS)
385 libkerberos4_la_LIBADD = $(SASL_KRB_LIB) $(LIB_SOCKET) $(COMPAT_OBJS)
386 libgs2_la_SOURCES = gs2.c gs2_init.c gs2_token.c gs2_token.h $(common_sources)
387 libgs2_la_DEPENDENCIES = $(COMPAT_OBJS)
388 libgs2_la_LIBADD = $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
389 libgssapiv2_la_SOURCES = gssapi.c gssapiv2_init.c $(common_sources)
390 libgssapiv2_la_DEPENDENCIES = $(COMPAT_OBJS)
391 libgssapiv2_la_LIBADD = $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET) $(COMPAT_OBJS)
392 libcrammd5_la_SOURCES = cram.c crammd5_init.c $(common_sources)
393 libcrammd5_la_DEPENDENCIES = $(COMPAT_OBJS)
394 libcrammd5_la_LIBADD = $(COMPAT_OBJS)
395 libdigestmd5_la_SOURCES = digestmd5.c digestmd5_init.c $(common_sources)
396 libdigestmd5_la_DEPENDENCIES = $(COMPAT_OBJS)
397 libdigestmd5_la_LIBADD = $(LIB_DES) $(LIB_SOCKET) $(COMPAT_OBJS)
398 libscram_la_SOURCES = scram.c scram_init.c $(common_sources)
399 libscram_la_DEPENDENCIES = $(COMPAT_OBJS)
400 libscram_la_LIBADD = $(SCRAM_LIBS) $(COMPAT_OBJS)
401 liblogin_la_SOURCES = login.c login_init.c $(common_sources)
402 liblogin_la_DEPENDENCIES = $(COMPAT_OBJS)
403 liblogin_la_LIBADD = $(PLAIN_LIBS) $(COMPAT_OBJS)
404 libsrp_la_SOURCES = srp.c srp_init.c $(common_sources)
405 libsrp_la_DEPENDENCIES = $(COMPAT_OBJS)
406 libsrp_la_LIBADD = $(SRP_LIBS) $(COMPAT_OBJS)
407 libotp_la_SOURCES = otp.c otp_init.c otp.h $(common_sources)
408 libotp_la_DEPENDENCIES = $(COMPAT_OBJS)
409 libotp_la_LIBADD = $(OTP_LIBS) $(COMPAT_OBJS)
410 libntlm_la_SOURCES = ntlm.c ntlm_init.c $(common_sources)
411 libntlm_la_DEPENDENCIES = $(COMPAT_OBJS)
412 libntlm_la_LIBADD = $(NTLM_LIBS) $(COMPAT_OBJS)
413 libpassdss_la_SOURCES = passdss.c passdss_init.c $(common_sources)
414 libpassdss_la_DEPENDENCIES = $(COMPAT_OBJS)
415 libpassdss_la_LIBADD = $(PASSDSS_LIBS) $(COMPAT_OBJS)
416
417 # Auxprop Plugins
418 libsasldb_la_SOURCES = sasldb.c sasldb_init.c $(common_sources)
419 libsasldb_la_DEPENDENCIES = $(COMPAT_OBJS)
420 libsasldb_la_LIBADD = ../sasldb/libsasldb.la $(SASL_DB_LIB) $(COMPAT_OBJS)
421 libldapdb_la_SOURCES = ldapdb.c ldapdb_init.c $(common_sources)
422 libldapdb_la_DEPENDENCIES = $(COMPAT_OBJS)
423 libldapdb_la_LIBADD = $(LIB_LDAP) $(COMPAT_OBJS)
424 libsql_la_SOURCES = sql.c sql_init.c $(common_sources)
425 libsql_la_LDFLAGS = $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE) $(LIB_SQLITE3) \
426 $(AM_LDFLAGS)
427
428 libsql_la_DEPENDENCIES = $(COMPAT_OBJS)
429 libsql_la_LIBADD = $(COMPAT_OBJS)
430
431 # Instructions for making the _init files
432 init_src = anonymous_init.c crammd5_init.c digestmd5_init.c scram_init.c gs2_init.c gssapiv2_init.c \
433 kerberos4_init.c login_init.c plain_init.c srp_init.c otp_init.c ntlm_init.c \
434 passdss_init.c sasldb_init.c sql_init.c ldapdb_init.c
435
436 CLEANFILES = $(init_src)
437 all: all-am
438
439 .SUFFIXES:
440 .SUFFIXES: .c .lo .o .obj
441 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
442 @for dep in $?; do \
443 case '$(am__configure_deps)' in \
444 *$$dep*) \
445 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
446 && { if test -f $@; then exit 0; else break; fi; }; \
447 exit 1;; \
448 esac; \
449 done; \
450 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/Makefile'; \
451 $(am__cd) $(top_srcdir) && \
452 $(AUTOMAKE) --gnu plugins/Makefile
453 .PRECIOUS: Makefile
454 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
455 @case '$?' in \
456 *config.status*) \
457 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
458 *) \
459 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
460 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
461 esac;
462
463 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
464 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
465
466 $(top_srcdir)/configure: $(am__configure_deps)
467 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
468 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
469 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
470 $(am__aclocal_m4_deps):
471 install-saslLTLIBRARIES: $(sasl_LTLIBRARIES)
472 @$(NORMAL_INSTALL)
473 test -z "$(sasldir)" || $(MKDIR_P) "$(DESTDIR)$(sasldir)"
474 @list='$(sasl_LTLIBRARIES)'; test -n "$(sasldir)" || list=; \
475 list2=; for p in $$list; do \
476 if test -f $$p; then \
477 list2="$$list2 $$p"; \
478 else :; fi; \
479 done; \
480 test -z "$$list2" || { \
481 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(sasldir)'"; \
482 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(sasldir)"; \
483 }
484
485 uninstall-saslLTLIBRARIES:
486 @$(NORMAL_UNINSTALL)
487 @list='$(sasl_LTLIBRARIES)'; test -n "$(sasldir)" || list=; \
488 for p in $$list; do \
489 $(am__strip_dir) \
490 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(sasldir)/$$f'"; \
491 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(sasldir)/$$f"; \
492 done
493
494 clean-saslLTLIBRARIES:
495 -test -z "$(sasl_LTLIBRARIES)" || rm -f $(sasl_LTLIBRARIES)
496 @list='$(sasl_LTLIBRARIES)'; for p in $$list; do \
497 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
498 test "$$dir" != "$$p" || dir=.; \
499 echo "rm -f \"$${dir}/so_locations\""; \
500 rm -f "$${dir}/so_locations"; \
501 done
502 libanonymous.la: $(libanonymous_la_OBJECTS) $(libanonymous_la_DEPENDENCIES)
503 $(LINK) $(libanonymous_la_OBJECTS) $(libanonymous_la_LIBADD) $(LIBS)
504 libcrammd5.la: $(libcrammd5_la_OBJECTS) $(libcrammd5_la_DEPENDENCIES)
505 $(LINK) $(libcrammd5_la_OBJECTS) $(libcrammd5_la_LIBADD) $(LIBS)
506 libdigestmd5.la: $(libdigestmd5_la_OBJECTS) $(libdigestmd5_la_DEPENDENCIES)
507 $(LINK) $(libdigestmd5_la_OBJECTS) $(libdigestmd5_la_LIBADD) $(LIBS)
508 libgs2.la: $(libgs2_la_OBJECTS) $(libgs2_la_DEPENDENCIES)
509 $(LINK) $(libgs2_la_OBJECTS) $(libgs2_la_LIBADD) $(LIBS)
510 libgssapiv2.la: $(libgssapiv2_la_OBJECTS) $(libgssapiv2_la_DEPENDENCIES)
511 $(LINK) $(libgssapiv2_la_OBJECTS) $(libgssapiv2_la_LIBADD) $(LIBS)
512 libkerberos4.la: $(libkerberos4_la_OBJECTS) $(libkerberos4_la_DEPENDENCIES)
513 $(LINK) $(libkerberos4_la_OBJECTS) $(libkerberos4_la_LIBADD) $(LIBS)
514 libldapdb.la: $(libldapdb_la_OBJECTS) $(libldapdb_la_DEPENDENCIES)
515 $(LINK) $(libldapdb_la_OBJECTS) $(libldapdb_la_LIBADD) $(LIBS)
516 liblogin.la: $(liblogin_la_OBJECTS) $(liblogin_la_DEPENDENCIES)
517 $(LINK) $(liblogin_la_OBJECTS) $(liblogin_la_LIBADD) $(LIBS)
518 libntlm.la: $(libntlm_la_OBJECTS) $(libntlm_la_DEPENDENCIES)
519 $(LINK) $(libntlm_la_OBJECTS) $(libntlm_la_LIBADD) $(LIBS)
520 libotp.la: $(libotp_la_OBJECTS) $(libotp_la_DEPENDENCIES)
521 $(LINK) $(libotp_la_OBJECTS) $(libotp_la_LIBADD) $(LIBS)
522 libpassdss.la: $(libpassdss_la_OBJECTS) $(libpassdss_la_DEPENDENCIES)
523 $(LINK) $(libpassdss_la_OBJECTS) $(libpassdss_la_LIBADD) $(LIBS)
524 libplain.la: $(libplain_la_OBJECTS) $(libplain_la_DEPENDENCIES)
525 $(LINK) $(libplain_la_OBJECTS) $(libplain_la_LIBADD) $(LIBS)
526 libsasldb.la: $(libsasldb_la_OBJECTS) $(libsasldb_la_DEPENDENCIES)
527 $(LINK) $(libsasldb_la_OBJECTS) $(libsasldb_la_LIBADD) $(LIBS)
528 libscram.la: $(libscram_la_OBJECTS) $(libscram_la_DEPENDENCIES)
529 $(LINK) $(libscram_la_OBJECTS) $(libscram_la_LIBADD) $(LIBS)
530 libsql.la: $(libsql_la_OBJECTS) $(libsql_la_DEPENDENCIES)
531 $(libsql_la_LINK) $(libsql_la_OBJECTS) $(libsql_la_LIBADD) $(LIBS)
532 libsrp.la: $(libsrp_la_OBJECTS) $(libsrp_la_DEPENDENCIES)
533 $(LINK) $(libsrp_la_OBJECTS) $(libsrp_la_LIBADD) $(LIBS)
534
535 mostlyclean-compile:
536 -rm -f *.$(OBJEXT)
537
538 distclean-compile:
539 -rm -f *.tab.c
540
541 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anonymous.Plo@am__quote@
542 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anonymous_init.Plo@am__quote@
543 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cram.Plo@am__quote@
544 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crammd5_init.Plo@am__quote@
545 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/digestmd5.Plo@am__quote@
546 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/digestmd5_init.Plo@am__quote@
547 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gs2.Plo@am__quote@
548 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gs2_init.Plo@am__quote@
549 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gs2_token.Plo@am__quote@
550 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gssapi.Plo@am__quote@
551 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gssapiv2_init.Plo@am__quote@
552 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kerberos4.Plo@am__quote@
553 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kerberos4_init.Plo@am__quote@
554 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldapdb.Plo@am__quote@
555 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldapdb_init.Plo@am__quote@
556 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/login.Plo@am__quote@
557 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/login_init.Plo@am__quote@
558 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntlm.Plo@am__quote@
559 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ntlm_init.Plo@am__quote@
560 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otp.Plo@am__quote@
561 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/otp_init.Plo@am__quote@
562 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/passdss.Plo@am__quote@
563 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/passdss_init.Plo@am__quote@
564 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plain.Plo@am__quote@
565 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plain_init.Plo@am__quote@
566 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_common.Plo@am__quote@
567 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sasldb.Plo@am__quote@
568 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sasldb_init.Plo@am__quote@
569 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scram.Plo@am__quote@
570 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scram_init.Plo@am__quote@
571 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sql.Plo@am__quote@
572 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sql_init.Plo@am__quote@
573 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srp.Plo@am__quote@
574 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srp_init.Plo@am__quote@
575
576 .c.o:
577 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
578 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
579 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
580 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
581 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
582
583 .c.obj:
584 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
585 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
586 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
587 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
588 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
589
590 .c.lo:
591 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
592 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
593 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
594 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
595 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
596
597 mostlyclean-libtool:
598 -rm -f *.lo
599
600 clean-libtool:
601 -rm -rf .libs _libs
602
603 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
604 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
605 unique=`for i in $$list; do \
606 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
607 done | \
608 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
609 END { if (nonempty) { for (i in files) print i; }; }'`; \
610 mkid -fID $$unique
611 tags: TAGS
612
613 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
614 $(TAGS_FILES) $(LISP)
615 set x; \
616 here=`pwd`; \
617 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
618 unique=`for i in $$list; do \
619 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
620 done | \
621 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
622 END { if (nonempty) { for (i in files) print i; }; }'`; \
623 shift; \
624 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
625 test -n "$$unique" || unique=$$empty_fix; \
626 if test $$# -gt 0; then \
627 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
628 "$$@" $$unique; \
629 else \
630 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
631 $$unique; \
632 fi; \
633 fi
634 ctags: CTAGS
635 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
636 $(TAGS_FILES) $(LISP)
637 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
638 unique=`for i in $$list; do \
639 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
640 done | \
641 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
642 END { if (nonempty) { for (i in files) print i; }; }'`; \
643 test -z "$(CTAGS_ARGS)$$unique" \
644 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
645 $$unique
646
647 GTAGS:
648 here=`$(am__cd) $(top_builddir) && pwd` \
649 && $(am__cd) $(top_srcdir) \
650 && gtags -i $(GTAGS_ARGS) "$$here"
651
652 distclean-tags:
653 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
654
655 distdir: $(DISTFILES)
656 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
657 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
658 list='$(DISTFILES)'; \
659 dist_files=`for file in $$list; do echo $$file; done | \
660 sed -e "s|^$$srcdirstrip/||;t" \
661 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
662 case $$dist_files in \
663 */*) $(MKDIR_P) `echo "$$dist_files" | \
664 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
665 sort -u` ;; \
666 esac; \
667 for file in $$dist_files; do \
668 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
669 if test -d $$d/$$file; then \
670 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
671 if test -d "$(distdir)/$$file"; then \
672 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
673 fi; \
674 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
675 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
676 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
677 fi; \
678 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
679 else \
680 test -f "$(distdir)/$$file" \
681 || cp -p $$d/$$file "$(distdir)/$$file" \
682 || exit 1; \
683 fi; \
684 done
685 check-am: all-am
686 check: check-am
687 all-am: Makefile $(LTLIBRARIES) $(SCRIPTS)
688 installdirs:
689 for dir in "$(DESTDIR)$(sasldir)"; do \
690 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
691 done
692 install: install-am
693 install-exec: install-exec-am
694 install-data: install-data-am
695 uninstall: uninstall-am
696
697 install-am: all-am
698 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
699
700 installcheck: installcheck-am
701 install-strip:
702 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
703 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
704 `test -z '$(STRIP)' || \
705 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
706 mostlyclean-generic:
707
708 clean-generic:
709 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
710
711 distclean-generic:
712 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
713 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
714
715 maintainer-clean-generic:
716 @echo "This command is intended for maintainers to use"
717 @echo "it deletes files that may require special tools to rebuild."
718 clean: clean-am
719
720 clean-am: clean-generic clean-libtool clean-saslLTLIBRARIES \
721 mostlyclean-am
722
723 distclean: distclean-am
724 -rm -rf ./$(DEPDIR)
725 -rm -f Makefile
726 distclean-am: clean-am distclean-compile distclean-generic \
727 distclean-tags
728
729 dvi: dvi-am
730
731 dvi-am:
732
733 html: html-am
734
735 html-am:
736
737 info: info-am
738
739 info-am:
740
741 install-data-am: install-saslLTLIBRARIES
742
743 install-dvi: install-dvi-am
744
745 install-dvi-am:
746
747 install-exec-am:
748
749 install-html: install-html-am
750
751 install-html-am:
752
753 install-info: install-info-am
754
755 install-info-am:
756
757 install-man:
758
759 install-pdf: install-pdf-am
760
761 install-pdf-am:
762
763 install-ps: install-ps-am
764
765 install-ps-am:
766
767 installcheck-am:
768
769 maintainer-clean: maintainer-clean-am
770 -rm -rf ./$(DEPDIR)
771 -rm -f Makefile
772 maintainer-clean-am: distclean-am maintainer-clean-generic
773
774 mostlyclean: mostlyclean-am
775
776 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
777 mostlyclean-libtool
778
779 pdf: pdf-am
780
781 pdf-am:
782
783 ps: ps-am
784
785 ps-am:
786
787 uninstall-am: uninstall-saslLTLIBRARIES
788
789 .MAKE: install-am install-strip
790
791 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
792 clean-libtool clean-saslLTLIBRARIES ctags distclean \
793 distclean-compile distclean-generic distclean-libtool \
794 distclean-tags distdir dvi dvi-am html html-am info info-am \
795 install install-am install-data install-data-am install-dvi \
796 install-dvi-am install-exec install-exec-am install-html \
797 install-html-am install-info install-info-am install-man \
798 install-pdf install-pdf-am install-ps install-ps-am \
799 install-saslLTLIBRARIES install-strip installcheck \
800 installcheck-am installdirs maintainer-clean \
801 maintainer-clean-generic mostlyclean mostlyclean-compile \
802 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
803 tags uninstall uninstall-am uninstall-saslLTLIBRARIES
804
805
806 ${init_src}: $(srcdir)/makeinit.sh
807 $(SHELL) $(srcdir)/makeinit.sh
808
809 # Compatibility function build rules (they build in lib/)
810 $(COMPAT_OBJS):
811 rm -f $(COMPAT_OBJS)
812 cd ../lib; $(MAKE) $(COMPAT_OBJS)
813 for file in $(COMPAT_OBJS); do ln -s ../lib/$$file .; done
814
815 # Tell versions [3.59,3.63) of GNU make to not export all variables.
816 # Otherwise a system limit (for SysV at least) may be exceeded.
817 .NOEXPORT:
124124 !ELSE
125125 GSS_FLAGS=
126126 GSS_LIBS=
127 !ENDIF
128
129 CRAM_FLAGS=/DOBSOLETE_CRAM_ATTR=1
130
131 DIGEST_FLAGS=/D "WITH_RC4"
127 !ENDIF
128
129 !IF "$(SASLDB)" == "LMDB"
130 DB_LIBS=/libpath:$(LMDB_LIBPATH) lmdb.lib
131
132 # Auxprop Plugin
133 libsasldb_sources = allockey.c db_lmdb.c
134 libsasldb_objs = allockey.obj db_lmdb.obj
135 !ELSE
136 DB_LIBS=/libpath:$(DB_LIBPATH) $(DB_LIB)
132137
133138 # Auxprop Plugin
134139 libsasldb_sources = allockey.c db_berkeley.c
135140 libsasldb_objs = allockey.obj db_berkeley.obj
141 !ENDIF
142
143 CRAM_FLAGS=/DOBSOLETE_CRAM_ATTR=1
144
145 DIGEST_FLAGS=/D "WITH_RC4"
136146
137147 saslSASLDB_sources = sasldb.c sasldb_init.c $(libsasldb_sources) $(common_sources)
138148 saslSASLDB_objs = sasldb.obj sasldb_init.obj $(libsasldb_objs) $(common_objs)
151161 EXTRA_FLAGS=$(EXTRA_FLAGS) $(DB_FLAGS) $(OPENSSL_FLAGS) $(GSS_FLAGS) $(SRP_FLAGS) $(SQL_FLAGS) $(DIGEST_FLAGS) $(CRAM_FLAGS) $(LDAP_FLAGS)
152162 CPPFLAGS = /I "..\win32\include" /I "." /I "..\include" $(EXTRA_FLAGS) /D "WIN32" /D "_WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL"
153163
154 DB_LIBS=/libpath:$(DB_LIBPATH) $(DB_LIB)
155164 OPENSSL_LIBS=/libpath:$(OPENSSL_LIBPATH) libeay32.lib ssleay32.lib
156165
157166 # Where to install files from this directory
187196 db_berkeley.c: ..\sasldb\db_berkeley.c
188197 xcopy /D /Y ..\sasldb\db_berkeley.c .
189198
199 db_lmdb.c: ..\sasldb\db_lmdb.c
200 xcopy /D /Y ..\sasldb\db_lmdb.c .
201
190202 #Add /pdb: option?
191203
192204 saslANONYMOUS.dll: $(saslANONYMOUS_objs) saslANONYMOUS.res
262274 -@erase getaddrinfo.c
263275 -@erase allockey.c
264276 -@erase db_berkeley.c
277 -@erase db_lmdb.c
265278 -@erase getnameinfo.c
266279 -@erase $(generated_rc)
267280 -@erase "*.res"
+0
-43
plugins/anonymous_init.c less more
0
1 #include <config.h>
2
3 #include <string.h>
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef macintosh
7 #include <sys/stat.h>
8 #endif
9 #include <fcntl.h>
10 #include <assert.h>
11
12 #include <sasl.h>
13 #include <saslplug.h>
14 #include <saslutil.h>
15
16 #include "plugin_common.h"
17
18 #ifdef macintosh
19 #include <sasl_anonymous_plugin_decl.h>
20 #endif
21
22 #ifdef WIN32
23 BOOL APIENTRY DllMain( HANDLE hModule,
24 DWORD ul_reason_for_call,
25 LPVOID lpReserved
26 )
27 {
28 switch (ul_reason_for_call)
29 {
30 case DLL_PROCESS_ATTACH:
31 case DLL_THREAD_ATTACH:
32 case DLL_THREAD_DETACH:
33 case DLL_PROCESS_DETACH:
34 break;
35 }
36 return TRUE;
37 }
38 #endif
39
40 SASL_CLIENT_PLUG_INIT( anonymous )
41 SASL_SERVER_PLUG_INIT( anonymous )
42
+0
-43
plugins/crammd5_init.c less more
0
1 #include <config.h>
2
3 #include <string.h>
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef macintosh
7 #include <sys/stat.h>
8 #endif
9 #include <fcntl.h>
10 #include <assert.h>
11
12 #include <sasl.h>
13 #include <saslplug.h>
14 #include <saslutil.h>
15
16 #include "plugin_common.h"
17
18 #ifdef macintosh
19 #include <sasl_crammd5_plugin_decl.h>
20 #endif
21
22 #ifdef WIN32
23 BOOL APIENTRY DllMain( HANDLE hModule,
24 DWORD ul_reason_for_call,
25 LPVOID lpReserved
26 )
27 {
28 switch (ul_reason_for_call)
29 {
30 case DLL_PROCESS_ATTACH:
31 case DLL_THREAD_ATTACH:
32 case DLL_THREAD_DETACH:
33 case DLL_PROCESS_DETACH:
34 break;
35 }
36 return TRUE;
37 }
38 #endif
39
40 SASL_CLIENT_PLUG_INIT( crammd5 )
41 SASL_SERVER_PLUG_INIT( crammd5 )
42
21112111 return SASL_FAIL;
21122112 }
21132113
2114 if (text->http_mode &&
2114 if (text->http_mode && text->reauth->timeout &&
21152115 sparams->utils->mutex_lock(text->reauth->mutex) == SASL_OK) { /* LOCK */
21162116
21172117 /* Create an initial cache entry for non-persistent HTTP connections */
24502450 #endif
24512451 }
24522452
2453 if (!text->nonce) {
2453 if (!text->nonce && text->reauth->timeout) {
24542454 unsigned val = hash((char *) nonce) % text->reauth->size;
24552455
24562456 /* reauth attempt or continuation of HTTP Digest on a
27572757 /* if ok verified */
27582758 if (strcmp(serverresponse, response) != 0) {
27592759 if (Try_8859_1) {
2760
2760 sparams->utils->free(serverresponse);
27612761 serverresponse = create_response(text,
27622762 sparams->utils,
27632763 nonce,
30473047 memset(oparams, 0, sizeof(sasl_out_params_t));
30483048 if (text->nonce) sparams->utils->free(text->nonce);
30493049 if (text->realm) sparams->utils->free(text->realm);
3050 text->nonce = text->realm = NULL;
3050 text->realm = NULL;
3051 text->nonce = NULL;
30513052
30523053 /* fall through and issue challenge */
30533054 }
36493650 int saw_qop = 0;
36503651 int ciphers = 0;
36513652 int maxbuf_count = 0;
3652 bool IsUTF8 = FALSE;
36533653 int algorithm_count = 0;
36543654 int opaque_count = 0;
36553655
38663866 params->utils->seterror(params->utils->conn, 0,
38673867 "Charset must be UTF-8");
38683868 goto FreeAllocatedMem;
3869 } else {
3870 IsUTF8 = TRUE;
38713869 }
38723870 } else if (strcasecmp(name,"algorithm")==0) {
38733871 if (text->http_mode && strcasecmp(value, "md5") == 0) {
42984296 *clientoutlen = (unsigned) strlen(text->out_buf);
42994297 *clientout = text->out_buf;
43004298
4301 text->state = 3;
4299 /* check for next state (2 or 3) is done in digestmd5_client_mech_step() */
43024300 return SASL_CONTINUE;
43034301 }
43044302
43314329
43324330 if (nrealm == 1) {
43334331 /* only one choice! */
4332 if (text->realm) params->utils->free(text->realm);
43344333 text->realm = realms[0];
43354334
43364335 /* free realms */
45244523 return SASL_CONTINUE;
45254524 }
45264525 }
4527
4528 /* fall through and respond to challenge */
4529
4530 case 3:
4531 if (serverin && !strncasecmp(serverin, "rspauth=", 8)) {
4532 return digestmd5_client_mech_step3(ctext, params,
4533 serverin, serverinlen,
4534 prompt_need,
4535 clientout, clientoutlen,
4536 oparams);
4526 else if (!strncasecmp(serverin, "rspauth=", 8)) {
4527 /* server accepted fast reauth */
4528 text->state = 3;
4529 goto step3;
45374530 }
45384531
45394532 /* fall through and respond to challenge */
45604553 clientout, clientoutlen,
45614554 oparams);
45624555
4556 case 3:
4557 step3:
4558 return digestmd5_client_mech_step3(ctext, params,
4559 serverin, serverinlen,
4560 prompt_need,
4561 clientout, clientoutlen,
4562 oparams);
4563
45634564 default:
45644565 params->utils->log(NULL, SASL_LOG_ERR,
45654566 "Invalid DIGEST-MD5 client step %d\n", text->state);
45804581 "DIGEST-MD5 client mech dispose");
45814582
45824583 if (ctext->free_password) _plug_free_secret(utils, &ctext->password);
4584 if (ctext->algorithm) utils->free(ctext->algorithm);
4585 if (ctext->opaque) utils->free(ctext->opaque);
45834586
45844587 digestmd5_common_mech_dispose(conn_context, utils);
45854588 }
+0
-43
plugins/digestmd5_init.c less more
0
1 #include <config.h>
2
3 #include <string.h>
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef macintosh
7 #include <sys/stat.h>
8 #endif
9 #include <fcntl.h>
10 #include <assert.h>
11
12 #include <sasl.h>
13 #include <saslplug.h>
14 #include <saslutil.h>
15
16 #include "plugin_common.h"
17
18 #ifdef macintosh
19 #include <sasl_digestmd5_plugin_decl.h>
20 #endif
21
22 #ifdef WIN32
23 BOOL APIENTRY DllMain( HANDLE hModule,
24 DWORD ul_reason_for_call,
25 LPVOID lpReserved
26 )
27 {
28 switch (ul_reason_for_call)
29 {
30 case DLL_PROCESS_ATTACH:
31 case DLL_THREAD_ATTACH:
32 case DLL_THREAD_DETACH:
33 case DLL_PROCESS_DETACH:
34 break;
35 }
36 return TRUE;
37 }
38 #endif
39
40 SASL_CLIENT_PLUG_INIT( digestmd5 )
41 SASL_SERVER_PLUG_INIT( digestmd5 )
42
274274
275275 static void
276276 gs2_common_mech_free(void *global_context __attribute__((unused)),
277 const sasl_utils_t *utils)
277 const sasl_utils_t *utils __attribute__((unused)))
278278 {
279279 OM_uint32 minor;
280280
+0
-43
plugins/gs2_init.c less more
0
1 #include <config.h>
2
3 #include <string.h>
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef macintosh
7 #include <sys/stat.h>
8 #endif
9 #include <fcntl.h>
10 #include <assert.h>
11
12 #include <sasl.h>
13 #include <saslplug.h>
14 #include <saslutil.h>
15
16 #include "plugin_common.h"
17
18 #ifdef macintosh
19 #include <sasl_gs2_plugin_decl.h>
20 #endif
21
22 #ifdef WIN32
23 BOOL APIENTRY DllMain( HANDLE hModule,
24 DWORD ul_reason_for_call,
25 LPVOID lpReserved
26 )
27 {
28 switch (ul_reason_for_call)
29 {
30 case DLL_PROCESS_ATTACH:
31 case DLL_THREAD_ATTACH:
32 case DLL_THREAD_DETACH:
33 case DLL_PROCESS_DETACH:
34 break;
35 }
36 return TRUE;
37 }
38 #endif
39
40 SASL_CLIENT_PLUG_INIT( gs2 )
41 SASL_SERVER_PLUG_INIT( gs2 )
42
5050 #include <gssapi/gssapi.h>
5151 #endif
5252
53 #include <gssapi/gssapi_krb5.h>
54
5355 #ifdef WIN32
5456 # include <winsock2.h>
5557
125127 */
126128
127129 #ifdef GSS_USE_MUTEXES
128 #define GSS_LOCK_MUTEX(utils) \
129 if(((sasl_utils_t *)(utils))->mutex_lock(gss_mutex) != 0) { \
130 #define GSS_LOCK_MUTEX_EXT(utils, mutex) \
131 if(((sasl_utils_t *)(utils))->mutex_lock(mutex) != 0) { \
130132 return SASL_FAIL; \
131133 }
132134
133 #define GSS_UNLOCK_MUTEX(utils) \
134 if(((sasl_utils_t *)(utils))->mutex_unlock(gss_mutex) != 0) { \
135 #define GSS_UNLOCK_MUTEX_EXT(utils, mutex) \
136 if(((sasl_utils_t *)(utils))->mutex_unlock(mutex) != 0) { \
135137 return SASL_FAIL; \
136138 }
139
140 #define GSS_LOCK_MUTEX(utils) GSS_LOCK_MUTEX_EXT(utils, gss_mutex)
141 #define GSS_UNLOCK_MUTEX(utils) GSS_UNLOCK_MUTEX_EXT(utils, gss_mutex)
142
143 #define GSS_LOCK_MUTEX_CTX(utils, ctx) GSS_LOCK_MUTEX_EXT(utils, (ctx)->ctx_mutex)
144 #define GSS_UNLOCK_MUTEX_CTX(utils, ctx) GSS_UNLOCK_MUTEX_EXT(utils, (ctx)->ctx_mutex)
145
137146
138147 static void *gss_mutex = NULL;
139148 #else
140149 #define GSS_LOCK_MUTEX(utils)
141150 #define GSS_UNLOCK_MUTEX(utils)
151 #define GSS_LOCK_MUTEX_CTX(utils, ctx)
152 #define GSS_UNLOCK_MUTEX_CTX(utils, ctx)
142153 #endif
143154
144155 typedef struct context {
175186
176187 char *authid; /* hold the authid between steps - server */
177188 const char *user; /* hold the userid between steps - client */
189 void *ctx_mutex; /* A per-context mutex */
178190 } context_t;
179191
180192 enum {
201213 OM_uint32 msg_ctx;
202214 int ret;
203215 char *out = NULL;
204 size_t len, curlen = 0;
216 size_t len;
217 unsigned curlen = 0;
205218 const char prefix[] = "GSSAPI Error: ";
206219
207220 if (!utils) return SASL_OK;
354367 output_token->value = NULL;
355368 output_token->length = 0;
356369
357 GSS_LOCK_MUTEX(text->utils);
370 GSS_LOCK_MUTEX_CTX(text->utils, text);
358371 maj_stat = gss_wrap (&min_stat,
359372 text->gss_ctx,
360373 privacy,
362375 input_token,
363376 NULL,
364377 output_token);
365 GSS_UNLOCK_MUTEX(text->utils);
378 GSS_UNLOCK_MUTEX_CTX(text->utils, text);
366379
367380 if (GSS_ERROR(maj_stat)) {
368381 sasl_gss_seterror(text->utils, maj_stat, min_stat);
369382 if (output_token->value) {
370 GSS_LOCK_MUTEX(text->utils);
383 GSS_LOCK_MUTEX_CTX(text->utils, text);
371384 gss_release_buffer(&min_stat, output_token);
372 GSS_UNLOCK_MUTEX(text->utils);
385 GSS_UNLOCK_MUTEX_CTX(text->utils, text);
373386 }
374387 return SASL_FAIL;
375388 }
383396 output_token->length + 4);
384397
385398 if (ret != SASL_OK) {
386 GSS_LOCK_MUTEX(text->utils);
399 GSS_LOCK_MUTEX_CTX(text->utils, text);
387400 gss_release_buffer(&min_stat, output_token);
388 GSS_UNLOCK_MUTEX(text->utils);
401 GSS_UNLOCK_MUTEX_CTX(text->utils, text);
389402 return ret;
390403 }
391404
406419 *output = text->encode_buf;
407420
408421 if (output_token->value) {
409 GSS_LOCK_MUTEX(text->utils);
422 GSS_LOCK_MUTEX_CTX(text->utils, text);
410423 gss_release_buffer(&min_stat, output_token);
411 GSS_UNLOCK_MUTEX(text->utils);
424 GSS_UNLOCK_MUTEX_CTX(text->utils, text);
412425 }
413426
414427 return SASL_OK;
454467 output_token->value = NULL;
455468 output_token->length = 0;
456469
457 GSS_LOCK_MUTEX(text->utils);
470 GSS_LOCK_MUTEX_CTX(text->utils, text);
458471 maj_stat = gss_unwrap (&min_stat,
459472 text->gss_ctx,
460473 input_token,
461474 output_token,
462475 NULL,
463476 NULL);
464 GSS_UNLOCK_MUTEX(text->utils);
477 GSS_UNLOCK_MUTEX_CTX(text->utils, text);
465478
466479 if (GSS_ERROR(maj_stat)) {
467480 sasl_gss_seterror(text->utils,maj_stat,min_stat);
468481 if (output_token->value) {
469 GSS_LOCK_MUTEX(text->utils);
482 GSS_LOCK_MUTEX_CTX(text->utils, text);
470483 gss_release_buffer(&min_stat, output_token);
471 GSS_UNLOCK_MUTEX(text->utils);
484 GSS_UNLOCK_MUTEX_CTX(text->utils, text);
472485 }
473486 return SASL_FAIL;
474487 }
483496 &text->decode_once_buf_len,
484497 *outputlen);
485498 if (result != SASL_OK) {
486 GSS_LOCK_MUTEX(text->utils);
499 GSS_LOCK_MUTEX_CTX(text->utils, text);
487500 gss_release_buffer(&min_stat, output_token);
488 GSS_UNLOCK_MUTEX(text->utils);
501 GSS_UNLOCK_MUTEX_CTX(text->utils, text);
489502 return result;
490503 }
491504 *output = text->decode_once_buf;
492505 memcpy(*output, output_token->value, *outputlen);
493506 }
494 GSS_LOCK_MUTEX(text->utils);
507 GSS_LOCK_MUTEX_CTX(text->utils, text);
495508 gss_release_buffer(&min_stat, output_token);
496 GSS_UNLOCK_MUTEX(text->utils);
509 GSS_UNLOCK_MUTEX_CTX(text->utils, text);
497510 }
498511
499512 return SASL_OK;
524537
525538 memset(ret,0,sizeof(context_t));
526539 ret->utils = utils;
527
540 #ifdef GSS_USE_MUTEXES
541 ret->ctx_mutex = utils->mutex_alloc();
542 if (!ret->ctx_mutex) {
543 utils->free(ret);
544 return NULL;
545 }
546 #endif
547
528548 return ret;
529549 }
530550
531551 static int sasl_gss_free_context_contents(context_t *text)
532552 {
533 OM_uint32 maj_stat, min_stat;
553 OM_uint32 min_stat;
534554
535555 if (!text) return SASL_OK;
536556
537 GSS_LOCK_MUTEX(text->utils);
557 #ifdef GSS_USE_MUTEXES
558 if (text->ctx_mutex) {
559 GSS_LOCK_MUTEX_CTX(text->utils, text);
560 }
561 #endif
538562
539563 if (text->gss_ctx != GSS_C_NO_CONTEXT) {
540 maj_stat = gss_delete_sec_context(&min_stat,&text->gss_ctx,
541 GSS_C_NO_BUFFER);
564 (void) gss_delete_sec_context(&min_stat,&text->gss_ctx,
565 GSS_C_NO_BUFFER);
542566 text->gss_ctx = GSS_C_NO_CONTEXT;
543567 }
544568
545569 if (text->client_name != GSS_C_NO_NAME) {
546 maj_stat = gss_release_name(&min_stat,&text->client_name);
570 (void) gss_release_name(&min_stat,&text->client_name);
547571 text->client_name = GSS_C_NO_NAME;
548572 }
549573
550574 if (text->server_name != GSS_C_NO_NAME) {
551 maj_stat = gss_release_name(&min_stat,&text->server_name);
575 (void) gss_release_name(&min_stat,&text->server_name);
552576 text->server_name = GSS_C_NO_NAME;
553577 }
554578
555579 if ( text->server_creds != GSS_C_NO_CREDENTIAL) {
556 maj_stat = gss_release_cred(&min_stat, &text->server_creds);
580 (void) gss_release_cred(&min_stat, &text->server_creds);
557581 text->server_creds = GSS_C_NO_CREDENTIAL;
558582 }
559583
560584 if ( text->client_creds != GSS_C_NO_CREDENTIAL) {
561 maj_stat = gss_release_cred(&min_stat, &text->client_creds);
585 (void) gss_release_cred(&min_stat, &text->client_creds);
562586 text->client_creds = GSS_C_NO_CREDENTIAL;
563587 }
564588
565 GSS_UNLOCK_MUTEX(text->utils);
566
567589 if (text->out_buf) {
568590 text->utils->free(text->out_buf);
569591 text->out_buf = NULL;
596618 text->utils->free(text->authid);
597619 text->authid = NULL;
598620 }
621
622 #ifdef GSS_USE_MUTEXES
623 if (text->ctx_mutex) {
624 GSS_UNLOCK_MUTEX_CTX(text->utils, text);
625 text->utils->mutex_free(text->ctx_mutex);
626 text->ctx_mutex = NULL;
627 }
628 #endif
599629
600630 return SASL_OK;
601631
691721 }
692722 sprintf(name_token.value,"%s@%s", params->service, params->serverFQDN);
693723
694 GSS_LOCK_MUTEX(params->utils);
724 GSS_LOCK_MUTEX_CTX(params->utils, text);
695725 maj_stat = gss_import_name (&min_stat,
696726 &name_token,
697727 GSS_C_NT_HOSTBASED_SERVICE,
698728 &text->server_name);
699 GSS_UNLOCK_MUTEX(params->utils);
729 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
700730
701731 params->utils->free(name_token.value);
702732 name_token.value = NULL;
708738 }
709739
710740 if ( text->server_creds != GSS_C_NO_CREDENTIAL) {
711 GSS_LOCK_MUTEX(params->utils);
741 GSS_LOCK_MUTEX_CTX(params->utils, text);
712742 maj_stat = gss_release_cred(&min_stat, &text->server_creds);
713 GSS_UNLOCK_MUTEX(params->utils);
743 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
714744 text->server_creds = GSS_C_NO_CREDENTIAL;
715745 }
716746
717747 /* If caller didn't provide creds already */
718748 if ( server_creds == GSS_C_NO_CREDENTIAL) {
719 GSS_LOCK_MUTEX(params->utils);
749 GSS_LOCK_MUTEX_CTX(params->utils, text);
720750 maj_stat = gss_acquire_cred(&min_stat,
721751 text->server_name,
722752 GSS_C_INDEFINITE,
725755 &text->server_creds,
726756 NULL,
727757 NULL);
728 GSS_UNLOCK_MUTEX(params->utils);
758 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
729759
730760 if (GSS_ERROR(maj_stat)) {
731761 sasl_gss_seterror(text->utils, maj_stat, min_stat);
742772 }
743773
744774
745 GSS_LOCK_MUTEX(params->utils);
775 GSS_LOCK_MUTEX_CTX(params->utils, text);
746776 maj_stat =
747777 gss_accept_sec_context(&min_stat,
748778 &(text->gss_ctx),
755785 &out_flags,
756786 NULL, /* context validity period */
757787 &(text->client_creds));
758 GSS_UNLOCK_MUTEX(params->utils);
788 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
759789
760790 if (GSS_ERROR(maj_stat)) {
761791 sasl_gss_log(text->utils, maj_stat, min_stat);
762792 text->utils->seterror(text->utils->conn, SASL_NOLOG, "GSSAPI Failure: gss_accept_sec_context");
763793 if (output_token->value) {
764 GSS_LOCK_MUTEX(params->utils);
794 GSS_LOCK_MUTEX_CTX(params->utils, text);
765795 gss_release_buffer(&min_stat, output_token);
766 GSS_UNLOCK_MUTEX(params->utils);
796 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
767797 }
768798 sasl_gss_free_context_contents(text);
769799 return SASL_BADAUTH;
777807 ret = _plug_buf_alloc(text->utils, &(text->out_buf),
778808 &(text->out_buf_len), *serveroutlen);
779809 if(ret != SASL_OK) {
780 GSS_LOCK_MUTEX(params->utils);
810 GSS_LOCK_MUTEX_CTX(params->utils, text);
781811 gss_release_buffer(&min_stat, output_token);
782 GSS_UNLOCK_MUTEX(params->utils);
812 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
783813 return ret;
784814 }
785815 memcpy(text->out_buf, output_token->value, *serveroutlen);
786816 *serverout = text->out_buf;
787817 }
788818
789 GSS_LOCK_MUTEX(params->utils);
819 GSS_LOCK_MUTEX_CTX(params->utils, text);
790820 gss_release_buffer(&min_stat, output_token);
791 GSS_UNLOCK_MUTEX(params->utils);
821 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
792822 } else {
793823 /* No output token, send an empty string */
794824 *serverout = GSSAPI_BLANK_STRING;
831861 /* continue with authentication */
832862 }
833863
834 GSS_LOCK_MUTEX(params->utils);
864 GSS_LOCK_MUTEX_CTX(params->utils, text);
835865 maj_stat = gss_canonicalize_name(&min_stat,
836866 text->client_name,
837867 mech_type,
838868 &client_name_MN);
839 GSS_UNLOCK_MUTEX(params->utils);
869 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
840870
841871 if (GSS_ERROR(maj_stat)) {
842872 SETERROR(text->utils, "GSSAPI Failure: gss_canonicalize_name");
847877 name_token.value = NULL;
848878 name_without_realm.value = NULL;
849879
850 GSS_LOCK_MUTEX(params->utils);
880 GSS_LOCK_MUTEX_CTX(params->utils, text);
851881 maj_stat = gss_display_name (&min_stat,
852882 client_name_MN,
853883 &name_token,
854884 NULL);
855 GSS_UNLOCK_MUTEX(params->utils);
885 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
856886
857887 if (GSS_ERROR(maj_stat)) {
858888 SETERROR(text->utils, "GSSAPI Failure: gss_display_name");
882912
883913 name_without_realm.length = strlen( (char *) name_without_realm.value );
884914
885 GSS_LOCK_MUTEX(params->utils);
915 GSS_LOCK_MUTEX_CTX(params->utils, text);
886916 maj_stat = gss_import_name (&min_stat,
887917 &name_without_realm,
888918 /* Solaris 8/9 gss_import_name doesn't accept GSS_C_NULL_OID here,
893923 GSS_C_NULL_OID,
894924 #endif
895925 &without);
896 GSS_UNLOCK_MUTEX(params->utils);
926 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
897927
898928 if (GSS_ERROR(maj_stat)) {
899929 SETERROR(text->utils, "GSSAPI Failure: gss_import_name");
902932 goto cleanup;
903933 }
904934
905 GSS_LOCK_MUTEX(params->utils);
935 GSS_LOCK_MUTEX_CTX(params->utils, text);
906936 maj_stat = gss_compare_name(&min_stat,
907937 client_name_MN,
908938 without,
909939 &equal);
910 GSS_UNLOCK_MUTEX(params->utils);
940 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
911941
912942 if (GSS_ERROR(maj_stat)) {
913943 SETERROR(text->utils, "GSSAPI Failure: gss_compare_name");
943973 ret = SASL_CONTINUE;
944974 }
945975
976 /* Release server creds which are no longer needed */
977 if ( text->server_creds != GSS_C_NO_CREDENTIAL) {
978 maj_stat = gss_release_cred(&min_stat, &text->server_creds);
979 text->server_creds = GSS_C_NO_CREDENTIAL;
980 }
981
946982 cleanup:
983 if (text->server_creds != GSS_C_NO_CREDENTIAL) {
984 GSS_LOCK_MUTEX(params->utils);
985 maj_stat = gss_release_cred(&min_stat, &text->server_creds);
986 GSS_UNLOCK_MUTEX(params->utils);
987 text->server_creds = GSS_C_NO_CREDENTIAL;
988 }
947989 if (client_name_MN) {
948990 GSS_LOCK_MUTEX(params->utils);
949991 gss_release_name(&min_stat, &client_name_MN);
10521094 real_input_token.value = (void *)sasldata;
10531095 real_input_token.length = 4;
10541096
1055 GSS_LOCK_MUTEX(params->utils);
1097 GSS_LOCK_MUTEX_CTX(params->utils, text);
10561098 maj_stat = gss_wrap(&min_stat,
10571099 text->gss_ctx,
10581100 0, /* Just integrity checking here */
10601102 input_token,
10611103 NULL,
10621104 output_token);
1063 GSS_UNLOCK_MUTEX(params->utils);
1105 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
10641106
10651107 if (GSS_ERROR(maj_stat)) {
10661108 sasl_gss_seterror(text->utils, maj_stat, min_stat);
10671109 if (output_token->value) {
1068 GSS_LOCK_MUTEX(params->utils);
1110 GSS_LOCK_MUTEX_CTX(params->utils, text);
10691111 gss_release_buffer(&min_stat, output_token);
1070 GSS_UNLOCK_MUTEX(params->utils);
1112 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
10711113 }
10721114 sasl_gss_free_context_contents(text);
10731115 return SASL_FAIL;
10811123 ret = _plug_buf_alloc(text->utils, &(text->out_buf),
10821124 &(text->out_buf_len), *serveroutlen);
10831125 if(ret != SASL_OK) {
1084 GSS_LOCK_MUTEX(params->utils);
1126 GSS_LOCK_MUTEX_CTX(params->utils, text);
10851127 gss_release_buffer(&min_stat, output_token);
1086 GSS_UNLOCK_MUTEX(params->utils);
1128 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
10871129 return ret;
10881130 }
10891131 memcpy(text->out_buf, output_token->value, *serveroutlen);
10901132 *serverout = text->out_buf;
10911133 }
10921134
1093 GSS_LOCK_MUTEX(params->utils);
1135 GSS_LOCK_MUTEX_CTX(params->utils, text);
10941136 gss_release_buffer(&min_stat, output_token);
1095 GSS_UNLOCK_MUTEX(params->utils);
1137 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
10961138 }
10971139
10981140 /* Wait for ssf request and authid */
11231165 real_input_token.value = (void *)clientin;
11241166 real_input_token.length = clientinlen;
11251167
1126 GSS_LOCK_MUTEX(params->utils);
1168 GSS_LOCK_MUTEX_CTX(params->utils, text);
11271169 maj_stat = gss_unwrap(&min_stat,
11281170 text->gss_ctx,
11291171 input_token,
11301172 output_token,
11311173 NULL,
11321174 NULL);
1133 GSS_UNLOCK_MUTEX(params->utils);
1175 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
11341176
11351177 if (GSS_ERROR(maj_stat)) {
11361178 sasl_gss_seterror(text->utils, maj_stat, min_stat);
11411183 if (output_token->length < 4) {
11421184 SETERROR(text->utils,
11431185 "token too short");
1144 GSS_LOCK_MUTEX(params->utils);
1186 GSS_LOCK_MUTEX_CTX(params->utils, text);
11451187 gss_release_buffer(&min_stat, output_token);
1146 GSS_UNLOCK_MUTEX(params->utils);
1188 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
11471189 sasl_gss_free_context_contents(text);
11481190 return SASL_FAIL;
11491191 }
11501192
11511193 layerchoice = (int)(((char *)(output_token->value))[0]);
1152 if (layerchoice == LAYER_NONE &&
1194 if (!(layerchoice & (LAYER_INTEGRITY | LAYER_CONFIDENTIALITY)) &&
11531195 (text->qop & LAYER_NONE)) { /* no encryption */
11541196 oparams->encode = NULL;
11551197 oparams->decode = NULL;
11561198 oparams->mech_ssf = 0;
1157 } else if (layerchoice == LAYER_INTEGRITY &&
1199 } else if ((layerchoice & LAYER_INTEGRITY) &&
11581200 (text->qop & LAYER_INTEGRITY)) { /* integrity */
11591201 oparams->encode = &gssapi_integrity_encode;
11601202 oparams->decode = &gssapi_decode;
11611203 oparams->mech_ssf = 1;
1162 } else if ((layerchoice == LAYER_CONFIDENTIALITY ||
1163 /* For compatibility with broken clients setting both bits */
1164 layerchoice == (LAYER_CONFIDENTIALITY|LAYER_INTEGRITY)) &&
1204 } else if (/* For compatibility with broken clients setting both bits */
1205 (layerchoice & (LAYER_CONFIDENTIALITY | LAYER_INTEGRITY)) &&
11651206 (text->qop & LAYER_CONFIDENTIALITY)) { /* privacy */
11661207 oparams->encode = &gssapi_privacy_encode;
11671208 oparams->decode = &gssapi_decode;
11741215 /* Mark that we attempted negotiation */
11751216 oparams->mech_ssf = 2;
11761217 if (output_token->value) {
1177 GSS_LOCK_MUTEX(params->utils);
1218 GSS_LOCK_MUTEX_CTX(params->utils, text);
11781219 gss_release_buffer(&min_stat, output_token);
1179 GSS_UNLOCK_MUTEX(params->utils);
1220 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
11801221 }
11811222 sasl_gss_free_context_contents(text);
11821223 return SASL_FAIL;
12201261 }
12211262 }
12221263
1223 GSS_LOCK_MUTEX(params->utils);
1264 GSS_LOCK_MUTEX_CTX(params->utils, text);
12241265 gss_release_buffer(&min_stat, output_token);
1225 GSS_UNLOCK_MUTEX(params->utils);
1266 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
12261267
12271268 text->state = SASL_GSSAPI_STATE_AUTHENTICATED;
12281269
12571298
12581299 if (text == NULL) return SASL_BADPROT;
12591300
1260 params->utils->log(NULL, SASL_LOG_DEBUG,
1301 params->utils->log(params->utils->conn, SASL_LOG_DEBUG,
12611302 "GSSAPI server step %d\n", text->state);
12621303
12631304 switch (text->state) {
12831324 break;
12841325
12851326 default:
1286 params->utils->log(NULL, SASL_LOG_ERR,
1327 params->utils->log(params->utils->conn, SASL_LOG_ERR,
12871328 "Invalid GSSAPI server step %d\n", text->state);
12881329 return SASL_FAIL;
12891330 }
14891530 *clientout = NULL;
14901531 *clientoutlen = 0;
14911532
1492 params->utils->log(NULL, SASL_LOG_DEBUG,
1533 params->utils->log(params->utils->conn, SASL_LOG_DEBUG,
14931534 "GSSAPI client step %d", text->state);
14941535
14951536 switch (text->state) {
15461587
15471588 sprintf(name_token.value,"%s@%s", params->service, params->serverFQDN);
15481589
1549 GSS_LOCK_MUTEX(params->utils);
1590 GSS_LOCK_MUTEX_CTX(params->utils, text);
15501591 maj_stat = gss_import_name (&min_stat,
15511592 &name_token,
15521593 GSS_C_NT_HOSTBASED_SERVICE,
15531594 &text->server_name);
1554 GSS_UNLOCK_MUTEX(params->utils);
1595 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
15551596
15561597 params->utils->free(name_token.value);
15571598 name_token.value = NULL;
15751616 * and no input from the server. However, thanks to Imap,
15761617 * which discards our first output, this happens all the time.
15771618 * Throw away the context and try again. */
1578 GSS_LOCK_MUTEX(params->utils);
1619 GSS_LOCK_MUTEX_CTX(params->utils, text);
15791620 maj_stat = gss_delete_sec_context (&min_stat,&text->gss_ctx,GSS_C_NO_BUFFER);
1580 GSS_UNLOCK_MUTEX(params->utils);
1621 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
15811622 text->gss_ctx = GSS_C_NO_CONTEXT;
15821623 }
15831624
15991640 req_flags = req_flags | GSS_C_DELEG_FLAG;
16001641 }
16011642
1602 GSS_LOCK_MUTEX(params->utils);
1643 GSS_LOCK_MUTEX_CTX(params->utils, text);
16031644 maj_stat = gss_init_sec_context(&min_stat,
16041645 client_creds, /* GSS_C_NO_CREDENTIAL */
16051646 &text->gss_ctx,
16131654 output_token,
16141655 &out_req_flags,
16151656 NULL);
1616 GSS_UNLOCK_MUTEX(params->utils);
1657 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
16171658
16181659 if (GSS_ERROR(maj_stat)) {
16191660 sasl_gss_seterror(text->utils, maj_stat, min_stat);
16201661 if (output_token->value) {
1621 GSS_LOCK_MUTEX(params->utils);
1662 GSS_LOCK_MUTEX_CTX(params->utils, text);
16221663 gss_release_buffer(&min_stat, output_token);
1623 GSS_UNLOCK_MUTEX(params->utils);
1664 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
16241665 }
16251666 sasl_gss_free_context_contents(text);
16261667 return SASL_FAIL;
16511692 ret = _plug_buf_alloc(text->utils, &(text->out_buf),
16521693 &(text->out_buf_len), *clientoutlen);
16531694 if(ret != SASL_OK) {
1654 GSS_LOCK_MUTEX(params->utils);
1695 GSS_LOCK_MUTEX_CTX(params->utils, text);
16551696 gss_release_buffer(&min_stat, output_token);
1656 GSS_UNLOCK_MUTEX(params->utils);
1697 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
16571698 return ret;
16581699 }
16591700 memcpy(text->out_buf, output_token->value, *clientoutlen);
16601701 *clientout = text->out_buf;
16611702 }
16621703
1663 GSS_LOCK_MUTEX(params->utils);
1704 GSS_LOCK_MUTEX_CTX(params->utils, text);
16641705 gss_release_buffer(&min_stat, output_token);
1665 GSS_UNLOCK_MUTEX(params->utils);
1706 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
16661707 }
16671708
16681709 if (maj_stat == GSS_S_COMPLETE) {
1669 GSS_LOCK_MUTEX(params->utils);
1710 GSS_LOCK_MUTEX_CTX(params->utils, text);
16701711 maj_stat = gss_inquire_context(&min_stat,
16711712 text->gss_ctx,
16721713 &text->client_name,
16771718 NULL, /* flags */
16781719 NULL, /* local init */
16791720 NULL); /* open */
1680 GSS_UNLOCK_MUTEX(params->utils);
1721 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
16811722
16821723 if (GSS_ERROR(maj_stat)) {
16831724 sasl_gss_seterror(text->utils, maj_stat, min_stat);
16861727 }
16871728
16881729 name_token.length = 0;
1689 GSS_LOCK_MUTEX(params->utils);
1730 GSS_LOCK_MUTEX_CTX(params->utils, text);
16901731 maj_stat = gss_display_name(&min_stat,
16911732 text->client_name,
16921733 &name_token,
16931734 NULL);
1694 GSS_UNLOCK_MUTEX(params->utils);
1735 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
16951736
16961737 if (GSS_ERROR(maj_stat)) {
16971738 if (name_token.value) {
1698 GSS_LOCK_MUTEX(params->utils);
1739 GSS_LOCK_MUTEX_CTX(params->utils, text);
16991740 gss_release_buffer(&min_stat, &name_token);
1700 GSS_UNLOCK_MUTEX(params->utils);
1741 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
17011742 }
17021743 SETERROR(text->utils, "GSSAPI Failure");
17031744 sasl_gss_free_context_contents(text);
17181759 SASL_CU_AUTHID | SASL_CU_AUTHZID,
17191760 oparams);
17201761 }
1721 GSS_LOCK_MUTEX(params->utils);
1762 GSS_LOCK_MUTEX_CTX(params->utils, text);
17221763 gss_release_buffer(&min_stat, &name_token);
1723 GSS_UNLOCK_MUTEX(params->utils);
1764 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
17241765
17251766 if (ret != SASL_OK) return ret;
17261767
17461787 real_input_token.value = (void *) serverin;
17471788 real_input_token.length = serverinlen;
17481789
1749 GSS_LOCK_MUTEX(params->utils);
1790 GSS_LOCK_MUTEX_CTX(params->utils, text);
17501791 maj_stat = gss_unwrap(&min_stat,
17511792 text->gss_ctx,
17521793 input_token,
17531794 output_token,
17541795 NULL,
17551796 NULL);
1756 GSS_UNLOCK_MUTEX(params->utils);
1797 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
17571798
17581799 if (GSS_ERROR(maj_stat)) {
17591800 sasl_gss_seterror(text->utils, maj_stat, min_stat);
1801 if (output_token->value) {
1802 GSS_LOCK_MUTEX_CTX(params->utils, text);
1803 gss_release_buffer(&min_stat, output_token);
1804 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
1805 }
17601806 sasl_gss_free_context_contents(text);
1761 if (output_token->value) {
1762 GSS_LOCK_MUTEX(params->utils);
1763 gss_release_buffer(&min_stat, output_token);
1764 GSS_UNLOCK_MUTEX(params->utils);
1765 }
17661807 return SASL_FAIL;
17671808 }
17681809
17691810 if (output_token->length != 4) {
17701811 SETERROR(text->utils,
17711812 (output_token->length < 4) ? "token too short" : "token too long");
1772 GSS_LOCK_MUTEX(params->utils);
1813 GSS_LOCK_MUTEX_CTX(params->utils, text);
17731814 gss_release_buffer(&min_stat, output_token);
1774 GSS_UNLOCK_MUTEX(params->utils);
1815 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
17751816 sasl_gss_free_context_contents(text);
17761817 return SASL_FAIL;
17771818 }
18721913 }
18731914 }
18741915
1875 GSS_LOCK_MUTEX(params->utils);
1916 GSS_LOCK_MUTEX_CTX(params->utils, text);
18761917 gss_release_buffer(&min_stat, output_token);
1877 GSS_UNLOCK_MUTEX(params->utils);
1918 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
18781919
18791920 /* oparams->user is always set, due to canon_user requirements.
18801921 * Make sure the client actually requested it though, by checking
19201961 }
19211962 ((unsigned char *)input_token->value)[0] = mychoice;
19221963
1923 GSS_LOCK_MUTEX(params->utils);
1964 GSS_LOCK_MUTEX_CTX(params->utils, text);
19241965 maj_stat = gss_wrap (&min_stat,
19251966 text->gss_ctx,
19261967 0, /* Just integrity checking here */
19281969 input_token,
19291970 NULL,
19301971 output_token);
1931 GSS_UNLOCK_MUTEX(params->utils);
1972 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
19321973
19331974 params->utils->free(input_token->value);
19341975 input_token->value = NULL;
19361977 if (GSS_ERROR(maj_stat)) {
19371978 sasl_gss_seterror(text->utils, maj_stat, min_stat);
19381979 if (output_token->value) {
1939 GSS_LOCK_MUTEX(params->utils);
1980 GSS_LOCK_MUTEX_CTX(params->utils, text);
19401981 gss_release_buffer(&min_stat, output_token);
1941 GSS_UNLOCK_MUTEX(params->utils);
1982 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
19421983 }
19431984 sasl_gss_free_context_contents(text);
19441985 return SASL_FAIL;
19541995 &(text->out_buf_len),
19551996 *clientoutlen);
19561997 if (ret != SASL_OK) {
1957 GSS_LOCK_MUTEX(params->utils);
1998 GSS_LOCK_MUTEX_CTX(params->utils, text);
19581999 gss_release_buffer(&min_stat, output_token);
1959 GSS_UNLOCK_MUTEX(params->utils);
2000 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
19602001 return ret;
19612002 }
19622003 memcpy(text->out_buf, output_token->value, *clientoutlen);
19632004 *clientout = text->out_buf;
19642005 }
19652006
1966 GSS_LOCK_MUTEX(params->utils);
2007 GSS_LOCK_MUTEX_CTX(params->utils, text);
19672008 gss_release_buffer(&min_stat, output_token);
1968 GSS_UNLOCK_MUTEX(params->utils);
2009 GSS_UNLOCK_MUTEX_CTX(params->utils, text);
19692010
19702011 }
19712012
19822023 }
19832024
19842025 default:
1985 params->utils->log(NULL, SASL_LOG_ERR,
2026 params->utils->log(params->utils->conn, SASL_LOG_ERR,
19862027 "Invalid GSSAPI client step %d\n", text->state);
19872028 return SASL_FAIL;
19882029 }
+0
-43
plugins/gssapiv2_init.c less more
0
1 #include <config.h>
2
3 #include <string.h>
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef macintosh
7 #include <sys/stat.h>
8 #endif
9 #include <fcntl.h>
10 #include <assert.h>
11
12 #include <sasl.h>
13 #include <saslplug.h>
14 #include <saslutil.h>
15
16 #include "plugin_common.h"
17
18 #ifdef macintosh
19 #include <sasl_gssapiv2_plugin_decl.h>
20 #endif
21
22 #ifdef WIN32
23 BOOL APIENTRY DllMain( HANDLE hModule,
24 DWORD ul_reason_for_call,
25 LPVOID lpReserved
26 )
27 {
28 switch (ul_reason_for_call)
29 {
30 case DLL_PROCESS_ATTACH:
31 case DLL_THREAD_ATTACH:
32 case DLL_THREAD_DETACH:
33 case DLL_PROCESS_DETACH:
34 break;
35 }
36 return TRUE;
37 }
38 #endif
39
40 SASL_CLIENT_PLUG_INIT( gssapiv2 )
41 SASL_SERVER_PLUG_INIT( gssapiv2 )
42
+0
-43
plugins/kerberos4_init.c less more
0
1 #include <config.h>
2
3 #include <string.h>
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef macintosh
7 #include <sys/stat.h>
8 #endif
9 #include <fcntl.h>
10 #include <assert.h>
11
12 #include <sasl.h>
13 #include <saslplug.h>
14 #include <saslutil.h>
15
16 #include "plugin_common.h"
17
18 #ifdef macintosh
19 #include <sasl_kerberos4_plugin_decl.h>
20 #endif
21
22 #ifdef WIN32
23 BOOL APIENTRY DllMain( HANDLE hModule,
24 DWORD ul_reason_for_call,
25 LPVOID lpReserved
26 )
27 {
28 switch (ul_reason_for_call)
29 {
30 case DLL_PROCESS_ATTACH:
31 case DLL_THREAD_ATTACH:
32 case DLL_THREAD_DETACH:
33 case DLL_PROCESS_DETACH:
34 break;
35 }
36 return TRUE;
37 }
38 #endif
39
40 SASL_CLIENT_PLUG_INIT( kerberos4 )
41 SASL_SERVER_PLUG_INIT( kerberos4 )
42
2121
2222 #include "plugin_common.h"
2323
24 #define LDAP_DEPRECATED 1
2425 #include <ldap.h>
2526
2627 static char ldapdb[] = "ldapdb";
+0
-39
plugins/ldapdb_init.c less more
0
1 #include <config.h>
2
3 #include <string.h>
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef macintosh
7 #include <sys/stat.h>
8 #endif
9 #include <fcntl.h>
10 #include <assert.h>
11
12 #include <sasl.h>
13 #include <saslplug.h>
14 #include <saslutil.h>
15
16 #include "plugin_common.h"
17
18 #ifdef WIN32
19 BOOL APIENTRY DllMain( HANDLE hModule,
20 DWORD ul_reason_for_call,
21 LPVOID lpReserved
22 )
23 {
24 switch (ul_reason_for_call)
25 {
26 case DLL_PROCESS_ATTACH:
27 case DLL_THREAD_ATTACH:
28 case DLL_THREAD_DETACH:
29 case DLL_PROCESS_DETACH:
30 break;
31 }
32 return TRUE;
33 }
34 #endif
35
36 SASL_AUXPROP_PLUG_INIT( ldapdb )
37
38 SASL_CANONUSER_PLUG_INIT( ldapdb )
+0
-43
plugins/login_init.c less more
0
1 #include <config.h>
2
3 #include <string.h>
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef macintosh
7 #include <sys/stat.h>
8 #endif
9 #include <fcntl.h>
10 #include <assert.h>
11
12 #include <sasl.h>
13 #include <saslplug.h>
14 #include <saslutil.h>
15
16 #include "plugin_common.h"
17
18 #ifdef macintosh
19 #include <sasl_login_plugin_decl.h>
20 #endif
21
22 #ifdef WIN32
23 BOOL APIENTRY DllMain( HANDLE hModule,
24 DWORD ul_reason_for_call,
25 LPVOID lpReserved
26 )
27 {
28 switch (ul_reason_for_call)
29 {
30 case DLL_PROCESS_ATTACH:
31 case DLL_THREAD_ATTACH:
32 case DLL_THREAD_DETACH:
33 case DLL_PROCESS_DETACH:
34 break;
35 }
36 return TRUE;
37 }
38 #endif
39
40 SASL_CLIENT_PLUG_INIT( login )
41 SASL_SERVER_PLUG_INIT( login )
42
274274 {
275275 if (len) {
276276 if (unicode) {
277 to_unicode(base + *offset, str, len);
277 to_unicode(base + *offset, (const char *) str, len);
278278 len *= 2;
279279 }
280280 else {
372372 char P14[14];
373373 unsigned char S8[] = { 0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25 };
374374
375 strncpy(P14, passwd->data, sizeof(P14));
375 strncpy(P14, (const char *) passwd->data, sizeof(P14));
376376 ucase(P14, sizeof(P14));
377377
378 E(P16, P14, sizeof(P14), S8, sizeof(S8));
378 E(P16, (unsigned char *) P14, sizeof(P14), S8, sizeof(S8));
379379 *result = SASL_OK;
380380 return P16;
381381 }
389389 *result = SASL_NOMEM;
390390 }
391391 else {
392 to_unicode(*buf, passwd->data, passwd->len);
393 MD4(*buf, 2 * passwd->len, P16);
392 to_unicode((unsigned char *) *buf, (const char *) passwd->data, passwd->len);
393 MD4((unsigned char *) *buf, 2 * passwd->len, P16);
394394 *result = SASL_OK;
395395 }
396396 return P16;
416416 return P24;
417417 }
418418
419 static HMAC_CTX *_plug_HMAC_CTX_new(const sasl_utils_t *utils)
420 {
421 utils->log(NULL, SASL_LOG_DEBUG, "_plug_HMAC_CTX_new()");
422
423 #if OPENSSL_VERSION_NUMBER >= 0x10100000L
424 return HMAC_CTX_new();
425 #else
426 return utils->malloc(sizeof(EVP_MD_CTX));
427 #endif
428 }
429
430 static void _plug_HMAC_CTX_free(HMAC_CTX *ctx, const sasl_utils_t *utils)
431 {
432 utils->log(NULL, SASL_LOG_DEBUG, "_plug_HMAC_CTX_free()");
433
434 #if OPENSSL_VERSION_NUMBER >= 0x10100000L
435 HMAC_CTX_free(ctx);
436 #else
437 HMAC_cleanup(ctx);
438 utils->free(ctx);
439 #endif
440 }
441
419442 static unsigned char *V2(unsigned char *V2, sasl_secret_t *passwd,
420443 const char *authid, const char *target,
421444 const unsigned char *challenge,
423446 const sasl_utils_t *utils,
424447 char **buf, unsigned *buflen, int *result)
425448 {
426 HMAC_CTX ctx;
449 HMAC_CTX *ctx = NULL;
427450 unsigned char hash[EVP_MAX_MD_SIZE];
428451 char *upper;
429452 unsigned int len;
434457 SETERROR(utils, "cannot allocate NTLMv2 hash");
435458 *result = SASL_NOMEM;
436459 }
460 else if ((ctx = _plug_HMAC_CTX_new(utils)) == NULL) {
461 SETERROR(utils, "cannot allocate HMAC CTX");
462 *result = SASL_NOMEM;
463 }
437464 else {
438465 /* NTLMv2hash = HMAC-MD5(NTLMhash, unicode(ucase(authid + domain))) */
439466 P16_nt(hash, passwd, utils, buf, buflen, result);
443470 strcpy(upper, authid);
444471 if (target) strcat(upper, target);
445472 ucase(upper, len);
446 to_unicode(*buf, upper, len);
447
448 HMAC(EVP_md5(), hash, MD4_DIGEST_LENGTH, *buf, 2 * len, hash, &len);
473 to_unicode((unsigned char *) *buf, upper, len);
474
475 HMAC(EVP_md5(), hash, MD4_DIGEST_LENGTH, (unsigned char *) *buf, 2 * len, hash, &len);
449476
450477 /* V2 = HMAC-MD5(NTLMv2hash, challenge + blob) + blob */
451 HMAC_Init(&ctx, hash, len, EVP_md5());
452 HMAC_Update(&ctx, challenge, NTLM_NONCE_LENGTH);
453 HMAC_Update(&ctx, blob, bloblen);
454 HMAC_Final(&ctx, V2, &len);
455 HMAC_cleanup(&ctx);
478 HMAC_Init_ex(ctx, hash, len, EVP_md5(), NULL);
479 HMAC_Update(ctx, challenge, NTLM_NONCE_LENGTH);
480 HMAC_Update(ctx, blob, bloblen);
481 HMAC_Final(ctx, V2, &len);
456482
457483 /* the blob is concatenated outside of this function */
458484
459485 *result = SASL_OK;
460486 }
487
488 if (ctx) _plug_HMAC_CTX_free(ctx, utils);
461489
462490 return V2;
463491 }
767795 */
768796 n = strcspn(in, ".");
769797 if (n > 16) n = 16;
770 strncpy(out+18, in, n);
771 in = out+18;
798 strncpy((char *) out+18, in, n);
799 in = (char *) out+18;
772800 ucase(in, n);
773801
774802 out[j++] = 0x20;
10321060 "NTLM: error reading NEGPROT response");
10331061 return SASL_FAIL;
10341062 }
1035 p = text->out_buf;
1063 p = (unsigned char *) text->out_buf;
10361064
10371065 /* parse the header */
10381066 if (len < SMB_HDR_SIZE) {
11141142 return SASL_NOMEM;
11151143 }
11161144 memcpy(*domain, p, len);
1117 from_unicode(*domain, *domain, len);
1145 from_unicode(*domain, (unsigned char *) *domain, len);
11181146
11191147 text->flags |= NTLM_TARGET_IS_DOMAIN;
11201148 }
12551283 "NTLM: error reading SESSIONSETUP response");
12561284 return SASL_FAIL;
12571285 }
1258 p = text->out_buf;
1286 p = (unsigned char *) text->out_buf;
12591287
12601288 /* parse the header */
12611289 if (len < SMB_HDR_SIZE) {
13421370 return SASL_NOMEM;
13431371 }
13441372
1345 base = *buf;
1373 base = (unsigned char *) *buf;
13461374 memset(base, 0, *outlen);
13471375 memcpy(base + NTLM_SIG_OFFSET, NTLM_SIGNATURE, sizeof(NTLM_SIGNATURE));
13481376 htoil(base + NTLM_TYPE_OFFSET, NTLM_TYPE_CHALLENGE);
13491377 load_buffer(base + NTLM_TYPE2_TARGET_OFFSET,
1350 ucase(target, 0), (uint16) xstrlen(target), flags & NTLM_USE_UNICODE,
1378 (const unsigned char *) ucase(target, 0), (uint16) xstrlen(target), flags & NTLM_USE_UNICODE,
13511379 base, &offset);
13521380 htoil(base + NTLM_TYPE2_FLAGS_OFFSET, flags);
13531381 memcpy(base + NTLM_TYPE2_CHALLENGE_OFFSET, nonce, NTLM_NONCE_LENGTH);
14991527 return SASL_BADPROT;
15001528 }
15011529
1502 result = unload_buffer(sparams->utils, clientin + NTLM_TYPE3_LMRESP_OFFSET,
1530 result = unload_buffer(sparams->utils,
1531 (const unsigned char *) clientin + NTLM_TYPE3_LMRESP_OFFSET,
15031532 (u_char **) &lm_resp, &lm_resp_len, 0,
1504 clientin, clientinlen);
1533 (const unsigned char *) clientin, clientinlen);
15051534 if (result != SASL_OK) goto cleanup;
15061535
1507 result = unload_buffer(sparams->utils, clientin + NTLM_TYPE3_NTRESP_OFFSET,
1536 result = unload_buffer(sparams->utils,
1537 (const unsigned char *) clientin + NTLM_TYPE3_NTRESP_OFFSET,
15081538 (u_char **) &nt_resp, &nt_resp_len, 0,
1509 clientin, clientinlen);
1539 (const unsigned char *) clientin, clientinlen);
15101540 if (result != SASL_OK) goto cleanup;
15111541
1512 result = unload_buffer(sparams->utils, clientin + NTLM_TYPE3_DOMAIN_OFFSET,
1542 result = unload_buffer(sparams->utils,
1543 (const unsigned char *) clientin + NTLM_TYPE3_DOMAIN_OFFSET,
15131544 (u_char **) &domain, &domain_len,
15141545 text->flags & NTLM_USE_UNICODE,
1515 clientin, clientinlen);
1546 (const unsigned char *) clientin, clientinlen);
15161547 if (result != SASL_OK) goto cleanup;
15171548
1518 result = unload_buffer(sparams->utils, clientin + NTLM_TYPE3_USER_OFFSET,
1549 result = unload_buffer(sparams->utils,
1550 (const unsigned char *) clientin + NTLM_TYPE3_USER_OFFSET,
15191551 (u_char **) &authid, &authid_len,
15201552 text->flags & NTLM_USE_UNICODE,
1521 clientin, clientinlen);
1553 (const unsigned char *) clientin, clientinlen);
15221554 if (result != SASL_OK) goto cleanup;
15231555
15241556 /* require at least one response and an authid */
15811613 }
15821614
15831615 password->len = (unsigned) pass_len;
1584 strncpy(password->data, auxprop_values[0].values[0], pass_len + 1);
1616 strncpy((char *) password->data, auxprop_values[0].values[0], pass_len + 1);
15851617
15861618 /* erase the plaintext password */
15871619 sparams->utils->prop_erase(sparams->propctx, password_request[0]);
18041836 return SASL_NOMEM;
18051837 }
18061838
1807 base = *buf;
1839 base = (unsigned char *) *buf;
18081840 memset(base, 0, *outlen);
18091841 memcpy(base + NTLM_SIG_OFFSET, NTLM_SIGNATURE, sizeof(NTLM_SIGNATURE));
18101842 htoil(base + NTLM_TYPE_OFFSET, NTLM_TYPE_REQUEST);
18111843 htoil(base + NTLM_TYPE1_FLAGS_OFFSET, flags);
18121844 load_buffer(base + NTLM_TYPE1_DOMAIN_OFFSET,
1813 domain, (uint16) xstrlen(domain), 0, base, &offset);
1845 (const unsigned char *) domain, (uint16) xstrlen(domain), 0, base, &offset);
18141846 load_buffer(base + NTLM_TYPE1_WORKSTN_OFFSET,
1815 wkstn, (uint16) xstrlen(wkstn), 0, base, &offset);
1847 (const unsigned char *) wkstn, (uint16) xstrlen(wkstn), 0, base, &offset);
18161848
18171849 return SASL_OK;
18181850 }
18571889 return SASL_NOMEM;
18581890 }
18591891
1860 base = *buf;
1892 base = (unsigned char *) *buf;
18611893 memset(base, 0, *outlen);
18621894 memcpy(base + NTLM_SIG_OFFSET, NTLM_SIGNATURE, sizeof(NTLM_SIGNATURE));
18631895 htoil(base + NTLM_TYPE_OFFSET, NTLM_TYPE_RESPONSE);
18661898 load_buffer(base + NTLM_TYPE3_NTRESP_OFFSET,
18671899 nt_resp, nt_resp ? NTLM_RESP_LENGTH : 0, 0, base, &offset);
18681900 load_buffer(base + NTLM_TYPE3_DOMAIN_OFFSET,
1869 ucase(domain, 0), (uint16) xstrlen(domain), flags & NTLM_USE_UNICODE,
1901 (const unsigned char *) ucase(domain, 0), (uint16) xstrlen(domain),
1902 flags & NTLM_USE_UNICODE,
18701903 base, &offset);
18711904 load_buffer(base + NTLM_TYPE3_USER_OFFSET,
1872 user, (uint16) xstrlen(user), flags & NTLM_USE_UNICODE, base, &offset);
1905 (const unsigned char *) user, (uint16) xstrlen(user),
1906 flags & NTLM_USE_UNICODE, base, &offset);
18731907 load_buffer(base + NTLM_TYPE3_WORKSTN_OFFSET,
1874 ucase(wkstn, 0), (uint16) xstrlen(wkstn), flags & NTLM_USE_UNICODE,
1908 (const unsigned char *) ucase(wkstn, 0), (uint16) xstrlen(wkstn),
1909 flags & NTLM_USE_UNICODE,
18751910 base, &offset);
18761911 load_buffer(base + NTLM_TYPE3_SESSIONKEY_OFFSET,
18771912 key, key ? NTLM_SESSKEY_LENGTH : 0, 0, base, &offset);
20102045
20112046 flags &= NTLM_FLAGS_MASK; /* mask off the bits we don't support */
20122047
2013 result = unload_buffer(params->utils, serverin + NTLM_TYPE2_TARGET_OFFSET,
2048 result = unload_buffer(params->utils,
2049 (const unsigned char *) serverin + NTLM_TYPE2_TARGET_OFFSET,
20142050 (u_char **) &domain, NULL,
20152051 flags & NTLM_USE_UNICODE,
20162052 (u_char *) serverin, serverinlen);
20262062 (sendv2[0] == 'o' && sendv2[1] == 'n') || sendv2[0] == 't')) {
20272063
20282064 /* put the cnonce in place after the LMv2 HMAC */
2029 char *cnonce = resp + MD5_DIGEST_LENGTH;
2065 char *cnonce = (char *) resp + MD5_DIGEST_LENGTH;
20302066
20312067 params->utils->log(NULL, SASL_LOG_DEBUG,
20322068 "calculating LMv2 response");
20342070 params->utils->rand(params->utils->rpool, cnonce, NTLM_NONCE_LENGTH);
20352071
20362072 V2(resp, password, oparams->authid, domain,
2037 serverin + NTLM_TYPE2_CHALLENGE_OFFSET, cnonce, NTLM_NONCE_LENGTH,
2073 (const unsigned char *) serverin + NTLM_TYPE2_CHALLENGE_OFFSET,
2074 (const unsigned char *) cnonce, NTLM_NONCE_LENGTH,
20382075 params->utils, &text->out_buf, &text->out_buf_len, &result);
20392076
20402077 lm_resp = resp;
+0
-43
plugins/ntlm_init.c less more
0
1 #include <config.h>
2
3 #include <string.h>
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef macintosh
7 #include <sys/stat.h>
8 #endif
9 #include <fcntl.h>
10 #include <assert.h>
11
12 #include <sasl.h>
13 #include <saslplug.h>
14 #include <saslutil.h>
15
16 #include "plugin_common.h"
17
18 #ifdef macintosh
19 #include <sasl_ntlm_plugin_decl.h>
20 #endif
21
22 #ifdef WIN32
23 BOOL APIENTRY DllMain( HANDLE hModule,
24 DWORD ul_reason_for_call,
25 LPVOID lpReserved
26 )
27 {
28 switch (ul_reason_for_call)
29 {
30 case DLL_PROCESS_ATTACH:
31 case DLL_THREAD_ATTACH:
32 case DLL_THREAD_DETACH:
33 case DLL_PROCESS_DETACH:
34 break;
35 }
36 return TRUE;
37 }
38 #endif
39
40 SASL_CLIENT_PLUG_INIT( ntlm )
41 SASL_SERVER_PLUG_INIT( ntlm )
42
9595 {NULL, 0, NULL}
9696 };
9797
98 static EVP_MD_CTX *_plug_EVP_MD_CTX_new(const sasl_utils_t *utils)
99 {
100 utils->log(NULL, SASL_LOG_DEBUG, "_plug_EVP_MD_CTX_new()");
101
102 #if OPENSSL_VERSION_NUMBER >= 0x10100000L
103 return EVP_MD_CTX_new();
104 #else
105 return utils->malloc(sizeof(EVP_MD_CTX));
106 #endif
107 }
108
109 static void _plug_EVP_MD_CTX_free(EVP_MD_CTX *ctx, const sasl_utils_t *utils)
110 {
111 utils->log(NULL, SASL_LOG_DEBUG, "_plug_EVP_MD_CTX_free()");
112
113 #if OPENSSL_VERSION_NUMBER >= 0x10100000L
114 EVP_MD_CTX_free(ctx);
115 #else
116 utils->free(ctx);
117 #endif
118 }
119
98120 /* Convert the binary data into ASCII hex */
99121 void bin2hex(unsigned char *bin, int binlen, char *hex)
100122 {
115137 * swabbing bytes if necessary.
116138 */
117139 static void otp_hash(const EVP_MD *md, char *in, size_t inlen,
118 unsigned char *out, int swab)
119 {
120 EVP_MD_CTX mdctx;
121 char hash[EVP_MAX_MD_SIZE];
140 unsigned char *out, int swab, EVP_MD_CTX *mdctx)
141 {
142 unsigned char hash[EVP_MAX_MD_SIZE];
122143 unsigned int i;
123144 int j;
124145 unsigned hashlen;
125146
126 EVP_DigestInit(&mdctx, md);
127 EVP_DigestUpdate(&mdctx, in, inlen);
128 EVP_DigestFinal(&mdctx, hash, &hashlen);
147 EVP_DigestInit(mdctx, md);
148 EVP_DigestUpdate(mdctx, in, inlen);
149 EVP_DigestFinal(mdctx, hash, &hashlen);
129150
130151 /* Fold the result into 64 bits */
131152 for (i = OTP_HASH_SIZE; i < hashlen; i++) {
145166
146167 static int generate_otp(const sasl_utils_t *utils,
147168 algorithm_option_t *alg, unsigned seq, char *seed,
148 char *secret, char *otp)
169 unsigned char *secret, unsigned secret_len,
170 unsigned char *otp)
149171 {
150172 const EVP_MD *md;
151 char *key;
173 EVP_MD_CTX *mdctx = NULL;
174 char *key = NULL;
175 int r = SASL_OK;
152176
153177 if (!(md = EVP_get_digestbyname(alg->evp_name))) {
154178 utils->seterror(utils->conn, 0,
156180 return SASL_FAIL;
157181 }
158182
159 if ((key = utils->malloc(strlen(seed) + strlen(secret) + 1)) == NULL) {
183 if ((mdctx = _plug_EVP_MD_CTX_new(utils)) == NULL) {
184 SETERROR(utils, "cannot allocate MD CTX");
185 r = SASL_NOMEM;
186 goto done;
187 }
188
189 if ((key = utils->malloc(strlen(seed) + secret_len + 1)) == NULL) {
160190 SETERROR(utils, "cannot allocate OTP key");
161 return SASL_NOMEM;
191 r = SASL_NOMEM;
192 goto done;
162193 }
163194
164195 /* initial step */
165 strcpy(key, seed);
166 strcat(key, secret);
167 otp_hash(md, key, strlen(key), otp, alg->swab);
196 sprintf(key, "%s%.*s", seed, secret_len, secret);
197 otp_hash(md, key, strlen(key), otp, alg->swab, mdctx);
168198
169199 /* computation step */
170200 while (seq-- > 0)
171 otp_hash(md, otp, OTP_HASH_SIZE, otp, alg->swab);
172
173 utils->free(key);
174
175 return SASL_OK;
201 otp_hash(md, (char *) otp, OTP_HASH_SIZE, otp, alg->swab, mdctx);
202
203 done:
204 if (key) utils->free(key);
205 if (mdctx) _plug_EVP_MD_CTX_free(mdctx, utils);
206
207 return r;
176208 }
177209
178210 static int parse_challenge(const sasl_utils_t *utils,
586618 return (i < binlen) ? SASL_BADAUTH : SASL_OK;
587619 }
588620
589 static int make_secret(const sasl_utils_t *utils,
590 const char *alg, unsigned seq, char *seed, char *otp,
621 static int make_secret(const sasl_utils_t *utils, const char *alg,
622 unsigned seq, char *seed, unsigned char *otp,
591623 time_t timeout, sasl_secret_t **secret)
592624 {
593625 size_t sec_len;
594 unsigned char *data;
626 char *data;
595627 char buf[2*OTP_HASH_SIZE+1];
596628
597629 /*
609641 }
610642
611643 (*secret)->len = (unsigned) sec_len;
612 data = (*secret)->data;
644 data = (char *) (*secret)->data;
613645
614646 bin2hex(otp, OTP_HASH_SIZE, buf);
615647 buf[2*OTP_HASH_SIZE] = '\0';
627659 time_t *timeout)
628660 {
629661 if (strlen(secret) < seclen) {
630 unsigned char *c;
662 char *c;
631663
632664 /*
633665 * old-style (binary) secret is stored as:
692724
693725 /* Convert the 6 words into binary data */
694726 static int word2bin(const sasl_utils_t *utils,
695 char *words, unsigned char *bin, const EVP_MD *md)
727 char *words, unsigned char *bin, const EVP_MD *md,
728 EVP_MD_CTX *mdctx)
696729 {
697730 int i, j;
698731 char *c, *word, buf[OTP_RESPONSE_MAX+1];
751784
752785 /* alternate dictionary */
753786 if (alt_dict) {
754 EVP_MD_CTX mdctx;
755 char hash[EVP_MAX_MD_SIZE];
756 int hashlen;
787 unsigned char hash[EVP_MAX_MD_SIZE];
788 unsigned hashlen;
757789
758 EVP_DigestInit(&mdctx, md);
759 EVP_DigestUpdate(&mdctx, word, strlen(word));
760 EVP_DigestFinal(&mdctx, hash, &hashlen);
790 EVP_DigestInit(mdctx, md);
791 EVP_DigestUpdate(mdctx, word, strlen(word));
792 EVP_DigestFinal(mdctx, hash, &hashlen);
761793
762794 /* use lowest 11 bits */
763795 x = ((hash[hashlen-2] & 0x7) << 8) | hash[hashlen-1];
801833 char *response)
802834 {
803835 const EVP_MD *md;
836 EVP_MD_CTX *mdctx = NULL;
804837 char *c;
805838 int do_init = 0;
806839 unsigned char cur_otp[OTP_HASH_SIZE], prev_otp[OTP_HASH_SIZE];
814847 return SASL_FAIL;
815848 }
816849
850 if ((mdctx = _plug_EVP_MD_CTX_new(utils)) == NULL) {
851 SETERROR(utils, "cannot allocate MD CTX");
852 return SASL_NOMEM;
853 }
854
817855 /* eat leading whitespace */
818856 c = response;
819857 while (isspace((int) *c)) c++;
823861 r = hex2bin(c+strlen(OTP_HEX_TYPE), cur_otp, OTP_HASH_SIZE);
824862 }
825863 else if (!strncasecmp(c, OTP_WORD_TYPE, strlen(OTP_WORD_TYPE))) {
826 r = word2bin(utils, c+strlen(OTP_WORD_TYPE), cur_otp, md);
864 r = word2bin(utils, c+strlen(OTP_WORD_TYPE), cur_otp, md, mdctx);
827865 }
828866 else if (!strncasecmp(c, OTP_INIT_HEX_TYPE,
829867 strlen(OTP_INIT_HEX_TYPE))) {
833871 else if (!strncasecmp(c, OTP_INIT_WORD_TYPE,
834872 strlen(OTP_INIT_WORD_TYPE))) {
835873 do_init = 1;
836 r = word2bin(utils, c+strlen(OTP_INIT_WORD_TYPE), cur_otp, md);
874 r = word2bin(utils, c+strlen(OTP_INIT_WORD_TYPE), cur_otp, md, mdctx);
837875 }
838876 else {
839877 SETERROR(utils, "unknown OTP extended response type");
842880 }
843881 else {
844882 /* standard response, try word first, and then hex */
845 r = word2bin(utils, c, cur_otp, md);
883 r = word2bin(utils, c, cur_otp, md, mdctx);
846884 if (r != SASL_OK)
847885 r = hex2bin(c, cur_otp, OTP_HASH_SIZE);
848886 }
849887
850888 if (r == SASL_OK) {
851889 /* do one more hash (previous otp) and compare to stored otp */
852 otp_hash(md, cur_otp, OTP_HASH_SIZE, prev_otp, text->alg->swab);
890 otp_hash(md, (char *) cur_otp, OTP_HASH_SIZE,
891 prev_otp, text->alg->swab, mdctx);
853892
854893 if (!memcmp(prev_otp, text->otp, OTP_HASH_SIZE)) {
855894 /* update the secret with this seq/otp */
878917 *new_resp++ = '\0';
879918 }
880919
881 if (!(new_chal && new_resp))
882 return SASL_BADAUTH;
920 if (!(new_chal && new_resp)) {
921 r = SASL_BADAUTH;
922 goto done;
923 }
883924
884925 if ((r = parse_challenge(utils, new_chal, &alg, &seq, seed, 1))
885926 != SASL_OK) {
886 return r;
887 }
888
889 if (seq < 1 || !strcasecmp(seed, text->seed))
890 return SASL_BADAUTH;
927 goto done;
928 }
929
930 if (seq < 1 || !strcasecmp(seed, text->seed)) {
931 r = SASL_BADAUTH;
932 goto done;
933 }
891934
892935 /* find the MDA */
893936 if (!(md = EVP_get_digestbyname(alg->evp_name))) {
894937 utils->seterror(utils->conn, 0,
895938 "OTP algorithm %s is not available",
896939 alg->evp_name);
897 return SASL_BADAUTH;
940 r = SASL_BADAUTH;
941 goto done;
898942 }
899943
900944 if (!strncasecmp(c, OTP_INIT_HEX_TYPE, strlen(OTP_INIT_HEX_TYPE))) {
902946 }
903947 else if (!strncasecmp(c, OTP_INIT_WORD_TYPE,
904948 strlen(OTP_INIT_WORD_TYPE))) {
905 r = word2bin(utils, new_resp, new_otp, md);
949 r = word2bin(utils, new_resp, new_otp, md, mdctx);
906950 }
907951
908952 if (r == SASL_OK) {
913957 memcpy(text->otp, new_otp, OTP_HASH_SIZE);
914958 }
915959 }
916
960
961 done:
962 if (mdctx) _plug_EVP_MD_CTX_free(mdctx, utils);
963
917964 return r;
918965 }
919966
10701117 result = params->utils->prop_request(propctx, store_request);
10711118 if (result == SASL_OK)
10721119 result = params->utils->prop_set(propctx, "cmusaslsecretOTP",
1073 sec->data, sec->len);
1120 (char *) sec->data, sec->len);
10741121 if (result == SASL_OK)
10751122 result = params->utils->auxprop_store(params->utils->conn,
10761123 propctx, text->authid);
11521199 result = params->utils->prop_request(propctx, store_request);
11531200 if (result == SASL_OK)
11541201 result = params->utils->prop_set(propctx, "cmusaslsecretOTP",
1155 sec->data, sec->len);
1202 (char *) sec->data, sec->len);
11561203 if (result == SASL_OK)
11571204 result = params->utils->auxprop_store(params->utils->conn,
11581205 propctx, text->authid);
12431290 r = utils->prop_request(propctx, store_request);
12441291 if (!r)
12451292 r = utils->prop_set(propctx, "cmusaslsecretOTP",
1246 (sec ? sec->data : NULL),
1293 (sec ? (char *) sec->data : NULL),
12471294 (sec ? sec->len : 0));
12481295 if (!r)
12491296 r = utils->auxprop_store(utils->conn, propctx, text->authid);
12681315 static int otp_setpass(void *glob_context __attribute__((unused)),
12691316 sasl_server_params_t *sparams,
12701317 const char *userstr,
1271 const char *pass,
1272 unsigned passlen __attribute__((unused)),
1318 const char *pass, unsigned passlen,
12731319 const char *oldpass __attribute__((unused)),
12741320 unsigned oldpasslen __attribute__((unused)),
12751321 unsigned flags)
13141360 unsigned int len;
13151361 unsigned short randnum;
13161362 char seed[OTP_SEED_MAX+1];
1317 char otp[OTP_HASH_SIZE];
1363 unsigned char otp[OTP_HASH_SIZE];
13181364
13191365 sparams->utils->getopt(sparams->utils->getopt_context,
13201366 "OTP", "otp_mda", &mda, &len);
13411387 sprintf(seed, "%.2s%04u", sparams->serverFQDN, (randnum % 9999) + 1);
13421388
13431389 r = generate_otp(sparams->utils, algs, OTP_SEQUENCE_DEFAULT,
1344 seed, (char*) pass, otp);
1390 seed, (unsigned char *) pass, passlen, otp);
13451391 if (r != SASL_OK) {
13461392 /* generate_otp() takes care of error message */
13471393 goto cleanup;
13631409 r = sparams->utils->prop_request(propctx, store_request);
13641410 if (!r)
13651411 r = sparams->utils->prop_set(propctx, "cmusaslsecretOTP",
1366 (sec ? sec->data : NULL),
1412 (sec ? (char *) sec->data : NULL),
13671413 (sec ? sec->len : 0));
13681414 if (!r)
13691415 r = sparams->utils->auxprop_store(sparams->utils->conn, propctx, user);
16691715 algorithm_option_t *alg;
16701716 unsigned seq;
16711717 char seed[OTP_SEED_MAX+1];
1672 char otp[OTP_HASH_SIZE];
1718 unsigned char otp[OTP_HASH_SIZE];
16731719 int init_done = 0;
16741720
16751721 /* parse challenge */
16931739
16941740 /* generate otp */
16951741 result = generate_otp(params->utils, alg, seq, seed,
1696 text->password->data, otp);
1742 text->password->data, text->password->len, otp);
16971743 if (result != SASL_OK) return result;
16981744
16991745 result = _plug_buf_alloc(params->utils, &(text->out_buf),
17031749 if (seq < OTP_SEQUENCE_REINIT) {
17041750 unsigned short randnum;
17051751 char new_seed[OTP_SEED_MAX+1];
1706 char new_otp[OTP_HASH_SIZE];
1752 unsigned char new_otp[OTP_HASH_SIZE];
17071753
17081754 /* try to reinitialize */
17091755
17161762 } while (!strcasecmp(seed, new_seed));
17171763
17181764 result = generate_otp(params->utils, alg, OTP_SEQUENCE_DEFAULT,
1719 new_seed, text->password->data, new_otp);
1765 new_seed, text->password->data, text->password->len, new_otp);
17201766
17211767 if (result == SASL_OK) {
17221768 /* create an init-hex response */
+0
-43
plugins/otp_init.c less more
0
1 #include <config.h>
2
3 #include <string.h>
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef macintosh
7 #include <sys/stat.h>
8 #endif
9 #include <fcntl.h>
10 #include <assert.h>
11
12 #include <sasl.h>
13 #include <saslplug.h>
14 #include <saslutil.h>
15
16 #include "plugin_common.h"
17
18 #ifdef macintosh
19 #include <sasl_otp_plugin_decl.h>
20 #endif
21
22 #ifdef WIN32
23 BOOL APIENTRY DllMain( HANDLE hModule,
24 DWORD ul_reason_for_call,
25 LPVOID lpReserved
26 )
27 {
28 switch (ul_reason_for_call)
29 {
30 case DLL_PROCESS_ATTACH:
31 case DLL_THREAD_ATTACH:
32 case DLL_THREAD_DETACH:
33 case DLL_PROCESS_DETACH:
34 break;
35 }
36 return TRUE;
37 }
38 #endif
39
40 SASL_CLIENT_PLUG_INIT( otp )
41 SASL_SERVER_PLUG_INIT( otp )
42
+0
-43
plugins/passdss_init.c less more
0
1 #include <config.h>
2
3 #include <string.h>
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef macintosh
7 #include <sys/stat.h>
8 #endif
9 #include <fcntl.h>
10 #include <assert.h>
11
12 #include <sasl.h>
13 #include <saslplug.h>
14 #include <saslutil.h>
15
16 #include "plugin_common.h"
17
18 #ifdef macintosh
19 #include <sasl_passdss_plugin_decl.h>
20 #endif
21
22 #ifdef WIN32
23 BOOL APIENTRY DllMain( HANDLE hModule,
24 DWORD ul_reason_for_call,
25 LPVOID lpReserved
26 )
27 {
28 switch (ul_reason_for_call)
29 {
30 case DLL_PROCESS_ATTACH:
31 case DLL_THREAD_ATTACH:
32 case DLL_THREAD_DETACH:
33 case DLL_PROCESS_DETACH:
34 break;
35 }
36 return TRUE;
37 }
38 #endif
39
40 SASL_CLIENT_PLUG_INIT( passdss )
41 SASL_SERVER_PLUG_INIT( passdss )
42
+0
-43
plugins/plain_init.c less more
0
1 #include <config.h>
2
3 #include <string.h>
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef macintosh
7 #include <sys/stat.h>
8 #endif
9 #include <fcntl.h>
10 #include <assert.h>
11
12 #include <sasl.h>
13 #include <saslplug.h>
14 #include <saslutil.h>
15
16 #include "plugin_common.h"
17
18 #ifdef macintosh
19 #include <sasl_plain_plugin_decl.h>
20 #endif
21
22 #ifdef WIN32
23 BOOL APIENTRY DllMain( HANDLE hModule,
24 DWORD ul_reason_for_call,
25 LPVOID lpReserved
26 )
27 {
28 switch (ul_reason_for_call)
29 {
30 case DLL_PROCESS_ATTACH:
31 case DLL_THREAD_ATTACH:
32 case DLL_THREAD_DETACH:
33 case DLL_PROCESS_DETACH:
34 break;
35 }
36 return TRUE;
37 }
38 #endif
39
40 SASL_CLIENT_PLUG_INIT( plain )
41 SASL_SERVER_PLUG_INIT( plain )
42
9393 if (!IN6_IS_ADDR_V4MAPPED((&sin6->sin6_addr)))
9494 return;
9595 sin4 = (struct sockaddr_in *)sa;
96 addr = *(uint32_t *)&sin6->sin6_addr.s6_addr[12];
96 addr = *(uint32_t *)&sin6->sin6_addr.s6_addr32[3];
9797 port = sin6->sin6_port;
9898 memset(sin4, 0, sizeof(struct sockaddr_in));
9999 sin4->sin_addr.s_addr = addr;
333333 /* We prompted, and got.*/
334334
335335 if (required && !prompt->result) {
336 SETERROR(utils, "Unexpectedly missing a prompt result");
336 SETERROR(utils, "Unexpectedly missing a prompt result in _plug_get_simple");
337337 return SASL_BADPARAM;
338338 }
339339
381381 /* We prompted, and got.*/
382382
383383 if (!prompt->result) {
384 SETERROR(utils, "Unexpectedly missing a prompt result");
384 SETERROR(utils, "Unexpectedly missing a prompt result in _plug_get_password");
385385 return SASL_BADPARAM;
386386 }
387387
440440 /* We prompted, and got.*/
441441
442442 if (!prompt->result) {
443 SETERROR(utils, "Unexpectedly missing a prompt result");
443 SETERROR(utils, "Unexpectedly missing a prompt result in _plug_challenge_prompt");
444444 return SASL_BADPARAM;
445445 }
446446
486486 /* We prompted, and got.*/
487487
488488 if (!prompt->result) {
489 SETERROR(utils, "Unexpectedly missing a prompt result");
489 SETERROR(utils, "Unexpectedly missing a prompt result in _plug_get_realm");
490490 return SASL_BADPARAM;
491491 }
492492
247247
248248 ret = SASL_OK;
249249 for (cur = to_store; cur->name; cur++) {
250 char * value = (cur->values && cur->values[0]) ? cur->values[0] : NULL;
250 const char *value = (cur->values && cur->values[0]) ? cur->values[0] : NULL;
251251
252252 if (cur->name[0] == '*') {
253253 continue;
+0
-38
plugins/sasldb_init.c less more
0
1 #include <config.h>
2
3 #include <string.h>
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef macintosh
7 #include <sys/stat.h>
8 #endif
9 #include <fcntl.h>
10 #include <assert.h>
11
12 #include <sasl.h>
13 #include <saslplug.h>
14 #include <saslutil.h>
15
16 #include "plugin_common.h"
17
18 #ifdef WIN32
19 BOOL APIENTRY DllMain( HANDLE hModule,
20 DWORD ul_reason_for_call,
21 LPVOID lpReserved
22 )
23 {
24 switch (ul_reason_for_call)
25 {
26 case DLL_PROCESS_ATTACH:
27 case DLL_THREAD_ATTACH:
28 case DLL_THREAD_DETACH:
29 case DLL_PROCESS_DETACH:
30 break;
31 }
32 return TRUE;
33 }
34 #endif
35
36 SASL_AUXPROP_PLUG_INIT( sasldb )
37
254254 return buffer;
255255 }
256256
257 #ifdef SCRAM_DEBUG
257258 /* Useful for debugging interop issues */
258259 static void
259260 print_hash (const char * func, const char * hash)
266267 }
267268 printf ("\n");
268269 }
270 #endif
269271
270272
271273 /* The result variable need to point to a buffer big enough for the [SHA-1] hash */
298300 if (HMAC(EVP_sha1(),
299301 (const unsigned char *) str,
300302 (int)str_len,
301 initial_key,
303 (const unsigned char *) initial_key,
302304 (int)salt_len + 4,
303305 (unsigned char *)result,
304306 &hash_len) == NULL) {
314316 if (HMAC(EVP_sha1(),
315317 (const unsigned char *) str,
316318 (int)str_len,
317 temp_result,
319 (const unsigned char *) temp_result,
318320 SCRAM_HASH_SIZE,
319321 (unsigned char *)temp_result,
320322 &hash_len) == NULL) {
344346 size_t * p_salt_len)
345347 {
346348 char * result = utils->malloc(SCRAM_HASH_SIZE);
347 Hi(utils, username, strlen(username), g_salt_key, SALT_SIZE, 20 /* iterations */, result);
349 Hi(utils, username, strlen(username), (const char *) g_salt_key, SALT_SIZE,
350 20 /* iterations */, result);
348351 *p_salt_len = SCRAM_HASH_SIZE;
349 return result;
352 return (unsigned char *) result;
350353 }
351354
352355 static int
385388
386389 /* SaltedPassword := Hi(password, salt) */
387390 Hi (utils,
388 sec->data,
391 (const char *) sec->data,
389392 sec->len,
390393 salt,
391394 salt_len,
396399 if (HMAC(EVP_sha1(),
397400 (const unsigned char *) SaltedPassword,
398401 SCRAM_HASH_SIZE,
399 CLIENT_KEY_CONSTANT,
402 (const unsigned char *) CLIENT_KEY_CONSTANT,
400403 CLIENT_KEY_CONSTANT_LEN,
401404 (unsigned char *)ClientKey,
402405 &hash_len) == NULL) {
406409 }
407410
408411 /* StoredKey := H(ClientKey) */
409 if (SHA1(ClientKey, SCRAM_HASH_SIZE, StoredKey) == NULL) {
412 if (SHA1((const unsigned char *) ClientKey, SCRAM_HASH_SIZE,
413 (unsigned char *) StoredKey) == NULL) {
410414 *error_text = "SHA1 call failed";
411415 result = SASL_SCRAM_INTERNAL;
412416 goto cleanup;
417421 if (HMAC(EVP_sha1(),
418422 (const unsigned char *) SaltedPassword,
419423 SCRAM_HASH_SIZE,
420 SERVER_KEY_CONSTANT,
424 (const unsigned char *) SERVER_KEY_CONSTANT,
421425 SERVER_KEY_CONSTANT_LEN,
422426 (unsigned char *)ServerKey,
423427 &hash_len) == NULL) {
508512 NULL };
509513 int canon_flags;
510514 struct propval auxprop_values[3];
511 unsigned int hash_len = 0;
512515 int result;
513516
514517 if (clientinlen == 0) {
782785 char * s_iteration_count;
783786 char * end;
784787
785 text->salt = scram_server_user_salt(sparams->utils, text->authentication_id, &text->salt_len);
788 text->salt = (char *) scram_server_user_salt(sparams->utils, text->authentication_id, &text->salt_len);
786789
787790 sparams->utils->getopt(sparams->utils->getopt_context,
788791 /* Different SCRAM hashes can have different strengh */
789792 SCRAM_SASL_MECH,
790793 "scram_iteration_counter",
791 &s_iteration_count,
794 (const char **) &s_iteration_count,
792795 NULL);
793796
794797 if (s_iteration_count != NULL) {
898901 (unsigned int)base64_salt_len,
899902 text->salt,
900903 (unsigned int)base64_salt_len,
901 &text->salt_len) != SASL_OK) {
904 (unsigned int *) &text->salt_len) != SASL_OK) {
902905 SETERROR(sparams->utils, "Invalid base64 encoding of the salt in " SCRAM_SASL_MECH " stored value");
903906 continue;
904907 }
13031306 if (HMAC(EVP_sha1(),
13041307 (const unsigned char *) text->StoredKey,
13051308 SCRAM_HASH_SIZE,
1306 text->auth_message,
1309 (const unsigned char *)text->auth_message,
13071310 (int)text->auth_message_len,
13081311 (unsigned char *)ClientSignature,
13091312 &hash_len) == NULL) {
13351338 }
13361339
13371340 /* StoredKey := H(ClientKey) */
1338 if (SHA1(ReceivedClientKey, SCRAM_HASH_SIZE, CalculatedStoredKey) == NULL) {
1341 if (SHA1((const unsigned char *) ReceivedClientKey, SCRAM_HASH_SIZE,
1342 (unsigned char *) CalculatedStoredKey) == NULL) {
13391343 sparams->utils->seterror(sparams->utils->conn,0,
13401344 "SHA1 call failed");
13411345 result = SASL_SCRAM_INTERNAL;
13541358 if (HMAC(EVP_sha1(),
13551359 (const unsigned char *) text->ServerKey,
13561360 SCRAM_HASH_SIZE,
1357 text->auth_message,
1361 (unsigned char *) text->auth_message,
13581362 (int)text->auth_message_len,
13591363 (unsigned char *)ServerSignature,
13601364 &hash_len) == NULL) {
15711575 /* Different SCRAM hashes can have different strengh */
15721576 SCRAM_SASL_MECH,
15731577 "scram_iteration_counter",
1574 &s_iteration_count,
1578 (const char **) &s_iteration_count,
15751579 NULL);
15761580
15771581 if (s_iteration_count != NULL) {
16621666 goto cleanup;
16631667 }
16641668
1665 sprintf(sec->data,
1669 sprintf((char *) sec->data,
16661670 "%s$%u:%s$%s:%s",
16671671 SCRAM_SASL_MECH,
16681672 iteration_count,
16691673 base64_salt,
16701674 base64_StoredKey,
16711675 base64_ServerKey);
1672 sec->len = (unsigned int) strlen(sec->data);
1676 sec->len = (unsigned int) strlen((const char *) sec->data);
16731677 }
16741678
16751679 /* do the store */
16831687 if (!r) {
16841688 r = sparams->utils->prop_set(propctx,
16851689 "authPassword",
1686 (sec ? sec->data : NULL),
1690 (const char *) (sec ? sec->data : NULL),
16871691 (sec ? sec->len : 0));
16881692 }
16891693 if (!r) {
19881992
19891993 if (userid != NULL && *userid != '\0') {
19901994 result = encode_saslname (oparams->user,
1991 &encoded_authorization_id,
1995 (const char **) &encoded_authorization_id,
19921996 &freeme2);
19931997
19941998 if (result != SASL_OK) {
19992003 }
20002004
20012005 result = encode_saslname (oparams->authid,
2002 &encoded_authcid,
2006 (const char **) &encoded_authcid,
20032007 &freeme);
20042008 if (result != SASL_OK) {
20052009 MEMERROR( params->utils );
22762280 goto cleanup;
22772281 }
22782282
2279 channel_binding_data = params->cbinding->data;
2283 channel_binding_data = (const char *) params->cbinding->data;
22802284 channel_binding_data_len = params->cbinding->len;
22812285 }
22822286
23672371
23682372 /* SaltedPassword := Hi(password, salt) */
23692373 Hi (params->utils,
2370 text->password->data,
2374 (const char *) text->password->data,
23712375 text->password->len,
23722376 text->salt,
23732377 text->salt_len,
23802384 if (HMAC(EVP_sha1(),
23812385 (const unsigned char *) text->SaltedPassword,
23822386 SCRAM_HASH_SIZE,
2383 CLIENT_KEY_CONSTANT,
2387 (const unsigned char *) CLIENT_KEY_CONSTANT,
23842388 CLIENT_KEY_CONSTANT_LEN,
23852389 (unsigned char *)ClientKey,
23862390 &hash_len) == NULL) {
23932397 PRINT_HASH ("ClientKey", ClientKey);
23942398
23952399 /* StoredKey := H(ClientKey) */
2396 if (SHA1(ClientKey, SCRAM_HASH_SIZE, StoredKey) == NULL) {
2400 if (SHA1((const unsigned char *) ClientKey, SCRAM_HASH_SIZE,
2401 (unsigned char *) StoredKey) == NULL) {
23972402 params->utils->seterror(params->utils->conn,0,
23982403 "SHA1 call failed");
23992404 result = SASL_SCRAM_INTERNAL;
24062411 if (HMAC(EVP_sha1(),
24072412 (const unsigned char *)StoredKey,
24082413 SCRAM_HASH_SIZE,
2409 text->auth_message,
2414 (const unsigned char *) text->auth_message,
24102415 (int)text->auth_message_len,
24112416 (unsigned char *)ClientSignature,
24122417 &hash_len) == NULL) {
25342539 if (HMAC(EVP_sha1(),
25352540 (const unsigned char *)text->SaltedPassword,
25362541 SCRAM_HASH_SIZE,
2537 SERVER_KEY_CONSTANT,
2542 (const unsigned char *) SERVER_KEY_CONSTANT,
25382543 SERVER_KEY_CONSTANT_LEN,
25392544 (unsigned char *)ServerKey,
25402545 &hash_len) == NULL) {
25482553 if (HMAC(EVP_sha1(),
25492554 (const unsigned char *)ServerKey,
25502555 SCRAM_HASH_SIZE,
2551 text->auth_message,
2556 (const unsigned char *) text->auth_message,
25522557 (int)text->auth_message_len,
25532558 (unsigned char *)ServerSignature,
25542559 &hash_len) == NULL) {
+0
-43
plugins/scram_init.c less more
0
1 #include <config.h>
2
3 #include <string.h>
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef macintosh
7 #include <sys/stat.h>
8 #endif
9 #include <fcntl.h>
10 #include <assert.h>
11
12 #include <sasl.h>
13 #include <saslplug.h>
14 #include <saslutil.h>
15
16 #include "plugin_common.h"
17
18 #ifdef macintosh
19 #include <sasl_scram_plugin_decl.h>
20 #endif
21
22 #ifdef WIN32
23 BOOL APIENTRY DllMain( HANDLE hModule,
24 DWORD ul_reason_for_call,
25 LPVOID lpReserved
26 )
27 {
28 switch (ul_reason_for_call)
29 {
30 case DLL_PROCESS_ATTACH:
31 case DLL_THREAD_ATTACH:
32 case DLL_THREAD_DETACH:
33 case DLL_PROCESS_DETACH:
34 break;
35 }
36 return TRUE;
37 }
38 #endif
39
40 SASL_CLIENT_PLUG_INIT( scram )
41 SASL_SERVER_PLUG_INIT( scram )
42
0 /* SECURID SASL plugin
1 * Ken Murchison
2 * $Id: securid.c,v 1.1 2006/02/07 19:27:54 murch Exp $
3 */
4 /*
5 * Copyright (c) 2006 Carnegie Mellon University. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 *
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the
17 * distribution.
18 *
19 * 3. The name "Carnegie Mellon University" must not be used to
20 * endorse or promote products derived from this software without
21 * prior written permission. For permission or any other legal
22 * details, please contact
23 * Office of Technology Transfer
24 * Carnegie Mellon University
25 * 5000 Forbes Avenue
26 * Pittsburgh, PA 15213-3890
27 * (412) 268-4387, fax: (412) 268-7395
28 * tech-transfer@andrew.cmu.edu
29 *
30 * 4. Redistributions of any form whatsoever must retain the following
31 * acknowledgment:
32 * "This product includes software developed by Computing Services
33 * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
34 *
35 * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
36 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
37 * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
38 * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
39 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
40 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
41 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
42 */
43
44 #include <config.h>
45 #include <stdio.h>
46 #include <string.h>
47
48 #include <sdi_athd.h>
49 #include <sdconf.h>
50 #include <sdi_size.h>
51 #include <sdi_type.h>
52 #include <sdi_defs.h>
53 #include <sdacmvls.h>
54
55 #include <sasl.h>
56 #include <saslplug.h>
57
58 #include "plugin_common.h"
59
60 #ifdef WIN32
61 /* This must be after sasl.h */
62 # include "saslSECURID.h"
63 #endif /* WIN32 */
64
65 #ifdef macintosh
66 #include <sasl_securid_plugin_decl.h>
67 #endif
68
69 int creadcfg(void);
70 int sd_init(struct SD_CLIENT *sd);
71 int sd_check(char *passcode, char *username, struct SD_CLIENT *sd);
72 int sd_pin(char *pin, char canceled, struct SD_CLIENT *sd);
73 int sd_next(char *nextcode, struct SD_CLIENT *sd);
74 void sd_close(struct SD_CLIENT *sd);
75 union config_record configure;
76
77 static const char rcsid[] = "$Implementation: Carnegie Mellon SASL " VERSION " $";
78
79 #undef L_DEFAULT_GUARD
80 #define L_DEFAULT_GUARD (0)
81
82 typedef struct context {
83 int state;
84 struct SD_CLIENT sd;
85 int need_pin;
86 sasl_secret_t *passcode;
87 char *out_buf;
88 unsigned out_buf_len;
89 } context_t;
90
91 static int securid_server_mech_new(void *glob_context __attribute__((unused)),
92 sasl_server_params_t *sparams,
93 const char *challenge __attribute__((unused)),
94 unsigned challen __attribute__((unused)),
95 void **conn)
96 {
97 context_t *text;
98
99 /* holds state are in */
100 text=sparams->utils->malloc(sizeof(context_t));
101 if (text==NULL) {
102 MEMERROR(sparams->utils);
103 return SASL_NOMEM;
104 }
105
106 memset(text, 0, sizeof(context_t));
107 #if 0
108 /* access sdconf.rec */
109 if (creadcfg()) {
110 SETERROR(sparams->utils, "error reading sdconf.rec");
111 return SASL_FAIL;
112 }
113
114 /* initialize socket */
115 if (sd_init(&text->sd)) {
116 SETERROR(sparams->utils,
117 "Cannot initialize ACE client-server communications");
118 return SASL_FAIL;
119 }
120 #endif
121 text->state=1;
122
123 *conn=text;
124
125 return SASL_OK;
126 }
127
128 static void securid_both_mech_dispose(void *conn_context,
129 const sasl_utils_t *utils)
130 {
131 context_t *text;
132 text=conn_context;
133
134 if (!text)
135 return;
136
137 /* free sensitive info */
138 _plug_free_secret(utils, &(text->passcode));
139
140 if(text->out_buf)
141 utils->free(text->out_buf);
142
143 utils->free(text);
144 }
145
146 static void securid_server_mech_dispose(void *conn_context,
147 const sasl_utils_t *utils)
148 {
149 context_t *text;
150 text=conn_context;
151
152 if (!text)
153 return;
154 #if 0
155 sd_close(&text->sd); /* Shutdown the network connection */
156 #endif
157 securid_both_mech_dispose(conn_context, utils);
158 }
159
160
161 static void securid_both_mech_free(void *global_context,
162 const sasl_utils_t *utils)
163 {
164 if(global_context) utils->free(global_context);
165 }
166
167 /* fills in passcode; remember to free passcode and wipe it out correctly */
168 static
169 int verify_passcode(sasl_server_params_t *params,
170 const char *user, const char *pass)
171 {
172 int result;
173
174 /* if it's null, checkpass will default */
175 result = params->utils->checkpass(params->utils->conn,
176 user, 0, pass, 0);
177
178 return result;
179 }
180
181 static int
182 securid_server_mech_step(void *conn_context,
183 sasl_server_params_t *params,
184 const char *clientin,
185 unsigned clientinlen,
186 const char **serverout,
187 unsigned *serveroutlen,
188 sasl_out_params_t *oparams)
189 {
190 context_t *text;
191 text=conn_context;
192
193 oparams->mech_ssf=0;
194 oparams->maxoutbuf = 0;
195
196 oparams->encode = NULL;
197 oparams->decode = NULL;
198
199 oparams->param_version = 0;
200
201 if (text->state <= 2) {
202 const char *authzid;
203 const char *authid;
204 const char *passcode;
205 const char *pin;
206 unsigned lup=0;
207 int result, ret;
208
209 /* should have received authzid NUL authid NUL passcode NUL [ pin NUL ] */
210
211 /* get authzid */
212 authzid = clientin;
213 while ((lup < clientinlen) && (clientin[lup] != 0))
214 ++lup;
215
216 if (lup >= clientinlen)
217 {
218 SETERROR(params->utils, "Can only find authzid (no passcode)");
219 return SASL_BADPROT;
220 }
221
222 /* get authid */
223 ++lup;
224 authid = clientin + lup;
225 while ((lup < clientinlen) && (clientin[lup] != 0))
226 ++lup;
227
228 if (lup >= clientinlen)
229 {
230 params->utils->seterror(params->utils->conn, 0,
231 "Can only find authzid/authid (no passcode)");
232 return SASL_BADPROT;
233 }
234
235 /* get passcode */
236 lup++;
237 passcode = clientin + lup;
238 while ((lup < clientinlen) && (clientin[lup] != 0))
239 ++lup;
240
241 if (text->state == 2 && text->need_pin) {
242 if (lup >= clientinlen)
243 {
244 params->utils->seterror(params->utils->conn, 0,
245 "Can only find authzid/authid/passcode"
246 " (no pin)");
247 return SASL_BADPROT;
248 }
249
250 /* get pin */
251 lup++;
252 pin = clientin + lup;
253 while ((lup < clientinlen) && (clientin[lup] != 0))
254 ++lup;
255 }
256
257 if (lup >= clientinlen) {
258 SETERROR(params->utils, "Got more data than we were expecting in the SECURID plugin\n");
259 return SASL_BADPROT;
260 }
261
262 if (text->state == 1) {
263 /* verify passcode - return sasl_ok on success */
264 if (!strcasecmp(passcode, "ok"))
265 ret = ACM_OK;
266 else if (!strcasecmp(passcode, "fail"))
267 ret = ACM_ACCESS_DENIED;
268 else if (!strcasecmp(passcode, "next"))
269 ret = ACM_NEXT_CODE_REQUIRED;
270 else if (!strcasecmp(passcode, "pin"))
271 ret = ACM_NEW_PIN_REQUIRED;
272 else
273 ret = ACM_ACCESS_DENIED;
274
275 if (ret == ACM_ACCESS_DENIED) {
276 params->utils->seterror(params->utils->conn, 0,
277 "Passcode verification failed");
278 return SASL_BADAUTH;
279 }
280
281 if (! authzid || !*authzid)
282 authzid = authid;
283
284 result = params->canon_user(params->utils->conn,
285 authid, 0, SASL_CU_AUTHID, oparams);
286 if(result != SASL_OK) return result;
287
288 result = params->canon_user(params->utils->conn,
289 authzid, 0, SASL_CU_AUTHZID, oparams);
290 if(result != SASL_OK) return result;
291
292 switch (ret) {
293 case ACM_OK:
294 *serverout = NULL;
295 *serveroutlen = 0;
296
297 text->state = 3; /* so fails if called again */
298
299 oparams->doneflag = 1;
300
301 return SASL_OK;
302
303 break;
304
305 case ACM_NEXT_CODE_REQUIRED:
306 *serveroutlen = strlen("passcode")+1;
307
308 result = _plug_buf_alloc(params->utils, &(text->out_buf),
309 &(text->out_buf_len), *serveroutlen);
310 if(result != SASL_OK) return result;
311
312 strcpy(text->out_buf, "passcode");
313
314 *serverout = text->out_buf;
315
316 text->state++;
317 return SASL_CONTINUE;
318
319 break;
320
321 case ACM_NEW_PIN_REQUIRED:
322 *serveroutlen = strlen("pin")+1;
323
324 result = _plug_buf_alloc(params->utils, &(text->out_buf),
325 &(text->out_buf_len), *serveroutlen);
326 if(result != SASL_OK) return result;
327
328 strcpy(text->out_buf, "pin");
329
330 *serverout = text->out_buf;
331
332 text->state++;
333
334 text->need_pin = 1;
335
336 return SASL_CONTINUE;
337
338 break;
339 }
340 }
341
342 if (text->state == 2) {
343 if (text->need_pin) {
344 }
345
346 else {
347 /* verify next passcode - return sasl_ok on success */
348 if (!strcasecmp(passcode, "ok"))
349 ret = ACM_OK;
350 else if (!strcasecmp(passcode, "fail"))
351 ret = ACM_ACCESS_DENIED;
352 else
353 ret = ACM_ACCESS_DENIED;
354
355 if (ret == ACM_ACCESS_DENIED) {
356 params->utils->seterror(params->utils->conn, 0,
357 "Next passcode verification failed");
358 return SASL_BADAUTH;
359 }
360
361 *serverout = NULL;
362 *serveroutlen = 0;
363
364 text->state = 3; /* so fails if called again */
365
366 oparams->doneflag = 1;
367
368 return SASL_OK;
369 }
370 }
371 }
372
373 SETERROR( params->utils,
374 "Unexpected State Reached in SECURID plugin");
375 return SASL_FAIL; /* should never get here */
376 }
377
378 static sasl_server_plug_t securid_server_plugins[] =
379 {
380 {
381 "SECURID",
382 0,
383 SASL_SEC_NOPLAINTEXT | SASL_SEC_NOANONYMOUS | SASL_SEC_FORWARD_SECRECY,
384 SASL_FEAT_WANT_CLIENT_FIRST,
385 NULL,
386 &securid_server_mech_new,
387 &securid_server_mech_step,
388 &securid_server_mech_dispose,
389 &securid_both_mech_free,
390 NULL,
391 NULL,
392 NULL,
393 NULL,
394 NULL
395 }
396 };
397
398 int securid_server_plug_init(const sasl_utils_t *utils,
399 int maxversion,
400 int *out_version,
401 sasl_server_plug_t **pluglist,
402 int *plugcount)
403 {
404 if (maxversion<SASL_SERVER_PLUG_VERSION) {
405 SETERROR(utils, "SECURID version mismatch");
406 return SASL_BADVERS;
407 }
408
409 *pluglist=securid_server_plugins;
410
411 *plugcount=1;
412 *out_version=SASL_SERVER_PLUG_VERSION;
413
414 return SASL_OK;
415 }
416
417 /* put in sasl_wrongmech */
418 static int securid_client_mech_new(void *glob_context __attribute__((unused)),
419 sasl_client_params_t *params,
420 void **conn)
421 {
422 context_t *text;
423
424 /* holds state are in */
425 text = params->utils->malloc(sizeof(context_t));
426 if (text==NULL) {
427 MEMERROR( params->utils );
428 return SASL_NOMEM;
429 }
430
431 memset(text, 0, sizeof(context_t));
432
433 text->state=1;
434 *conn=text;
435
436 return SASL_OK;
437 }
438
439 /*
440 * Trys to find the prompt with the lookingfor id in the prompt list
441 * Returns it if found. NULL otherwise
442 */
443 static sasl_interact_t *find_prompt(sasl_interact_t **promptlist,
444 unsigned int lookingfor)
445 {
446 sasl_interact_t *prompt;
447
448 if (promptlist && *promptlist)
449 for (prompt = *promptlist;
450 prompt->id != SASL_CB_LIST_END;
451 ++prompt)
452 if (prompt->id==lookingfor)
453 return prompt;
454
455 return NULL;
456 }
457
458 /*
459 * Somehow retrieve the userid
460 * This is the same as in digest-md5 so change both
461 */
462 static int get_userid(sasl_client_params_t *params,
463 const char **userid,
464 sasl_interact_t **prompt_need)
465 {
466 int result;
467 sasl_getsimple_t *getuser_cb;
468 void *getuser_context;
469 sasl_interact_t *prompt;
470 const char *id;
471
472 /* see if we were given the userid in the prompt */
473 prompt=find_prompt(prompt_need,SASL_CB_USER);
474 if (prompt!=NULL)
475 {
476 *userid = prompt->result;
477 return SASL_OK;
478 }
479
480 /* Try to get the callback... */
481 result = params->utils->getcallback(params->utils->conn,
482 SASL_CB_USER,
483 &getuser_cb,
484 &getuser_context);
485 if (result == SASL_OK && getuser_cb) {
486 id = NULL;
487 result = getuser_cb(getuser_context,
488 SASL_CB_USER,
489 &id,
490 NULL);
491 if (result != SASL_OK)
492 return result;
493 if (! id) {
494 PARAMERROR(params->utils);
495 return SASL_BADPARAM;
496 }
497
498 *userid = id;
499 }
500
501 return result;
502 }
503
504 static int get_authid(sasl_client_params_t *params,
505 const char **authid,
506 sasl_interact_t **prompt_need)
507 {
508
509 int result;
510 sasl_getsimple_t *getauth_cb;
511 void *getauth_context;
512 sasl_interact_t *prompt;
513 const char *id;
514
515 /* see if we were given the authname in the prompt */
516 prompt=find_prompt(prompt_need,SASL_CB_AUTHNAME);
517 if (prompt!=NULL)
518 {
519 *authid = prompt->result;
520
521 return SASL_OK;
522 }
523
524 /* Try to get the callback... */
525 result = params->utils->getcallback(params->utils->conn,
526 SASL_CB_AUTHNAME,
527 &getauth_cb,
528 &getauth_context);
529 if (result == SASL_OK && getauth_cb) {
530 id = NULL;
531 result = getauth_cb(getauth_context,
532 SASL_CB_AUTHNAME,
533 &id,
534 NULL);
535 if (result != SASL_OK)
536 return result;
537 if (! id) {
538 PARAMERROR( params->utils );
539 return SASL_BADPARAM;
540 }
541
542 *authid = id;
543 }
544
545 return result;
546 }
547
548 static int get_passcode(sasl_client_params_t *params,
549 sasl_secret_t **passcode,
550 sasl_interact_t **prompt_need)
551 {
552
553 int result;
554 sasl_getsecret_t *getpass_cb;
555 void *getpass_context;
556 sasl_interact_t *prompt;
557
558 /* see if we were given the passcode in the prompt */
559 prompt=find_prompt(prompt_need,SASL_CB_PASS);
560 if (prompt!=NULL)
561 {
562 /* We prompted, and got.*/
563
564 if (! prompt->result) {
565 SETERROR(params->utils, "Unexpectedly missing a prompt result");
566 return SASL_FAIL;
567 }
568
569 /* copy what we got into a secret_t */
570 *passcode = (sasl_secret_t *) params->utils->malloc(sizeof(sasl_secret_t)+
571 prompt->len+1);
572 if (! *passcode) {
573 MEMERROR( params->utils );
574 return SASL_NOMEM;
575 }
576
577 (*passcode)->len=prompt->len;
578 memcpy((*passcode)->data, prompt->result, prompt->len);
579 (*passcode)->data[(*passcode)->len]=0;
580
581 return SASL_OK;
582 }
583
584
585 /* Try to get the callback... */
586 result = params->utils->getcallback(params->utils->conn,
587 SASL_CB_PASS,
588 &getpass_cb,
589 &getpass_context);
590
591 if (result == SASL_OK && getpass_cb)
592 result = getpass_cb(params->utils->conn,
593 getpass_context,
594 SASL_CB_PASS,
595 passcode);
596
597 return result;
598 }
599
600 /*
601 * Make the necessary prompts
602 */
603 static int make_prompts(sasl_client_params_t *params,
604 sasl_interact_t **prompts_res,
605 int user_res,
606 int auth_res,
607 int pass_res)
608 {
609 int num=1;
610 sasl_interact_t *prompts;
611
612 if (user_res==SASL_INTERACT) num++;
613 if (auth_res==SASL_INTERACT) num++;
614 if (pass_res==SASL_INTERACT) num++;
615
616 if (num==1) {
617 SETERROR( params->utils, "make_prompts called with no actual prompts" );
618 return SASL_FAIL;
619 }
620
621 prompts=params->utils->malloc(sizeof(sasl_interact_t)*(num+1));
622 if ((prompts) ==NULL) {
623 MEMERROR( params->utils );
624 return SASL_NOMEM;
625 }
626
627 *prompts_res=prompts;
628
629 if (user_res==SASL_INTERACT)
630 {
631 /* We weren't able to get the callback; let's try a SASL_INTERACT */
632 (prompts)->id=SASL_CB_USER;
633 (prompts)->challenge="Authzidization Name";
634 (prompts)->prompt="Please enter your authzidization name";
635 (prompts)->defresult=NULL;
636
637 prompts++;
638 }
639
640 if (auth_res==SASL_INTERACT)
641 {
642 /* We weren't able to get the callback; let's try a SASL_INTERACT */
643 (prompts)->id=SASL_CB_AUTHNAME;
644 (prompts)->challenge="Authidtication Name";
645 (prompts)->prompt="Please enter your authidtication name";
646 (prompts)->defresult=NULL;
647
648 prompts++;
649 }
650
651
652 if (pass_res==SASL_INTERACT)
653 {
654 /* We weren't able to get the callback; let's try a SASL_INTERACT */
655 (prompts)->id=SASL_CB_PASS;
656 (prompts)->challenge="Passcode";
657 (prompts)->prompt="Please enter your passcode";
658 (prompts)->defresult=NULL;
659
660 prompts++;
661 }
662
663 /* add the ending one */
664 (prompts)->id=SASL_CB_LIST_END;
665 (prompts)->challenge=NULL;
666 (prompts)->prompt =NULL;
667 (prompts)->defresult=NULL;
668
669 return SASL_OK;
670 }
671
672
673
674 static int securid_client_mech_step(void *conn_context,
675 sasl_client_params_t *params,
676 const char *serverin __attribute__((unused)),
677 unsigned serverinlen __attribute__((unused)),
678 sasl_interact_t **prompt_need,
679 const char **clientout,
680 unsigned *clientoutlen,
681 sasl_out_params_t *oparams)
682 {
683 int result, ret;
684 const char *user, *authid;
685
686 context_t *text;
687 text=conn_context;
688
689 /* set oparams */
690 oparams->mech_ssf=0;
691 oparams->maxoutbuf=0;
692 oparams->encode=NULL;
693 oparams->decode=NULL;
694
695 oparams->param_version = 0;
696
697 if (text->state > 2)
698 return SASL_FAIL; /* should never get here */
699
700 if (text->state == 1) {
701 int user_result=SASL_OK;
702 int auth_result=SASL_OK;
703 int pass_result=SASL_OK;
704
705 /* check if sec layer strong enough */
706 if (params->props.min_ssf>0+params->external_ssf) {
707 SETERROR( params->utils, "The SECURID plugin cannot support any SSF");
708 return SASL_TOOWEAK;
709 }
710
711 /* try to get the authid */
712 if (oparams->authid==NULL)
713 {
714 auth_result=get_authid(params,
715 &authid,
716 prompt_need);
717
718 if ((auth_result!=SASL_OK) && (auth_result!=SASL_INTERACT))
719 return auth_result;
720 }
721
722 /* try to get the userid */
723 if (oparams->user==NULL)
724 {
725 user_result=get_userid(params,
726 &user,
727 prompt_need);
728
729 /* Fallback to authid */
730 if ((user_result!=SASL_OK) && (user_result!=SASL_INTERACT)) {
731 user = authid;
732 }
733 }
734
735 /* try to get the passcode */
736 if (text->passcode==NULL)
737 {
738 pass_result=get_passcode(params,
739 &text->passcode,
740 prompt_need);
741
742 if ((pass_result!=SASL_OK) && (pass_result!=SASL_INTERACT))
743 return pass_result;
744 }
745
746 /* free prompts we got */
747 if (prompt_need && *prompt_need) {
748 params->utils->free(*prompt_need);
749 *prompt_need = NULL;
750 }
751
752 /* if there are prompts not filled in */
753 if ((user_result==SASL_INTERACT) || (auth_result==SASL_INTERACT) ||
754 (pass_result==SASL_INTERACT))
755 {
756 /* make the prompt list */
757 result=make_prompts(params,prompt_need,
758 user_result, auth_result, pass_result);
759 if (result!=SASL_OK) return result;
760
761 return SASL_INTERACT;
762 }
763
764 ret = params->canon_user(params->utils->conn, user, 0,
765 SASL_CU_AUTHZID, oparams);
766 if(ret != SASL_OK) return ret;
767 ret = params->canon_user(params->utils->conn, authid, 0,
768 SASL_CU_AUTHID, oparams);
769 if(ret != SASL_OK) return ret;
770
771 if (!text->passcode) {
772 PARAMERROR(params->utils);
773 return SASL_BADPARAM;
774 }
775 }
776
777 if (text->state == 2) {
778 const char *request;
779 const char *pin;
780 unsigned lup=0;
781 int user_result=SASL_OK;
782 int auth_result=SASL_OK;
783 int pass_result=SASL_OK;
784
785 /* should have received "passcode" NUL | "pin" NUL [ suggested-pin NUL ] */
786
787 /* get request */
788 request = serverin;
789 while ((lup < serverinlen) && (serverin[lup] != 0))
790 ++lup;
791
792 if (!strcmp(request, "passcode")) {
793 text->need_pin = 0;
794 }
795 else if (!strcmp(request, "pin")) {
796 text->need_pin = 1;
797
798 if (lup < serverinlen) {
799 /* get pin */
800 lup++;
801 pin = serverin + lup;
802 while ((lup < serverinlen) && (serverin[lup] != 0))
803 ++lup;
804 }
805 }
806 else {
807 params->utils->seterror(params->utils->conn,
808 "unknown SECURID server request '%s'\n",
809 request);
810 return SASL_BADPROT;
811 }
812
813 if (lup >= serverinlen) {
814 SETERROR(params->utils, "Got more data than we were expecting in the SECURID plugin\n");
815 return SASL_BADPROT;
816 }
817
818 /* free previous passcode info */
819 _plug_free_secret(params->utils, &(text->passcode));
820
821 /* try to get the passcode */
822 if (text->passcode==NULL)
823 {
824 pass_result=get_passcode(params,
825 &text->passcode,
826 prompt_need);
827
828 if ((pass_result!=SASL_OK) && (pass_result!=SASL_INTERACT))
829 return pass_result;
830 }
831
832 /* free prompts we got */
833 if (prompt_need && *prompt_need) {
834 params->utils->free(*prompt_need);
835 *prompt_need = NULL;
836 }
837
838 /* if there are prompts not filled in */
839 if ((user_result==SASL_INTERACT) || (auth_result==SASL_INTERACT) ||
840 (pass_result==SASL_INTERACT))
841 {
842 /* make the prompt list */
843 result=make_prompts(params,prompt_need,
844 user_result, auth_result, pass_result);
845 if (result!=SASL_OK) return result;
846
847 return SASL_INTERACT;
848 }
849
850 if (!text->passcode) {
851 PARAMERROR(params->utils);
852 return SASL_BADPARAM;
853 }
854 }
855
856 /* send authzid id NUL authid id NUL passcode NUL [ pin NUL ] */
857 *clientoutlen = (oparams->ulen + 1
858 + oparams->alen + 1
859 + text->passcode->len + 1);
860
861 result = _plug_buf_alloc(params->utils, &(text->out_buf),
862 &(text->out_buf_len), *clientoutlen);
863 if(result != SASL_OK) return result;
864
865 memset(text->out_buf, 0, *clientoutlen);
866 memcpy(text->out_buf, oparams->user, oparams->ulen);
867 memcpy(text->out_buf+oparams->ulen+1, oparams->authid, oparams->alen);
868 memcpy(text->out_buf+oparams->ulen+oparams->alen+2,
869 text->passcode->data,
870 text->passcode->len);
871
872 *clientout=text->out_buf;
873
874 text->state++;
875
876 return SASL_CONTINUE;
877 }
878
879 static sasl_client_plug_t securid_client_plugins[] =
880 {
881 {
882 "SECURID",
883 0,
884 SASL_SEC_NOPLAINTEXT | SASL_SEC_NOANONYMOUS | SASL_SEC_FORWARD_SECRECY,
885 SASL_FEAT_WANT_CLIENT_FIRST,
886 NULL,
887 NULL,
888 &securid_client_mech_new,
889 &securid_client_mech_step,
890 &securid_both_mech_dispose,
891 &securid_both_mech_free,
892 NULL,
893 NULL,
894 NULL
895 }
896 };
897
898 int securid_client_plug_init(sasl_utils_t *utils,
899 int maxversion,
900 int *out_version,
901 sasl_client_plug_t **pluglist,
902 int *plugcount)
903 {
904 if (maxversion<SASL_CLIENT_PLUG_VERSION) {
905 SETERROR(utils, "SECURID version mismatch");
906 return SASL_BADVERS;
907 }
908
909 *pluglist=securid_client_plugins;
910
911 *plugcount=1;
912 *out_version=SASL_CLIENT_PLUG_VERSION;
913
914 return SASL_OK;
915 }
7070 MYSQL *mysql;
7171
7272 if (!(mysql = mysql_init(NULL))) {
73 utils->log(NULL, SASL_LOG_ERR,
73 utils->log(utils->conn, SASL_LOG_ERR,
7474 "sql plugin: could not execute mysql_init()");
7575 return NULL;
7676 }
107107 (void)mysql_real_query(conn, cmd, len);
108108
109109 if(mysql_errno(conn)) {
110 utils->log(NULL, SASL_LOG_ERR, "sql query failed: %s",
110 utils->log(utils->conn, SASL_LOG_ERR, "sql query failed: %s",
111111 mysql_error(conn));
112112 return -1;
113113 }
122122 result = mysql_store_result(conn);
123123 if (!result) {
124124 /* umm nothing found */
125 utils->log(NULL, SASL_LOG_NOTE, "sql plugin: no result found");
125 utils->log(utils->conn, SASL_LOG_NOTE, "sql plugin: no result found");
126126 return -1;
127127 }
128128
131131 if (!row_count) {
132132 /* umm nothing found */
133133 mysql_free_result(result);
134 utils->log(NULL, SASL_LOG_NOTE, "sql plugin: no result found");
134 utils->log(utils->conn, SASL_LOG_NOTE, "sql plugin: no result found");
135135 return -1;
136136 }
137137 if (row_count > 1) {
138 utils->log(NULL, SASL_LOG_WARN,
138 utils->log(utils->conn, SASL_LOG_WARN,
139139 "sql plugin: found duplicate row for query %s", cmd);
140140 }
141141
144144 row = mysql_fetch_row(result);
145145 if (!row || !row[0]) {
146146 /* umm nothing found */
147 utils->log(NULL, SASL_LOG_NOTE, "sql plugin: no result found");
147 utils->log(utils->conn, SASL_LOG_NOTE, "sql plugin: no result found");
148148 mysql_free_result(result);
149149 return -1;
150150 }
256256 free(conninfo);
257257
258258 if ((PQstatus(conn) != CONNECTION_OK)) {
259 utils->log(NULL, SASL_LOG_ERR, "sql plugin: %s", PQerrorMessage(conn));
259 utils->log(utils->conn, SASL_LOG_ERR, "sql plugin: %s",
260 PQerrorMessage(conn));
260261 return NULL;
261262 }
262263
287288 }
288289 else if (status != PGRES_TUPLES_OK) {
289290 /* error */
290 utils->log(NULL, SASL_LOG_DEBUG, "sql plugin: %s ",
291 utils->log(utils->conn, SASL_LOG_DEBUG, "sql plugin: %s ",
291292 PQresStatus(status));
292293 PQclear(result);
293294 return -1;
297298 row_count = PQntuples(result);
298299 if (!row_count) {
299300 /* umm nothing found */
300 utils->log(NULL, SASL_LOG_NOTE, "sql plugin: no result found");
301 utils->log(utils->conn, SASL_LOG_NOTE, "sql plugin: no result found");
301302 PQclear(result);
302303 return -1;
303304 }
304305 if (row_count > 1) {
305 utils->log(NULL, SASL_LOG_WARN,
306 utils->log(utils->conn, SASL_LOG_WARN,
306307 "sql plugin: found duplicate row for query %s", cmd);
307308 }
308309
356357
357358 db = sqlite_open(database, 0, &zErrMsg);
358359 if (db == NULL) {
359 utils->log(NULL, SASL_LOG_ERR, "sql plugin: %s", zErrMsg);
360 utils->log(utils->conn, SASL_LOG_ERR, "sql plugin: %s", zErrMsg);
360361 sqlite_freemem (zErrMsg);
361362 return NULL;
362363 }
363364
364365 rc = sqlite_exec(db, "PRAGMA empty_result_callbacks = ON", NULL, NULL, &zErrMsg);
365366 if (rc != SQLITE_OK) {
366 utils->log(NULL, SASL_LOG_ERR, "sql plugin: %s", zErrMsg);
367 utils->log(utils->conn, SASL_LOG_ERR, "sql plugin: %s", zErrMsg);
367368 sqlite_freemem (zErrMsg);
368369 sqlite_close(db);
369370 return NULL;
413414
414415 rc = sqlite_exec((sqlite*)db, cmd, sqlite_my_callback, (void*)&result, &zErrMsg);
415416 if (rc != SQLITE_OK && rc != SQLITE_ABORT) {
416 utils->log(NULL, SASL_LOG_DEBUG, "sql plugin: %s ", zErrMsg);
417 utils->log(utils->conn, SASL_LOG_DEBUG, "sql plugin: %s ", zErrMsg);
417418 sqlite_freemem (zErrMsg);
418419 return -1;
419420 }
425426
426427 if (result == NULL) {
427428 /* umm nothing found */
428 utils->log(NULL, SASL_LOG_NOTE, "sql plugin: no result found");
429 utils->log(utils->conn, SASL_LOG_NOTE, "sql plugin: no result found");
429430 return -1;
430431 }
431432
484485 rc = sqlite3_open(database, &db);
485486 if (SQLITE_OK != rc) {
486487 if (db)
487 utils->log(NULL, SASL_LOG_ERR, "sql plugin: %s", sqlite3_errmsg(db));
488 utils->log(utils->conn, SASL_LOG_ERR, "sql plugin: %s",
489 sqlite3_errmsg(db));
488490 else
489 utils->log(NULL, SASL_LOG_ERR, "sql plugin: %d", rc);
491 utils->log(utils->conn, SASL_LOG_ERR, "sql plugin: %d", rc);
490492 sqlite3_close(db);
491493 return NULL;
492494 }
494496 rc = sqlite3_exec(db, "PRAGMA empty_result_callbacks = ON", NULL, NULL, &zErrMsg);
495497 if (rc != SQLITE_OK) {
496498 if (zErrMsg) {
497 utils->log(NULL, SASL_LOG_ERR, "sql plugin: %s", zErrMsg);
499 utils->log(utils->conn, SASL_LOG_ERR, "sql plugin: %s",
500 zErrMsg);
498501 sqlite3_free(zErrMsg);
499502 } else
500 utils->log(NULL, SASL_LOG_DEBUG, "sql plugin: %d", rc);
503 utils->log(utils->conn, SASL_LOG_DEBUG, "sql plugin: %d", rc);
501504 sqlite3_close(db);
502505 return NULL;
503506 }
551554 rc = sqlite3_exec((sqlite3*)db, cmd, sqlite3_my_callback, (void*)&result, &zErrMsg);
552555 if (rc != SQLITE_OK) {
553556 if (zErrMsg) {
554 utils->log(NULL, SASL_LOG_DEBUG, "sql plugin: %s", zErrMsg);
557 utils->log(utils->conn, SASL_LOG_DEBUG, "sql plugin: %s", zErrMsg);
555558 sqlite3_free(zErrMsg);
556559 } else {
557 utils->log(NULL, SASL_LOG_DEBUG, "sql plugin: %d", rc);
560 utils->log(utils->conn, SASL_LOG_DEBUG, "sql plugin: %d", rc);
558561 }
559562 return -1;
560563 }
566569
567570 if (result == NULL) {
568571 /* umm nothing found */
569 utils->log(NULL, SASL_LOG_NOTE, "sql plugin: no result found");
572 utils->log(utils->conn, SASL_LOG_NOTE, "sql plugin: no result found");
570573 return -1;
571574 }
572575
718721 buf_ptr += vlen;
719722 }
720723 else {
721 utils->log(NULL, SASL_LOG_ERR,
724 utils->log(utils->conn, SASL_LOG_ERR,
722725 "'%%v' shouldn't be in a SELECT or DELETE");
723726 }
724727 break;
768771 }
769772
770773 if (!e->name) {
771 utils->log(NULL, SASL_LOG_ERR, "SQL engine '%s' not supported",
774 utils->log(utils->conn, SASL_LOG_ERR, "SQL engine '%s' not supported",
772775 engine_name);
773776 }
774777
844847 * it should probably save the connection but for
845848 * now we will just disconnect everytime
846849 */
847 utils->log(NULL, SASL_LOG_DEBUG,
850 utils->log(utils->conn, SASL_LOG_DEBUG,
848851 "sql plugin try and connect to a host\n");
849852
850853 /* create a working version of the hostnames */
860863 while (!isalnum(db_host[0])) db_host++;
861864 }
862865
863 utils->log(NULL, SASL_LOG_DEBUG,
866 utils->log(utils->conn, SASL_LOG_DEBUG,
864867 "sql plugin trying to open db '%s' on host '%s'%s\n",
865868 settings->sql_database, cur_host,
866869 settings->sql_usessl ? " using SSL" : "");
876879 utils);
877880 if (conn) break;
878881
879 utils->log(NULL, SASL_LOG_ERR,
882 utils->log(utils->conn, SASL_LOG_ERR,
880883 "sql plugin could not connect to host %s", cur_host);
881884
882885 cur_host = db_host;
916919 /* setup the settings */
917920 settings = (sql_settings_t *) glob_context;
918921
919 sparams->utils->log(NULL, SASL_LOG_DEBUG,
922 sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
920923 "sql plugin Parse the username %s\n", user);
921924
922925 user_buf = sparams->utils->malloc(ulen + 1);
965968
966969 conn = sql_connect(settings, sparams->utils);
967970 if (!conn) {
968 sparams->utils->log(NULL, SASL_LOG_ERR,
971 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
969972 "sql plugin couldn't connect to any host\n");
970973 /* TODO: in the future we might want to extend the internal
971974 SQL driver API to return a more detailed error */
10131016
10141017 if (!do_txn) {
10151018 do_txn = 1;
1016 sparams->utils->log(NULL, SASL_LOG_DEBUG, "begin transaction");
1019 sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
1020 "begin transaction");
10171021 if (settings->sql_engine->sql_begin_txn(conn, sparams->utils)) {
1018 sparams->utils->log(NULL, SASL_LOG_ERR,
1022 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
10191023 "Unable to begin transaction\n");
10201024 }
10211025 }
10221026
1023 sparams->utils->log(NULL, SASL_LOG_DEBUG,
1027 sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
10241028 "sql plugin create statement from %s %s %s\n",
10251029 realname, escap_userid, escap_realm);
10261030
10341038 break;
10351039 }
10361040
1037 sparams->utils->log(NULL, SASL_LOG_DEBUG,
1041 sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
10381042 "sql plugin doing query %s\n", query);
10391043
10401044 value[0] = '\0';
10641068 the userPassword attribute */
10651069 if (!do_txn) {
10661070 do_txn = 1;
1067 sparams->utils->log(NULL, SASL_LOG_DEBUG, "begin transaction");
1071 sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
1072 "begin transaction");
10681073 if (settings->sql_engine->sql_begin_txn(conn, sparams->utils)) {
1069 sparams->utils->log(NULL, SASL_LOG_ERR,
1074 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
10701075 "Unable to begin transaction\n");
10711076 }
10721077 }
10731078
1074 sparams->utils->log(NULL, SASL_LOG_DEBUG,
1079 sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
10751080 "sql plugin create statement from %s %s %s\n",
10761081 SASL_AUX_PASSWORD_PROP,
10771082 escap_userid,
10871092 if (query == NULL) {
10881093 ret = SASL_NOMEM;
10891094 } else {
1090 sparams->utils->log(NULL, SASL_LOG_DEBUG,
1095 sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
10911096 "sql plugin doing query %s\n", query);
10921097
10931098 value[0] = '\0';
11091114
11101115
11111116 if (do_txn) {
1112 sparams->utils->log(NULL, SASL_LOG_DEBUG, "commit transaction");
1117 sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
1118 "commit transaction");
11131119 if (settings->sql_engine->sql_commit_txn(conn, sparams->utils)) {
1114 sparams->utils->log(NULL, SASL_LOG_ERR,
1120 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
11151121 "Unable to commit transaction\n");
11161122 /* Failure of the commit is non fatal when reading values */
11171123 }
11591165 /* make sure our input is okay */
11601166 if (!glob_context || !sparams || !user) return SASL_BADPARAM;
11611167
1162 sparams->utils->log(NULL, SASL_LOG_DEBUG,
1168 sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
11631169 "sql plugin Parse the username %s\n", user);
11641170
11651171 user_buf = sparams->utils->malloc(ulen + 1);
12021208
12031209 conn = sql_connect(settings, sparams->utils);
12041210 if (!conn) {
1205 sparams->utils->log(NULL, SASL_LOG_ERR,
1211 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
12061212 "sql plugin couldn't connect to any host\n");
12071213 goto done;
12081214 }
12111217 settings->sql_engine->sql_escape_str(escap_realm, realm);
12121218
12131219 if (settings->sql_engine->sql_begin_txn(conn, sparams->utils)) {
1214 sparams->utils->log(NULL, SASL_LOG_ERR,
1220 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
12151221 "Unable to begin transaction\n");
12161222 }
12171223 for (cur = to_store; ret == SASL_OK && cur->name; cur++) {
12511257 cur->values && cur->values[0] ?
12521258 "<omitted>" : SQL_NULL_VALUE,
12531259 sparams->utils);
1254 sparams->utils->log(NULL, SASL_LOG_DEBUG,
1260 sparams->utils->log(sparams->utils->conn, SASL_LOG_DEBUG,
12551261 "sql plugin doing statement %s\n",
12561262 log_statement);
12571263 sparams->utils->free(log_statement);
12661272 sparams->utils->free(statement);
12671273 }
12681274 if (ret != SASL_OK) {
1269 sparams->utils->log(NULL, SASL_LOG_ERR,
1275 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
12701276 "Failed to store auxprop; aborting transaction\n");
12711277 if (settings->sql_engine->sql_rollback_txn(conn, sparams->utils)) {
1272 sparams->utils->log(NULL, SASL_LOG_ERR,
1278 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
12731279 "Unable to rollback transaction\n");
12741280 }
12751281 }
12761282 else if (settings->sql_engine->sql_commit_txn(conn, sparams->utils)) {
1277 sparams->utils->log(NULL, SASL_LOG_ERR,
1283 sparams->utils->log(sparams->utils->conn, SASL_LOG_ERR,
12781284 "Unable to commit transaction\n");
12791285 }
12801286
13001306
13011307 if (!settings) return;
13021308
1303 utils->log(NULL, SASL_LOG_DEBUG, "sql freeing memory\n");
1309 utils->log(utils->conn, SASL_LOG_DEBUG, "sql freeing memory\n");
13041310
13051311 utils->free(settings);
13061312 }
13431349 if (!settings->sql_engine->name) return SASL_NOMECH;
13441350
13451351 if (!sql_exists(settings->sql_select)) {
1346 utils->log(NULL, SASL_LOG_ERR, "sql_select option missing");
1352 utils->log(utils->conn, SASL_LOG_ERR, "sql_select option missing");
13471353 utils->free(settings);
13481354 return SASL_NOMECH;
13491355 }
13501356
1351 utils->log(NULL, SASL_LOG_DEBUG,
1357 utils->log(utils->conn, SASL_LOG_DEBUG,
13521358 "sql auxprop plugin using %s engine\n",
13531359 settings->sql_engine->name);
13541360
+0
-38
plugins/sql_init.c less more
0
1 #include <config.h>
2
3 #include <string.h>
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef macintosh
7 #include <sys/stat.h>
8 #endif
9 #include <fcntl.h>
10 #include <assert.h>
11
12 #include <sasl.h>
13 #include <saslplug.h>
14 #include <saslutil.h>
15
16 #include "plugin_common.h"
17
18 #ifdef WIN32
19 BOOL APIENTRY DllMain( HANDLE hModule,
20 DWORD ul_reason_for_call,
21 LPVOID lpReserved
22 )
23 {
24 switch (ul_reason_for_call)
25 {
26 case DLL_PROCESS_ATTACH:
27 case DLL_THREAD_ATTACH:
28 case DLL_THREAD_DETACH:
29 case DLL_PROCESS_DETACH:
30 break;
31 }
32 return TRUE;
33 }
34 #endif
35
36 SASL_AUXPROP_PLUG_INIT( sql )
37
+0
-43
plugins/srp_init.c less more
0
1 #include <config.h>
2
3 #include <string.h>
4 #include <stdlib.h>
5 #include <stdio.h>
6 #ifndef macintosh
7 #include <sys/stat.h>
8 #endif
9 #include <fcntl.h>
10 #include <assert.h>
11
12 #include <sasl.h>
13 #include <saslplug.h>
14 #include <saslutil.h>
15
16 #include "plugin_common.h"
17
18 #ifdef macintosh
19 #include <sasl_srp_plugin_decl.h>
20 #endif
21
22 #ifdef WIN32
23 BOOL APIENTRY DllMain( HANDLE hModule,
24 DWORD ul_reason_for_call,
25 LPVOID lpReserved
26 )
27 {
28 switch (ul_reason_for_call)
29 {
30 case DLL_PROCESS_ATTACH:
31 case DLL_THREAD_ATTACH:
32 case DLL_THREAD_DETACH:
33 case DLL_PROCESS_DETACH:
34 break;
35 }
36 return TRUE;
37 }
38 #endif
39
40 SASL_CLIENT_PLUG_INIT( srp )
41 SASL_SERVER_PLUG_INIT( srp )
42
2323
2424 sbin_PROGRAMS = pwcheck
2525
26 INCLUDES = -I../include -I../lib
26 AM_CPPFLAGS = -I../include -I../lib
2727
2828 pwcheck_SOURCES = pwcheck.c
2929 EXTRA_pwcheck_SOURCES = pwcheck_getpwnam.c pwcheck_getspnam.c
+0
-591
pwcheck/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 # Makefile.am for the pwcheck daemon
18 # Larry Greenfield
19 #
20 # Copyright 1999 by Carnegie Mellon University
21 #
22 # All Rights Reserved
23 #
24 # Permission to use, copy, modify, and distribute this software and its
25 # documentation for any purpose and without fee is hereby granted,
26 # provided that the above copyright notice appear in all copies and that
27 # both that copyright notice and this permission notice appear in
28 # supporting documentation, and that the name of CMU not be
29 # used in advertising or publicity pertaining to distribution of the
30 # software without specific, written prior permission.
31 #
32 # CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
33 # ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
34 # CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
35 # ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
36 # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
37 # ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
38 # SOFTWARE.
39 #
40
41 VPATH = @srcdir@
42 pkgdatadir = $(datadir)/@PACKAGE@
43 pkgincludedir = $(includedir)/@PACKAGE@
44 pkglibdir = $(libdir)/@PACKAGE@
45 pkglibexecdir = $(libexecdir)/@PACKAGE@
46 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
47 install_sh_DATA = $(install_sh) -c -m 644
48 install_sh_PROGRAM = $(install_sh) -c
49 install_sh_SCRIPT = $(install_sh) -c
50 INSTALL_HEADER = $(INSTALL_DATA)
51 transform = $(program_transform_name)
52 NORMAL_INSTALL = :
53 PRE_INSTALL = :
54 POST_INSTALL = :
55 NORMAL_UNINSTALL = :
56 PRE_UNINSTALL = :
57 POST_UNINSTALL = :
58 build_triplet = @build@
59 host_triplet = @host@
60 target_triplet = @target@
61 sbin_PROGRAMS = pwcheck$(EXEEXT)
62 subdir = pwcheck
63 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
64 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
65 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
66 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
67 $(top_srcdir)/config/sasldb.m4 \
68 $(top_srcdir)/cmulocal/berkdb.m4 \
69 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
70 $(top_srcdir)/cmulocal/c-attribute.m4 \
71 $(top_srcdir)/cmulocal/common.m4 \
72 $(top_srcdir)/cmulocal/cyrus.m4 \
73 $(top_srcdir)/cmulocal/init_automake.m4 \
74 $(top_srcdir)/cmulocal/ipv6.m4 \
75 $(top_srcdir)/cmulocal/openldap.m4 \
76 $(top_srcdir)/cmulocal/openssl.m4 \
77 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
78 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
79 $(ACLOCAL_M4)
80 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
81 CONFIG_HEADER = $(top_builddir)/config.h
82 CONFIG_CLEAN_FILES =
83 CONFIG_CLEAN_VPATH_FILES =
84 am__installdirs = "$(DESTDIR)$(sbindir)"
85 PROGRAMS = $(sbin_PROGRAMS)
86 am_pwcheck_OBJECTS = pwcheck.$(OBJEXT)
87 pwcheck_OBJECTS = $(am_pwcheck_OBJECTS)
88 pwcheck_DEPENDENCIES = pwcheck_@PWCHECKMETH@.lo
89 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
90 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
91 am__depfiles_maybe = depfiles
92 am__mv = mv -f
93 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
94 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
95 LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
96 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
97 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
98 CCLD = $(CC)
99 LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
100 $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
101 SOURCES = $(pwcheck_SOURCES) $(EXTRA_pwcheck_SOURCES)
102 DIST_SOURCES = $(pwcheck_SOURCES) $(EXTRA_pwcheck_SOURCES)
103 ETAGS = etags
104 CTAGS = ctags
105 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
106 ACLOCAL = @ACLOCAL@
107 AMTAR = @AMTAR@
108 AUTOCONF = @AUTOCONF@
109 AUTOHEADER = @AUTOHEADER@
110 AUTOMAKE = @AUTOMAKE@
111 AWK = @AWK@
112 CC = @CC@
113 CCDEPMODE = @CCDEPMODE@
114 CFLAGS = @CFLAGS@
115 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
116 CPP = @CPP@
117 CPPFLAGS = @CPPFLAGS@
118 CYGPATH_W = @CYGPATH_W@
119 DEFS = @DEFS@
120 DEPDIR = @DEPDIR@
121 DIRS = @DIRS@
122 DMALLOC_LIBS = @DMALLOC_LIBS@
123 ECHO_C = @ECHO_C@
124 ECHO_N = @ECHO_N@
125 ECHO_T = @ECHO_T@
126 EGREP = @EGREP@
127 EXEEXT = @EXEEXT@
128 GETADDRINFOOBJS = @GETADDRINFOOBJS@
129 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
130 GETSUBOPT = @GETSUBOPT@
131 GREP = @GREP@
132 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
133 GSSAPI_LIBS = @GSSAPI_LIBS@
134 INSTALL = @INSTALL@
135 INSTALL_DATA = @INSTALL_DATA@
136 INSTALL_PROGRAM = @INSTALL_PROGRAM@
137 INSTALL_SCRIPT = @INSTALL_SCRIPT@
138 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
139 IPCTYPE = @IPCTYPE@
140 JAVAC = @JAVAC@
141 JAVADOC = @JAVADOC@
142 JAVAH = @JAVAH@
143 JAVAROOT = @JAVAROOT@
144 JAVA_INCLUDES = @JAVA_INCLUDES@
145 LDFLAGS = @LDFLAGS@
146 LIBOBJS = @LIBOBJS@
147 LIBS = @LIBS@
148 LIBTOOL = @LIBTOOL@
149 LIB_CRYPT = @LIB_CRYPT@
150 LIB_DES = @LIB_DES@
151 LIB_DOOR = @LIB_DOOR@
152 LIB_LDAP = @LIB_LDAP@
153 LIB_MYSQL = @LIB_MYSQL@
154 LIB_PGSQL = @LIB_PGSQL@
155 LIB_SOCKET = @LIB_SOCKET@
156 LIB_SQLITE = @LIB_SQLITE@
157 LIB_SQLITE3 = @LIB_SQLITE3@
158 LN_S = @LN_S@
159 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
160 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
161 LTLIBOBJS = @LTLIBOBJS@
162 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
163 MAKEINFO = @MAKEINFO@
164 MKDIR_P = @MKDIR_P@
165 NM = @NM@
166 NTLM_LIBS = @NTLM_LIBS@
167 OBJEXT = @OBJEXT@
168 OTP_LIBS = @OTP_LIBS@
169 PACKAGE = @PACKAGE@
170 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
171 PACKAGE_NAME = @PACKAGE_NAME@
172 PACKAGE_STRING = @PACKAGE_STRING@
173 PACKAGE_TARNAME = @PACKAGE_TARNAME@
174 PACKAGE_VERSION = @PACKAGE_VERSION@
175 PASSDSS_LIBS = @PASSDSS_LIBS@
176 PATH_SEPARATOR = @PATH_SEPARATOR@
177 PLAIN_LIBS = @PLAIN_LIBS@
178 PURECOV = @PURECOV@
179 PURIFY = @PURIFY@
180 PWCHECKMETH = @PWCHECKMETH@
181 RANLIB = @RANLIB@
182 SASL_DB_BACKEND = @SASL_DB_BACKEND@
183 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
184 SASL_DB_INC = @SASL_DB_INC@
185 SASL_DB_LIB = @SASL_DB_LIB@
186 SASL_DB_MANS = @SASL_DB_MANS@
187 SASL_DB_UTILS = @SASL_DB_UTILS@
188 SASL_DL_LIB = @SASL_DL_LIB@
189 SASL_KRB_LIB = @SASL_KRB_LIB@
190 SASL_MECHS = @SASL_MECHS@
191 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
192 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
193 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
194 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
195 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
196 SCRAM_LIBS = @SCRAM_LIBS@
197 SET_MAKE = @SET_MAKE@
198 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
199 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
200 SHELL = @SHELL@
201 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
202 SNPRINTFOBJS = @SNPRINTFOBJS@
203 SRP_LIBS = @SRP_LIBS@
204 STRIP = @STRIP@
205 VERSION = @VERSION@
206 abs_builddir = @abs_builddir@
207 abs_srcdir = @abs_srcdir@
208 abs_top_builddir = @abs_top_builddir@
209 abs_top_srcdir = @abs_top_srcdir@
210 ac_ct_CC = @ac_ct_CC@
211 am__include = @am__include@
212 am__leading_dot = @am__leading_dot@
213 am__quote = @am__quote@
214 am__tar = @am__tar@
215 am__untar = @am__untar@
216 bindir = @bindir@
217 build = @build@
218 build_alias = @build_alias@
219 build_cpu = @build_cpu@
220 build_os = @build_os@
221 build_vendor = @build_vendor@
222 builddir = @builddir@
223 configdir = @configdir@
224 datadir = @datadir@
225 datarootdir = @datarootdir@
226 docdir = @docdir@
227 dvidir = @dvidir@
228 exec_prefix = @exec_prefix@
229 host = @host@
230 host_alias = @host_alias@
231 host_cpu = @host_cpu@
232 host_os = @host_os@
233 host_vendor = @host_vendor@
234 htmldir = @htmldir@
235 includedir = @includedir@
236 infodir = @infodir@
237 install_sh = @install_sh@
238 libdir = @libdir@
239 libexecdir = @libexecdir@
240 localedir = @localedir@
241 localstatedir = @localstatedir@
242 mandir = @mandir@
243 mkdir_p = @mkdir_p@
244 oldincludedir = @oldincludedir@
245 pdfdir = @pdfdir@
246 plugindir = @plugindir@
247 prefix = @prefix@
248 program_transform_name = @program_transform_name@
249 psdir = @psdir@
250 sbindir = @sbindir@
251 sharedstatedir = @sharedstatedir@
252 srcdir = @srcdir@
253 subdirs = @subdirs@
254 sysconfdir = @sysconfdir@
255 target = @target@
256 target_alias = @target_alias@
257 target_cpu = @target_cpu@
258 target_os = @target_os@
259 target_vendor = @target_vendor@
260 top_build_prefix = @top_build_prefix@
261 top_builddir = @top_builddir@
262 top_srcdir = @top_srcdir@
263 INCLUDES = -I../include -I../lib
264 pwcheck_SOURCES = pwcheck.c
265 EXTRA_pwcheck_SOURCES = pwcheck_getpwnam.c pwcheck_getspnam.c
266 pwcheck_DEPENDECIES = pwcheck_@PWCHECKMETH@.lo
267 pwcheck_LDADD = pwcheck_@PWCHECKMETH@.lo @LIB_CRYPT@ @LIB_SOCKET@
268 all: all-am
269
270 .SUFFIXES:
271 .SUFFIXES: .c .lo .o .obj
272 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
273 @for dep in $?; do \
274 case '$(am__configure_deps)' in \
275 *$$dep*) \
276 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
277 && { if test -f $@; then exit 0; else break; fi; }; \
278 exit 1;; \
279 esac; \
280 done; \
281 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pwcheck/Makefile'; \
282 $(am__cd) $(top_srcdir) && \
283 $(AUTOMAKE) --gnu pwcheck/Makefile
284 .PRECIOUS: Makefile
285 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
286 @case '$?' in \
287 *config.status*) \
288 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
289 *) \
290 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
291 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
292 esac;
293
294 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
295 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
296
297 $(top_srcdir)/configure: $(am__configure_deps)
298 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
299 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
300 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
301 $(am__aclocal_m4_deps):
302 install-sbinPROGRAMS: $(sbin_PROGRAMS)
303 @$(NORMAL_INSTALL)
304 test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
305 @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
306 for p in $$list; do echo "$$p $$p"; done | \
307 sed 's/$(EXEEXT)$$//' | \
308 while read p p1; do if test -f $$p || test -f $$p1; \
309 then echo "$$p"; echo "$$p"; else :; fi; \
310 done | \
311 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
312 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
313 sed 'N;N;N;s,\n, ,g' | \
314 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
315 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
316 if ($$2 == $$4) files[d] = files[d] " " $$1; \
317 else { print "f", $$3 "/" $$4, $$1; } } \
318 END { for (d in files) print "f", d, files[d] }' | \
319 while read type dir files; do \
320 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
321 test -z "$$files" || { \
322 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
323 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
324 } \
325 ; done
326
327 uninstall-sbinPROGRAMS:
328 @$(NORMAL_UNINSTALL)
329 @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
330 files=`for p in $$list; do echo "$$p"; done | \
331 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
332 -e 's/$$/$(EXEEXT)/' `; \
333 test -n "$$list" || exit 0; \
334 echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
335 cd "$(DESTDIR)$(sbindir)" && rm -f $$files
336
337 clean-sbinPROGRAMS:
338 @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
339 echo " rm -f" $$list; \
340 rm -f $$list || exit $$?; \
341 test -n "$(EXEEXT)" || exit 0; \
342 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
343 echo " rm -f" $$list; \
344 rm -f $$list
345 pwcheck$(EXEEXT): $(pwcheck_OBJECTS) $(pwcheck_DEPENDENCIES)
346 @rm -f pwcheck$(EXEEXT)
347 $(LINK) $(pwcheck_OBJECTS) $(pwcheck_LDADD) $(LIBS)
348
349 mostlyclean-compile:
350 -rm -f *.$(OBJEXT)
351
352 distclean-compile:
353 -rm -f *.tab.c
354
355 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwcheck.Po@am__quote@
356 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwcheck_getpwnam.Po@am__quote@
357 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwcheck_getspnam.Po@am__quote@
358
359 .c.o:
360 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
361 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
362 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
363 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
364 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
365
366 .c.obj:
367 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
368 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
369 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
370 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
371 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
372
373 .c.lo:
374 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
375 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
376 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
377 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
378 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
379
380 mostlyclean-libtool:
381 -rm -f *.lo
382
383 clean-libtool:
384 -rm -rf .libs _libs
385
386 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
387 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
388 unique=`for i in $$list; do \
389 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
390 done | \
391 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
392 END { if (nonempty) { for (i in files) print i; }; }'`; \
393 mkid -fID $$unique
394 tags: TAGS
395
396 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
397 $(TAGS_FILES) $(LISP)
398 set x; \
399 here=`pwd`; \
400 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
401 unique=`for i in $$list; do \
402 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
403 done | \
404 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
405 END { if (nonempty) { for (i in files) print i; }; }'`; \
406 shift; \
407 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
408 test -n "$$unique" || unique=$$empty_fix; \
409 if test $$# -gt 0; then \
410 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
411 "$$@" $$unique; \
412 else \
413 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
414 $$unique; \
415 fi; \
416 fi
417 ctags: CTAGS
418 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
419 $(TAGS_FILES) $(LISP)
420 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
421 unique=`for i in $$list; do \
422 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
423 done | \
424 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
425 END { if (nonempty) { for (i in files) print i; }; }'`; \
426 test -z "$(CTAGS_ARGS)$$unique" \
427 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
428 $$unique
429
430 GTAGS:
431 here=`$(am__cd) $(top_builddir) && pwd` \
432 && $(am__cd) $(top_srcdir) \
433 && gtags -i $(GTAGS_ARGS) "$$here"
434
435 distclean-tags:
436 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
437
438 distdir: $(DISTFILES)
439 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
440 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
441 list='$(DISTFILES)'; \
442 dist_files=`for file in $$list; do echo $$file; done | \
443 sed -e "s|^$$srcdirstrip/||;t" \
444 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
445 case $$dist_files in \
446 */*) $(MKDIR_P) `echo "$$dist_files" | \
447 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
448 sort -u` ;; \
449 esac; \
450 for file in $$dist_files; do \
451 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
452 if test -d $$d/$$file; then \
453 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
454 if test -d "$(distdir)/$$file"; then \
455 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
456 fi; \
457 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
458 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
459 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
460 fi; \
461 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
462 else \
463 test -f "$(distdir)/$$file" \
464 || cp -p $$d/$$file "$(distdir)/$$file" \
465 || exit 1; \
466 fi; \
467 done
468 check-am: all-am
469 check: check-am
470 all-am: Makefile $(PROGRAMS)
471 installdirs:
472 for dir in "$(DESTDIR)$(sbindir)"; do \
473 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
474 done
475 install: install-am
476 install-exec: install-exec-am
477 install-data: install-data-am
478 uninstall: uninstall-am
479
480 install-am: all-am
481 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
482
483 installcheck: installcheck-am
484 install-strip:
485 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
486 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
487 `test -z '$(STRIP)' || \
488 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
489 mostlyclean-generic:
490
491 clean-generic:
492
493 distclean-generic:
494 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
495 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
496
497 maintainer-clean-generic:
498 @echo "This command is intended for maintainers to use"
499 @echo "it deletes files that may require special tools to rebuild."
500 clean: clean-am
501
502 clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
503 mostlyclean-am
504
505 distclean: distclean-am
506 -rm -rf ./$(DEPDIR)
507 -rm -f Makefile
508 distclean-am: clean-am distclean-compile distclean-generic \
509 distclean-tags
510
511 dvi: dvi-am
512
513 dvi-am:
514
515 html: html-am
516
517 html-am:
518
519 info: info-am
520
521 info-am:
522
523 install-data-am:
524
525 install-dvi: install-dvi-am
526
527 install-dvi-am:
528
529 install-exec-am: install-sbinPROGRAMS
530
531 install-html: install-html-am
532
533 install-html-am:
534
535 install-info: install-info-am
536
537 install-info-am:
538
539 install-man:
540
541 install-pdf: install-pdf-am
542
543 install-pdf-am:
544
545 install-ps: install-ps-am
546
547 install-ps-am:
548
549 installcheck-am:
550
551 maintainer-clean: maintainer-clean-am
552 -rm -rf ./$(DEPDIR)
553 -rm -f Makefile
554 maintainer-clean-am: distclean-am maintainer-clean-generic
555
556 mostlyclean: mostlyclean-am
557
558 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
559 mostlyclean-libtool
560
561 pdf: pdf-am
562
563 pdf-am:
564
565 ps: ps-am
566
567 ps-am:
568
569 uninstall-am: uninstall-sbinPROGRAMS
570
571 .MAKE: install-am install-strip
572
573 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
574 clean-libtool clean-sbinPROGRAMS ctags distclean \
575 distclean-compile distclean-generic distclean-libtool \
576 distclean-tags distdir dvi dvi-am html html-am info info-am \
577 install install-am install-data install-data-am install-dvi \
578 install-dvi-am install-exec install-exec-am install-html \
579 install-html-am install-info install-info-am install-man \
580 install-pdf install-pdf-am install-ps install-ps-am \
581 install-sbinPROGRAMS install-strip installcheck \
582 installcheck-am installdirs maintainer-clean \
583 maintainer-clean-generic mostlyclean mostlyclean-compile \
584 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
585 tags uninstall uninstall-am uninstall-sbinPROGRAMS
586
587
588 # Tell versions [3.59,3.63) of GNU make to not export all variables.
589 # Otherwise a system limit (for SysV at least) may be exceeded.
590 .NOEXPORT:
3131 char *password;
3232 {
3333 char* r;
34 char* crpt_passwd;
3435 struct passwd *pwd;
3536
3637 pwd = getpwnam(userid);
4041 else if (pwd->pw_passwd[0] == '*') {
4142 r = "Account disabled";
4243 }
43 else if (strcmp(pwd->pw_passwd, crypt(password, pwd->pw_passwd)) != 0) {
44 else if (!(crpt_passwd = crypt(password, pwd->pw_passwd)) || strcmp(pwd->pw_passwd, (const char *)crpt_passwd) != 0) {
4445 r = "Incorrect password";
4546 }
4647 else {
3131 char *password;
3232 {
3333 struct spwd *pwd;
34 char *crpt_passwd;
3435
3536 pwd = getspnam(userid);
3637 if (!pwd) {
3738 return "Userid not found";
3839 }
3940
40 if (strcmp(pwd->sp_pwdp, crypt(password, pwd->sp_pwdp)) != 0) {
41 crpt_passwd = crypt(password, pwd->sp_pwdp);
42 if (!crpt_passwd || strcmp(pwd->sp_pwdp, (const char *)crpt_passwd) != 0) {
4143 return "Incorrect password";
4244 }
4345 else {
4141 #
4242 ################################################################
4343
44 INCLUDES=-I$(top_srcdir)/include
44 AM_CPPFLAGS=-I$(top_srcdir)/include
4545
4646 noinst_PROGRAMS = client server
4747 EXTRA_PROGRAMS = sample-client sample-server
48 EXTRA_DIST = NTMakefile
4849 CLEANFILES=sample-client sample-server ./.libs/*sample-client ./.libs/*sample-server
4950
5051 sample_client_SOURCES = sample-client.c
+0
-607
sample/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 # Makefile.am -- automake input for sample SASL programs
18 # Rob Earhart
19 #
20 ################################################################
21 # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
22 #
23 # Redistribution and use in source and binary forms, with or without
24 # modification, are permitted provided that the following conditions
25 # are met:
26 #
27 # 1. Redistributions of source code must retain the above copyright
28 # notice, this list of conditions and the following disclaimer.
29 #
30 # 2. Redistributions in binary form must reproduce the above copyright
31 # notice, this list of conditions and the following disclaimer in
32 # the documentation and/or other materials provided with the
33 # distribution.
34 #
35 # 3. The name "Carnegie Mellon University" must not be used to
36 # endorse or promote products derived from this software without
37 # prior written permission. For permission or any other legal
38 # details, please contact
39 # Office of Technology Transfer
40 # Carnegie Mellon University
41 # 5000 Forbes Avenue
42 # Pittsburgh, PA 15213-3890
43 # (412) 268-4387, fax: (412) 268-7395
44 # tech-transfer@andrew.cmu.edu
45 #
46 # 4. Redistributions of any form whatsoever must retain the following
47 # acknowledgment:
48 # "This product includes software developed by Computing Services
49 # at Carnegie Mellon University (http://www.cmu.edu/computing/)."
50 #
51 # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
52 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
53 # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
54 # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
55 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
56 # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
57 # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
58 #
59 ################################################################
60
61 VPATH = @srcdir@
62 pkgdatadir = $(datadir)/@PACKAGE@
63 pkgincludedir = $(includedir)/@PACKAGE@
64 pkglibdir = $(libdir)/@PACKAGE@
65 pkglibexecdir = $(libexecdir)/@PACKAGE@
66 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
67 install_sh_DATA = $(install_sh) -c -m 644
68 install_sh_PROGRAM = $(install_sh) -c
69 install_sh_SCRIPT = $(install_sh) -c
70 INSTALL_HEADER = $(INSTALL_DATA)
71 transform = $(program_transform_name)
72 NORMAL_INSTALL = :
73 PRE_INSTALL = :
74 POST_INSTALL = :
75 NORMAL_UNINSTALL = :
76 PRE_UNINSTALL = :
77 POST_UNINSTALL = :
78 build_triplet = @build@
79 host_triplet = @host@
80 target_triplet = @target@
81 noinst_PROGRAMS = client$(EXEEXT) server$(EXEEXT)
82 EXTRA_PROGRAMS = sample-client$(EXEEXT) sample-server$(EXEEXT)
83 EXTRA_DIST = http_digest_client.c
84 subdir = sample
85 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in $(srcdir)/NTMakefile
86 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
87 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
88 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
89 $(top_srcdir)/config/sasldb.m4 \
90 $(top_srcdir)/cmulocal/berkdb.m4 \
91 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
92 $(top_srcdir)/cmulocal/c-attribute.m4 \
93 $(top_srcdir)/cmulocal/common.m4 \
94 $(top_srcdir)/cmulocal/cyrus.m4 \
95 $(top_srcdir)/cmulocal/init_automake.m4 \
96 $(top_srcdir)/cmulocal/ipv6.m4 \
97 $(top_srcdir)/cmulocal/openldap.m4 \
98 $(top_srcdir)/cmulocal/openssl.m4 \
99 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
100 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
101 $(ACLOCAL_M4)
102 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
103 CONFIG_HEADER = $(top_builddir)/config.h
104 CONFIG_CLEAN_FILES =
105 CONFIG_CLEAN_VPATH_FILES =
106 PROGRAMS = $(noinst_PROGRAMS)
107 am_client_OBJECTS = client.$(OBJEXT) common.$(OBJEXT)
108 client_OBJECTS = $(am_client_OBJECTS)
109 am__DEPENDENCIES_1 =
110 client_DEPENDENCIES = ../lib/libsasl2.la $(am__DEPENDENCIES_1) \
111 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
112 am_sample_client_OBJECTS = sample-client.$(OBJEXT)
113 sample_client_OBJECTS = $(am_sample_client_OBJECTS)
114 sample_client_DEPENDENCIES = ../lib/libsasl2.la $(am__DEPENDENCIES_1) \
115 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
116 am_sample_server_OBJECTS = sample-server.$(OBJEXT)
117 sample_server_OBJECTS = $(am_sample_server_OBJECTS)
118 sample_server_DEPENDENCIES = ../lib/libsasl2.la $(am__DEPENDENCIES_1) \
119 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
120 am_server_OBJECTS = server.$(OBJEXT) common.$(OBJEXT)
121 server_OBJECTS = $(am_server_OBJECTS)
122 server_DEPENDENCIES = ../lib/libsasl2.la $(am__DEPENDENCIES_1) \
123 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
124 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
125 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
126 am__depfiles_maybe = depfiles
127 am__mv = mv -f
128 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
129 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
130 LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
131 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
132 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
133 CCLD = $(CC)
134 LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
135 $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
136 SOURCES = $(client_SOURCES) $(sample_client_SOURCES) \
137 $(sample_server_SOURCES) $(server_SOURCES)
138 DIST_SOURCES = $(client_SOURCES) $(sample_client_SOURCES) \
139 $(sample_server_SOURCES) $(server_SOURCES)
140 ETAGS = etags
141 CTAGS = ctags
142 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
143 ACLOCAL = @ACLOCAL@
144 AMTAR = @AMTAR@
145 AUTOCONF = @AUTOCONF@
146 AUTOHEADER = @AUTOHEADER@
147 AUTOMAKE = @AUTOMAKE@
148 AWK = @AWK@
149 CC = @CC@
150 CCDEPMODE = @CCDEPMODE@
151 CFLAGS = @CFLAGS@
152 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
153 CPP = @CPP@
154 CPPFLAGS = @CPPFLAGS@
155 CYGPATH_W = @CYGPATH_W@
156 DEFS = @DEFS@
157 DEPDIR = @DEPDIR@
158 DIRS = @DIRS@
159 DMALLOC_LIBS = @DMALLOC_LIBS@
160 ECHO_C = @ECHO_C@
161 ECHO_N = @ECHO_N@
162 ECHO_T = @ECHO_T@
163 EGREP = @EGREP@
164 EXEEXT = @EXEEXT@
165 GETADDRINFOOBJS = @GETADDRINFOOBJS@
166 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
167 GETSUBOPT = @GETSUBOPT@
168 GREP = @GREP@
169 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
170 GSSAPI_LIBS = @GSSAPI_LIBS@
171 INSTALL = @INSTALL@
172 INSTALL_DATA = @INSTALL_DATA@
173 INSTALL_PROGRAM = @INSTALL_PROGRAM@
174 INSTALL_SCRIPT = @INSTALL_SCRIPT@
175 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
176 IPCTYPE = @IPCTYPE@
177 JAVAC = @JAVAC@
178 JAVADOC = @JAVADOC@
179 JAVAH = @JAVAH@
180 JAVAROOT = @JAVAROOT@
181 JAVA_INCLUDES = @JAVA_INCLUDES@
182 LDFLAGS = @LDFLAGS@
183 LIBOBJS = @LIBOBJS@
184 LIBS = @LIBS@
185 LIBTOOL = @LIBTOOL@
186 LIB_CRYPT = @LIB_CRYPT@
187 LIB_DES = @LIB_DES@
188 LIB_DOOR = @LIB_DOOR@
189 LIB_LDAP = @LIB_LDAP@
190 LIB_MYSQL = @LIB_MYSQL@
191 LIB_PGSQL = @LIB_PGSQL@
192 LIB_SOCKET = @LIB_SOCKET@
193 LIB_SQLITE = @LIB_SQLITE@
194 LIB_SQLITE3 = @LIB_SQLITE3@
195 LN_S = @LN_S@
196 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
197 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
198 LTLIBOBJS = @LTLIBOBJS@
199 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
200 MAKEINFO = @MAKEINFO@
201 MKDIR_P = @MKDIR_P@
202 NM = @NM@
203 NTLM_LIBS = @NTLM_LIBS@
204 OBJEXT = @OBJEXT@
205 OTP_LIBS = @OTP_LIBS@
206 PACKAGE = @PACKAGE@
207 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
208 PACKAGE_NAME = @PACKAGE_NAME@
209 PACKAGE_STRING = @PACKAGE_STRING@
210 PACKAGE_TARNAME = @PACKAGE_TARNAME@
211 PACKAGE_VERSION = @PACKAGE_VERSION@
212 PASSDSS_LIBS = @PASSDSS_LIBS@
213 PATH_SEPARATOR = @PATH_SEPARATOR@
214 PLAIN_LIBS = @PLAIN_LIBS@
215 PURECOV = @PURECOV@
216 PURIFY = @PURIFY@
217 PWCHECKMETH = @PWCHECKMETH@
218 RANLIB = @RANLIB@
219 SASL_DB_BACKEND = @SASL_DB_BACKEND@
220 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
221 SASL_DB_INC = @SASL_DB_INC@
222 SASL_DB_LIB = @SASL_DB_LIB@
223 SASL_DB_MANS = @SASL_DB_MANS@
224 SASL_DB_UTILS = @SASL_DB_UTILS@
225 SASL_DL_LIB = @SASL_DL_LIB@
226 SASL_KRB_LIB = @SASL_KRB_LIB@
227 SASL_MECHS = @SASL_MECHS@
228 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
229 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
230 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
231 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
232 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
233 SCRAM_LIBS = @SCRAM_LIBS@
234 SET_MAKE = @SET_MAKE@
235 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
236 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
237 SHELL = @SHELL@
238 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
239 SNPRINTFOBJS = @SNPRINTFOBJS@
240 SRP_LIBS = @SRP_LIBS@
241 STRIP = @STRIP@
242 VERSION = @VERSION@
243 abs_builddir = @abs_builddir@
244 abs_srcdir = @abs_srcdir@
245 abs_top_builddir = @abs_top_builddir@
246 abs_top_srcdir = @abs_top_srcdir@
247 ac_ct_CC = @ac_ct_CC@
248 am__include = @am__include@
249 am__leading_dot = @am__leading_dot@
250 am__quote = @am__quote@
251 am__tar = @am__tar@
252 am__untar = @am__untar@
253 bindir = @bindir@
254 build = @build@
255 build_alias = @build_alias@
256 build_cpu = @build_cpu@
257 build_os = @build_os@
258 build_vendor = @build_vendor@
259 builddir = @builddir@
260 configdir = @configdir@
261 datadir = @datadir@
262 datarootdir = @datarootdir@
263 docdir = @docdir@
264 dvidir = @dvidir@
265 exec_prefix = @exec_prefix@
266 host = @host@
267 host_alias = @host_alias@
268 host_cpu = @host_cpu@
269 host_os = @host_os@
270 host_vendor = @host_vendor@
271 htmldir = @htmldir@
272 includedir = @includedir@
273 infodir = @infodir@
274 install_sh = @install_sh@
275 libdir = @libdir@
276 libexecdir = @libexecdir@
277 localedir = @localedir@
278 localstatedir = @localstatedir@
279 mandir = @mandir@
280 mkdir_p = @mkdir_p@
281 oldincludedir = @oldincludedir@
282 pdfdir = @pdfdir@
283 plugindir = @plugindir@
284 prefix = @prefix@
285 program_transform_name = @program_transform_name@
286 psdir = @psdir@
287 sbindir = @sbindir@
288 sharedstatedir = @sharedstatedir@
289 srcdir = @srcdir@
290 subdirs = @subdirs@
291 sysconfdir = @sysconfdir@
292 target = @target@
293 target_alias = @target_alias@
294 target_cpu = @target_cpu@
295 target_os = @target_os@
296 target_vendor = @target_vendor@
297 top_build_prefix = @top_build_prefix@
298 top_builddir = @top_builddir@
299 top_srcdir = @top_srcdir@
300 INCLUDES = -I$(top_srcdir)/include
301 CLEANFILES = sample-client sample-server ./.libs/*sample-client ./.libs/*sample-server
302 sample_client_SOURCES = sample-client.c
303 sample_server_SOURCES = sample-server.c
304 server_SOURCES = server.c common.c common.h
305 client_SOURCES = client.c common.c common.h
306 server_LDADD = ../lib/libsasl2.la $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET)
307 client_LDADD = ../lib/libsasl2.la $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET)
308 sample_client_LDADD = ../lib/libsasl2.la $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET)
309 sample_server_LDADD = ../lib/libsasl2.la $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(LIB_SOCKET)
310 all: all-am
311
312 .SUFFIXES:
313 .SUFFIXES: .c .lo .o .obj
314 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
315 @for dep in $?; do \
316 case '$(am__configure_deps)' in \
317 *$$dep*) \
318 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
319 && { if test -f $@; then exit 0; else break; fi; }; \
320 exit 1;; \
321 esac; \
322 done; \
323 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sample/Makefile'; \
324 $(am__cd) $(top_srcdir) && \
325 $(AUTOMAKE) --gnu sample/Makefile
326 .PRECIOUS: Makefile
327 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
328 @case '$?' in \
329 *config.status*) \
330 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
331 *) \
332 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
333 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
334 esac;
335
336 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
337 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
338
339 $(top_srcdir)/configure: $(am__configure_deps)
340 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
341 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
342 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
343 $(am__aclocal_m4_deps):
344
345 clean-noinstPROGRAMS:
346 @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
347 echo " rm -f" $$list; \
348 rm -f $$list || exit $$?; \
349 test -n "$(EXEEXT)" || exit 0; \
350 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
351 echo " rm -f" $$list; \
352 rm -f $$list
353 client$(EXEEXT): $(client_OBJECTS) $(client_DEPENDENCIES)
354 @rm -f client$(EXEEXT)
355 $(LINK) $(client_OBJECTS) $(client_LDADD) $(LIBS)
356 sample-client$(EXEEXT): $(sample_client_OBJECTS) $(sample_client_DEPENDENCIES)
357 @rm -f sample-client$(EXEEXT)
358 $(LINK) $(sample_client_OBJECTS) $(sample_client_LDADD) $(LIBS)
359 sample-server$(EXEEXT): $(sample_server_OBJECTS) $(sample_server_DEPENDENCIES)
360 @rm -f sample-server$(EXEEXT)
361 $(LINK) $(sample_server_OBJECTS) $(sample_server_LDADD) $(LIBS)
362 server$(EXEEXT): $(server_OBJECTS) $(server_DEPENDENCIES)
363 @rm -f server$(EXEEXT)
364 $(LINK) $(server_OBJECTS) $(server_LDADD) $(LIBS)
365
366 mostlyclean-compile:
367 -rm -f *.$(OBJEXT)
368
369 distclean-compile:
370 -rm -f *.tab.c
371
372 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Po@am__quote@
373 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@
374 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample-client.Po@am__quote@
375 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample-server.Po@am__quote@
376 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server.Po@am__quote@
377
378 .c.o:
379 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
380 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
381 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
382 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
383 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
384
385 .c.obj:
386 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
387 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
388 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
389 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
390 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
391
392 .c.lo:
393 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
394 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
395 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
396 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
397 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
398
399 mostlyclean-libtool:
400 -rm -f *.lo
401
402 clean-libtool:
403 -rm -rf .libs _libs
404
405 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
406 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
407 unique=`for i in $$list; do \
408 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
409 done | \
410 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
411 END { if (nonempty) { for (i in files) print i; }; }'`; \
412 mkid -fID $$unique
413 tags: TAGS
414
415 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
416 $(TAGS_FILES) $(LISP)
417 set x; \
418 here=`pwd`; \
419 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
420 unique=`for i in $$list; do \
421 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
422 done | \
423 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
424 END { if (nonempty) { for (i in files) print i; }; }'`; \
425 shift; \
426 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
427 test -n "$$unique" || unique=$$empty_fix; \
428 if test $$# -gt 0; then \
429 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
430 "$$@" $$unique; \
431 else \
432 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
433 $$unique; \
434 fi; \
435 fi
436 ctags: CTAGS
437 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
438 $(TAGS_FILES) $(LISP)
439 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
440 unique=`for i in $$list; do \
441 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
442 done | \
443 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
444 END { if (nonempty) { for (i in files) print i; }; }'`; \
445 test -z "$(CTAGS_ARGS)$$unique" \
446 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
447 $$unique
448
449 GTAGS:
450 here=`$(am__cd) $(top_builddir) && pwd` \
451 && $(am__cd) $(top_srcdir) \
452 && gtags -i $(GTAGS_ARGS) "$$here"
453
454 distclean-tags:
455 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
456
457 distdir: $(DISTFILES)
458 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
459 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
460 list='$(DISTFILES)'; \
461 dist_files=`for file in $$list; do echo $$file; done | \
462 sed -e "s|^$$srcdirstrip/||;t" \
463 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
464 case $$dist_files in \
465 */*) $(MKDIR_P) `echo "$$dist_files" | \
466 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
467 sort -u` ;; \
468 esac; \
469 for file in $$dist_files; do \
470 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
471 if test -d $$d/$$file; then \
472 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
473 if test -d "$(distdir)/$$file"; then \
474 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
475 fi; \
476 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
477 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
478 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
479 fi; \
480 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
481 else \
482 test -f "$(distdir)/$$file" \
483 || cp -p $$d/$$file "$(distdir)/$$file" \
484 || exit 1; \
485 fi; \
486 done
487 check-am: all-am
488 check: check-am
489 all-am: Makefile $(PROGRAMS)
490 installdirs:
491 install: install-am
492 install-exec: install-exec-am
493 install-data: install-data-am
494 uninstall: uninstall-am
495
496 install-am: all-am
497 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
498
499 installcheck: installcheck-am
500 install-strip:
501 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
502 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
503 `test -z '$(STRIP)' || \
504 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
505 mostlyclean-generic:
506
507 clean-generic:
508 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
509
510 distclean-generic:
511 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
512 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
513
514 maintainer-clean-generic:
515 @echo "This command is intended for maintainers to use"
516 @echo "it deletes files that may require special tools to rebuild."
517 clean: clean-am
518
519 clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
520 mostlyclean-am
521
522 distclean: distclean-am
523 -rm -rf ./$(DEPDIR)
524 -rm -f Makefile
525 distclean-am: clean-am distclean-compile distclean-generic \
526 distclean-tags
527
528 dvi: dvi-am
529
530 dvi-am:
531
532 html: html-am
533
534 html-am:
535
536 info: info-am
537
538 info-am:
539
540 install-data-am:
541
542 install-dvi: install-dvi-am
543
544 install-dvi-am:
545
546 install-exec-am:
547
548 install-html: install-html-am
549
550 install-html-am:
551
552 install-info: install-info-am
553
554 install-info-am:
555
556 install-man:
557
558 install-pdf: install-pdf-am
559
560 install-pdf-am:
561
562 install-ps: install-ps-am
563
564 install-ps-am:
565
566 installcheck-am:
567
568 maintainer-clean: maintainer-clean-am
569 -rm -rf ./$(DEPDIR)
570 -rm -f Makefile
571 maintainer-clean-am: distclean-am maintainer-clean-generic
572
573 mostlyclean: mostlyclean-am
574
575 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
576 mostlyclean-libtool
577
578 pdf: pdf-am
579
580 pdf-am:
581
582 ps: ps-am
583
584 ps-am:
585
586 uninstall-am:
587
588 .MAKE: install-am install-strip
589
590 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
591 clean-libtool clean-noinstPROGRAMS ctags distclean \
592 distclean-compile distclean-generic distclean-libtool \
593 distclean-tags distdir dvi dvi-am html html-am info info-am \
594 install install-am install-data install-data-am install-dvi \
595 install-dvi-am install-exec install-exec-am install-html \
596 install-html-am install-info install-info-am install-man \
597 install-pdf install-pdf-am install-ps install-ps-am \
598 install-strip installcheck installcheck-am installdirs \
599 maintainer-clean maintainer-clean-generic mostlyclean \
600 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
601 pdf pdf-am ps ps-am tags uninstall uninstall-am
602
603
604 # Tell versions [3.59,3.63) of GNU make to not export all variables.
605 # Otherwise a system limit (for SysV at least) may be exceeded.
606 .NOEXPORT:
173173 }
174174
175175 x->len = len;
176 strcpy(x->data, password);
176 strcpy((char *)x->data, password);
177177 memset(password, 0, len);
178178
179179 *psecret = x;
254254 mech = buf;
255255 }
256256
257 r = sasl_client_start(conn, mech, NULL, &data, &len, &chosenmech);
257 r = sasl_client_start(conn, mech, NULL, &data, (unsigned int *) &len, &chosenmech);
258258 if (r != SASL_OK && r != SASL_CONTINUE) {
259259 saslerr(r, "starting SASL negotiation");
260260 printf("\n%s\n", sasl_errdetail(conn));
294294 }
295295 len = recv_string(in, buf, sizeof buf);
296296
297 r = sasl_client_step(conn, buf, len, NULL, &data, &len);
297 r = sasl_client_step(conn, buf, len, NULL, &data, (unsigned int *) &len);
298298 if (r != SASL_OK && r != SASL_CONTINUE) {
299299 saslerr(r, "performing SASL negotiation");
300300 printf("\n%s\n", sasl_errdetail(conn));
388388
389389 /* set ip addresses */
390390 salen = sizeof(local_ip);
391 if (getsockname(fd, (struct sockaddr *)&local_ip, &salen) < 0) {
391 if (getsockname(fd, (struct sockaddr *)&local_ip, (unsigned int*) &salen) < 0) {
392392 perror("getsockname");
393393 }
394394
407407 snprintf(localaddr, sizeof(localaddr), "%s;%s", hbuf, pbuf);
408408
409409 salen = sizeof(remote_ip);
410 if (getpeername(fd, (struct sockaddr *)&remote_ip, &salen) < 0) {
410 if (getpeername(fd, (struct sockaddr *)&remote_ip, (unsigned int *) &salen) < 0) {
411411 perror("getpeername");
412412 }
413413
432432 if (cb_flag) {
433433 cb.name = "sasl-sample";
434434 cb.critical = cb_flag > 1;
435 cb.data = "this is a test of channel binding";
436 cb.len = strlen(cb.data);
435 cb.data = (unsigned char *) "this is a test of channel binding";
436 cb.len = (unsigned int) strlen((const char *) cb.data);
437437
438438 sasl_setprop(conn, SASL_CHANNEL_BINDING, &cb);
439439 }
219219
220220 dprintf(1, "generating client mechanism list... ");
221221 r = sasl_listmech(conn, NULL, NULL, " ", NULL,
222 &data, &len, &count);
222 &data, (unsigned int *) &len, &count);
223223 if (r != SASL_OK) saslfail(r, "generating mechanism list");
224224 dprintf(1, "%d mechanisms\n", count);
225225 }
226226
227227 /* send capability list to client */
228228 send_string(out, data, len);
229 if (mech)
230 free((void *) data);
229231
230232 dprintf(1, "waiting for client mechanism...\n");
231233 len = recv_string(in, chosenmech, sizeof chosenmech);
257259
258260 /* start libsasl negotiation */
259261 r = sasl_server_start(conn, chosenmech, buf, len,
260 &data, &len);
262 &data, (unsigned int *) &len);
261263 } else {
262264 r = sasl_server_start(conn, chosenmech, NULL, 0,
263 &data, &len);
265 &data, (unsigned int *) &len);
264266 }
265267
266268 if (r != SASL_OK && r != SASL_CONTINUE) {
288290 return -1;
289291 }
290292
291 r = sasl_server_step(conn, buf, len, &data, &len);
293 r = sasl_server_step(conn, buf, len, &data, (unsigned int *) &len);
292294 if (r != SASL_OK && r != SASL_CONTINUE) {
293295 saslerr(r, "performing SASL negotiation");
294296 fputc('N', out); /* send NO to client */
419421
420422 /* set ip addresses */
421423 salen = sizeof(local_ip);
422 if (getsockname(fd, (struct sockaddr *)&local_ip, &salen) < 0) {
424 if (getsockname(fd, (struct sockaddr *)&local_ip, (unsigned int *) &salen) < 0) {
423425 perror("getsockname");
424426 }
425427 niflags = (NI_NUMERICHOST | NI_NUMERICSERV);
437439 snprintf(localaddr, sizeof(localaddr), "%s;%s", hbuf, pbuf);
438440
439441 salen = sizeof(remote_ip);
440 if (getpeername(fd, (struct sockaddr *)&remote_ip, &salen) < 0) {
442 if (getpeername(fd, (struct sockaddr *)&remote_ip, (unsigned int *) &salen) < 0) {
441443 perror("getpeername");
442444 }
443445
467469
468470 cb.name = "sasl-sample";
469471 cb.critical = cb_flag > 1;
470 cb.data = "this is a test of channel binding";
471 cb.len = strlen(cb.data);
472 cb.data = (const unsigned char *) "this is a test of channel binding";
473 cb.len = (unsigned int) strlen((const char *) cb.data);
472474
473475 if (cb_flag) {
474476 sasl_setprop(conn, SASL_CHANNEL_BINDING, &cb);
515517 maj_stat = gss_display_status(&min_stat, code,
516518 type, GSS_C_NULL_OID,
517519 &msg_ctx, &msg);
518 fprintf(stderr, "%s: %s\n", m, (char *)msg.value);
520 fprintf(stderr, "%s (%u): %s\n", m, maj_stat, (char *)msg.value);
519521 (void) gss_release_buffer(&min_stat, &msg);
520522
521523 if (!msg_ctx)
0 Makefile.in
1 Makefile
2 .deps
3 .libs
4 *.l[ao]
5 *.o
6 saslauthd
7 saslauthd.8
8 saslauthd.h*
9 stamp-h1
10 testsaslauthd
+0
-23
saslauthd/AUTHORS less more
0 Tim Martin <tmartin@andrew.cmu.edu> wrote, debugged, and tested most of the
1 code.
2
3 Rob Siemborski <rjs3@andrew.cmu.edu> wrote the self-contained autoconf system.
4
5 Larry Greenfield <leg+sasl@andrew.cmu.edu> talked a lot.
6
7 Igor Brezac <igor@ipass.net> has done a good deal of work on the saslauthd
8 LDAP module.
9
10 Jeremy Rumpf <jrumpf@heavyload.net> implemented the credential cache, unified
11 the different IPC methods under a common framework.
12
13 Fabian Knittel <fknittel@gmx.de> wrote auth_pam plugin, based on
14 Debian's pwcheck_pam daemon by Michael-John Turner <mj@debian.org>.
15
16 saslauthd was originally contributed by Lyndon Nerenberg on
17 behalf of MessagingDirect Ltd.
18
19 getaddrinfo.c was written by Hajimu UMEMOTO <ume@mahoroba.org>
20 which is based on the IPv6 code written by KIKUCHI Takahiro
21 <kick@kyoto.wide.ad.jp>
22
+0
-3
saslauthd/INSTALL less more
0 Follow the install documentation for SASL. (saslauthd will install as
1 a part of the regular Cyrus SASL distribution as long as you configure
2 SASL with --with-saslauthd)
00 AUTOMAKE_OPTIONS = 1.7
11 sbin_PROGRAMS = saslauthd testsaslauthd
22 EXTRA_PROGRAMS = saslcache
3
4 LTLIBOBJS = @LTLIBOBJS@
5 LTLIBOBJS_FULL = $(addprefix ${top_srcdir}/lib/,${LTLIBOBJS})
36
47 saslauthd_SOURCES = mechanisms.c globals.h \
58 mechanisms.h auth_dce.c auth_dce.h auth_getpwent.c \
1215 ipc_unix.c ipc_doors.c saslauthd-main.c saslauthd-main.h \
1316 md5.c saslauthd_md5.h md5global.h
1417 EXTRA_saslauthd_sources = getaddrinfo.c getnameinfo.c
15 saslauthd_DEPENDENCIES = saslauthd-main.o @LTLIBOBJS@
18 saslauthd_DEPENDENCIES = saslauthd-main.o $(LTLIBOBJS_FULL)
1619 saslauthd_LDADD = @SASL_KRB_LIB@ \
17 @GSSAPIBASE_LIBS@ @GSSAPI_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \
18 @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@
20 @GSSAPIBASE_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \
21 @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ $(LTLIBOBJS_FULL)
1922
2023 testsaslauthd_SOURCES = testsaslauthd.c utils.c
2124 testsaslauthd_LDADD = @LIB_SOCKET@
2225
2326 saslcache_SOURCES = saslcache.c
2427
25 EXTRA_DIST = saslauthd.8 saslauthd.mdoc config include \
28 EXTRA_DIST = saslauthd.8 saslauthd.mdoc include \
2629 getnameinfo.c getaddrinfo.c LDAP_SASLAUTHD
27 INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/../include
30 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/../include
2831 DEFS = @DEFS@ -DSASLAUTHD_CONF_FILE_DEFAULT=\"@sysconfdir@/saslauthd.conf\" -I. -I$(srcdir) -I..
2932
3033
+0
-729
saslauthd/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 VPATH = @srcdir@
18 pkgdatadir = $(datadir)/@PACKAGE@
19 pkgincludedir = $(includedir)/@PACKAGE@
20 pkglibdir = $(libdir)/@PACKAGE@
21 pkglibexecdir = $(libexecdir)/@PACKAGE@
22 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23 install_sh_DATA = $(install_sh) -c -m 644
24 install_sh_PROGRAM = $(install_sh) -c
25 install_sh_SCRIPT = $(install_sh) -c
26 INSTALL_HEADER = $(INSTALL_DATA)
27 transform = $(program_transform_name)
28 NORMAL_INSTALL = :
29 PRE_INSTALL = :
30 POST_INSTALL = :
31 NORMAL_UNINSTALL = :
32 PRE_UNINSTALL = :
33 POST_UNINSTALL = :
34 build_triplet = @build@
35 host_triplet = @host@
36 sbin_PROGRAMS = saslauthd$(EXEEXT) testsaslauthd$(EXEEXT)
37 EXTRA_PROGRAMS = saslcache$(EXEEXT)
38 subdir = .
39 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
40 $(srcdir)/Makefile.in $(srcdir)/saslauthd.h.in \
41 $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
42 config/config.guess config/config.sub config/depcomp \
43 config/install-sh config/ltconfig config/ltmain.sh \
44 config/missing config/mkinstalldirs getaddrinfo.c \
45 getnameinfo.c
46 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
47 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
48 $(top_srcdir)/config/sasldb.m4 \
49 $(top_srcdir)/../cmulocal/berkdb.m4 \
50 $(top_srcdir)/../cmulocal/bsd_sockets.m4 \
51 $(top_srcdir)/../cmulocal/c-attribute.m4 \
52 $(top_srcdir)/../cmulocal/common.m4 \
53 $(top_srcdir)/../cmulocal/cyrus.m4 \
54 $(top_srcdir)/../cmulocal/init_automake.m4 \
55 $(top_srcdir)/../cmulocal/ipv6.m4 \
56 $(top_srcdir)/../cmulocal/openssl.m4 \
57 $(top_srcdir)/../cmulocal/sasl2.m4 $(top_srcdir)/configure.in
58 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
59 $(ACLOCAL_M4)
60 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
61 configure.lineno config.status.lineno
62 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
63 CONFIG_HEADER = saslauthd.h
64 CONFIG_CLEAN_FILES =
65 CONFIG_CLEAN_VPATH_FILES =
66 am__installdirs = "$(DESTDIR)$(sbindir)"
67 PROGRAMS = $(sbin_PROGRAMS)
68 am_saslauthd_OBJECTS = mechanisms.$(OBJEXT) auth_dce.$(OBJEXT) \
69 auth_getpwent.$(OBJEXT) auth_krb5.$(OBJEXT) \
70 auth_krb4.$(OBJEXT) auth_pam.$(OBJEXT) auth_rimap.$(OBJEXT) \
71 auth_httpform.$(OBJEXT) auth_shadow.$(OBJEXT) \
72 auth_sia.$(OBJEXT) auth_sasldb.$(OBJEXT) lak.$(OBJEXT) \
73 auth_ldap.$(OBJEXT) cache.$(OBJEXT) cfile.$(OBJEXT) \
74 krbtf.$(OBJEXT) utils.$(OBJEXT) ipc_unix.$(OBJEXT) \
75 ipc_doors.$(OBJEXT) saslauthd-main.$(OBJEXT) md5.$(OBJEXT)
76 saslauthd_OBJECTS = $(am_saslauthd_OBJECTS)
77 am_saslcache_OBJECTS = saslcache.$(OBJEXT)
78 saslcache_OBJECTS = $(am_saslcache_OBJECTS)
79 saslcache_LDADD = $(LDADD)
80 am_testsaslauthd_OBJECTS = testsaslauthd.$(OBJEXT) utils.$(OBJEXT)
81 testsaslauthd_OBJECTS = $(am_testsaslauthd_OBJECTS)
82 testsaslauthd_DEPENDENCIES =
83 DEFAULT_INCLUDES = -I.@am__isrc@
84 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
85 am__depfiles_maybe = depfiles
86 am__mv = mv -f
87 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
88 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
89 CCLD = $(CC)
90 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
91 SOURCES = $(saslauthd_SOURCES) $(saslcache_SOURCES) \
92 $(testsaslauthd_SOURCES)
93 DIST_SOURCES = $(saslauthd_SOURCES) $(saslcache_SOURCES) \
94 $(testsaslauthd_SOURCES)
95 ETAGS = etags
96 CTAGS = ctags
97 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
98 distdir = $(PACKAGE)-$(VERSION)
99 top_distdir = $(distdir)
100 am__remove_distdir = \
101 { test ! -d "$(distdir)" \
102 || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
103 && rm -fr "$(distdir)"; }; }
104 DIST_ARCHIVES = $(distdir).tar.gz
105 GZIP_ENV = --best
106 distuninstallcheck_listfiles = find . -type f -print
107 distcleancheck_listfiles = find . -type f -print
108 ACLOCAL = @ACLOCAL@
109 AMTAR = @AMTAR@
110 AUTOCONF = @AUTOCONF@
111 AUTOHEADER = @AUTOHEADER@
112 AUTOMAKE = @AUTOMAKE@
113 AWK = @AWK@
114 CC = @CC@
115 CCDEPMODE = @CCDEPMODE@
116 CFLAGS = @CFLAGS@
117 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
118 CPP = @CPP@
119 CPPFLAGS = @CPPFLAGS@
120 CYGPATH_W = @CYGPATH_W@
121 DEFS = @DEFS@ -DSASLAUTHD_CONF_FILE_DEFAULT=\"@sysconfdir@/saslauthd.conf\" -I. -I$(srcdir) -I..
122 DEPDIR = @DEPDIR@
123 ECHO_C = @ECHO_C@
124 ECHO_N = @ECHO_N@
125 ECHO_T = @ECHO_T@
126 EGREP = @EGREP@
127 EXEEXT = @EXEEXT@
128 GREP = @GREP@
129 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
130 GSSAPI_LIBS = @GSSAPI_LIBS@
131 INSTALL = @INSTALL@
132 INSTALL_DATA = @INSTALL_DATA@
133 INSTALL_PROGRAM = @INSTALL_PROGRAM@
134 INSTALL_SCRIPT = @INSTALL_SCRIPT@
135 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
136 LDAP_LIBS = @LDAP_LIBS@
137 LDFLAGS = @LDFLAGS@
138 LIBOBJS = @LIBOBJS@
139 LIBS = @LIBS@
140 LIB_CRYPT = @LIB_CRYPT@
141 LIB_DES = @LIB_DES@
142 LIB_PAM = @LIB_PAM@
143 LIB_SIA = @LIB_SIA@
144 LIB_SOCKET = @LIB_SOCKET@
145 LN_S = @LN_S@
146 LTLIBOBJS = @LTLIBOBJS@
147 MAIN_COMPAT_OBJ = @MAIN_COMPAT_OBJ@
148 MAKEINFO = @MAKEINFO@
149 MKDIR_P = @MKDIR_P@
150 OBJEXT = @OBJEXT@
151 PACKAGE = @PACKAGE@
152 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
153 PACKAGE_NAME = @PACKAGE_NAME@
154 PACKAGE_STRING = @PACKAGE_STRING@
155 PACKAGE_TARNAME = @PACKAGE_TARNAME@
156 PACKAGE_VERSION = @PACKAGE_VERSION@
157 PATH_SEPARATOR = @PATH_SEPARATOR@
158 SASL_DB_BACKEND = @SASL_DB_BACKEND@
159 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
160 SASL_DB_INC = @SASL_DB_INC@
161 SASL_DB_LIB = @SASL_DB_LIB@
162 SASL_DB_MANS = @SASL_DB_MANS@
163 SASL_DB_UTILS = @SASL_DB_UTILS@
164 SASL_KRB_LIB = @SASL_KRB_LIB@
165 SET_MAKE = @SET_MAKE@
166 SHELL = @SHELL@
167 STRIP = @STRIP@
168 VERSION = @VERSION@
169 abs_builddir = @abs_builddir@
170 abs_srcdir = @abs_srcdir@
171 abs_top_builddir = @abs_top_builddir@
172 abs_top_srcdir = @abs_top_srcdir@
173 ac_ct_CC = @ac_ct_CC@
174 am__include = @am__include@
175 am__leading_dot = @am__leading_dot@
176 am__quote = @am__quote@
177 am__tar = @am__tar@
178 am__untar = @am__untar@
179 bindir = @bindir@
180 build = @build@
181 build_alias = @build_alias@
182 build_cpu = @build_cpu@
183 build_os = @build_os@
184 build_vendor = @build_vendor@
185 builddir = @builddir@
186 datadir = @datadir@
187 datarootdir = @datarootdir@
188 docdir = @docdir@
189 dvidir = @dvidir@
190 exec_prefix = @exec_prefix@
191 host = @host@
192 host_alias = @host_alias@
193 host_cpu = @host_cpu@
194 host_os = @host_os@
195 host_vendor = @host_vendor@
196 htmldir = @htmldir@
197 includedir = @includedir@
198 infodir = @infodir@
199 install_sh = @install_sh@
200 libdir = @libdir@
201 libexecdir = @libexecdir@
202 localedir = @localedir@
203 localstatedir = @localstatedir@
204 mandir = @mandir@
205 mkdir_p = @mkdir_p@
206 oldincludedir = @oldincludedir@
207 pdfdir = @pdfdir@
208 prefix = @prefix@
209 program_transform_name = @program_transform_name@
210 psdir = @psdir@
211 sbindir = @sbindir@
212 sharedstatedir = @sharedstatedir@
213 srcdir = @srcdir@
214 sysconfdir = @sysconfdir@
215 target_alias = @target_alias@
216 top_build_prefix = @top_build_prefix@
217 top_builddir = @top_builddir@
218 top_srcdir = @top_srcdir@
219 AUTOMAKE_OPTIONS = 1.7
220 saslauthd_SOURCES = mechanisms.c globals.h \
221 mechanisms.h auth_dce.c auth_dce.h auth_getpwent.c \
222 auth_getpwent.h auth_krb5.c auth_krb5.h auth_krb4.c \
223 auth_krb4.h auth_pam.c auth_pam.h auth_rimap.c auth_httpform.c \
224 auth_rimap.h auth_shadow.c auth_shadow.h auth_sia.c auth_httpform.h \
225 auth_sia.h auth_sasldb.c auth_sasldb.h lak.c lak.h \
226 auth_ldap.c auth_ldap.h cache.c cache.h cfile.c cfile.h \
227 krbtf.c krbtf.h utils.c utils.h \
228 ipc_unix.c ipc_doors.c saslauthd-main.c saslauthd-main.h \
229 md5.c saslauthd_md5.h md5global.h
230
231 EXTRA_saslauthd_sources = getaddrinfo.c getnameinfo.c
232 saslauthd_DEPENDENCIES = saslauthd-main.o @LTLIBOBJS@
233 saslauthd_LDADD = @SASL_KRB_LIB@ \
234 @GSSAPIBASE_LIBS@ @GSSAPI_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \
235 @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@
236
237 testsaslauthd_SOURCES = testsaslauthd.c utils.c
238 testsaslauthd_LDADD = @LIB_SOCKET@
239 saslcache_SOURCES = saslcache.c
240 EXTRA_DIST = saslauthd.8 saslauthd.mdoc config include \
241 getnameinfo.c getaddrinfo.c LDAP_SASLAUTHD
242
243 INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/../include
244 all: saslauthd.h
245 $(MAKE) $(AM_MAKEFLAGS) all-am
246
247 .SUFFIXES:
248 .SUFFIXES: .c .o .obj
249 am--refresh:
250 @:
251 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
252 @for dep in $?; do \
253 case '$(am__configure_deps)' in \
254 *$$dep*) \
255 echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
256 $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
257 && exit 0; \
258 exit 1;; \
259 esac; \
260 done; \
261 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
262 $(am__cd) $(top_srcdir) && \
263 $(AUTOMAKE) --gnu Makefile
264 .PRECIOUS: Makefile
265 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
266 @case '$?' in \
267 *config.status*) \
268 echo ' $(SHELL) ./config.status'; \
269 $(SHELL) ./config.status;; \
270 *) \
271 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
272 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
273 esac;
274
275 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
276 $(SHELL) ./config.status --recheck
277
278 $(top_srcdir)/configure: $(am__configure_deps)
279 $(am__cd) $(srcdir) && $(AUTOCONF)
280 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
281 $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
282 $(am__aclocal_m4_deps):
283
284 saslauthd.h: stamp-h1
285 @if test ! -f $@; then \
286 rm -f stamp-h1; \
287 $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
288 else :; fi
289
290 stamp-h1: $(srcdir)/saslauthd.h.in $(top_builddir)/config.status
291 @rm -f stamp-h1
292 cd $(top_builddir) && $(SHELL) ./config.status saslauthd.h
293 $(srcdir)/saslauthd.h.in: $(am__configure_deps)
294 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
295 rm -f stamp-h1
296 touch $@
297
298 distclean-hdr:
299 -rm -f saslauthd.h stamp-h1
300 install-sbinPROGRAMS: $(sbin_PROGRAMS)
301 @$(NORMAL_INSTALL)
302 test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
303 @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
304 for p in $$list; do echo "$$p $$p"; done | \
305 sed 's/$(EXEEXT)$$//' | \
306 while read p p1; do if test -f $$p; \
307 then echo "$$p"; echo "$$p"; else :; fi; \
308 done | \
309 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
310 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
311 sed 'N;N;N;s,\n, ,g' | \
312 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
313 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
314 if ($$2 == $$4) files[d] = files[d] " " $$1; \
315 else { print "f", $$3 "/" $$4, $$1; } } \
316 END { for (d in files) print "f", d, files[d] }' | \
317 while read type dir files; do \
318 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
319 test -z "$$files" || { \
320 echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
321 $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
322 } \
323 ; done
324
325 uninstall-sbinPROGRAMS:
326 @$(NORMAL_UNINSTALL)
327 @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
328 files=`for p in $$list; do echo "$$p"; done | \
329 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
330 -e 's/$$/$(EXEEXT)/' `; \
331 test -n "$$list" || exit 0; \
332 echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
333 cd "$(DESTDIR)$(sbindir)" && rm -f $$files
334
335 clean-sbinPROGRAMS:
336 -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
337 saslauthd$(EXEEXT): $(saslauthd_OBJECTS) $(saslauthd_DEPENDENCIES)
338 @rm -f saslauthd$(EXEEXT)
339 $(LINK) $(saslauthd_OBJECTS) $(saslauthd_LDADD) $(LIBS)
340 saslcache$(EXEEXT): $(saslcache_OBJECTS) $(saslcache_DEPENDENCIES)
341 @rm -f saslcache$(EXEEXT)
342 $(LINK) $(saslcache_OBJECTS) $(saslcache_LDADD) $(LIBS)
343 testsaslauthd$(EXEEXT): $(testsaslauthd_OBJECTS) $(testsaslauthd_DEPENDENCIES)
344 @rm -f testsaslauthd$(EXEEXT)
345 $(LINK) $(testsaslauthd_OBJECTS) $(testsaslauthd_LDADD) $(LIBS)
346
347 mostlyclean-compile:
348 -rm -f *.$(OBJEXT)
349
350 distclean-compile:
351 -rm -f *.tab.c
352
353 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getaddrinfo.Plo@am__quote@
354 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getnameinfo.Plo@am__quote@
355 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth_dce.Po@am__quote@
356 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth_getpwent.Po@am__quote@
357 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth_httpform.Po@am__quote@
358 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth_krb4.Po@am__quote@
359 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth_krb5.Po@am__quote@
360 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth_ldap.Po@am__quote@
361 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth_pam.Po@am__quote@
362 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth_rimap.Po@am__quote@
363 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth_sasldb.Po@am__quote@
364 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth_shadow.Po@am__quote@
365 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth_sia.Po@am__quote@
366 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache.Po@am__quote@
367 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfile.Po@am__quote@
368 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_doors.Po@am__quote@
369 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc_unix.Po@am__quote@
370 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/krbtf.Po@am__quote@
371 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lak.Po@am__quote@
372 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@
373 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mechanisms.Po@am__quote@
374 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/saslauthd-main.Po@am__quote@
375 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/saslcache.Po@am__quote@
376 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testsaslauthd.Po@am__quote@
377 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
378
379 .c.o:
380 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
381 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
382 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
383 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
384 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
385
386 .c.obj:
387 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
388 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
389 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
390 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
391 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
392
393 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
394 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
395 unique=`for i in $$list; do \
396 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
397 done | \
398 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
399 END { if (nonempty) { for (i in files) print i; }; }'`; \
400 mkid -fID $$unique
401 tags: TAGS
402
403 TAGS: $(HEADERS) $(SOURCES) saslauthd.h.in $(TAGS_DEPENDENCIES) \
404 $(TAGS_FILES) $(LISP)
405 set x; \
406 here=`pwd`; \
407 list='$(SOURCES) $(HEADERS) saslauthd.h.in $(LISP) $(TAGS_FILES)'; \
408 unique=`for i in $$list; do \
409 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
410 done | \
411 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
412 END { if (nonempty) { for (i in files) print i; }; }'`; \
413 shift; \
414 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
415 test -n "$$unique" || unique=$$empty_fix; \
416 if test $$# -gt 0; then \
417 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
418 "$$@" $$unique; \
419 else \
420 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
421 $$unique; \
422 fi; \
423 fi
424 ctags: CTAGS
425 CTAGS: $(HEADERS) $(SOURCES) saslauthd.h.in $(TAGS_DEPENDENCIES) \
426 $(TAGS_FILES) $(LISP)
427 list='$(SOURCES) $(HEADERS) saslauthd.h.in $(LISP) $(TAGS_FILES)'; \
428 unique=`for i in $$list; do \
429 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
430 done | \
431 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
432 END { if (nonempty) { for (i in files) print i; }; }'`; \
433 test -z "$(CTAGS_ARGS)$$unique" \
434 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
435 $$unique
436
437 GTAGS:
438 here=`$(am__cd) $(top_builddir) && pwd` \
439 && $(am__cd) $(top_srcdir) \
440 && gtags -i $(GTAGS_ARGS) "$$here"
441
442 distclean-tags:
443 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
444
445 distdir: $(DISTFILES)
446 $(am__remove_distdir)
447 test -d "$(distdir)" || mkdir "$(distdir)"
448 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
449 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
450 list='$(DISTFILES)'; \
451 dist_files=`for file in $$list; do echo $$file; done | \
452 sed -e "s|^$$srcdirstrip/||;t" \
453 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
454 case $$dist_files in \
455 */*) $(MKDIR_P) `echo "$$dist_files" | \
456 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
457 sort -u` ;; \
458 esac; \
459 for file in $$dist_files; do \
460 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
461 if test -d $$d/$$file; then \
462 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
463 if test -d "$(distdir)/$$file"; then \
464 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
465 fi; \
466 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
467 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
468 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
469 fi; \
470 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
471 else \
472 test -f "$(distdir)/$$file" \
473 || cp -p $$d/$$file "$(distdir)/$$file" \
474 || exit 1; \
475 fi; \
476 done
477 $(MAKE) $(AM_MAKEFLAGS) \
478 top_distdir="$(top_distdir)" distdir="$(distdir)" \
479 dist-hook
480 -test -n "$(am__skip_mode_fix)" \
481 || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
482 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
483 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
484 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
485 || chmod -R a+r "$(distdir)"
486 dist-gzip: distdir
487 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
488 $(am__remove_distdir)
489
490 dist-bzip2: distdir
491 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
492 $(am__remove_distdir)
493
494 dist-lzma: distdir
495 tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
496 $(am__remove_distdir)
497
498 dist-xz: distdir
499 tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
500 $(am__remove_distdir)
501
502 dist-tarZ: distdir
503 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
504 $(am__remove_distdir)
505
506 dist-shar: distdir
507 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
508 $(am__remove_distdir)
509
510 dist-zip: distdir
511 -rm -f $(distdir).zip
512 zip -rq $(distdir).zip $(distdir)
513 $(am__remove_distdir)
514
515 dist dist-all: distdir
516 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
517 $(am__remove_distdir)
518
519 # This target untars the dist file and tries a VPATH configuration. Then
520 # it guarantees that the distribution is self-contained by making another
521 # tarfile.
522 distcheck: dist
523 case '$(DIST_ARCHIVES)' in \
524 *.tar.gz*) \
525 GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
526 *.tar.bz2*) \
527 bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
528 *.tar.lzma*) \
529 unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
530 *.tar.xz*) \
531 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
532 *.tar.Z*) \
533 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
534 *.shar.gz*) \
535 GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
536 *.zip*) \
537 unzip $(distdir).zip ;;\
538 esac
539 chmod -R a-w $(distdir); chmod a+w $(distdir)
540 mkdir $(distdir)/_build
541 mkdir $(distdir)/_inst
542 chmod a-w $(distdir)
543 test -d $(distdir)/_build || exit 0; \
544 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
545 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
546 && am__cwd=`pwd` \
547 && $(am__cd) $(distdir)/_build \
548 && ../configure --srcdir=.. --prefix="$$dc_install_base" \
549 $(DISTCHECK_CONFIGURE_FLAGS) \
550 && $(MAKE) $(AM_MAKEFLAGS) \
551 && $(MAKE) $(AM_MAKEFLAGS) dvi \
552 && $(MAKE) $(AM_MAKEFLAGS) check \
553 && $(MAKE) $(AM_MAKEFLAGS) install \
554 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
555 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
556 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
557 distuninstallcheck \
558 && chmod -R a-w "$$dc_install_base" \
559 && ({ \
560 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
561 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
562 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
563 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
564 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
565 } || { rm -rf "$$dc_destdir"; exit 1; }) \
566 && rm -rf "$$dc_destdir" \
567 && $(MAKE) $(AM_MAKEFLAGS) dist \
568 && rm -rf $(DIST_ARCHIVES) \
569 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
570 && cd "$$am__cwd" \
571 || exit 1
572 $(am__remove_distdir)
573 @(echo "$(distdir) archives ready for distribution: "; \
574 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
575 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
576 distuninstallcheck:
577 @$(am__cd) '$(distuninstallcheck_dir)' \
578 && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
579 || { echo "ERROR: files left after uninstall:" ; \
580 if test -n "$(DESTDIR)"; then \
581 echo " (check DESTDIR support)"; \
582 fi ; \
583 $(distuninstallcheck_listfiles) ; \
584 exit 1; } >&2
585 distcleancheck: distclean
586 @if test '$(srcdir)' = . ; then \
587 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
588 exit 1 ; \
589 fi
590 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
591 || { echo "ERROR: files left in build directory after distclean:" ; \
592 $(distcleancheck_listfiles) ; \
593 exit 1; } >&2
594 check-am: all-am
595 check: check-am
596 all-am: Makefile $(PROGRAMS) saslauthd.h
597 installdirs:
598 for dir in "$(DESTDIR)$(sbindir)"; do \
599 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
600 done
601 install: install-am
602 install-exec: install-exec-am
603 install-data: install-data-am
604 uninstall: uninstall-am
605
606 install-am: all-am
607 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
608
609 installcheck: installcheck-am
610 install-strip:
611 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
612 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
613 `test -z '$(STRIP)' || \
614 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
615 mostlyclean-generic:
616
617 clean-generic:
618
619 distclean-generic:
620 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
621 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
622
623 maintainer-clean-generic:
624 @echo "This command is intended for maintainers to use"
625 @echo "it deletes files that may require special tools to rebuild."
626 clean: clean-am
627
628 clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
629
630 distclean: distclean-am
631 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
632 -rm -rf $(DEPDIR) ./$(DEPDIR)
633 -rm -f Makefile
634 distclean-am: clean-am distclean-compile distclean-generic \
635 distclean-hdr distclean-tags
636
637 dvi: dvi-am
638
639 dvi-am:
640
641 html: html-am
642
643 html-am:
644
645 info: info-am
646
647 info-am:
648
649 install-data-am: install-data-local
650
651 install-dvi: install-dvi-am
652
653 install-dvi-am:
654
655 install-exec-am: install-sbinPROGRAMS
656
657 install-html: install-html-am
658
659 install-html-am:
660
661 install-info: install-info-am
662
663 install-info-am:
664
665 install-man:
666
667 install-pdf: install-pdf-am
668
669 install-pdf-am:
670
671 install-ps: install-ps-am
672
673 install-ps-am:
674
675 installcheck-am:
676
677 maintainer-clean: maintainer-clean-am
678 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
679 -rm -rf $(top_srcdir)/autom4te.cache
680 -rm -rf $(DEPDIR) ./$(DEPDIR)
681 -rm -f Makefile
682 maintainer-clean-am: distclean-am maintainer-clean-generic
683
684 mostlyclean: mostlyclean-am
685
686 mostlyclean-am: mostlyclean-compile mostlyclean-generic
687
688 pdf: pdf-am
689
690 pdf-am:
691
692 ps: ps-am
693
694 ps-am:
695
696 uninstall-am: uninstall-sbinPROGRAMS
697
698 .MAKE: all install-am install-strip
699
700 .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
701 clean-generic clean-sbinPROGRAMS ctags dist dist-all \
702 dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar dist-tarZ \
703 dist-xz dist-zip distcheck distclean distclean-compile \
704 distclean-generic distclean-hdr distclean-tags distcleancheck \
705 distdir distuninstallcheck dvi dvi-am html html-am info \
706 info-am install install-am install-data install-data-am \
707 install-data-local install-dvi install-dvi-am install-exec \
708 install-exec-am install-html install-html-am install-info \
709 install-info-am install-man install-pdf install-pdf-am \
710 install-ps install-ps-am install-sbinPROGRAMS install-strip \
711 installcheck installcheck-am installdirs maintainer-clean \
712 maintainer-clean-generic mostlyclean mostlyclean-compile \
713 mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
714 uninstall-am uninstall-sbinPROGRAMS
715
716
717 dist-hook: saslauthd.8
718
719 saslauthd.8: saslauthd.mdoc
720 nroff -mdoc $(srcdir)/saslauthd.mdoc > $(srcdir)/saslauthd.8
721
722 install-data-local: saslauthd.8
723 $(mkinstalldirs) $(DESTDIR)$(mandir)/man8
724 $(INSTALL_DATA) $(srcdir)/saslauthd.8 $(DESTDIR)$(mandir)/man8/saslauthd.8
725
726 # Tell versions [3.59,3.63) of GNU make to not export all variables.
727 # Otherwise a system limit (for SysV at least) may be exceeded.
728 .NOEXPORT:
+0
-3
saslauthd/NEWS less more
0 New in v1.1.0
1 -----------------
2 - saslauthd now configures as a separate package.
+0
-4
saslauthd/README less more
0 This directory contains the saslauthd daemon. Similar to pwcheck, it
1 allows password verification from a separate process.
2
3 For more information, consult the main Cyrus SASL documentation.
0
1 Credential Cache Operation
2 --------------------------
3
4 BASICS:
5
6
7 The idea here is to try and explain the operation behind the credentials
8 cache. The cache is actually implemented as an open hash table with fixed
9 length bucket chains attached to each table slot (aka row). The cache is
10 disabled in the default operation of saslauthd, and may be enabled by
11 specifying the -c option at runtime. Note that caching of authentication
12 credentials may not be acceptable within the site policy at all sites.
13
14 The table will also only cache the username, realm, and service
15 credentials if they are under a certain length. The combined length of the
16 username, realm, and service must be less than the CACHE_MAX_CREDS_LENGTH
17 define in cache.h:
18
19
20 #define CACHE_MAX_CREDS_LENGTH 60
21
22
23 Each bucket in the hash table has the following declaration:
24
25 struct bucket {
26 char creds[CACHE_MAX_CREDS_LENGTH];
27 unsigned int user_offt;
28 unsigned int realm_offt;
29 unsigned int service_offt;;
30 unsigned char pwd_digest[16];
31 time_t created;
32 };
33
34
35 Logical layout could be viewed as:
36
37 x = bucket
38
39 bucket chains
40 ----------------------
41 slot-> x x x x x x
42 slot-> x x x x x x
43 slot-> x x x x x x
44 slot-> x x x x x x
45 slot-> x x x x x x
46 slot-> x x x x x x
47 slot-> x x x x x x
48 slot-> x x x x x x
49 .....
50 ...
51 .
52
53
54 A combined string composed of the username + realm + service is hashed to
55 determine the proper slot that the entry should be located in. The associated
56 bucket chain (at the hashed location) is then traversed to attempt to locate the
57 entry.
58
59 If the entry is not located in the bucket chain (cache miss), then the criteria
60 (username, realm, service) will be written into the first empty or expired
61 bucket. Further, if no buckets are empty or expired, the oldest entry in the
62 bucket chain will be forcefully evicted and the new entry written in its place.
63
64 The hash table's size can be adjusted two ways. One is to increase the length
65 of the bucket chains (CACHE_MAX_BUCKETS_PER define in cache.h). The second is to
66 increase the number of slots available. The length of the bucket chains is hard
67 coded to a length of 6 buckets per slot. It is not recommended to increase this
68 value beyond about 8. Testing has shown that if the number of slots is sized
69 properly, buckets further out than 8 seldom get allocated.
70
71 By default, the CACHE_DEFAULT_TABLE_SIZE define sets the number of slots to
72 1711. Generating a total number of 10266 buckets. Techically this would cache
73 10266 individual users, but the maximum hash table load only grows to be around
74 .90. This effectively drops the number of cachable individual users to approx
75 9230. The size of the hash table is also runtime configurable. The option -s
76 to saslauthd accepts the desired size in kilobytes and calculates the number of
77 slots to allocate.
78
79 To increase the efficiency of the hashing function the number of slots in the
80 hash table needs to be kept relatively prime (hence all the default 111 stuff).
81 The efficiency of the hashing function may drop as much a 15% by changing the
82 number slots from 8001 to 8000. One shouldn't really worry about this though,
83 the calculator behind the -s option has a built in prime number generator.
84
85 Items in the credental cache are stamped with an epoch stamp to gauge timeouts.
86 The idea would be to set the cache timeout to a very long time (default is 8
87 hours). This would allow the cache to fill up with the credentials of the user
88 base, but would also expire entries that haven't been accessed for long time
89 spans. The default timeout can be set with the CACHE_DEFAULT_TIMEOUT define in
90 cache.h. The timeout is also runtime configurable by setting the timeout in
91 seconds with the -t option.
92
93
94 PROGRAMMING:
95
96
97 Programatically using the cache is pretty simple and straight forward. To check
98 if a set of credentials is in the cache, call:
99
100 int cache_lookup(char *user, char *realm, char *service, char *password, struct cache_result *result)
101
102 and then (if needed) a following:
103
104 void cache_commit(struct cache_result *result)
105
106 The lookup process goes as follows:
107
108 1) memset() the result pointer to eliminate stray data. Set the default
109 result->status to CACHE_NON_FLUSHABLE.
110 2) If the combined length of the username, service, and realm is longer
111 than CACHE_MAX_CREDS_LENGTH (default 60), return CACHE_TOO_BIG.
112 3) Hash the username, service, and realm to obtain the slot (row) location
113 that should have the entry.
114 4) Acquire a read lock on the slot (row).
115 5) Traverse the bucket chain looking for the cached entry. If a cached
116 entry is found with a matching password, unlock the slot (row),
117 return CACHE_OK.
118 6) If the password in the bucket doesn't match the given password,
119 write an updated bucket into result->bucket, set the reference pointer
120 (result->read_bucket) to the local read_bucket, set result->status ==
121 CACHE_FLUSH, release the lock, and return CACHE_FAIL. A pending
122 cache_commit() should follow.
123 7) If the entry could not be found in the bucket chain, write the new information
124 into result->bucket, set result->status == CACHE_FLUSH_WITH_RESCAN, release
125 the lock and return CACHE_FAIL. A pending cache_commit() should follow.
126
127
128 If the return value is CACHE_OK, then the user, realm, service, and password
129 have been previously seen. Nothing more is really required after this point.
130 Since the lookup was successful and result->status == CACHE_NO_FLUSH, any
131 ancillary call to cache_commit() does nothing.
132
133 If a CACHE_FAIL is returned, the credentials should be checked against their
134 native authentication mechanism. If that mechanism succeeds, then a call to
135 cache_commit() will write the pending entry (saved via cache_result *) to its
136 final location in the hash table. If the native authentication fails, skip the
137 call to cache_commit(), which will effectively discard the data.
138
139 If a CACHE_TOO_BIG is returned, the credentials should be checked against
140 their native authentication mechanism. Secondary calls to cache_commit()
141 will do nothing since result->status == CACHE_NO_FLUSH.
142
143 Cache_commit() flushes the result->bucket out to the hash table. The location
144 is determined by result->status. If result->status == CACHE_FLUSH, then the
145 result->bucket needs to be written to the location pointed to via result->read_bucket.
146 If result->status == CACHE_FLUSH_WITH_RESCAN, then the bucket is new or hasn't
147 been seen before. We should rescan the bucket chain at result->hash_offset and
148 evict the oldest entry.
149
150 It should also be noted that all passwords in the credential cache are
151 comprised of md5 digests of the original clear text passwords. The goal is
152 to only keep passwords in clear text as long as needed.
153
154
155 LOCKING:
156
157
158 Two methods are utilized to perform the required read/write locks on the hash
159 table slots. One uses the fcntl() call (used elsewhere in saslauthd), the second
160 utilizes the pthread rwlock interface (pthread_rwlock_wrlock(),
161 pthread_rwlock_rdlock(), etc). The intention is to use the fcntl() interface
162 when using the unix IPC mechanism and the rwlock interface when using the doors
163 IPC mechanism.
164
165 The fcntl() interface opens a temporary locking file in the same path as the
166 mux communication socket and has a .flock extension appended to it, example:
167 /var/run/saslauthd/mux.flock . Each byte in the temporary file corresponds to a
168 slot in the hash table. By employing fcntl() region locks (either F_WRLCK or
169 F_RDLCK) on selected bytes, we can simulate advisory locks in the hash
170 table.
171
172 The rwlock method initializes and array of pthread_rwlock_t types, one for each
173 slot in the table. Successive calls are then made with the desired slot to lock
174 being the offset into the pthread_rwlock_t table.
175
176
177 DEBUGGING:
178
179
180 For those testing the cache code. It would be beneficial to enable verbose output
181 regardless of what the rest of saslauthd is doing. By uncommenting the define in
182 cache.h:
183
184 /* If debugging uncomment this for always verbose */
185 //#define CACHE_DEFAULT_FLAGS CACHE_VERBOSE
186
187 extra data is logged about cache hits/misses, (un)locking events, etc. under the
188 syslog facility LOG_INFO|LOG_AUTH (auth.info).
189
190
191 SASLCACHE:
192
193
194 Upon startup, saslauthd will write the shared mmaped file out to the saslauthd
195 state directory with the name cache.mmap. There is an included utility called saslcache
196 that can be used to look into the mmaped file and gather some statistics about the
197 cache. To build the saslcache utility:
198
199 cd saslauthd
200 make saslcache
201
202 Examples of the saslcache utility:
203
204 ./saslcache -s dumps out some information about the cache
205
206 ----------------------------------------
207 Saslauthd Cache Detail:
208
209 timeout (seconds) : 28800
210 total slots allocated : 3643
211 slots in use : 3
212 total buckets : 21858
213 buckets per slot : 6
214 buckets in use : 3
215 hash table size (bytes) : 2098536
216 bucket size (bytes) : 96
217 minimum slot allocation : 0
218 maximum slot allocation : 1
219 slots at maximum allocation : 3
220 slots at minimum allocation : 3640
221 overall hash table load : 0.00
222
223 hits* : 19
224 misses* : 3
225 total lookup attempts* : 22
226 hit ratio* : 86.36
227 ----------------------------------------
228 * May not be completely accurate
229 ----------------------------------------
230
231
232 ./saslcache -d dumps the contents of the cache in a csv format
233
234 "user","realm","service","created","created_localtime"
235 "m3","","imap","1042513583","Mon Jan 13 22:06:23 2003"
236 "m2","","imap","1042513256","Mon Jan 13 22:00:56 2003"
237 "m1","","imap","1042513355","Mon Jan 13 22:02:35 2003"
238
239
240 ./saslcache -d -m /var/run/saslauthd/cache.mmap with alternate mmaped file path
241
242
243 Overall, the whole goal of the cache is to provide relief to the authentication
244 mechanisms without placing a lot of additional burden on the server. Hopefully
245 the above methodology will be lightweight and effective at this task.
246
247 As always, additional comments and/or suggestions are more than welcome.
248
249 Jeremy Rumpf
250 jrumpf@heavyload.net
251
0
1 IPC API Documentation
2 --------------------------
3
4
5 BASICS:
6
7
8 We'll explain what the ipc api is doing and how to implement new ipc
9 methods into saslauthd.
10
11 The ipc api is how saslauthd communicates with the end client. The ipc modules
12 are responsible for marshalling authentication requests, passing those requests
13 off to the do_auth() routine, and then returning the results back to the client.
14 In addition to handling authentication requests, the ipc modules also may have
15 to decide on other factors. Such as, what process model saslauthd will run
16 under, alterting saslauthd when it's safe to detach from the controlling tty,
17 etc.
18
19
20 IMPLEMENTATION:
21
22
23 An ipc module is required to implement three main functions.
24
25
26 void ipc_init()
27
28 The ipc_init() function must setup any requirements for the ipc method to
29 operate. In addition to any setup it must perform for itself, it also must:
30
31 1> Call void detach_tty() once during its execution. If necessary, this
32 will daemonize the instance of saslauthd. It should delay the call as long as
33 possible so that any error conditions that arise can be returned via stderr.
34
35 2> If the ipc module wishes to implement the standard unix process model, it
36 must set the global flag USE_PROCESS_MODEL (see unix_ipc.c).
37
38
39 void ipc_loop()
40
41 The ipc_loop() function is the main processing loop for saslauthd. It should
42 perform four basic tasks.
43
44 1> Marshall in the request from the client.
45
46 2> Pass the request elements off to the do_auth() function.
47
48 3> Send the results of do_auth() back to the client.
49
50 4> Free the pointer returned from do_auth().
51
52
53 void ipc_cleanup()
54
55 Void ipc_cleanup should perform and basic cleanup the module requires. If no
56 cleanup is required, an empty function should be provided.
57
58
59 HEADERS
60
61
62 The three main functions above are declared in the header file saslauthd-main.h.
63 Any other helper functions in the source module, can either be declared in a
64 separate header file, or more conveniently defined at the top of the module's source
65 file.
66
67
68 BUILD
69
70
71 To keep the build process relatively simple, all source modules will be compiled
72 at build time. Each ipc module should implement proper #ifdef statements around
73 its entire code block. The chosen source module for the required ipc method will
74 be fully compiled with the required function symbols defined. The remaning
75 source modules will be compiled into empty object files. The logic for
76 determining which source module will be fully compiled is placed in the
77 saslauthd-main.h header file.
78
79
80 Jeremy Rumpf
81 jrumpf@heavyload.net
82
83
+0
-962
saslauthd/aclocal.m4 less more
0 # generated automatically by aclocal 1.11 -*- Autoconf -*-
1
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 # PARTICULAR PURPOSE.
12
13 m4_ifndef([AC_AUTOCONF_VERSION],
14 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
15 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
16 [m4_warning([this file was generated for autoconf 2.63.
17 You have another version of autoconf. It may work, but is not guaranteed to.
18 If you have problems, you may need to regenerate the build system entirely.
19 To do so, use the procedure documented by the package, typically `autoreconf'.])])
20
21 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
22 #
23 # This file is free software; the Free Software Foundation
24 # gives unlimited permission to copy and/or distribute it,
25 # with or without modifications, as long as this notice is preserved.
26
27 # AM_AUTOMAKE_VERSION(VERSION)
28 # ----------------------------
29 # Automake X.Y traces this macro to ensure aclocal.m4 has been
30 # generated from the m4 files accompanying Automake X.Y.
31 # (This private macro should not be called outside this file.)
32 AC_DEFUN([AM_AUTOMAKE_VERSION],
33 [am__api_version='1.11'
34 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
35 dnl require some minimum version. Point them to the right macro.
36 m4_if([$1], [1.11], [],
37 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
38 ])
39
40 # _AM_AUTOCONF_VERSION(VERSION)
41 # -----------------------------
42 # aclocal traces this macro to find the Autoconf version.
43 # This is a private macro too. Using m4_define simplifies
44 # the logic in aclocal, which can simply ignore this definition.
45 m4_define([_AM_AUTOCONF_VERSION], [])
46
47 # AM_SET_CURRENT_AUTOMAKE_VERSION
48 # -------------------------------
49 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
50 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
51 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
52 [AM_AUTOMAKE_VERSION([1.11])dnl
53 m4_ifndef([AC_AUTOCONF_VERSION],
54 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
55 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
56
57 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
58
59 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
60 #
61 # This file is free software; the Free Software Foundation
62 # gives unlimited permission to copy and/or distribute it,
63 # with or without modifications, as long as this notice is preserved.
64
65 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
66 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
67 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
68 #
69 # Of course, Automake must honor this variable whenever it calls a
70 # tool from the auxiliary directory. The problem is that $srcdir (and
71 # therefore $ac_aux_dir as well) can be either absolute or relative,
72 # depending on how configure is run. This is pretty annoying, since
73 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
74 # source directory, any form will work fine, but in subdirectories a
75 # relative path needs to be adjusted first.
76 #
77 # $ac_aux_dir/missing
78 # fails when called from a subdirectory if $ac_aux_dir is relative
79 # $top_srcdir/$ac_aux_dir/missing
80 # fails if $ac_aux_dir is absolute,
81 # fails when called from a subdirectory in a VPATH build with
82 # a relative $ac_aux_dir
83 #
84 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
85 # are both prefixed by $srcdir. In an in-source build this is usually
86 # harmless because $srcdir is `.', but things will broke when you
87 # start a VPATH build or use an absolute $srcdir.
88 #
89 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
90 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
91 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
92 # and then we would define $MISSING as
93 # MISSING="\${SHELL} $am_aux_dir/missing"
94 # This will work as long as MISSING is not called from configure, because
95 # unfortunately $(top_srcdir) has no meaning in configure.
96 # However there are other variables, like CC, which are often used in
97 # configure, and could therefore not use this "fixed" $ac_aux_dir.
98 #
99 # Another solution, used here, is to always expand $ac_aux_dir to an
100 # absolute PATH. The drawback is that using absolute paths prevent a
101 # configured tree to be moved without reconfiguration.
102
103 AC_DEFUN([AM_AUX_DIR_EXPAND],
104 [dnl Rely on autoconf to set up CDPATH properly.
105 AC_PREREQ([2.50])dnl
106 # expand $ac_aux_dir to an absolute path
107 am_aux_dir=`cd $ac_aux_dir && pwd`
108 ])
109
110 # AM_CONDITIONAL -*- Autoconf -*-
111
112 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
113 # Free Software Foundation, Inc.
114 #
115 # This file is free software; the Free Software Foundation
116 # gives unlimited permission to copy and/or distribute it,
117 # with or without modifications, as long as this notice is preserved.
118
119 # serial 9
120
121 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
122 # -------------------------------------
123 # Define a conditional.
124 AC_DEFUN([AM_CONDITIONAL],
125 [AC_PREREQ(2.52)dnl
126 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
127 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
128 AC_SUBST([$1_TRUE])dnl
129 AC_SUBST([$1_FALSE])dnl
130 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
131 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
132 m4_define([_AM_COND_VALUE_$1], [$2])dnl
133 if $2; then
134 $1_TRUE=
135 $1_FALSE='#'
136 else
137 $1_TRUE='#'
138 $1_FALSE=
139 fi
140 AC_CONFIG_COMMANDS_PRE(
141 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
142 AC_MSG_ERROR([[conditional "$1" was never defined.
143 Usually this means the macro was only invoked conditionally.]])
144 fi])])
145
146 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
147 # Free Software Foundation, Inc.
148 #
149 # This file is free software; the Free Software Foundation
150 # gives unlimited permission to copy and/or distribute it,
151 # with or without modifications, as long as this notice is preserved.
152
153 # serial 10
154
155 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
156 # written in clear, in which case automake, when reading aclocal.m4,
157 # will think it sees a *use*, and therefore will trigger all it's
158 # C support machinery. Also note that it means that autoscan, seeing
159 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
160
161
162 # _AM_DEPENDENCIES(NAME)
163 # ----------------------
164 # See how the compiler implements dependency checking.
165 # NAME is "CC", "CXX", "GCJ", or "OBJC".
166 # We try a few techniques and use that to set a single cache variable.
167 #
168 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
169 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
170 # dependency, and given that the user is not expected to run this macro,
171 # just rely on AC_PROG_CC.
172 AC_DEFUN([_AM_DEPENDENCIES],
173 [AC_REQUIRE([AM_SET_DEPDIR])dnl
174 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
175 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
176 AC_REQUIRE([AM_DEP_TRACK])dnl
177
178 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
179 [$1], CXX, [depcc="$CXX" am_compiler_list=],
180 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
181 [$1], UPC, [depcc="$UPC" am_compiler_list=],
182 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
183 [depcc="$$1" am_compiler_list=])
184
185 AC_CACHE_CHECK([dependency style of $depcc],
186 [am_cv_$1_dependencies_compiler_type],
187 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
188 # We make a subdir and do the tests there. Otherwise we can end up
189 # making bogus files that we don't know about and never remove. For
190 # instance it was reported that on HP-UX the gcc test will end up
191 # making a dummy file named `D' -- because `-MD' means `put the output
192 # in D'.
193 mkdir conftest.dir
194 # Copy depcomp to subdir because otherwise we won't find it if we're
195 # using a relative directory.
196 cp "$am_depcomp" conftest.dir
197 cd conftest.dir
198 # We will build objects and dependencies in a subdirectory because
199 # it helps to detect inapplicable dependency modes. For instance
200 # both Tru64's cc and ICC support -MD to output dependencies as a
201 # side effect of compilation, but ICC will put the dependencies in
202 # the current directory while Tru64 will put them in the object
203 # directory.
204 mkdir sub
205
206 am_cv_$1_dependencies_compiler_type=none
207 if test "$am_compiler_list" = ""; then
208 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
209 fi
210 am__universal=false
211 m4_case([$1], [CC],
212 [case " $depcc " in #(
213 *\ -arch\ *\ -arch\ *) am__universal=true ;;
214 esac],
215 [CXX],
216 [case " $depcc " in #(
217 *\ -arch\ *\ -arch\ *) am__universal=true ;;
218 esac])
219
220 for depmode in $am_compiler_list; do
221 # Setup a source with many dependencies, because some compilers
222 # like to wrap large dependency lists on column 80 (with \), and
223 # we should not choose a depcomp mode which is confused by this.
224 #
225 # We need to recreate these files for each test, as the compiler may
226 # overwrite some of them when testing with obscure command lines.
227 # This happens at least with the AIX C compiler.
228 : > sub/conftest.c
229 for i in 1 2 3 4 5 6; do
230 echo '#include "conftst'$i'.h"' >> sub/conftest.c
231 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
232 # Solaris 8's {/usr,}/bin/sh.
233 touch sub/conftst$i.h
234 done
235 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
236
237 # We check with `-c' and `-o' for the sake of the "dashmstdout"
238 # mode. It turns out that the SunPro C++ compiler does not properly
239 # handle `-M -o', and we need to detect this. Also, some Intel
240 # versions had trouble with output in subdirs
241 am__obj=sub/conftest.${OBJEXT-o}
242 am__minus_obj="-o $am__obj"
243 case $depmode in
244 gcc)
245 # This depmode causes a compiler race in universal mode.
246 test "$am__universal" = false || continue
247 ;;
248 nosideeffect)
249 # after this tag, mechanisms are not by side-effect, so they'll
250 # only be used when explicitly requested
251 if test "x$enable_dependency_tracking" = xyes; then
252 continue
253 else
254 break
255 fi
256 ;;
257 msvisualcpp | msvcmsys)
258 # This compiler won't grok `-c -o', but also, the minuso test has
259 # not run yet. These depmodes are late enough in the game, and
260 # so weak that their functioning should not be impacted.
261 am__obj=conftest.${OBJEXT-o}
262 am__minus_obj=
263 ;;
264 none) break ;;
265 esac
266 if depmode=$depmode \
267 source=sub/conftest.c object=$am__obj \
268 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
269 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
270 >/dev/null 2>conftest.err &&
271 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
272 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
273 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
274 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
275 # icc doesn't choke on unknown options, it will just issue warnings
276 # or remarks (even with -Werror). So we grep stderr for any message
277 # that says an option was ignored or not supported.
278 # When given -MP, icc 7.0 and 7.1 complain thusly:
279 # icc: Command line warning: ignoring option '-M'; no argument required
280 # The diagnosis changed in icc 8.0:
281 # icc: Command line remark: option '-MP' not supported
282 if (grep 'ignoring option' conftest.err ||
283 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
284 am_cv_$1_dependencies_compiler_type=$depmode
285 break
286 fi
287 fi
288 done
289
290 cd ..
291 rm -rf conftest.dir
292 else
293 am_cv_$1_dependencies_compiler_type=none
294 fi
295 ])
296 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
297 AM_CONDITIONAL([am__fastdep$1], [
298 test "x$enable_dependency_tracking" != xno \
299 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
300 ])
301
302
303 # AM_SET_DEPDIR
304 # -------------
305 # Choose a directory name for dependency files.
306 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
307 AC_DEFUN([AM_SET_DEPDIR],
308 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
309 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
310 ])
311
312
313 # AM_DEP_TRACK
314 # ------------
315 AC_DEFUN([AM_DEP_TRACK],
316 [AC_ARG_ENABLE(dependency-tracking,
317 [ --disable-dependency-tracking speeds up one-time build
318 --enable-dependency-tracking do not reject slow dependency extractors])
319 if test "x$enable_dependency_tracking" != xno; then
320 am_depcomp="$ac_aux_dir/depcomp"
321 AMDEPBACKSLASH='\'
322 fi
323 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
324 AC_SUBST([AMDEPBACKSLASH])dnl
325 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
326 ])
327
328 # Generate code to set up dependency tracking. -*- Autoconf -*-
329
330 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
331 # Free Software Foundation, Inc.
332 #
333 # This file is free software; the Free Software Foundation
334 # gives unlimited permission to copy and/or distribute it,
335 # with or without modifications, as long as this notice is preserved.
336
337 #serial 5
338
339 # _AM_OUTPUT_DEPENDENCY_COMMANDS
340 # ------------------------------
341 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
342 [{
343 # Autoconf 2.62 quotes --file arguments for eval, but not when files
344 # are listed without --file. Let's play safe and only enable the eval
345 # if we detect the quoting.
346 case $CONFIG_FILES in
347 *\'*) eval set x "$CONFIG_FILES" ;;
348 *) set x $CONFIG_FILES ;;
349 esac
350 shift
351 for mf
352 do
353 # Strip MF so we end up with the name of the file.
354 mf=`echo "$mf" | sed -e 's/:.*$//'`
355 # Check whether this is an Automake generated Makefile or not.
356 # We used to match only the files named `Makefile.in', but
357 # some people rename them; so instead we look at the file content.
358 # Grep'ing the first line is not enough: some people post-process
359 # each Makefile.in and add a new line on top of each file to say so.
360 # Grep'ing the whole file is not good either: AIX grep has a line
361 # limit of 2048, but all sed's we know have understand at least 4000.
362 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
363 dirpart=`AS_DIRNAME("$mf")`
364 else
365 continue
366 fi
367 # Extract the definition of DEPDIR, am__include, and am__quote
368 # from the Makefile without running `make'.
369 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
370 test -z "$DEPDIR" && continue
371 am__include=`sed -n 's/^am__include = //p' < "$mf"`
372 test -z "am__include" && continue
373 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
374 # When using ansi2knr, U may be empty or an underscore; expand it
375 U=`sed -n 's/^U = //p' < "$mf"`
376 # Find all dependency output files, they are included files with
377 # $(DEPDIR) in their names. We invoke sed twice because it is the
378 # simplest approach to changing $(DEPDIR) to its actual value in the
379 # expansion.
380 for file in `sed -n "
381 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
382 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
383 # Make sure the directory exists.
384 test -f "$dirpart/$file" && continue
385 fdir=`AS_DIRNAME(["$file"])`
386 AS_MKDIR_P([$dirpart/$fdir])
387 # echo "creating $dirpart/$file"
388 echo '# dummy' > "$dirpart/$file"
389 done
390 done
391 }
392 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
393
394
395 # AM_OUTPUT_DEPENDENCY_COMMANDS
396 # -----------------------------
397 # This macro should only be invoked once -- use via AC_REQUIRE.
398 #
399 # This code is only required when automatic dependency tracking
400 # is enabled. FIXME. This creates each `.P' file that we will
401 # need in order to bootstrap the dependency handling code.
402 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
403 [AC_CONFIG_COMMANDS([depfiles],
404 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
405 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
406 ])
407
408 # Do all the work for Automake. -*- Autoconf -*-
409
410 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
411 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
412 #
413 # This file is free software; the Free Software Foundation
414 # gives unlimited permission to copy and/or distribute it,
415 # with or without modifications, as long as this notice is preserved.
416
417 # serial 16
418
419 # This macro actually does too much. Some checks are only needed if
420 # your package does certain things. But this isn't really a big deal.
421
422 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
423 # AM_INIT_AUTOMAKE([OPTIONS])
424 # -----------------------------------------------
425 # The call with PACKAGE and VERSION arguments is the old style
426 # call (pre autoconf-2.50), which is being phased out. PACKAGE
427 # and VERSION should now be passed to AC_INIT and removed from
428 # the call to AM_INIT_AUTOMAKE.
429 # We support both call styles for the transition. After
430 # the next Automake release, Autoconf can make the AC_INIT
431 # arguments mandatory, and then we can depend on a new Autoconf
432 # release and drop the old call support.
433 AC_DEFUN([AM_INIT_AUTOMAKE],
434 [AC_PREREQ([2.62])dnl
435 dnl Autoconf wants to disallow AM_ names. We explicitly allow
436 dnl the ones we care about.
437 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
438 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
439 AC_REQUIRE([AC_PROG_INSTALL])dnl
440 if test "`cd $srcdir && pwd`" != "`pwd`"; then
441 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
442 # is not polluted with repeated "-I."
443 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
444 # test to see if srcdir already configured
445 if test -f $srcdir/config.status; then
446 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
447 fi
448 fi
449
450 # test whether we have cygpath
451 if test -z "$CYGPATH_W"; then
452 if (cygpath --version) >/dev/null 2>/dev/null; then
453 CYGPATH_W='cygpath -w'
454 else
455 CYGPATH_W=echo
456 fi
457 fi
458 AC_SUBST([CYGPATH_W])
459
460 # Define the identity of the package.
461 dnl Distinguish between old-style and new-style calls.
462 m4_ifval([$2],
463 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
464 AC_SUBST([PACKAGE], [$1])dnl
465 AC_SUBST([VERSION], [$2])],
466 [_AM_SET_OPTIONS([$1])dnl
467 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
468 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
469 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
470 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
471 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
472
473 _AM_IF_OPTION([no-define],,
474 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
475 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
476
477 # Some tools Automake needs.
478 AC_REQUIRE([AM_SANITY_CHECK])dnl
479 AC_REQUIRE([AC_ARG_PROGRAM])dnl
480 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
481 AM_MISSING_PROG(AUTOCONF, autoconf)
482 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
483 AM_MISSING_PROG(AUTOHEADER, autoheader)
484 AM_MISSING_PROG(MAKEINFO, makeinfo)
485 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
486 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
487 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
488 # We need awk for the "check" target. The system "awk" is bad on
489 # some platforms.
490 AC_REQUIRE([AC_PROG_AWK])dnl
491 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
492 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
493 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
494 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
495 [_AM_PROG_TAR([v7])])])
496 _AM_IF_OPTION([no-dependencies],,
497 [AC_PROVIDE_IFELSE([AC_PROG_CC],
498 [_AM_DEPENDENCIES(CC)],
499 [define([AC_PROG_CC],
500 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
501 AC_PROVIDE_IFELSE([AC_PROG_CXX],
502 [_AM_DEPENDENCIES(CXX)],
503 [define([AC_PROG_CXX],
504 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
505 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
506 [_AM_DEPENDENCIES(OBJC)],
507 [define([AC_PROG_OBJC],
508 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
509 ])
510 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
511 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
512 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
513 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
514 AC_CONFIG_COMMANDS_PRE(dnl
515 [m4_provide_if([_AM_COMPILER_EXEEXT],
516 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
517 ])
518
519 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
520 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
521 dnl mangled by Autoconf and run in a shell conditional statement.
522 m4_define([_AC_COMPILER_EXEEXT],
523 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
524
525
526 # When config.status generates a header, we must update the stamp-h file.
527 # This file resides in the same directory as the config header
528 # that is generated. The stamp files are numbered to have different names.
529
530 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
531 # loop where config.status creates the headers, so we can generate
532 # our stamp files there.
533 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
534 [# Compute $1's index in $config_headers.
535 _am_arg=$1
536 _am_stamp_count=1
537 for _am_header in $config_headers :; do
538 case $_am_header in
539 $_am_arg | $_am_arg:* )
540 break ;;
541 * )
542 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
543 esac
544 done
545 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
546
547 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
548 #
549 # This file is free software; the Free Software Foundation
550 # gives unlimited permission to copy and/or distribute it,
551 # with or without modifications, as long as this notice is preserved.
552
553 # AM_PROG_INSTALL_SH
554 # ------------------
555 # Define $install_sh.
556 AC_DEFUN([AM_PROG_INSTALL_SH],
557 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
558 if test x"${install_sh}" != xset; then
559 case $am_aux_dir in
560 *\ * | *\ *)
561 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
562 *)
563 install_sh="\${SHELL} $am_aux_dir/install-sh"
564 esac
565 fi
566 AC_SUBST(install_sh)])
567
568 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
569 #
570 # This file is free software; the Free Software Foundation
571 # gives unlimited permission to copy and/or distribute it,
572 # with or without modifications, as long as this notice is preserved.
573
574 # serial 2
575
576 # Check whether the underlying file-system supports filenames
577 # with a leading dot. For instance MS-DOS doesn't.
578 AC_DEFUN([AM_SET_LEADING_DOT],
579 [rm -rf .tst 2>/dev/null
580 mkdir .tst 2>/dev/null
581 if test -d .tst; then
582 am__leading_dot=.
583 else
584 am__leading_dot=_
585 fi
586 rmdir .tst 2>/dev/null
587 AC_SUBST([am__leading_dot])])
588
589 # Check to see how 'make' treats includes. -*- Autoconf -*-
590
591 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
592 #
593 # This file is free software; the Free Software Foundation
594 # gives unlimited permission to copy and/or distribute it,
595 # with or without modifications, as long as this notice is preserved.
596
597 # serial 4
598
599 # AM_MAKE_INCLUDE()
600 # -----------------
601 # Check to see how make treats includes.
602 AC_DEFUN([AM_MAKE_INCLUDE],
603 [am_make=${MAKE-make}
604 cat > confinc << 'END'
605 am__doit:
606 @echo this is the am__doit target
607 .PHONY: am__doit
608 END
609 # If we don't find an include directive, just comment out the code.
610 AC_MSG_CHECKING([for style of include used by $am_make])
611 am__include="#"
612 am__quote=
613 _am_result=none
614 # First try GNU make style include.
615 echo "include confinc" > confmf
616 # Ignore all kinds of additional output from `make'.
617 case `$am_make -s -f confmf 2> /dev/null` in #(
618 *the\ am__doit\ target*)
619 am__include=include
620 am__quote=
621 _am_result=GNU
622 ;;
623 esac
624 # Now try BSD make style include.
625 if test "$am__include" = "#"; then
626 echo '.include "confinc"' > confmf
627 case `$am_make -s -f confmf 2> /dev/null` in #(
628 *the\ am__doit\ target*)
629 am__include=.include
630 am__quote="\""
631 _am_result=BSD
632 ;;
633 esac
634 fi
635 AC_SUBST([am__include])
636 AC_SUBST([am__quote])
637 AC_MSG_RESULT([$_am_result])
638 rm -f confinc confmf
639 ])
640
641 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
642
643 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
644 # Free Software Foundation, Inc.
645 #
646 # This file is free software; the Free Software Foundation
647 # gives unlimited permission to copy and/or distribute it,
648 # with or without modifications, as long as this notice is preserved.
649
650 # serial 6
651
652 # AM_MISSING_PROG(NAME, PROGRAM)
653 # ------------------------------
654 AC_DEFUN([AM_MISSING_PROG],
655 [AC_REQUIRE([AM_MISSING_HAS_RUN])
656 $1=${$1-"${am_missing_run}$2"}
657 AC_SUBST($1)])
658
659
660 # AM_MISSING_HAS_RUN
661 # ------------------
662 # Define MISSING if not defined so far and test if it supports --run.
663 # If it does, set am_missing_run to use it, otherwise, to nothing.
664 AC_DEFUN([AM_MISSING_HAS_RUN],
665 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
666 AC_REQUIRE_AUX_FILE([missing])dnl
667 if test x"${MISSING+set}" != xset; then
668 case $am_aux_dir in
669 *\ * | *\ *)
670 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
671 *)
672 MISSING="\${SHELL} $am_aux_dir/missing" ;;
673 esac
674 fi
675 # Use eval to expand $SHELL
676 if eval "$MISSING --run true"; then
677 am_missing_run="$MISSING --run "
678 else
679 am_missing_run=
680 AC_MSG_WARN([`missing' script is too old or missing])
681 fi
682 ])
683
684 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
685 #
686 # This file is free software; the Free Software Foundation
687 # gives unlimited permission to copy and/or distribute it,
688 # with or without modifications, as long as this notice is preserved.
689
690 # AM_PROG_MKDIR_P
691 # ---------------
692 # Check for `mkdir -p'.
693 AC_DEFUN([AM_PROG_MKDIR_P],
694 [AC_PREREQ([2.60])dnl
695 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
696 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
697 dnl while keeping a definition of mkdir_p for backward compatibility.
698 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
699 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
700 dnl Makefile.ins that do not define MKDIR_P, so we do our own
701 dnl adjustment using top_builddir (which is defined more often than
702 dnl MKDIR_P).
703 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
704 case $mkdir_p in
705 [[\\/$]]* | ?:[[\\/]]*) ;;
706 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
707 esac
708 ])
709
710 # Helper functions for option handling. -*- Autoconf -*-
711
712 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
713 #
714 # This file is free software; the Free Software Foundation
715 # gives unlimited permission to copy and/or distribute it,
716 # with or without modifications, as long as this notice is preserved.
717
718 # serial 4
719
720 # _AM_MANGLE_OPTION(NAME)
721 # -----------------------
722 AC_DEFUN([_AM_MANGLE_OPTION],
723 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
724
725 # _AM_SET_OPTION(NAME)
726 # ------------------------------
727 # Set option NAME. Presently that only means defining a flag for this option.
728 AC_DEFUN([_AM_SET_OPTION],
729 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
730
731 # _AM_SET_OPTIONS(OPTIONS)
732 # ----------------------------------
733 # OPTIONS is a space-separated list of Automake options.
734 AC_DEFUN([_AM_SET_OPTIONS],
735 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
736
737 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
738 # -------------------------------------------
739 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
740 AC_DEFUN([_AM_IF_OPTION],
741 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
742
743 # Check to make sure that the build environment is sane. -*- Autoconf -*-
744
745 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
746 # Free Software Foundation, Inc.
747 #
748 # This file is free software; the Free Software Foundation
749 # gives unlimited permission to copy and/or distribute it,
750 # with or without modifications, as long as this notice is preserved.
751
752 # serial 5
753
754 # AM_SANITY_CHECK
755 # ---------------
756 AC_DEFUN([AM_SANITY_CHECK],
757 [AC_MSG_CHECKING([whether build environment is sane])
758 # Just in case
759 sleep 1
760 echo timestamp > conftest.file
761 # Reject unsafe characters in $srcdir or the absolute working directory
762 # name. Accept space and tab only in the latter.
763 am_lf='
764 '
765 case `pwd` in
766 *[[\\\"\#\$\&\'\`$am_lf]]*)
767 AC_MSG_ERROR([unsafe absolute working directory name]);;
768 esac
769 case $srcdir in
770 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
771 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
772 esac
773
774 # Do `set' in a subshell so we don't clobber the current shell's
775 # arguments. Must try -L first in case configure is actually a
776 # symlink; some systems play weird games with the mod time of symlinks
777 # (eg FreeBSD returns the mod time of the symlink's containing
778 # directory).
779 if (
780 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
781 if test "$[*]" = "X"; then
782 # -L didn't work.
783 set X `ls -t "$srcdir/configure" conftest.file`
784 fi
785 rm -f conftest.file
786 if test "$[*]" != "X $srcdir/configure conftest.file" \
787 && test "$[*]" != "X conftest.file $srcdir/configure"; then
788
789 # If neither matched, then we have a broken ls. This can happen
790 # if, for instance, CONFIG_SHELL is bash and it inherits a
791 # broken ls alias from the environment. This has actually
792 # happened. Such a system could not be considered "sane".
793 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
794 alias in your environment])
795 fi
796
797 test "$[2]" = conftest.file
798 )
799 then
800 # Ok.
801 :
802 else
803 AC_MSG_ERROR([newly created file is older than distributed files!
804 Check your system clock])
805 fi
806 AC_MSG_RESULT(yes)])
807
808 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
809 #
810 # This file is free software; the Free Software Foundation
811 # gives unlimited permission to copy and/or distribute it,
812 # with or without modifications, as long as this notice is preserved.
813
814 # AM_PROG_INSTALL_STRIP
815 # ---------------------
816 # One issue with vendor `install' (even GNU) is that you can't
817 # specify the program used to strip binaries. This is especially
818 # annoying in cross-compiling environments, where the build's strip
819 # is unlikely to handle the host's binaries.
820 # Fortunately install-sh will honor a STRIPPROG variable, so we
821 # always use install-sh in `make install-strip', and initialize
822 # STRIPPROG with the value of the STRIP variable (set by the user).
823 AC_DEFUN([AM_PROG_INSTALL_STRIP],
824 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
825 # Installed binaries are usually stripped using `strip' when the user
826 # run `make install-strip'. However `strip' might not be the right
827 # tool to use in cross-compilation environments, therefore Automake
828 # will honor the `STRIP' environment variable to overrule this program.
829 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
830 if test "$cross_compiling" != no; then
831 AC_CHECK_TOOL([STRIP], [strip], :)
832 fi
833 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
834 AC_SUBST([INSTALL_STRIP_PROGRAM])])
835
836 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
837 #
838 # This file is free software; the Free Software Foundation
839 # gives unlimited permission to copy and/or distribute it,
840 # with or without modifications, as long as this notice is preserved.
841
842 # serial 2
843
844 # _AM_SUBST_NOTMAKE(VARIABLE)
845 # ---------------------------
846 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
847 # This macro is traced by Automake.
848 AC_DEFUN([_AM_SUBST_NOTMAKE])
849
850 # AM_SUBST_NOTMAKE(VARIABLE)
851 # ---------------------------
852 # Public sister of _AM_SUBST_NOTMAKE.
853 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
854
855 # Check how to create a tarball. -*- Autoconf -*-
856
857 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
858 #
859 # This file is free software; the Free Software Foundation
860 # gives unlimited permission to copy and/or distribute it,
861 # with or without modifications, as long as this notice is preserved.
862
863 # serial 2
864
865 # _AM_PROG_TAR(FORMAT)
866 # --------------------
867 # Check how to create a tarball in format FORMAT.
868 # FORMAT should be one of `v7', `ustar', or `pax'.
869 #
870 # Substitute a variable $(am__tar) that is a command
871 # writing to stdout a FORMAT-tarball containing the directory
872 # $tardir.
873 # tardir=directory && $(am__tar) > result.tar
874 #
875 # Substitute a variable $(am__untar) that extract such
876 # a tarball read from stdin.
877 # $(am__untar) < result.tar
878 AC_DEFUN([_AM_PROG_TAR],
879 [# Always define AMTAR for backward compatibility.
880 AM_MISSING_PROG([AMTAR], [tar])
881 m4_if([$1], [v7],
882 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
883 [m4_case([$1], [ustar],, [pax],,
884 [m4_fatal([Unknown tar format])])
885 AC_MSG_CHECKING([how to create a $1 tar archive])
886 # Loop over all known methods to create a tar archive until one works.
887 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
888 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
889 # Do not fold the above two line into one, because Tru64 sh and
890 # Solaris sh will not grok spaces in the rhs of `-'.
891 for _am_tool in $_am_tools
892 do
893 case $_am_tool in
894 gnutar)
895 for _am_tar in tar gnutar gtar;
896 do
897 AM_RUN_LOG([$_am_tar --version]) && break
898 done
899 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
900 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
901 am__untar="$_am_tar -xf -"
902 ;;
903 plaintar)
904 # Must skip GNU tar: if it does not support --format= it doesn't create
905 # ustar tarball either.
906 (tar --version) >/dev/null 2>&1 && continue
907 am__tar='tar chf - "$$tardir"'
908 am__tar_='tar chf - "$tardir"'
909 am__untar='tar xf -'
910 ;;
911 pax)
912 am__tar='pax -L -x $1 -w "$$tardir"'
913 am__tar_='pax -L -x $1 -w "$tardir"'
914 am__untar='pax -r'
915 ;;
916 cpio)
917 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
918 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
919 am__untar='cpio -i -H $1 -d'
920 ;;
921 none)
922 am__tar=false
923 am__tar_=false
924 am__untar=false
925 ;;
926 esac
927
928 # If the value was cached, stop now. We just wanted to have am__tar
929 # and am__untar set.
930 test -n "${am_cv_prog_tar_$1}" && break
931
932 # tar/untar a dummy directory, and stop if the command works
933 rm -rf conftest.dir
934 mkdir conftest.dir
935 echo GrepMe > conftest.dir/file
936 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
937 rm -rf conftest.dir
938 if test -s conftest.tar; then
939 AM_RUN_LOG([$am__untar <conftest.tar])
940 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
941 fi
942 done
943 rm -rf conftest.dir
944
945 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
946 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
947 AC_SUBST([am__tar])
948 AC_SUBST([am__untar])
949 ]) # _AM_PROG_TAR
950
951 m4_include([config/kerberos_v4.m4])
952 m4_include([config/sasldb.m4])
953 m4_include([../cmulocal/berkdb.m4])
954 m4_include([../cmulocal/bsd_sockets.m4])
955 m4_include([../cmulocal/c-attribute.m4])
956 m4_include([../cmulocal/common.m4])
957 m4_include([../cmulocal/cyrus.m4])
958 m4_include([../cmulocal/init_automake.m4])
959 m4_include([../cmulocal/ipv6.m4])
960 m4_include([../cmulocal/openssl.m4])
961 m4_include([../cmulocal/sasl2.m4])
4141 #include <pwd.h>
4242 #include <errno.h>
4343 #include <syslog.h>
44 #include <stdio.h>
4445
4546 #ifdef HAVE_CRYPT_H
4647 #include <crypt.h>
7677 {
7778 /* VARIABLES */
7879 struct passwd *pw; /* pointer to passwd file entry */
80 char *crpt_passwd; /* encrypted password */
7981 int errnum;
8082 /* END VARIABLES */
8183
104106 }
105107 }
106108
107 if (strcmp(pw->pw_passwd, (const char *)crypt(password, pw->pw_passwd))) {
109 crpt_passwd = crypt(password, pw->pw_passwd);
110 if (!crpt_passwd || strcmp(pw->pw_passwd, (const char *)crpt_passwd)) {
108111 if (flags & VERBOSE) {
109112 syslog(LOG_DEBUG, "DEBUG: auth_getpwent: %s: invalid password", login);
110113 }
5656 #ident "$Id: auth_httpform.c,v 1.2 2006/04/19 19:51:04 murch Exp $"
5757 #endif
5858
59 #include <config.h>
60
5961 /* PUBLIC DEPENDENCIES */
6062 #include <unistd.h>
6163 #include <stdlib.h>
7274 #include <arpa/inet.h>
7375 #include <signal.h>
7476 #include <netdb.h>
77 #include <stdio.h>
7578
7679 #include "mechanisms.h"
7780 #include "utils.h"
167170 size_t length = strlen(string);
168171 size_t alloc = length+50; /* add some reserve */
169172 char *out;
170 int outidx=0, inidx=0;
173 size_t outidx=0, inidx=0;
171174 /* END VARIABLES */
172175
173176 out = malloc(alloc);
233236 {
234237 /* VARIABLES */
235238 const char *ptr, *line_ptr;
236 char *buf, *buf_ptr;
239 char *esc_user = NULL, *esc_password = NULL, *esc_realm = NULL;
240 char *buf = NULL, *buf_ptr;
237241 int filtersize;
238242 int ulen, plen, rlen;
239243 int numpercents=0;
241245 size_t i;
242246 /* END VARIABLES */
243247
244 user = url_escape(user);
245 if (!user) {
248 user = esc_user = url_escape(user);
249 password = esc_password = url_escape(password);
250 realm = esc_realm = url_escape(realm);
251 if (!user || !password || !realm) {
246252 logger(LOG_ERR, "auth_httpform:create_post_data", "failed to allocate memory");
247 return NULL;
248 }
249
250 password = url_escape(password);
251 if (!password) {
252 memset(user, 0, strlen(user));
253 free(user);
254 logger(LOG_ERR, "auth_httpform:create_post_data", "failed to allocate memory");
255 return NULL;
256 }
257
258 realm = url_escape(realm);
259 if (!realm) {
260 memset(user, 0, strlen(user));
261 free(user);
262 memset(password, 0, strlen(password));
263 free(password);
264 logger(LOG_ERR, "auth_httpform:create_post_data", "failed to allocate memory");
265 return NULL;
253 goto CLEANUP;
266254 }
267255
268256 /* calculate memory needed for creating the complete query string. */
331319 memcpy(buf_ptr, line_ptr, strlen(line_ptr)+1);
332320
333321 CLEANUP:
334 memset(user, 0, strlen(user));
335 memset(password, 0, strlen(password));
336 memset(realm, 0, strlen(realm));
337 free(user);
338 free(password);
339 free(realm);
322 if (esc_user) {
323 memset(esc_user, 0, strlen(esc_user));
324 free(esc_user);
325 }
326 if (esc_password) {
327 memset(esc_password, 0, strlen(esc_password));
328 free(esc_password);
329 }
330 if (esc_realm) {
331 memset(esc_realm, 0, strlen(realm));
332 free(esc_realm);
333 }
340334
341335 return buf;
342336 }
492486 /* PARAMETERS */
493487 const char *user, /* I: plaintext authenticator */
494488 const char *password, /* I: plaintext password */
495 const char *service,
496 const char *realm
489 const char *service __attribute__((unused)),
490 const char *realm /* I: user's realm */
497491 /* END PARAMETERS */
498492 )
499493 {
501495 int s=-1; /* socket to remote auth host */
502496 struct addrinfo *r; /* remote socket address info */
503497 char *req; /* request, with user and pw */
504 char *c; /* scratch pointer */
505498 int rc; /* return code scratch area */
506499 char postbuf[RESP_LEN]; /* request buffer */
507500 int postlen; /* length of post request */
573566 "Content-Type: application/x-www-form-urlencoded" CRLF
574567 "Content-Length: %d" TWO_CRLF
575568 "%s",
576 r_uri, r_host, r_port, strlen(req), req);
569 r_uri, r_host, r_port, (int)strlen(req), req);
577570
578571 if (flags & VERBOSE) {
579572 syslog(LOG_DEBUG, "auth_httpform: sending %s %s %s",
7878 )
7979 {
8080 #ifdef AUTH_KRB5
81 int rc;
8281 char *configname = 0;
8382
8483 if (krbtf_init() == -1) {
101100 }
102101
103102 if (config) {
104 keytabname = cfile_getstring(config, "krb5_keytab", keytabname);
105 verify_principal = cfile_getstring(config, "krb5_verify_principal", verify_principal);
103 keytabname = (char *) cfile_getstring(config, "krb5_keytab", keytabname);
104 verify_principal = (char *) cfile_getstring(config, "krb5_verify_principal", verify_principal);
106105 }
107106
108107 return 0;
126125 const char *forced_instance = 0;
127126 int plen;
128127
128 plen = strlcpy(pname, user, pnamelen);
129 user = pname;
130
131 if (config && cfile_getswitch(config, "krb5_conv_krb4_instance", 0)) {
132 char *krb4_instance;
133
134 if ((krb4_instance = strchr(pname, '.'))) *krb4_instance = '/';
135 }
136
129137 if (config) {
130138 char keyname[1024];
131139
136144 if (forced_instance) {
137145 char *user_specified;
138146
139 if (user_specified = strchr(user, '/')) {
147 if ((user_specified = strchr(user, '/'))) {
140148 if (strcmp(user_specified + 1, forced_instance)) {
141149 /* user not allowed to override sysadmin */
142150 return -1;
148156 }
149157
150158 /* form user[/instance][@realm] */
151 plen = snprintf(pname, pnamelen, "%s%s%s%s%s",
152 user,
159 plen += snprintf(pname+plen, pnamelen-plen, "%s%s%s%s",
153160 (forced_instance ? "/" : ""),
154161 (forced_instance ? forced_instance : ""),
155162 ((realm && realm[0]) ? "@" : ""),
416423 krb5_get_init_creds_opt_init(&opts);
417424 /* 15 min should be more than enough */
418425 krb5_get_init_creds_opt_set_tkt_life(&opts, 900);
419 if (code = krb5_get_init_creds_password(context, &creds,
420 auth_user, password, NULL, NULL,
421 0, NULL, &opts)) {
426 if ((code = krb5_get_init_creds_password(context, &creds,
427 auth_user, password, NULL, NULL,
428 0, NULL, &opts))) {
422429 krb5_cc_destroy(context, ccache);
423430 krb5_free_principal(context, auth_user);
424431 krb5_free_context(context);
9595 /* END PARAMETERS */
9696 )
9797 {
98 /* VARIABLES */
99 struct addrinfo hints;
100 int err;
101 char *c; /* scratch pointer */
102 /* END VARIABLES */
103
10498 if (mech_option != NULL) {
10599 SASLAUTHD_CONF_FILE = mech_option;
106100 }
7474 #include <arpa/inet.h>
7575 #include <signal.h>
7676 #include <netdb.h>
77 #if TIME_WITH_SYS_TIME
78 # include <sys/time.h>
79 # include <time.h>
80 #else
81 # if HAVE_SYS_TIME_H
82 # include <sys/time.h>
83 # else
84 # include <time.h>
85 # endif
86 #endif
7787
7888 #include "auth_rimap.h"
7989 #include "utils.h"
382392 while( select (fds, &perm, NULL, NULL, &timeout ) >0 ) {
383393 if ( FD_ISSET(s, &perm) ) {
384394 ret = read(s, rbuf+rc, sizeof(rbuf)-rc);
385 if ( ret<0 ) {
395 if ( ret<=0 ) {
386396 rc = ret;
387397 break;
388398 } else {
495505 while( select (fds, &perm, NULL, NULL, &timeout ) >0 ) {
496506 if ( FD_ISSET(s, &perm) ) {
497507 ret = read(s, rbuf+rc, sizeof(rbuf)-rc);
498 if ( ret<0 ) {
508 if ( ret<=0 ) {
499509 rc = ret;
500510 break;
501511 } else {
3030 #ident "$Id: auth_shadow.c,v 1.12 2009/08/14 14:58:38 mel Exp $"
3131 #endif
3232
33 #include <config.h>
34
3335 /* PUBLIC DEPENDENCIES */
3436 #include "mechanisms.h"
37 #include <stdio.h>
3538
3639 #ifdef AUTH_SHADOW
3740
6871 # else /* ! HAVE_GETUSERPW */
6972 # include <shadow.h>
7073 # endif /* ! HAVE_GETUSERPW */
74
75 # ifdef HAVE_CRYPT_H
76 # include <crypt.h>
77 # endif
7178
7279 # include "auth_shadow.h"
7380 # include "globals.h"
209216 RETURN("NO Insufficient permission to access NIS authentication database (saslauthd)");
210217 }
211218
212 cpw = strdup((const char *)crypt(password, sp->sp_pwdp));
213 if (strcmp(sp->sp_pwdp, cpw)) {
219 cpw = crypt(password, sp->sp_pwdp);
220 if (!cpw || strcmp(sp->sp_pwdp, (const char *)cpw)) {
214221 if (flags & VERBOSE) {
215222 /*
216223 * This _should_ reveal the SHADOW_PW_LOCKED prefix to an
220227 syslog(LOG_DEBUG, "DEBUG: auth_shadow: pw mismatch: '%s' != '%s'",
221228 sp->sp_pwdp, cpw);
222229 }
223 free(cpw);
224230 RETURN("NO Incorrect password");
225231 }
226 free(cpw);
227232
228233 /*
229234 * The following fields will be set to -1 if:
234239
235240 if ((sp->sp_expire != -1) && (today > sp->sp_expire)) {
236241 if (flags & VERBOSE) {
237 syslog(LOG_DEBUG, "DEBUG: auth_shadow: account expired: %dl > %dl",
242 syslog(LOG_DEBUG, "DEBUG: auth_shadow: account expired: %ld > %ld",
238243 today, sp->sp_expire);
239244 }
240245 RETURN("NO Account expired");
285290 RETURN("NO Invalid username");
286291 }
287292
288 if (strcmp(upw->upw_passwd, crypt(password, upw->upw_passwd)) != 0) {
293 if (!(cpw = crypt(password, upw->upw_passwd)) || (strcmp(upw->upw_passwd, (const char *)cpw) != 0)) {
289294 if (flags & VERBOSE) {
290295 syslog(LOG_DEBUG, "auth_shadow: pw mismatch: %s != %s",
291296 password, upw->upw_passwd);
3636 /****************************************
3737 * includes
3838 *****************************************/
39 #include "saslauthd.h"
39 #include <config.h>
4040
4141 #include <sys/stat.h>
4242 #include <sys/types.h>
4040
4141
4242 /* constant includes */
43 #include "saslauthd.h"
43 #include <config.h>
4444
4545
4646 /****************************************************************
7575 int alloced = 0;
7676 char buf[BIG_ENOUGH];
7777 char *p, *key;
78 int result;
7978 struct cfile *cf;
8079
8180 if (complaint)
+0
-1516
saslauthd/config/config.guess less more
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
4 # 2011 Free Software Foundation, Inc.
5
6 timestamp='2011-08-20'
7
8 # This file is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
21 # 02110-1301, USA.
22 #
23 # As a special exception to the GNU General Public License, if you
24 # distribute this file as part of a program that contains a
25 # configuration script generated by Autoconf, you may include it under
26 # the same distribution terms that you use for the rest of that program.
27
28
29 # Originally written by Per Bothner. Please send patches (context
30 # diff format) to <config-patches@gnu.org> and include a ChangeLog
31 # entry.
32 #
33 # This script attempts to guess a canonical system name similar to
34 # config.sub. If it succeeds, it prints the system name on stdout, and
35 # exits with 0. Otherwise, it exits with 1.
36 #
37 # You can get the latest version of this script from:
38 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
39
40 me=`echo "$0" | sed -e 's,.*/,,'`
41
42 usage="\
43 Usage: $0 [OPTION]
44
45 Output the configuration name of the system \`$me' is run on.
46
47 Operation modes:
48 -h, --help print this help, then exit
49 -t, --time-stamp print date of last modification, then exit
50 -v, --version print version number, then exit
51
52 Report bugs and patches to <config-patches@gnu.org>."
53
54 version="\
55 GNU config.guess ($timestamp)
56
57 Originally written by Per Bothner.
58 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
59 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
60 Software Foundation, Inc.
61
62 This is free software; see the source for copying conditions. There is NO
63 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
64
65 help="
66 Try \`$me --help' for more information."
67
68 # Parse command line
69 while test $# -gt 0 ; do
70 case $1 in
71 --time-stamp | --time* | -t )
72 echo "$timestamp" ; exit ;;
73 --version | -v )
74 echo "$version" ; exit ;;
75 --help | --h* | -h )
76 echo "$usage"; exit ;;
77 -- ) # Stop option processing
78 shift; break ;;
79 - ) # Use stdin as input.
80 break ;;
81 -* )
82 echo "$me: invalid option $1$help" >&2
83 exit 1 ;;
84 * )
85 break ;;
86 esac
87 done
88
89 if test $# != 0; then
90 echo "$me: too many arguments$help" >&2
91 exit 1
92 fi
93
94 trap 'exit 1' 1 2 15
95
96 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
97 # compiler to aid in system detection is discouraged as it requires
98 # temporary files to be created and, as you can see below, it is a
99 # headache to deal with in a portable fashion.
100
101 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
102 # use `HOST_CC' if defined, but it is deprecated.
103
104 # Portable tmp directory creation inspired by the Autoconf team.
105
106 set_cc_for_build='
107 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
108 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
109 : ${TMPDIR=/tmp} ;
110 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
111 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
112 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
113 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
114 dummy=$tmp/dummy ;
115 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
116 case $CC_FOR_BUILD,$HOST_CC,$CC in
117 ,,) echo "int x;" > $dummy.c ;
118 for c in cc gcc c89 c99 ; do
119 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
120 CC_FOR_BUILD="$c"; break ;
121 fi ;
122 done ;
123 if test x"$CC_FOR_BUILD" = x ; then
124 CC_FOR_BUILD=no_compiler_found ;
125 fi
126 ;;
127 ,,*) CC_FOR_BUILD=$CC ;;
128 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
129 esac ; set_cc_for_build= ;'
130
131 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
132 # (ghazi@noc.rutgers.edu 1994-08-24)
133 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
134 PATH=$PATH:/.attbin ; export PATH
135 fi
136
137 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
138 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
139 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
140 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
141
142 # Note: order is significant - the case branches are not exclusive.
143
144 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
145 *:NetBSD:*:*)
146 # NetBSD (nbsd) targets should (where applicable) match one or
147 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
148 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
149 # switched to ELF, *-*-netbsd* would select the old
150 # object file format. This provides both forward
151 # compatibility and a consistent mechanism for selecting the
152 # object file format.
153 #
154 # Note: NetBSD doesn't particularly care about the vendor
155 # portion of the name. We always set it to "unknown".
156 sysctl="sysctl -n hw.machine_arch"
157 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
158 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
159 case "${UNAME_MACHINE_ARCH}" in
160 armeb) machine=armeb-unknown ;;
161 arm*) machine=arm-unknown ;;
162 sh3el) machine=shl-unknown ;;
163 sh3eb) machine=sh-unknown ;;
164 sh5el) machine=sh5le-unknown ;;
165 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
166 esac
167 # The Operating System including object format, if it has switched
168 # to ELF recently, or will in the future.
169 case "${UNAME_MACHINE_ARCH}" in
170 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
171 eval $set_cc_for_build
172 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
173 | grep -q __ELF__
174 then
175 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
176 # Return netbsd for either. FIX?
177 os=netbsd
178 else
179 os=netbsdelf
180 fi
181 ;;
182 *)
183 os=netbsd
184 ;;
185 esac
186 # The OS release
187 # Debian GNU/NetBSD machines have a different userland, and
188 # thus, need a distinct triplet. However, they do not need
189 # kernel version information, so it can be replaced with a
190 # suitable tag, in the style of linux-gnu.
191 case "${UNAME_VERSION}" in
192 Debian*)
193 release='-gnu'
194 ;;
195 *)
196 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
197 ;;
198 esac
199 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
200 # contains redundant information, the shorter form:
201 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
202 echo "${machine}-${os}${release}"
203 exit ;;
204 *:OpenBSD:*:*)
205 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
206 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
207 exit ;;
208 *:ekkoBSD:*:*)
209 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
210 exit ;;
211 *:SolidBSD:*:*)
212 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
213 exit ;;
214 macppc:MirBSD:*:*)
215 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
216 exit ;;
217 *:MirBSD:*:*)
218 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
219 exit ;;
220 alpha:OSF1:*:*)
221 case $UNAME_RELEASE in
222 *4.0)
223 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
224 ;;
225 *5.*)
226 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
227 ;;
228 esac
229 # According to Compaq, /usr/sbin/psrinfo has been available on
230 # OSF/1 and Tru64 systems produced since 1995. I hope that
231 # covers most systems running today. This code pipes the CPU
232 # types through head -n 1, so we only detect the type of CPU 0.
233 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
234 case "$ALPHA_CPU_TYPE" in
235 "EV4 (21064)")
236 UNAME_MACHINE="alpha" ;;
237 "EV4.5 (21064)")
238 UNAME_MACHINE="alpha" ;;
239 "LCA4 (21066/21068)")
240 UNAME_MACHINE="alpha" ;;
241 "EV5 (21164)")
242 UNAME_MACHINE="alphaev5" ;;
243 "EV5.6 (21164A)")
244 UNAME_MACHINE="alphaev56" ;;
245 "EV5.6 (21164PC)")
246 UNAME_MACHINE="alphapca56" ;;
247 "EV5.7 (21164PC)")
248 UNAME_MACHINE="alphapca57" ;;
249 "EV6 (21264)")
250 UNAME_MACHINE="alphaev6" ;;
251 "EV6.7 (21264A)")
252 UNAME_MACHINE="alphaev67" ;;
253 "EV6.8CB (21264C)")
254 UNAME_MACHINE="alphaev68" ;;
255 "EV6.8AL (21264B)")
256 UNAME_MACHINE="alphaev68" ;;
257 "EV6.8CX (21264D)")
258 UNAME_MACHINE="alphaev68" ;;
259 "EV6.9A (21264/EV69A)")
260 UNAME_MACHINE="alphaev69" ;;
261 "EV7 (21364)")
262 UNAME_MACHINE="alphaev7" ;;
263 "EV7.9 (21364A)")
264 UNAME_MACHINE="alphaev79" ;;
265 esac
266 # A Pn.n version is a patched version.
267 # A Vn.n version is a released version.
268 # A Tn.n version is a released field test version.
269 # A Xn.n version is an unreleased experimental baselevel.
270 # 1.2 uses "1.2" for uname -r.
271 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
272 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
273 exitcode=$?
274 trap '' 0
275 exit $exitcode ;;
276 Alpha\ *:Windows_NT*:*)
277 # How do we know it's Interix rather than the generic POSIX subsystem?
278 # Should we change UNAME_MACHINE based on the output of uname instead
279 # of the specific Alpha model?
280 echo alpha-pc-interix
281 exit ;;
282 21064:Windows_NT:50:3)
283 echo alpha-dec-winnt3.5
284 exit ;;
285 Amiga*:UNIX_System_V:4.0:*)
286 echo m68k-unknown-sysv4
287 exit ;;
288 *:[Aa]miga[Oo][Ss]:*:*)
289 echo ${UNAME_MACHINE}-unknown-amigaos
290 exit ;;
291 *:[Mm]orph[Oo][Ss]:*:*)
292 echo ${UNAME_MACHINE}-unknown-morphos
293 exit ;;
294 *:OS/390:*:*)
295 echo i370-ibm-openedition
296 exit ;;
297 *:z/VM:*:*)
298 echo s390-ibm-zvmoe
299 exit ;;
300 *:OS400:*:*)
301 echo powerpc-ibm-os400
302 exit ;;
303 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
304 echo arm-acorn-riscix${UNAME_RELEASE}
305 exit ;;
306 arm:riscos:*:*|arm:RISCOS:*:*)
307 echo arm-unknown-riscos
308 exit ;;
309 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
310 echo hppa1.1-hitachi-hiuxmpp
311 exit ;;
312 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
313 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
314 if test "`(/bin/universe) 2>/dev/null`" = att ; then
315 echo pyramid-pyramid-sysv3
316 else
317 echo pyramid-pyramid-bsd
318 fi
319 exit ;;
320 NILE*:*:*:dcosx)
321 echo pyramid-pyramid-svr4
322 exit ;;
323 DRS?6000:unix:4.0:6*)
324 echo sparc-icl-nx6
325 exit ;;
326 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
327 case `/usr/bin/uname -p` in
328 sparc) echo sparc-icl-nx7; exit ;;
329 esac ;;
330 s390x:SunOS:*:*)
331 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
332 exit ;;
333 sun4H:SunOS:5.*:*)
334 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335 exit ;;
336 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
337 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
338 exit ;;
339 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
340 echo i386-pc-auroraux${UNAME_RELEASE}
341 exit ;;
342 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
343 eval $set_cc_for_build
344 SUN_ARCH="i386"
345 # If there is a compiler, see if it is configured for 64-bit objects.
346 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
347 # This test works for both compilers.
348 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
349 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
350 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
351 grep IS_64BIT_ARCH >/dev/null
352 then
353 SUN_ARCH="x86_64"
354 fi
355 fi
356 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
357 exit ;;
358 sun4*:SunOS:6*:*)
359 # According to config.sub, this is the proper way to canonicalize
360 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
361 # it's likely to be more like Solaris than SunOS4.
362 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
363 exit ;;
364 sun4*:SunOS:*:*)
365 case "`/usr/bin/arch -k`" in
366 Series*|S4*)
367 UNAME_RELEASE=`uname -v`
368 ;;
369 esac
370 # Japanese Language versions have a version number like `4.1.3-JL'.
371 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
372 exit ;;
373 sun3*:SunOS:*:*)
374 echo m68k-sun-sunos${UNAME_RELEASE}
375 exit ;;
376 sun*:*:4.2BSD:*)
377 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
378 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
379 case "`/bin/arch`" in
380 sun3)
381 echo m68k-sun-sunos${UNAME_RELEASE}
382 ;;
383 sun4)
384 echo sparc-sun-sunos${UNAME_RELEASE}
385 ;;
386 esac
387 exit ;;
388 aushp:SunOS:*:*)
389 echo sparc-auspex-sunos${UNAME_RELEASE}
390 exit ;;
391 # The situation for MiNT is a little confusing. The machine name
392 # can be virtually everything (everything which is not
393 # "atarist" or "atariste" at least should have a processor
394 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
395 # to the lowercase version "mint" (or "freemint"). Finally
396 # the system name "TOS" denotes a system which is actually not
397 # MiNT. But MiNT is downward compatible to TOS, so this should
398 # be no problem.
399 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
400 echo m68k-atari-mint${UNAME_RELEASE}
401 exit ;;
402 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
403 echo m68k-atari-mint${UNAME_RELEASE}
404 exit ;;
405 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
406 echo m68k-atari-mint${UNAME_RELEASE}
407 exit ;;
408 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
409 echo m68k-milan-mint${UNAME_RELEASE}
410 exit ;;
411 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
412 echo m68k-hades-mint${UNAME_RELEASE}
413 exit ;;
414 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
415 echo m68k-unknown-mint${UNAME_RELEASE}
416 exit ;;
417 m68k:machten:*:*)
418 echo m68k-apple-machten${UNAME_RELEASE}
419 exit ;;
420 powerpc:machten:*:*)
421 echo powerpc-apple-machten${UNAME_RELEASE}
422 exit ;;
423 RISC*:Mach:*:*)
424 echo mips-dec-mach_bsd4.3
425 exit ;;
426 RISC*:ULTRIX:*:*)
427 echo mips-dec-ultrix${UNAME_RELEASE}
428 exit ;;
429 VAX*:ULTRIX*:*:*)
430 echo vax-dec-ultrix${UNAME_RELEASE}
431 exit ;;
432 2020:CLIX:*:* | 2430:CLIX:*:*)
433 echo clipper-intergraph-clix${UNAME_RELEASE}
434 exit ;;
435 mips:*:*:UMIPS | mips:*:*:RISCos)
436 eval $set_cc_for_build
437 sed 's/^ //' << EOF >$dummy.c
438 #ifdef __cplusplus
439 #include <stdio.h> /* for printf() prototype */
440 int main (int argc, char *argv[]) {
441 #else
442 int main (argc, argv) int argc; char *argv[]; {
443 #endif
444 #if defined (host_mips) && defined (MIPSEB)
445 #if defined (SYSTYPE_SYSV)
446 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
447 #endif
448 #if defined (SYSTYPE_SVR4)
449 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
450 #endif
451 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
452 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
453 #endif
454 #endif
455 exit (-1);
456 }
457 EOF
458 $CC_FOR_BUILD -o $dummy $dummy.c &&
459 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
460 SYSTEM_NAME=`$dummy $dummyarg` &&
461 { echo "$SYSTEM_NAME"; exit; }
462 echo mips-mips-riscos${UNAME_RELEASE}
463 exit ;;
464 Motorola:PowerMAX_OS:*:*)
465 echo powerpc-motorola-powermax
466 exit ;;
467 Motorola:*:4.3:PL8-*)
468 echo powerpc-harris-powermax
469 exit ;;
470 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
471 echo powerpc-harris-powermax
472 exit ;;
473 Night_Hawk:Power_UNIX:*:*)
474 echo powerpc-harris-powerunix
475 exit ;;
476 m88k:CX/UX:7*:*)
477 echo m88k-harris-cxux7
478 exit ;;
479 m88k:*:4*:R4*)
480 echo m88k-motorola-sysv4
481 exit ;;
482 m88k:*:3*:R3*)
483 echo m88k-motorola-sysv3
484 exit ;;
485 AViiON:dgux:*:*)
486 # DG/UX returns AViiON for all architectures
487 UNAME_PROCESSOR=`/usr/bin/uname -p`
488 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
489 then
490 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
491 [ ${TARGET_BINARY_INTERFACE}x = x ]
492 then
493 echo m88k-dg-dgux${UNAME_RELEASE}
494 else
495 echo m88k-dg-dguxbcs${UNAME_RELEASE}
496 fi
497 else
498 echo i586-dg-dgux${UNAME_RELEASE}
499 fi
500 exit ;;
501 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
502 echo m88k-dolphin-sysv3
503 exit ;;
504 M88*:*:R3*:*)
505 # Delta 88k system running SVR3
506 echo m88k-motorola-sysv3
507 exit ;;
508 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
509 echo m88k-tektronix-sysv3
510 exit ;;
511 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
512 echo m68k-tektronix-bsd
513 exit ;;
514 *:IRIX*:*:*)
515 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
516 exit ;;
517 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
518 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
519 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
520 i*86:AIX:*:*)
521 echo i386-ibm-aix
522 exit ;;
523 ia64:AIX:*:*)
524 if [ -x /usr/bin/oslevel ] ; then
525 IBM_REV=`/usr/bin/oslevel`
526 else
527 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
528 fi
529 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
530 exit ;;
531 *:AIX:2:3)
532 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
533 eval $set_cc_for_build
534 sed 's/^ //' << EOF >$dummy.c
535 #include <sys/systemcfg.h>
536
537 main()
538 {
539 if (!__power_pc())
540 exit(1);
541 puts("powerpc-ibm-aix3.2.5");
542 exit(0);
543 }
544 EOF
545 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
546 then
547 echo "$SYSTEM_NAME"
548 else
549 echo rs6000-ibm-aix3.2.5
550 fi
551 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
552 echo rs6000-ibm-aix3.2.4
553 else
554 echo rs6000-ibm-aix3.2
555 fi
556 exit ;;
557 *:AIX:*:[4567])
558 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
559 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
560 IBM_ARCH=rs6000
561 else
562 IBM_ARCH=powerpc
563 fi
564 if [ -x /usr/bin/oslevel ] ; then
565 IBM_REV=`/usr/bin/oslevel`
566 else
567 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
568 fi
569 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
570 exit ;;
571 *:AIX:*:*)
572 echo rs6000-ibm-aix
573 exit ;;
574 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
575 echo romp-ibm-bsd4.4
576 exit ;;
577 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
578 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
579 exit ;; # report: romp-ibm BSD 4.3
580 *:BOSX:*:*)
581 echo rs6000-bull-bosx
582 exit ;;
583 DPX/2?00:B.O.S.:*:*)
584 echo m68k-bull-sysv3
585 exit ;;
586 9000/[34]??:4.3bsd:1.*:*)
587 echo m68k-hp-bsd
588 exit ;;
589 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
590 echo m68k-hp-bsd4.4
591 exit ;;
592 9000/[34678]??:HP-UX:*:*)
593 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
594 case "${UNAME_MACHINE}" in
595 9000/31? ) HP_ARCH=m68000 ;;
596 9000/[34]?? ) HP_ARCH=m68k ;;
597 9000/[678][0-9][0-9])
598 if [ -x /usr/bin/getconf ]; then
599 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
600 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
601 case "${sc_cpu_version}" in
602 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
603 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
604 532) # CPU_PA_RISC2_0
605 case "${sc_kernel_bits}" in
606 32) HP_ARCH="hppa2.0n" ;;
607 64) HP_ARCH="hppa2.0w" ;;
608 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
609 esac ;;
610 esac
611 fi
612 if [ "${HP_ARCH}" = "" ]; then
613 eval $set_cc_for_build
614 sed 's/^ //' << EOF >$dummy.c
615
616 #define _HPUX_SOURCE
617 #include <stdlib.h>
618 #include <unistd.h>
619
620 int main ()
621 {
622 #if defined(_SC_KERNEL_BITS)
623 long bits = sysconf(_SC_KERNEL_BITS);
624 #endif
625 long cpu = sysconf (_SC_CPU_VERSION);
626
627 switch (cpu)
628 {
629 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
630 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
631 case CPU_PA_RISC2_0:
632 #if defined(_SC_KERNEL_BITS)
633 switch (bits)
634 {
635 case 64: puts ("hppa2.0w"); break;
636 case 32: puts ("hppa2.0n"); break;
637 default: puts ("hppa2.0"); break;
638 } break;
639 #else /* !defined(_SC_KERNEL_BITS) */
640 puts ("hppa2.0"); break;
641 #endif
642 default: puts ("hppa1.0"); break;
643 }
644 exit (0);
645 }
646 EOF
647 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
648 test -z "$HP_ARCH" && HP_ARCH=hppa
649 fi ;;
650 esac
651 if [ ${HP_ARCH} = "hppa2.0w" ]
652 then
653 eval $set_cc_for_build
654
655 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
656 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
657 # generating 64-bit code. GNU and HP use different nomenclature:
658 #
659 # $ CC_FOR_BUILD=cc ./config.guess
660 # => hppa2.0w-hp-hpux11.23
661 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
662 # => hppa64-hp-hpux11.23
663
664 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
665 grep -q __LP64__
666 then
667 HP_ARCH="hppa2.0w"
668 else
669 HP_ARCH="hppa64"
670 fi
671 fi
672 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
673 exit ;;
674 ia64:HP-UX:*:*)
675 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
676 echo ia64-hp-hpux${HPUX_REV}
677 exit ;;
678 3050*:HI-UX:*:*)
679 eval $set_cc_for_build
680 sed 's/^ //' << EOF >$dummy.c
681 #include <unistd.h>
682 int
683 main ()
684 {
685 long cpu = sysconf (_SC_CPU_VERSION);
686 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
687 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
688 results, however. */
689 if (CPU_IS_PA_RISC (cpu))
690 {
691 switch (cpu)
692 {
693 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
694 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
695 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
696 default: puts ("hppa-hitachi-hiuxwe2"); break;
697 }
698 }
699 else if (CPU_IS_HP_MC68K (cpu))
700 puts ("m68k-hitachi-hiuxwe2");
701 else puts ("unknown-hitachi-hiuxwe2");
702 exit (0);
703 }
704 EOF
705 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
706 { echo "$SYSTEM_NAME"; exit; }
707 echo unknown-hitachi-hiuxwe2
708 exit ;;
709 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
710 echo hppa1.1-hp-bsd
711 exit ;;
712 9000/8??:4.3bsd:*:*)
713 echo hppa1.0-hp-bsd
714 exit ;;
715 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
716 echo hppa1.0-hp-mpeix
717 exit ;;
718 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
719 echo hppa1.1-hp-osf
720 exit ;;
721 hp8??:OSF1:*:*)
722 echo hppa1.0-hp-osf
723 exit ;;
724 i*86:OSF1:*:*)
725 if [ -x /usr/sbin/sysversion ] ; then
726 echo ${UNAME_MACHINE}-unknown-osf1mk
727 else
728 echo ${UNAME_MACHINE}-unknown-osf1
729 fi
730 exit ;;
731 parisc*:Lites*:*:*)
732 echo hppa1.1-hp-lites
733 exit ;;
734 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
735 echo c1-convex-bsd
736 exit ;;
737 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
738 if getsysinfo -f scalar_acc
739 then echo c32-convex-bsd
740 else echo c2-convex-bsd
741 fi
742 exit ;;
743 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
744 echo c34-convex-bsd
745 exit ;;
746 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
747 echo c38-convex-bsd
748 exit ;;
749 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
750 echo c4-convex-bsd
751 exit ;;
752 CRAY*Y-MP:*:*:*)
753 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
754 exit ;;
755 CRAY*[A-Z]90:*:*:*)
756 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
757 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
758 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
759 -e 's/\.[^.]*$/.X/'
760 exit ;;
761 CRAY*TS:*:*:*)
762 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
763 exit ;;
764 CRAY*T3E:*:*:*)
765 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
766 exit ;;
767 CRAY*SV1:*:*:*)
768 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
769 exit ;;
770 *:UNICOS/mp:*:*)
771 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
772 exit ;;
773 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
774 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
775 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
776 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
777 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
778 exit ;;
779 5000:UNIX_System_V:4.*:*)
780 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
781 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
782 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
783 exit ;;
784 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
785 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
786 exit ;;
787 sparc*:BSD/OS:*:*)
788 echo sparc-unknown-bsdi${UNAME_RELEASE}
789 exit ;;
790 *:BSD/OS:*:*)
791 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
792 exit ;;
793 *:FreeBSD:*:*)
794 UNAME_PROCESSOR=`/usr/bin/uname -p`
795 case ${UNAME_PROCESSOR} in
796 amd64)
797 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
798 *)
799 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
800 esac
801 exit ;;
802 i*:CYGWIN*:*)
803 echo ${UNAME_MACHINE}-pc-cygwin
804 exit ;;
805 *:MINGW*:*)
806 echo ${UNAME_MACHINE}-pc-mingw32
807 exit ;;
808 i*:windows32*:*)
809 # uname -m includes "-pc" on this system.
810 echo ${UNAME_MACHINE}-mingw32
811 exit ;;
812 i*:PW*:*)
813 echo ${UNAME_MACHINE}-pc-pw32
814 exit ;;
815 *:Interix*:*)
816 case ${UNAME_MACHINE} in
817 x86)
818 echo i586-pc-interix${UNAME_RELEASE}
819 exit ;;
820 authenticamd | genuineintel | EM64T)
821 echo x86_64-unknown-interix${UNAME_RELEASE}
822 exit ;;
823 IA64)
824 echo ia64-unknown-interix${UNAME_RELEASE}
825 exit ;;
826 esac ;;
827 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
828 echo i${UNAME_MACHINE}-pc-mks
829 exit ;;
830 8664:Windows_NT:*)
831 echo x86_64-pc-mks
832 exit ;;
833 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
834 # How do we know it's Interix rather than the generic POSIX subsystem?
835 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
836 # UNAME_MACHINE based on the output of uname instead of i386?
837 echo i586-pc-interix
838 exit ;;
839 i*:UWIN*:*)
840 echo ${UNAME_MACHINE}-pc-uwin
841 exit ;;
842 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
843 echo x86_64-unknown-cygwin
844 exit ;;
845 p*:CYGWIN*:*)
846 echo powerpcle-unknown-cygwin
847 exit ;;
848 prep*:SunOS:5.*:*)
849 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
850 exit ;;
851 *:GNU:*:*)
852 # the GNU system
853 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
854 exit ;;
855 *:GNU/*:*:*)
856 # other systems with GNU libc and userland
857 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
858 exit ;;
859 i*86:Minix:*:*)
860 echo ${UNAME_MACHINE}-pc-minix
861 exit ;;
862 alpha:Linux:*:*)
863 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
864 EV5) UNAME_MACHINE=alphaev5 ;;
865 EV56) UNAME_MACHINE=alphaev56 ;;
866 PCA56) UNAME_MACHINE=alphapca56 ;;
867 PCA57) UNAME_MACHINE=alphapca56 ;;
868 EV6) UNAME_MACHINE=alphaev6 ;;
869 EV67) UNAME_MACHINE=alphaev67 ;;
870 EV68*) UNAME_MACHINE=alphaev68 ;;
871 esac
872 objdump --private-headers /bin/sh | grep -q ld.so.1
873 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
874 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
875 exit ;;
876 arm*:Linux:*:*)
877 eval $set_cc_for_build
878 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
879 | grep -q __ARM_EABI__
880 then
881 echo ${UNAME_MACHINE}-unknown-linux-gnu
882 else
883 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
884 | grep -q __ARM_PCS_VFP
885 then
886 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
887 else
888 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
889 fi
890 fi
891 exit ;;
892 avr32*:Linux:*:*)
893 echo ${UNAME_MACHINE}-unknown-linux-gnu
894 exit ;;
895 cris:Linux:*:*)
896 echo cris-axis-linux-gnu
897 exit ;;
898 crisv32:Linux:*:*)
899 echo crisv32-axis-linux-gnu
900 exit ;;
901 frv:Linux:*:*)
902 echo frv-unknown-linux-gnu
903 exit ;;
904 i*86:Linux:*:*)
905 LIBC=gnu
906 eval $set_cc_for_build
907 sed 's/^ //' << EOF >$dummy.c
908 #ifdef __dietlibc__
909 LIBC=dietlibc
910 #endif
911 EOF
912 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
913 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
914 exit ;;
915 ia64:Linux:*:*)
916 echo ${UNAME_MACHINE}-unknown-linux-gnu
917 exit ;;
918 m32r*:Linux:*:*)
919 echo ${UNAME_MACHINE}-unknown-linux-gnu
920 exit ;;
921 m68*:Linux:*:*)
922 echo ${UNAME_MACHINE}-unknown-linux-gnu
923 exit ;;
924 mips:Linux:*:* | mips64:Linux:*:*)
925 eval $set_cc_for_build
926 sed 's/^ //' << EOF >$dummy.c
927 #undef CPU
928 #undef ${UNAME_MACHINE}
929 #undef ${UNAME_MACHINE}el
930 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
931 CPU=${UNAME_MACHINE}el
932 #else
933 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
934 CPU=${UNAME_MACHINE}
935 #else
936 CPU=
937 #endif
938 #endif
939 EOF
940 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
941 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
942 ;;
943 or32:Linux:*:*)
944 echo or32-unknown-linux-gnu
945 exit ;;
946 padre:Linux:*:*)
947 echo sparc-unknown-linux-gnu
948 exit ;;
949 parisc64:Linux:*:* | hppa64:Linux:*:*)
950 echo hppa64-unknown-linux-gnu
951 exit ;;
952 parisc:Linux:*:* | hppa:Linux:*:*)
953 # Look for CPU level
954 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
955 PA7*) echo hppa1.1-unknown-linux-gnu ;;
956 PA8*) echo hppa2.0-unknown-linux-gnu ;;
957 *) echo hppa-unknown-linux-gnu ;;
958 esac
959 exit ;;
960 ppc64:Linux:*:*)
961 echo powerpc64-unknown-linux-gnu
962 exit ;;
963 ppc:Linux:*:*)
964 echo powerpc-unknown-linux-gnu
965 exit ;;
966 s390:Linux:*:* | s390x:Linux:*:*)
967 echo ${UNAME_MACHINE}-ibm-linux
968 exit ;;
969 sh64*:Linux:*:*)
970 echo ${UNAME_MACHINE}-unknown-linux-gnu
971 exit ;;
972 sh*:Linux:*:*)
973 echo ${UNAME_MACHINE}-unknown-linux-gnu
974 exit ;;
975 sparc:Linux:*:* | sparc64:Linux:*:*)
976 echo ${UNAME_MACHINE}-unknown-linux-gnu
977 exit ;;
978 tile*:Linux:*:*)
979 echo ${UNAME_MACHINE}-unknown-linux-gnu
980 exit ;;
981 vax:Linux:*:*)
982 echo ${UNAME_MACHINE}-dec-linux-gnu
983 exit ;;
984 x86_64:Linux:*:*)
985 echo x86_64-unknown-linux-gnu
986 exit ;;
987 xtensa*:Linux:*:*)
988 echo ${UNAME_MACHINE}-unknown-linux-gnu
989 exit ;;
990 i*86:DYNIX/ptx:4*:*)
991 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
992 # earlier versions are messed up and put the nodename in both
993 # sysname and nodename.
994 echo i386-sequent-sysv4
995 exit ;;
996 i*86:UNIX_SV:4.2MP:2.*)
997 # Unixware is an offshoot of SVR4, but it has its own version
998 # number series starting with 2...
999 # I am not positive that other SVR4 systems won't match this,
1000 # I just have to hope. -- rms.
1001 # Use sysv4.2uw... so that sysv4* matches it.
1002 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1003 exit ;;
1004 i*86:OS/2:*:*)
1005 # If we were able to find `uname', then EMX Unix compatibility
1006 # is probably installed.
1007 echo ${UNAME_MACHINE}-pc-os2-emx
1008 exit ;;
1009 i*86:XTS-300:*:STOP)
1010 echo ${UNAME_MACHINE}-unknown-stop
1011 exit ;;
1012 i*86:atheos:*:*)
1013 echo ${UNAME_MACHINE}-unknown-atheos
1014 exit ;;
1015 i*86:syllable:*:*)
1016 echo ${UNAME_MACHINE}-pc-syllable
1017 exit ;;
1018 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1019 echo i386-unknown-lynxos${UNAME_RELEASE}
1020 exit ;;
1021 i*86:*DOS:*:*)
1022 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1023 exit ;;
1024 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1025 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1026 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1027 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1028 else
1029 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1030 fi
1031 exit ;;
1032 i*86:*:5:[678]*)
1033 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1034 case `/bin/uname -X | grep "^Machine"` in
1035 *486*) UNAME_MACHINE=i486 ;;
1036 *Pentium) UNAME_MACHINE=i586 ;;
1037 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1038 esac
1039 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1040 exit ;;
1041 i*86:*:3.2:*)
1042 if test -f /usr/options/cb.name; then
1043 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1044 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1045 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1046 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1047 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1048 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1049 && UNAME_MACHINE=i586
1050 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1051 && UNAME_MACHINE=i686
1052 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1053 && UNAME_MACHINE=i686
1054 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1055 else
1056 echo ${UNAME_MACHINE}-pc-sysv32
1057 fi
1058 exit ;;
1059 pc:*:*:*)
1060 # Left here for compatibility:
1061 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1062 # the processor, so we play safe by assuming i586.
1063 # Note: whatever this is, it MUST be the same as what config.sub
1064 # prints for the "djgpp" host, or else GDB configury will decide that
1065 # this is a cross-build.
1066 echo i586-pc-msdosdjgpp
1067 exit ;;
1068 Intel:Mach:3*:*)
1069 echo i386-pc-mach3
1070 exit ;;
1071 paragon:*:*:*)
1072 echo i860-intel-osf1
1073 exit ;;
1074 i860:*:4.*:*) # i860-SVR4
1075 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1076 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1077 else # Add other i860-SVR4 vendors below as they are discovered.
1078 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1079 fi
1080 exit ;;
1081 mini*:CTIX:SYS*5:*)
1082 # "miniframe"
1083 echo m68010-convergent-sysv
1084 exit ;;
1085 mc68k:UNIX:SYSTEM5:3.51m)
1086 echo m68k-convergent-sysv
1087 exit ;;
1088 M680?0:D-NIX:5.3:*)
1089 echo m68k-diab-dnix
1090 exit ;;
1091 M68*:*:R3V[5678]*:*)
1092 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1093 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1094 OS_REL=''
1095 test -r /etc/.relid \
1096 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1097 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1098 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1099 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1100 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1101 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1102 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1103 && { echo i486-ncr-sysv4; exit; } ;;
1104 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1105 OS_REL='.3'
1106 test -r /etc/.relid \
1107 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1108 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1109 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1110 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1111 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1112 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1113 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1114 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1115 echo m68k-unknown-lynxos${UNAME_RELEASE}
1116 exit ;;
1117 mc68030:UNIX_System_V:4.*:*)
1118 echo m68k-atari-sysv4
1119 exit ;;
1120 TSUNAMI:LynxOS:2.*:*)
1121 echo sparc-unknown-lynxos${UNAME_RELEASE}
1122 exit ;;
1123 rs6000:LynxOS:2.*:*)
1124 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1125 exit ;;
1126 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1127 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1128 exit ;;
1129 SM[BE]S:UNIX_SV:*:*)
1130 echo mips-dde-sysv${UNAME_RELEASE}
1131 exit ;;
1132 RM*:ReliantUNIX-*:*:*)
1133 echo mips-sni-sysv4
1134 exit ;;
1135 RM*:SINIX-*:*:*)
1136 echo mips-sni-sysv4
1137 exit ;;
1138 *:SINIX-*:*:*)
1139 if uname -p 2>/dev/null >/dev/null ; then
1140 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1141 echo ${UNAME_MACHINE}-sni-sysv4
1142 else
1143 echo ns32k-sni-sysv
1144 fi
1145 exit ;;
1146 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1147 # says <Richard.M.Bartel@ccMail.Census.GOV>
1148 echo i586-unisys-sysv4
1149 exit ;;
1150 *:UNIX_System_V:4*:FTX*)
1151 # From Gerald Hewes <hewes@openmarket.com>.
1152 # How about differentiating between stratus architectures? -djm
1153 echo hppa1.1-stratus-sysv4
1154 exit ;;
1155 *:*:*:FTX*)
1156 # From seanf@swdc.stratus.com.
1157 echo i860-stratus-sysv4
1158 exit ;;
1159 i*86:VOS:*:*)
1160 # From Paul.Green@stratus.com.
1161 echo ${UNAME_MACHINE}-stratus-vos
1162 exit ;;
1163 *:VOS:*:*)
1164 # From Paul.Green@stratus.com.
1165 echo hppa1.1-stratus-vos
1166 exit ;;
1167 mc68*:A/UX:*:*)
1168 echo m68k-apple-aux${UNAME_RELEASE}
1169 exit ;;
1170 news*:NEWS-OS:6*:*)
1171 echo mips-sony-newsos6
1172 exit ;;
1173 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1174 if [ -d /usr/nec ]; then
1175 echo mips-nec-sysv${UNAME_RELEASE}
1176 else
1177 echo mips-unknown-sysv${UNAME_RELEASE}
1178 fi
1179 exit ;;
1180 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1181 echo powerpc-be-beos
1182 exit ;;
1183 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1184 echo powerpc-apple-beos
1185 exit ;;
1186 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1187 echo i586-pc-beos
1188 exit ;;
1189 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1190 echo i586-pc-haiku
1191 exit ;;
1192 SX-4:SUPER-UX:*:*)
1193 echo sx4-nec-superux${UNAME_RELEASE}
1194 exit ;;
1195 SX-5:SUPER-UX:*:*)
1196 echo sx5-nec-superux${UNAME_RELEASE}
1197 exit ;;
1198 SX-6:SUPER-UX:*:*)
1199 echo sx6-nec-superux${UNAME_RELEASE}
1200 exit ;;
1201 SX-7:SUPER-UX:*:*)
1202 echo sx7-nec-superux${UNAME_RELEASE}
1203 exit ;;
1204 SX-8:SUPER-UX:*:*)
1205 echo sx8-nec-superux${UNAME_RELEASE}
1206 exit ;;
1207 SX-8R:SUPER-UX:*:*)
1208 echo sx8r-nec-superux${UNAME_RELEASE}
1209 exit ;;
1210 Power*:Rhapsody:*:*)
1211 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1212 exit ;;
1213 *:Rhapsody:*:*)
1214 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1215 exit ;;
1216 *:Darwin:*:*)
1217 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1218 case $UNAME_PROCESSOR in
1219 i386)
1220 eval $set_cc_for_build
1221 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1222 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1223 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1224 grep IS_64BIT_ARCH >/dev/null
1225 then
1226 UNAME_PROCESSOR="x86_64"
1227 fi
1228 fi ;;
1229 unknown) UNAME_PROCESSOR=powerpc ;;
1230 esac
1231 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1232 exit ;;
1233 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1234 UNAME_PROCESSOR=`uname -p`
1235 if test "$UNAME_PROCESSOR" = "x86"; then
1236 UNAME_PROCESSOR=i386
1237 UNAME_MACHINE=pc
1238 fi
1239 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1240 exit ;;
1241 *:QNX:*:4*)
1242 echo i386-pc-qnx
1243 exit ;;
1244 NEO-?:NONSTOP_KERNEL:*:*)
1245 echo neo-tandem-nsk${UNAME_RELEASE}
1246 exit ;;
1247 NSE-?:NONSTOP_KERNEL:*:*)
1248 echo nse-tandem-nsk${UNAME_RELEASE}
1249 exit ;;
1250 NSR-?:NONSTOP_KERNEL:*:*)
1251 echo nsr-tandem-nsk${UNAME_RELEASE}
1252 exit ;;
1253 *:NonStop-UX:*:*)
1254 echo mips-compaq-nonstopux
1255 exit ;;
1256 BS2000:POSIX*:*:*)
1257 echo bs2000-siemens-sysv
1258 exit ;;
1259 DS/*:UNIX_System_V:*:*)
1260 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1261 exit ;;
1262 *:Plan9:*:*)
1263 # "uname -m" is not consistent, so use $cputype instead. 386
1264 # is converted to i386 for consistency with other x86
1265 # operating systems.
1266 if test "$cputype" = "386"; then
1267 UNAME_MACHINE=i386
1268 else
1269 UNAME_MACHINE="$cputype"
1270 fi
1271 echo ${UNAME_MACHINE}-unknown-plan9
1272 exit ;;
1273 *:TOPS-10:*:*)
1274 echo pdp10-unknown-tops10
1275 exit ;;
1276 *:TENEX:*:*)
1277 echo pdp10-unknown-tenex
1278 exit ;;
1279 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1280 echo pdp10-dec-tops20
1281 exit ;;
1282 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1283 echo pdp10-xkl-tops20
1284 exit ;;
1285 *:TOPS-20:*:*)
1286 echo pdp10-unknown-tops20
1287 exit ;;
1288 *:ITS:*:*)
1289 echo pdp10-unknown-its
1290 exit ;;
1291 SEI:*:*:SEIUX)
1292 echo mips-sei-seiux${UNAME_RELEASE}
1293 exit ;;
1294 *:DragonFly:*:*)
1295 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1296 exit ;;
1297 *:*VMS:*:*)
1298 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1299 case "${UNAME_MACHINE}" in
1300 A*) echo alpha-dec-vms ; exit ;;
1301 I*) echo ia64-dec-vms ; exit ;;
1302 V*) echo vax-dec-vms ; exit ;;
1303 esac ;;
1304 *:XENIX:*:SysV)
1305 echo i386-pc-xenix
1306 exit ;;
1307 i*86:skyos:*:*)
1308 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1309 exit ;;
1310 i*86:rdos:*:*)
1311 echo ${UNAME_MACHINE}-pc-rdos
1312 exit ;;
1313 i*86:AROS:*:*)
1314 echo ${UNAME_MACHINE}-pc-aros
1315 exit ;;
1316 esac
1317
1318 #echo '(No uname command or uname output not recognized.)' 1>&2
1319 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1320
1321 eval $set_cc_for_build
1322 cat >$dummy.c <<EOF
1323 #ifdef _SEQUENT_
1324 # include <sys/types.h>
1325 # include <sys/utsname.h>
1326 #endif
1327 main ()
1328 {
1329 #if defined (sony)
1330 #if defined (MIPSEB)
1331 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1332 I don't know.... */
1333 printf ("mips-sony-bsd\n"); exit (0);
1334 #else
1335 #include <sys/param.h>
1336 printf ("m68k-sony-newsos%s\n",
1337 #ifdef NEWSOS4
1338 "4"
1339 #else
1340 ""
1341 #endif
1342 ); exit (0);
1343 #endif
1344 #endif
1345
1346 #if defined (__arm) && defined (__acorn) && defined (__unix)
1347 printf ("arm-acorn-riscix\n"); exit (0);
1348 #endif
1349
1350 #if defined (hp300) && !defined (hpux)
1351 printf ("m68k-hp-bsd\n"); exit (0);
1352 #endif
1353
1354 #if defined (NeXT)
1355 #if !defined (__ARCHITECTURE__)
1356 #define __ARCHITECTURE__ "m68k"
1357 #endif
1358 int version;
1359 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1360 if (version < 4)
1361 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1362 else
1363 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1364 exit (0);
1365 #endif
1366
1367 #if defined (MULTIMAX) || defined (n16)
1368 #if defined (UMAXV)
1369 printf ("ns32k-encore-sysv\n"); exit (0);
1370 #else
1371 #if defined (CMU)
1372 printf ("ns32k-encore-mach\n"); exit (0);
1373 #else
1374 printf ("ns32k-encore-bsd\n"); exit (0);
1375 #endif
1376 #endif
1377 #endif
1378
1379 #if defined (__386BSD__)
1380 printf ("i386-pc-bsd\n"); exit (0);
1381 #endif
1382
1383 #if defined (sequent)
1384 #if defined (i386)
1385 printf ("i386-sequent-dynix\n"); exit (0);
1386 #endif
1387 #if defined (ns32000)
1388 printf ("ns32k-sequent-dynix\n"); exit (0);
1389 #endif
1390 #endif
1391
1392 #if defined (_SEQUENT_)
1393 struct utsname un;
1394
1395 uname(&un);
1396
1397 if (strncmp(un.version, "V2", 2) == 0) {
1398 printf ("i386-sequent-ptx2\n"); exit (0);
1399 }
1400 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1401 printf ("i386-sequent-ptx1\n"); exit (0);
1402 }
1403 printf ("i386-sequent-ptx\n"); exit (0);
1404
1405 #endif
1406
1407 #if defined (vax)
1408 # if !defined (ultrix)
1409 # include <sys/param.h>
1410 # if defined (BSD)
1411 # if BSD == 43
1412 printf ("vax-dec-bsd4.3\n"); exit (0);
1413 # else
1414 # if BSD == 199006
1415 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1416 # else
1417 printf ("vax-dec-bsd\n"); exit (0);
1418 # endif
1419 # endif
1420 # else
1421 printf ("vax-dec-bsd\n"); exit (0);
1422 # endif
1423 # else
1424 printf ("vax-dec-ultrix\n"); exit (0);
1425 # endif
1426 #endif
1427
1428 #if defined (alliant) && defined (i860)
1429 printf ("i860-alliant-bsd\n"); exit (0);
1430 #endif
1431
1432 exit (1);
1433 }
1434 EOF
1435
1436 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1437 { echo "$SYSTEM_NAME"; exit; }
1438
1439 # Apollos put the system type in the environment.
1440
1441 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1442
1443 # Convex versions that predate uname can use getsysinfo(1)
1444
1445 if [ -x /usr/convex/getsysinfo ]
1446 then
1447 case `getsysinfo -f cpu_type` in
1448 c1*)
1449 echo c1-convex-bsd
1450 exit ;;
1451 c2*)
1452 if getsysinfo -f scalar_acc
1453 then echo c32-convex-bsd
1454 else echo c2-convex-bsd
1455 fi
1456 exit ;;
1457 c34*)
1458 echo c34-convex-bsd
1459 exit ;;
1460 c38*)
1461 echo c38-convex-bsd
1462 exit ;;
1463 c4*)
1464 echo c4-convex-bsd
1465 exit ;;
1466 esac
1467 fi
1468
1469 cat >&2 <<EOF
1470 $0: unable to guess system type
1471
1472 This script, last modified $timestamp, has failed to recognize
1473 the operating system you are using. It is advised that you
1474 download the most up to date version of the config scripts from
1475
1476 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1477 and
1478 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1479
1480 If the version you run ($0) is already up to date, please
1481 send the following data and any information you think might be
1482 pertinent to <config-patches@gnu.org> in order to provide the needed
1483 information to handle your system.
1484
1485 config.guess timestamp = $timestamp
1486
1487 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1488 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1489 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1490 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1491
1492 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1493 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1494
1495 hostinfo = `(hostinfo) 2>/dev/null`
1496 /bin/universe = `(/bin/universe) 2>/dev/null`
1497 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1498 /bin/arch = `(/bin/arch) 2>/dev/null`
1499 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1500 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1501
1502 UNAME_MACHINE = ${UNAME_MACHINE}
1503 UNAME_RELEASE = ${UNAME_RELEASE}
1504 UNAME_SYSTEM = ${UNAME_SYSTEM}
1505 UNAME_VERSION = ${UNAME_VERSION}
1506 EOF
1507
1508 exit 1
1509
1510 # Local variables:
1511 # eval: (add-hook 'write-file-hooks 'time-stamp)
1512 # time-stamp-start: "timestamp='"
1513 # time-stamp-format: "%:y-%02m-%02d"
1514 # time-stamp-end: "'"
1515 # End:
+0
-1764
saslauthd/config/config.sub less more
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
4 # 2011 Free Software Foundation, Inc.
5
6 timestamp='2011-08-23'
7
8 # This file is (in principle) common to ALL GNU software.
9 # The presence of a machine in this file suggests that SOME GNU software
10 # can handle that machine. It does not imply ALL GNU software can.
11 #
12 # This file is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License, or
15 # (at your option) any later version.
16 #
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
25 # 02110-1301, USA.
26 #
27 # As a special exception to the GNU General Public License, if you
28 # distribute this file as part of a program that contains a
29 # configuration script generated by Autoconf, you may include it under
30 # the same distribution terms that you use for the rest of that program.
31
32
33 # Please send patches to <config-patches@gnu.org>. Submit a context
34 # diff and a properly formatted GNU ChangeLog entry.
35 #
36 # Configuration subroutine to validate and canonicalize a configuration type.
37 # Supply the specified configuration type as an argument.
38 # If it is invalid, we print an error message on stderr and exit with code 1.
39 # Otherwise, we print the canonical config type on stdout and succeed.
40
41 # You can get the latest version of this script from:
42 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
43
44 # This file is supposed to be the same for all GNU packages
45 # and recognize all the CPU types, system types and aliases
46 # that are meaningful with *any* GNU software.
47 # Each package is responsible for reporting which valid configurations
48 # it does not support. The user should be able to distinguish
49 # a failure to support a valid configuration from a meaningless
50 # configuration.
51
52 # The goal of this file is to map all the various variations of a given
53 # machine specification into a single specification in the form:
54 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
55 # or in some cases, the newer four-part form:
56 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
57 # It is wrong to echo any other type of specification.
58
59 me=`echo "$0" | sed -e 's,.*/,,'`
60
61 usage="\
62 Usage: $0 [OPTION] CPU-MFR-OPSYS
63 $0 [OPTION] ALIAS
64
65 Canonicalize a configuration name.
66
67 Operation modes:
68 -h, --help print this help, then exit
69 -t, --time-stamp print date of last modification, then exit
70 -v, --version print version number, then exit
71
72 Report bugs and patches to <config-patches@gnu.org>."
73
74 version="\
75 GNU config.sub ($timestamp)
76
77 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
78 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
79 Software Foundation, Inc.
80
81 This is free software; see the source for copying conditions. There is NO
82 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
83
84 help="
85 Try \`$me --help' for more information."
86
87 # Parse command line
88 while test $# -gt 0 ; do
89 case $1 in
90 --time-stamp | --time* | -t )
91 echo "$timestamp" ; exit ;;
92 --version | -v )
93 echo "$version" ; exit ;;
94 --help | --h* | -h )
95 echo "$usage"; exit ;;
96 -- ) # Stop option processing
97 shift; break ;;
98 - ) # Use stdin as input.
99 break ;;
100 -* )
101 echo "$me: invalid option $1$help"
102 exit 1 ;;
103
104 *local*)
105 # First pass through any local machine types.
106 echo $1
107 exit ;;
108
109 * )
110 break ;;
111 esac
112 done
113
114 case $# in
115 0) echo "$me: missing argument$help" >&2
116 exit 1;;
117 1) ;;
118 *) echo "$me: too many arguments$help" >&2
119 exit 1;;
120 esac
121
122 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
123 # Here we must recognize all the valid KERNEL-OS combinations.
124 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
125 case $maybe_os in
126 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
127 linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
128 knetbsd*-gnu* | netbsd*-gnu* | \
129 kopensolaris*-gnu* | \
130 storm-chaos* | os2-emx* | rtmk-nova*)
131 os=-$maybe_os
132 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
133 ;;
134 *)
135 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
136 if [ $basic_machine != $1 ]
137 then os=`echo $1 | sed 's/.*-/-/'`
138 else os=; fi
139 ;;
140 esac
141
142 ### Let's recognize common machines as not being operating systems so
143 ### that things like config.sub decstation-3100 work. We also
144 ### recognize some manufacturers as not being operating systems, so we
145 ### can provide default operating systems below.
146 case $os in
147 -sun*os*)
148 # Prevent following clause from handling this invalid input.
149 ;;
150 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
151 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
152 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
153 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
154 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
155 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
156 -apple | -axis | -knuth | -cray | -microblaze)
157 os=
158 basic_machine=$1
159 ;;
160 -bluegene*)
161 os=-cnk
162 ;;
163 -sim | -cisco | -oki | -wec | -winbond)
164 os=
165 basic_machine=$1
166 ;;
167 -scout)
168 ;;
169 -wrs)
170 os=-vxworks
171 basic_machine=$1
172 ;;
173 -chorusos*)
174 os=-chorusos
175 basic_machine=$1
176 ;;
177 -chorusrdb)
178 os=-chorusrdb
179 basic_machine=$1
180 ;;
181 -hiux*)
182 os=-hiuxwe2
183 ;;
184 -sco6)
185 os=-sco5v6
186 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
187 ;;
188 -sco5)
189 os=-sco3.2v5
190 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
191 ;;
192 -sco4)
193 os=-sco3.2v4
194 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
195 ;;
196 -sco3.2.[4-9]*)
197 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
198 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
199 ;;
200 -sco3.2v[4-9]*)
201 # Don't forget version if it is 3.2v4 or newer.
202 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
203 ;;
204 -sco5v6*)
205 # Don't forget version if it is 3.2v4 or newer.
206 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
207 ;;
208 -sco*)
209 os=-sco3.2v2
210 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
211 ;;
212 -udk*)
213 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
214 ;;
215 -isc)
216 os=-isc2.2
217 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
218 ;;
219 -clix*)
220 basic_machine=clipper-intergraph
221 ;;
222 -isc*)
223 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
224 ;;
225 -lynx*)
226 os=-lynxos
227 ;;
228 -ptx*)
229 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
230 ;;
231 -windowsnt*)
232 os=`echo $os | sed -e 's/windowsnt/winnt/'`
233 ;;
234 -psos*)
235 os=-psos
236 ;;
237 -mint | -mint[0-9]*)
238 basic_machine=m68k-atari
239 os=-mint
240 ;;
241 esac
242
243 # Decode aliases for certain CPU-COMPANY combinations.
244 case $basic_machine in
245 # Recognize the basic CPU types without company name.
246 # Some are omitted here because they have special meanings below.
247 1750a | 580 \
248 | a29k \
249 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
250 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
251 | am33_2.0 \
252 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
253 | be32 | be64 \
254 | bfin \
255 | c4x | clipper \
256 | d10v | d30v | dlx | dsp16xx \
257 | fido | fr30 | frv \
258 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
259 | i370 | i860 | i960 | ia64 \
260 | ip2k | iq2000 \
261 | le32 | le64 \
262 | lm32 \
263 | m32c | m32r | m32rle | m68000 | m68k | m88k \
264 | maxq | mb | microblaze | mcore | mep | metag \
265 | mips | mipsbe | mipseb | mipsel | mipsle \
266 | mips16 \
267 | mips64 | mips64el \
268 | mips64octeon | mips64octeonel \
269 | mips64orion | mips64orionel \
270 | mips64r5900 | mips64r5900el \
271 | mips64vr | mips64vrel \
272 | mips64vr4100 | mips64vr4100el \
273 | mips64vr4300 | mips64vr4300el \
274 | mips64vr5000 | mips64vr5000el \
275 | mips64vr5900 | mips64vr5900el \
276 | mipsisa32 | mipsisa32el \
277 | mipsisa32r2 | mipsisa32r2el \
278 | mipsisa64 | mipsisa64el \
279 | mipsisa64r2 | mipsisa64r2el \
280 | mipsisa64sb1 | mipsisa64sb1el \
281 | mipsisa64sr71k | mipsisa64sr71kel \
282 | mipstx39 | mipstx39el \
283 | mn10200 | mn10300 \
284 | moxie \
285 | mt \
286 | msp430 \
287 | nds32 | nds32le | nds32be \
288 | nios | nios2 \
289 | ns16k | ns32k \
290 | open8 \
291 | or32 \
292 | pdp10 | pdp11 | pj | pjl \
293 | powerpc | powerpc64 | powerpc64le | powerpcle \
294 | pyramid \
295 | rx \
296 | score \
297 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
298 | sh64 | sh64le \
299 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
300 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
301 | spu \
302 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
303 | ubicom32 \
304 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
305 | we32k \
306 | x86 | xc16x | xstormy16 | xtensa \
307 | z8k | z80)
308 basic_machine=$basic_machine-unknown
309 ;;
310 c54x)
311 basic_machine=tic54x-unknown
312 ;;
313 c55x)
314 basic_machine=tic55x-unknown
315 ;;
316 c6x)
317 basic_machine=tic6x-unknown
318 ;;
319 m6811 | m68hc11 | m6812 | m68hc12 | picochip)
320 # Motorola 68HC11/12.
321 basic_machine=$basic_machine-unknown
322 os=-none
323 ;;
324 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
325 ;;
326 ms1)
327 basic_machine=mt-unknown
328 ;;
329
330 strongarm | thumb | xscale)
331 basic_machine=arm-unknown
332 ;;
333
334 xscaleeb)
335 basic_machine=armeb-unknown
336 ;;
337
338 xscaleel)
339 basic_machine=armel-unknown
340 ;;
341
342 # We use `pc' rather than `unknown'
343 # because (1) that's what they normally are, and
344 # (2) the word "unknown" tends to confuse beginning users.
345 i*86 | x86_64)
346 basic_machine=$basic_machine-pc
347 ;;
348 # Object if more than one company name word.
349 *-*-*)
350 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
351 exit 1
352 ;;
353 # Recognize the basic CPU types with company name.
354 580-* \
355 | a29k-* \
356 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
357 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
358 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
359 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
360 | avr-* | avr32-* \
361 | be32-* | be64-* \
362 | bfin-* | bs2000-* \
363 | c[123]* | c30-* | [cjt]90-* | c4x-* \
364 | clipper-* | craynv-* | cydra-* \
365 | d10v-* | d30v-* | dlx-* \
366 | elxsi-* \
367 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
368 | h8300-* | h8500-* \
369 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
370 | i*86-* | i860-* | i960-* | ia64-* \
371 | ip2k-* | iq2000-* \
372 | le32-* | le64-* \
373 | lm32-* \
374 | m32c-* | m32r-* | m32rle-* \
375 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
376 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
377 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
378 | mips16-* \
379 | mips64-* | mips64el-* \
380 | mips64octeon-* | mips64octeonel-* \
381 | mips64orion-* | mips64orionel-* \
382 | mips64r5900-* | mips64r5900el-* \
383 | mips64vr-* | mips64vrel-* \
384 | mips64vr4100-* | mips64vr4100el-* \
385 | mips64vr4300-* | mips64vr4300el-* \
386 | mips64vr5000-* | mips64vr5000el-* \
387 | mips64vr5900-* | mips64vr5900el-* \
388 | mipsisa32-* | mipsisa32el-* \
389 | mipsisa32r2-* | mipsisa32r2el-* \
390 | mipsisa64-* | mipsisa64el-* \
391 | mipsisa64r2-* | mipsisa64r2el-* \
392 | mipsisa64sb1-* | mipsisa64sb1el-* \
393 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
394 | mipstx39-* | mipstx39el-* \
395 | mmix-* \
396 | mt-* \
397 | msp430-* \
398 | nds32-* | nds32le-* | nds32be-* \
399 | nios-* | nios2-* \
400 | none-* | np1-* | ns16k-* | ns32k-* \
401 | open8-* \
402 | orion-* \
403 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
404 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
405 | pyramid-* \
406 | romp-* | rs6000-* | rx-* \
407 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
408 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
409 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
410 | sparclite-* \
411 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
412 | tahoe-* \
413 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
414 | tile*-* \
415 | tron-* \
416 | ubicom32-* \
417 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
418 | vax-* \
419 | we32k-* \
420 | x86-* | x86_64-* | xc16x-* | xps100-* \
421 | xstormy16-* | xtensa*-* \
422 | ymp-* \
423 | z8k-* | z80-*)
424 ;;
425 # Recognize the basic CPU types without company name, with glob match.
426 xtensa*)
427 basic_machine=$basic_machine-unknown
428 ;;
429 # Recognize the various machine names and aliases which stand
430 # for a CPU type and a company and sometimes even an OS.
431 386bsd)
432 basic_machine=i386-unknown
433 os=-bsd
434 ;;
435 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
436 basic_machine=m68000-att
437 ;;
438 3b*)
439 basic_machine=we32k-att
440 ;;
441 a29khif)
442 basic_machine=a29k-amd
443 os=-udi
444 ;;
445 abacus)
446 basic_machine=abacus-unknown
447 ;;
448 adobe68k)
449 basic_machine=m68010-adobe
450 os=-scout
451 ;;
452 alliant | fx80)
453 basic_machine=fx80-alliant
454 ;;
455 altos | altos3068)
456 basic_machine=m68k-altos
457 ;;
458 am29k)
459 basic_machine=a29k-none
460 os=-bsd
461 ;;
462 amd64)
463 basic_machine=x86_64-pc
464 ;;
465 amd64-*)
466 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
467 ;;
468 amdahl)
469 basic_machine=580-amdahl
470 os=-sysv
471 ;;
472 amiga | amiga-*)
473 basic_machine=m68k-unknown
474 ;;
475 amigaos | amigados)
476 basic_machine=m68k-unknown
477 os=-amigaos
478 ;;
479 amigaunix | amix)
480 basic_machine=m68k-unknown
481 os=-sysv4
482 ;;
483 apollo68)
484 basic_machine=m68k-apollo
485 os=-sysv
486 ;;
487 apollo68bsd)
488 basic_machine=m68k-apollo
489 os=-bsd
490 ;;
491 aros)
492 basic_machine=i386-pc
493 os=-aros
494 ;;
495 aux)
496 basic_machine=m68k-apple
497 os=-aux
498 ;;
499 balance)
500 basic_machine=ns32k-sequent
501 os=-dynix
502 ;;
503 blackfin)
504 basic_machine=bfin-unknown
505 os=-linux
506 ;;
507 blackfin-*)
508 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
509 os=-linux
510 ;;
511 bluegene*)
512 basic_machine=powerpc-ibm
513 os=-cnk
514 ;;
515 c54x-*)
516 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
517 ;;
518 c55x-*)
519 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
520 ;;
521 c6x-*)
522 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
523 ;;
524 c90)
525 basic_machine=c90-cray
526 os=-unicos
527 ;;
528 cegcc)
529 basic_machine=arm-unknown
530 os=-cegcc
531 ;;
532 convex-c1)
533 basic_machine=c1-convex
534 os=-bsd
535 ;;
536 convex-c2)
537 basic_machine=c2-convex
538 os=-bsd
539 ;;
540 convex-c32)
541 basic_machine=c32-convex
542 os=-bsd
543 ;;
544 convex-c34)
545 basic_machine=c34-convex
546 os=-bsd
547 ;;
548 convex-c38)
549 basic_machine=c38-convex
550 os=-bsd
551 ;;
552 cray | j90)
553 basic_machine=j90-cray
554 os=-unicos
555 ;;
556 craynv)
557 basic_machine=craynv-cray
558 os=-unicosmp
559 ;;
560 cr16 | cr16-*)
561 basic_machine=cr16-unknown
562 os=-elf
563 ;;
564 crds | unos)
565 basic_machine=m68k-crds
566 ;;
567 crisv32 | crisv32-* | etraxfs*)
568 basic_machine=crisv32-axis
569 ;;
570 cris | cris-* | etrax*)
571 basic_machine=cris-axis
572 ;;
573 crx)
574 basic_machine=crx-unknown
575 os=-elf
576 ;;
577 da30 | da30-*)
578 basic_machine=m68k-da30
579 ;;
580 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
581 basic_machine=mips-dec
582 ;;
583 decsystem10* | dec10*)
584 basic_machine=pdp10-dec
585 os=-tops10
586 ;;
587 decsystem20* | dec20*)
588 basic_machine=pdp10-dec
589 os=-tops20
590 ;;
591 delta | 3300 | motorola-3300 | motorola-delta \
592 | 3300-motorola | delta-motorola)
593 basic_machine=m68k-motorola
594 ;;
595 delta88)
596 basic_machine=m88k-motorola
597 os=-sysv3
598 ;;
599 dicos)
600 basic_machine=i686-pc
601 os=-dicos
602 ;;
603 djgpp)
604 basic_machine=i586-pc
605 os=-msdosdjgpp
606 ;;
607 dpx20 | dpx20-*)
608 basic_machine=rs6000-bull
609 os=-bosx
610 ;;
611 dpx2* | dpx2*-bull)
612 basic_machine=m68k-bull
613 os=-sysv3
614 ;;
615 ebmon29k)
616 basic_machine=a29k-amd
617 os=-ebmon
618 ;;
619 elxsi)
620 basic_machine=elxsi-elxsi
621 os=-bsd
622 ;;
623 encore | umax | mmax)
624 basic_machine=ns32k-encore
625 ;;
626 es1800 | OSE68k | ose68k | ose | OSE)
627 basic_machine=m68k-ericsson
628 os=-ose
629 ;;
630 fx2800)
631 basic_machine=i860-alliant
632 ;;
633 genix)
634 basic_machine=ns32k-ns
635 ;;
636 gmicro)
637 basic_machine=tron-gmicro
638 os=-sysv
639 ;;
640 go32)
641 basic_machine=i386-pc
642 os=-go32
643 ;;
644 h3050r* | hiux*)
645 basic_machine=hppa1.1-hitachi
646 os=-hiuxwe2
647 ;;
648 h8300hms)
649 basic_machine=h8300-hitachi
650 os=-hms
651 ;;
652 h8300xray)
653 basic_machine=h8300-hitachi
654 os=-xray
655 ;;
656 h8500hms)
657 basic_machine=h8500-hitachi
658 os=-hms
659 ;;
660 harris)
661 basic_machine=m88k-harris
662 os=-sysv3
663 ;;
664 hp300-*)
665 basic_machine=m68k-hp
666 ;;
667 hp300bsd)
668 basic_machine=m68k-hp
669 os=-bsd
670 ;;
671 hp300hpux)
672 basic_machine=m68k-hp
673 os=-hpux
674 ;;
675 hp3k9[0-9][0-9] | hp9[0-9][0-9])
676 basic_machine=hppa1.0-hp
677 ;;
678 hp9k2[0-9][0-9] | hp9k31[0-9])
679 basic_machine=m68000-hp
680 ;;
681 hp9k3[2-9][0-9])
682 basic_machine=m68k-hp
683 ;;
684 hp9k6[0-9][0-9] | hp6[0-9][0-9])
685 basic_machine=hppa1.0-hp
686 ;;
687 hp9k7[0-79][0-9] | hp7[0-79][0-9])
688 basic_machine=hppa1.1-hp
689 ;;
690 hp9k78[0-9] | hp78[0-9])
691 # FIXME: really hppa2.0-hp
692 basic_machine=hppa1.1-hp
693 ;;
694 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
695 # FIXME: really hppa2.0-hp
696 basic_machine=hppa1.1-hp
697 ;;
698 hp9k8[0-9][13679] | hp8[0-9][13679])
699 basic_machine=hppa1.1-hp
700 ;;
701 hp9k8[0-9][0-9] | hp8[0-9][0-9])
702 basic_machine=hppa1.0-hp
703 ;;
704 hppa-next)
705 os=-nextstep3
706 ;;
707 hppaosf)
708 basic_machine=hppa1.1-hp
709 os=-osf
710 ;;
711 hppro)
712 basic_machine=hppa1.1-hp
713 os=-proelf
714 ;;
715 i370-ibm* | ibm*)
716 basic_machine=i370-ibm
717 ;;
718 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
719 i*86v32)
720 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
721 os=-sysv32
722 ;;
723 i*86v4*)
724 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
725 os=-sysv4
726 ;;
727 i*86v)
728 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
729 os=-sysv
730 ;;
731 i*86sol2)
732 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
733 os=-solaris2
734 ;;
735 i386mach)
736 basic_machine=i386-mach
737 os=-mach
738 ;;
739 i386-vsta | vsta)
740 basic_machine=i386-unknown
741 os=-vsta
742 ;;
743 iris | iris4d)
744 basic_machine=mips-sgi
745 case $os in
746 -irix*)
747 ;;
748 *)
749 os=-irix4
750 ;;
751 esac
752 ;;
753 isi68 | isi)
754 basic_machine=m68k-isi
755 os=-sysv
756 ;;
757 m68knommu)
758 basic_machine=m68k-unknown
759 os=-linux
760 ;;
761 m68knommu-*)
762 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
763 os=-linux
764 ;;
765 m88k-omron*)
766 basic_machine=m88k-omron
767 ;;
768 magnum | m3230)
769 basic_machine=mips-mips
770 os=-sysv
771 ;;
772 merlin)
773 basic_machine=ns32k-utek
774 os=-sysv
775 ;;
776 microblaze)
777 basic_machine=microblaze-xilinx
778 ;;
779 mingw32)
780 basic_machine=i386-pc
781 os=-mingw32
782 ;;
783 mingw32ce)
784 basic_machine=arm-unknown
785 os=-mingw32ce
786 ;;
787 miniframe)
788 basic_machine=m68000-convergent
789 ;;
790 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
791 basic_machine=m68k-atari
792 os=-mint
793 ;;
794 mips3*-*)
795 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
796 ;;
797 mips3*)
798 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
799 ;;
800 monitor)
801 basic_machine=m68k-rom68k
802 os=-coff
803 ;;
804 morphos)
805 basic_machine=powerpc-unknown
806 os=-morphos
807 ;;
808 msdos)
809 basic_machine=i386-pc
810 os=-msdos
811 ;;
812 ms1-*)
813 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
814 ;;
815 mvs)
816 basic_machine=i370-ibm
817 os=-mvs
818 ;;
819 nacl)
820 basic_machine=le32-unknown
821 os=-nacl
822 ;;
823 ncr3000)
824 basic_machine=i486-ncr
825 os=-sysv4
826 ;;
827 netbsd386)
828 basic_machine=i386-unknown
829 os=-netbsd
830 ;;
831 netwinder)
832 basic_machine=armv4l-rebel
833 os=-linux
834 ;;
835 news | news700 | news800 | news900)
836 basic_machine=m68k-sony
837 os=-newsos
838 ;;
839 news1000)
840 basic_machine=m68030-sony
841 os=-newsos
842 ;;
843 news-3600 | risc-news)
844 basic_machine=mips-sony
845 os=-newsos
846 ;;
847 necv70)
848 basic_machine=v70-nec
849 os=-sysv
850 ;;
851 next | m*-next )
852 basic_machine=m68k-next
853 case $os in
854 -nextstep* )
855 ;;
856 -ns2*)
857 os=-nextstep2
858 ;;
859 *)
860 os=-nextstep3
861 ;;
862 esac
863 ;;
864 nh3000)
865 basic_machine=m68k-harris
866 os=-cxux
867 ;;
868 nh[45]000)
869 basic_machine=m88k-harris
870 os=-cxux
871 ;;
872 nindy960)
873 basic_machine=i960-intel
874 os=-nindy
875 ;;
876 mon960)
877 basic_machine=i960-intel
878 os=-mon960
879 ;;
880 nonstopux)
881 basic_machine=mips-compaq
882 os=-nonstopux
883 ;;
884 np1)
885 basic_machine=np1-gould
886 ;;
887 neo-tandem)
888 basic_machine=neo-tandem
889 ;;
890 nse-tandem)
891 basic_machine=nse-tandem
892 ;;
893 nsr-tandem)
894 basic_machine=nsr-tandem
895 ;;
896 op50n-* | op60c-*)
897 basic_machine=hppa1.1-oki
898 os=-proelf
899 ;;
900 openrisc | openrisc-*)
901 basic_machine=or32-unknown
902 ;;
903 os400)
904 basic_machine=powerpc-ibm
905 os=-os400
906 ;;
907 OSE68000 | ose68000)
908 basic_machine=m68000-ericsson
909 os=-ose
910 ;;
911 os68k)
912 basic_machine=m68k-none
913 os=-os68k
914 ;;
915 pa-hitachi)
916 basic_machine=hppa1.1-hitachi
917 os=-hiuxwe2
918 ;;
919 paragon)
920 basic_machine=i860-intel
921 os=-osf
922 ;;
923 parisc)
924 basic_machine=hppa-unknown
925 os=-linux
926 ;;
927 parisc-*)
928 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
929 os=-linux
930 ;;
931 pbd)
932 basic_machine=sparc-tti
933 ;;
934 pbb)
935 basic_machine=m68k-tti
936 ;;
937 pc532 | pc532-*)
938 basic_machine=ns32k-pc532
939 ;;
940 pc98)
941 basic_machine=i386-pc
942 ;;
943 pc98-*)
944 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
945 ;;
946 pentium | p5 | k5 | k6 | nexgen | viac3)
947 basic_machine=i586-pc
948 ;;
949 pentiumpro | p6 | 6x86 | athlon | athlon_*)
950 basic_machine=i686-pc
951 ;;
952 pentiumii | pentium2 | pentiumiii | pentium3)
953 basic_machine=i686-pc
954 ;;
955 pentium4)
956 basic_machine=i786-pc
957 ;;
958 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
959 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
960 ;;
961 pentiumpro-* | p6-* | 6x86-* | athlon-*)
962 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
963 ;;
964 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
965 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
966 ;;
967 pentium4-*)
968 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
969 ;;
970 pn)
971 basic_machine=pn-gould
972 ;;
973 power) basic_machine=power-ibm
974 ;;
975 ppc | ppcbe) basic_machine=powerpc-unknown
976 ;;
977 ppc-* | ppcbe-*)
978 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
979 ;;
980 ppcle | powerpclittle | ppc-le | powerpc-little)
981 basic_machine=powerpcle-unknown
982 ;;
983 ppcle-* | powerpclittle-*)
984 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
985 ;;
986 ppc64) basic_machine=powerpc64-unknown
987 ;;
988 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
989 ;;
990 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
991 basic_machine=powerpc64le-unknown
992 ;;
993 ppc64le-* | powerpc64little-*)
994 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
995 ;;
996 ps2)
997 basic_machine=i386-ibm
998 ;;
999 pw32)
1000 basic_machine=i586-unknown
1001 os=-pw32
1002 ;;
1003 rdos)
1004 basic_machine=i386-pc
1005 os=-rdos
1006 ;;
1007 rom68k)
1008 basic_machine=m68k-rom68k
1009 os=-coff
1010 ;;
1011 rm[46]00)
1012 basic_machine=mips-siemens
1013 ;;
1014 rtpc | rtpc-*)
1015 basic_machine=romp-ibm
1016 ;;
1017 s390 | s390-*)
1018 basic_machine=s390-ibm
1019 ;;
1020 s390x | s390x-*)
1021 basic_machine=s390x-ibm
1022 ;;
1023 sa29200)
1024 basic_machine=a29k-amd
1025 os=-udi
1026 ;;
1027 sb1)
1028 basic_machine=mipsisa64sb1-unknown
1029 ;;
1030 sb1el)
1031 basic_machine=mipsisa64sb1el-unknown
1032 ;;
1033 sde)
1034 basic_machine=mipsisa32-sde
1035 os=-elf
1036 ;;
1037 sei)
1038 basic_machine=mips-sei
1039 os=-seiux
1040 ;;
1041 sequent)
1042 basic_machine=i386-sequent
1043 ;;
1044 sh)
1045 basic_machine=sh-hitachi
1046 os=-hms
1047 ;;
1048 sh5el)
1049 basic_machine=sh5le-unknown
1050 ;;
1051 sh64)
1052 basic_machine=sh64-unknown
1053 ;;
1054 sparclite-wrs | simso-wrs)
1055 basic_machine=sparclite-wrs
1056 os=-vxworks
1057 ;;
1058 sps7)
1059 basic_machine=m68k-bull
1060 os=-sysv2
1061 ;;
1062 spur)
1063 basic_machine=spur-unknown
1064 ;;
1065 st2000)
1066 basic_machine=m68k-tandem
1067 ;;
1068 stratus)
1069 basic_machine=i860-stratus
1070 os=-sysv4
1071 ;;
1072 strongarm-* | thumb-*)
1073 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1074 ;;
1075 sun2)
1076 basic_machine=m68000-sun
1077 ;;
1078 sun2os3)
1079 basic_machine=m68000-sun
1080 os=-sunos3
1081 ;;
1082 sun2os4)
1083 basic_machine=m68000-sun
1084 os=-sunos4
1085 ;;
1086 sun3os3)
1087 basic_machine=m68k-sun
1088 os=-sunos3
1089 ;;
1090 sun3os4)
1091 basic_machine=m68k-sun
1092 os=-sunos4
1093 ;;
1094 sun4os3)
1095 basic_machine=sparc-sun
1096 os=-sunos3
1097 ;;
1098 sun4os4)
1099 basic_machine=sparc-sun
1100 os=-sunos4
1101 ;;
1102 sun4sol2)
1103 basic_machine=sparc-sun
1104 os=-solaris2
1105 ;;
1106 sun3 | sun3-*)
1107 basic_machine=m68k-sun
1108 ;;
1109 sun4)
1110 basic_machine=sparc-sun
1111 ;;
1112 sun386 | sun386i | roadrunner)
1113 basic_machine=i386-sun
1114 ;;
1115 sv1)
1116 basic_machine=sv1-cray
1117 os=-unicos
1118 ;;
1119 symmetry)
1120 basic_machine=i386-sequent
1121 os=-dynix
1122 ;;
1123 t3e)
1124 basic_machine=alphaev5-cray
1125 os=-unicos
1126 ;;
1127 t90)
1128 basic_machine=t90-cray
1129 os=-unicos
1130 ;;
1131 tile*)
1132 basic_machine=$basic_machine-unknown
1133 os=-linux-gnu
1134 ;;
1135 tx39)
1136 basic_machine=mipstx39-unknown
1137 ;;
1138 tx39el)
1139 basic_machine=mipstx39el-unknown
1140 ;;
1141 toad1)
1142 basic_machine=pdp10-xkl
1143 os=-tops20
1144 ;;
1145 tower | tower-32)
1146 basic_machine=m68k-ncr
1147 ;;
1148 tpf)
1149 basic_machine=s390x-ibm
1150 os=-tpf
1151 ;;
1152 udi29k)
1153 basic_machine=a29k-amd
1154 os=-udi
1155 ;;
1156 ultra3)
1157 basic_machine=a29k-nyu
1158 os=-sym1
1159 ;;
1160 v810 | necv810)
1161 basic_machine=v810-nec
1162 os=-none
1163 ;;
1164 vaxv)
1165 basic_machine=vax-dec
1166 os=-sysv
1167 ;;
1168 vms)
1169 basic_machine=vax-dec
1170 os=-vms
1171 ;;
1172 vpp*|vx|vx-*)
1173 basic_machine=f301-fujitsu
1174 ;;
1175 vxworks960)
1176 basic_machine=i960-wrs
1177 os=-vxworks
1178 ;;
1179 vxworks68)
1180 basic_machine=m68k-wrs
1181 os=-vxworks
1182 ;;
1183 vxworks29k)
1184 basic_machine=a29k-wrs
1185 os=-vxworks
1186 ;;
1187 w65*)
1188 basic_machine=w65-wdc
1189 os=-none
1190 ;;
1191 w89k-*)
1192 basic_machine=hppa1.1-winbond
1193 os=-proelf
1194 ;;
1195 xbox)
1196 basic_machine=i686-pc
1197 os=-mingw32
1198 ;;
1199 xps | xps100)
1200 basic_machine=xps100-honeywell
1201 ;;
1202 xscale-* | xscalee[bl]-*)
1203 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1204 ;;
1205 ymp)
1206 basic_machine=ymp-cray
1207 os=-unicos
1208 ;;
1209 z8k-*-coff)
1210 basic_machine=z8k-unknown
1211 os=-sim
1212 ;;
1213 z80-*-coff)
1214 basic_machine=z80-unknown
1215 os=-sim
1216 ;;
1217 none)
1218 basic_machine=none-none
1219 os=-none
1220 ;;
1221
1222 # Here we handle the default manufacturer of certain CPU types. It is in
1223 # some cases the only manufacturer, in others, it is the most popular.
1224 w89k)
1225 basic_machine=hppa1.1-winbond
1226 ;;
1227 op50n)
1228 basic_machine=hppa1.1-oki
1229 ;;
1230 op60c)
1231 basic_machine=hppa1.1-oki
1232 ;;
1233 romp)
1234 basic_machine=romp-ibm
1235 ;;
1236 mmix)
1237 basic_machine=mmix-knuth
1238 ;;
1239 rs6000)
1240 basic_machine=rs6000-ibm
1241 ;;
1242 vax)
1243 basic_machine=vax-dec
1244 ;;
1245 pdp10)
1246 # there are many clones, so DEC is not a safe bet
1247 basic_machine=pdp10-unknown
1248 ;;
1249 pdp11)
1250 basic_machine=pdp11-dec
1251 ;;
1252 we32k)
1253 basic_machine=we32k-att
1254 ;;
1255 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1256 basic_machine=sh-unknown
1257 ;;
1258 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1259 basic_machine=sparc-sun
1260 ;;
1261 cydra)
1262 basic_machine=cydra-cydrome
1263 ;;
1264 orion)
1265 basic_machine=orion-highlevel
1266 ;;
1267 orion105)
1268 basic_machine=clipper-highlevel
1269 ;;
1270 mac | mpw | mac-mpw)
1271 basic_machine=m68k-apple
1272 ;;
1273 pmac | pmac-mpw)
1274 basic_machine=powerpc-apple
1275 ;;
1276 *-unknown)
1277 # Make sure to match an already-canonicalized machine name.
1278 ;;
1279 *)
1280 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1281 exit 1
1282 ;;
1283 esac
1284
1285 # Here we canonicalize certain aliases for manufacturers.
1286 case $basic_machine in
1287 *-digital*)
1288 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1289 ;;
1290 *-commodore*)
1291 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1292 ;;
1293 *)
1294 ;;
1295 esac
1296
1297 # Decode manufacturer-specific aliases for certain operating systems.
1298
1299 if [ x"$os" != x"" ]
1300 then
1301 case $os in
1302 # First match some system type aliases
1303 # that might get confused with valid system types.
1304 # -solaris* is a basic system type, with this one exception.
1305 -auroraux)
1306 os=-auroraux
1307 ;;
1308 -solaris1 | -solaris1.*)
1309 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1310 ;;
1311 -solaris)
1312 os=-solaris2
1313 ;;
1314 -svr4*)
1315 os=-sysv4
1316 ;;
1317 -unixware*)
1318 os=-sysv4.2uw
1319 ;;
1320 -gnu/linux*)
1321 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1322 ;;
1323 # First accept the basic system types.
1324 # The portable systems comes first.
1325 # Each alternative MUST END IN A *, to match a version number.
1326 # -sysv* is not here because it comes later, after sysvr4.
1327 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1328 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1329 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1330 | -sym* | -kopensolaris* \
1331 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1332 | -aos* | -aros* \
1333 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1334 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1335 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1336 | -openbsd* | -solidbsd* \
1337 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1338 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1339 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1340 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1341 | -chorusos* | -chorusrdb* | -cegcc* \
1342 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1343 | -mingw32* | -linux-gnu* | -linux-android* \
1344 | -linux-newlib* | -linux-uclibc* \
1345 | -uxpv* | -beos* | -mpeix* | -udk* \
1346 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1347 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1348 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1349 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1350 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1351 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1352 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
1353 # Remember, each alternative MUST END IN *, to match a version number.
1354 ;;
1355 -qnx*)
1356 case $basic_machine in
1357 x86-* | i*86-*)
1358 ;;
1359 *)
1360 os=-nto$os
1361 ;;
1362 esac
1363 ;;
1364 -nto-qnx*)
1365 ;;
1366 -nto*)
1367 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1368 ;;
1369 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1370 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1371 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1372 ;;
1373 -mac*)
1374 os=`echo $os | sed -e 's|mac|macos|'`
1375 ;;
1376 -linux-dietlibc)
1377 os=-linux-dietlibc
1378 ;;
1379 -linux*)
1380 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1381 ;;
1382 -sunos5*)
1383 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1384 ;;
1385 -sunos6*)
1386 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1387 ;;
1388 -opened*)
1389 os=-openedition
1390 ;;
1391 -os400*)
1392 os=-os400
1393 ;;
1394 -wince*)
1395 os=-wince
1396 ;;
1397 -osfrose*)
1398 os=-osfrose
1399 ;;
1400 -osf*)
1401 os=-osf
1402 ;;
1403 -utek*)
1404 os=-bsd
1405 ;;
1406 -dynix*)
1407 os=-bsd
1408 ;;
1409 -acis*)
1410 os=-aos
1411 ;;
1412 -atheos*)
1413 os=-atheos
1414 ;;
1415 -syllable*)
1416 os=-syllable
1417 ;;
1418 -386bsd)
1419 os=-bsd
1420 ;;
1421 -ctix* | -uts*)
1422 os=-sysv
1423 ;;
1424 -nova*)
1425 os=-rtmk-nova
1426 ;;
1427 -ns2 )
1428 os=-nextstep2
1429 ;;
1430 -nsk*)
1431 os=-nsk
1432 ;;
1433 # Preserve the version number of sinix5.
1434 -sinix5.*)
1435 os=`echo $os | sed -e 's|sinix|sysv|'`
1436 ;;
1437 -sinix*)
1438 os=-sysv4
1439 ;;
1440 -tpf*)
1441 os=-tpf
1442 ;;
1443 -triton*)
1444 os=-sysv3
1445 ;;
1446 -oss*)
1447 os=-sysv3
1448 ;;
1449 -svr4)
1450 os=-sysv4
1451 ;;
1452 -svr3)
1453 os=-sysv3
1454 ;;
1455 -sysvr4)
1456 os=-sysv4
1457 ;;
1458 # This must come after -sysvr4.
1459 -sysv*)
1460 ;;
1461 -ose*)
1462 os=-ose
1463 ;;
1464 -es1800*)
1465 os=-ose
1466 ;;
1467 -xenix)
1468 os=-xenix
1469 ;;
1470 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1471 os=-mint
1472 ;;
1473 -aros*)
1474 os=-aros
1475 ;;
1476 -kaos*)
1477 os=-kaos
1478 ;;
1479 -zvmoe)
1480 os=-zvmoe
1481 ;;
1482 -dicos*)
1483 os=-dicos
1484 ;;
1485 -nacl*)
1486 ;;
1487 -none)
1488 ;;
1489 *)
1490 # Get rid of the `-' at the beginning of $os.
1491 os=`echo $os | sed 's/[^-]*-//'`
1492 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1493 exit 1
1494 ;;
1495 esac
1496 else
1497
1498 # Here we handle the default operating systems that come with various machines.
1499 # The value should be what the vendor currently ships out the door with their
1500 # machine or put another way, the most popular os provided with the machine.
1501
1502 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1503 # "-sun"), then you have to tell the case statement up towards the top
1504 # that MANUFACTURER isn't an operating system. Otherwise, code above
1505 # will signal an error saying that MANUFACTURER isn't an operating
1506 # system, and we'll never get to this point.
1507
1508 case $basic_machine in
1509 score-*)
1510 os=-elf
1511 ;;
1512 spu-*)
1513 os=-elf
1514 ;;
1515 *-acorn)
1516 os=-riscix1.2
1517 ;;
1518 arm*-rebel)
1519 os=-linux
1520 ;;
1521 arm*-semi)
1522 os=-aout
1523 ;;
1524 c4x-* | tic4x-*)
1525 os=-coff
1526 ;;
1527 tic54x-*)
1528 os=-coff
1529 ;;
1530 tic55x-*)
1531 os=-coff
1532 ;;
1533 tic6x-*)
1534 os=-coff
1535 ;;
1536 # This must come before the *-dec entry.
1537 pdp10-*)
1538 os=-tops20
1539 ;;
1540 pdp11-*)
1541 os=-none
1542 ;;
1543 *-dec | vax-*)
1544 os=-ultrix4.2
1545 ;;
1546 m68*-apollo)
1547 os=-domain
1548 ;;
1549 i386-sun)
1550 os=-sunos4.0.2
1551 ;;
1552 m68000-sun)
1553 os=-sunos3
1554 # This also exists in the configure program, but was not the
1555 # default.
1556 # os=-sunos4
1557 ;;
1558 m68*-cisco)
1559 os=-aout
1560 ;;
1561 mep-*)
1562 os=-elf
1563 ;;
1564 mips*-cisco)
1565 os=-elf
1566 ;;
1567 mips*-*)
1568 os=-elf
1569 ;;
1570 or32-*)
1571 os=-coff
1572 ;;
1573 *-tti) # must be before sparc entry or we get the wrong os.
1574 os=-sysv3
1575 ;;
1576 sparc-* | *-sun)
1577 os=-sunos4.1.1
1578 ;;
1579 *-be)
1580 os=-beos
1581 ;;
1582 *-haiku)
1583 os=-haiku
1584 ;;
1585 *-ibm)
1586 os=-aix
1587 ;;
1588 *-knuth)
1589 os=-mmixware
1590 ;;
1591 *-wec)
1592 os=-proelf
1593 ;;
1594 *-winbond)
1595 os=-proelf
1596 ;;
1597 *-oki)
1598 os=-proelf
1599 ;;
1600 *-hp)
1601 os=-hpux
1602 ;;
1603 *-hitachi)
1604 os=-hiux
1605 ;;
1606 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1607 os=-sysv
1608 ;;
1609 *-cbm)
1610 os=-amigaos
1611 ;;
1612 *-dg)
1613 os=-dgux
1614 ;;
1615 *-dolphin)
1616 os=-sysv3
1617 ;;
1618 m68k-ccur)
1619 os=-rtu
1620 ;;
1621 m88k-omron*)
1622 os=-luna
1623 ;;
1624 *-next )
1625 os=-nextstep
1626 ;;
1627 *-sequent)
1628 os=-ptx
1629 ;;
1630 *-crds)
1631 os=-unos
1632 ;;
1633 *-ns)
1634 os=-genix
1635 ;;
1636 i370-*)
1637 os=-mvs
1638 ;;
1639 *-next)
1640 os=-nextstep3
1641 ;;
1642 *-gould)
1643 os=-sysv
1644 ;;
1645 *-highlevel)
1646 os=-bsd
1647 ;;
1648 *-encore)
1649 os=-bsd
1650 ;;
1651 *-sgi)
1652 os=-irix
1653 ;;
1654 *-siemens)
1655 os=-sysv4
1656 ;;
1657 *-masscomp)
1658 os=-rtu
1659 ;;
1660 f30[01]-fujitsu | f700-fujitsu)
1661 os=-uxpv
1662 ;;
1663 *-rom68k)
1664 os=-coff
1665 ;;
1666 *-*bug)
1667 os=-coff
1668 ;;
1669 *-apple)
1670 os=-macos
1671 ;;
1672 *-atari*)
1673 os=-mint
1674 ;;
1675 *)
1676 os=-none
1677 ;;
1678 esac
1679 fi
1680
1681 # Here we handle the case where we know the os, and the CPU type, but not the
1682 # manufacturer. We pick the logical manufacturer.
1683 vendor=unknown
1684 case $basic_machine in
1685 *-unknown)
1686 case $os in
1687 -riscix*)
1688 vendor=acorn
1689 ;;
1690 -sunos*)
1691 vendor=sun
1692 ;;
1693 -cnk*|-aix*)
1694 vendor=ibm
1695 ;;
1696 -beos*)
1697 vendor=be
1698 ;;
1699 -hpux*)
1700 vendor=hp
1701 ;;
1702 -mpeix*)
1703 vendor=hp
1704 ;;
1705 -hiux*)
1706 vendor=hitachi
1707 ;;
1708 -unos*)
1709 vendor=crds
1710 ;;
1711 -dgux*)
1712 vendor=dg
1713 ;;
1714 -luna*)
1715 vendor=omron
1716 ;;
1717 -genix*)
1718 vendor=ns
1719 ;;
1720 -mvs* | -opened*)
1721 vendor=ibm
1722 ;;
1723 -os400*)
1724 vendor=ibm
1725 ;;
1726 -ptx*)
1727 vendor=sequent
1728 ;;
1729 -tpf*)
1730 vendor=ibm
1731 ;;
1732 -vxsim* | -vxworks* | -windiss*)
1733 vendor=wrs
1734 ;;
1735 -aux*)
1736 vendor=apple
1737 ;;
1738 -hms*)
1739 vendor=hitachi
1740 ;;
1741 -mpw* | -macos*)
1742 vendor=apple
1743 ;;
1744 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1745 vendor=atari
1746 ;;
1747 -vos*)
1748 vendor=stratus
1749 ;;
1750 esac
1751 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1752 ;;
1753 esac
1754
1755 echo $basic_machine$os
1756 exit
1757
1758 # Local variables:
1759 # eval: (add-hook 'write-file-hooks 'time-stamp)
1760 # time-stamp-start: "timestamp='"
1761 # time-stamp-format: "%:y-%02m-%02d"
1762 # time-stamp-end: "'"
1763 # End:
+0
-423
saslauthd/config/depcomp less more
0 #! /bin/sh
1
2 # depcomp - compile a program generating dependencies as side-effects
3 # Copyright 1999, 2000 Free Software Foundation, Inc.
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
8 # any later version.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 # 02111-1307, USA.
19
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that program.
24
25 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
26
27 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
28 echo "depcomp: Variables source, object and depmode must be set" 1>&2
29 exit 1
30 fi
31 # `libtool' can also be set to `yes' or `no'.
32
33 if test -z "$depfile"; then
34 base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
35 dir=`echo "$object" | sed 's,/.*$,/,'`
36 if test "$dir" = "$object"; then
37 dir=
38 fi
39 # FIXME: should be _deps on DOS.
40 depfile="$dir.deps/$base"
41 fi
42
43 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
44
45 rm -f "$tmpdepfile"
46
47 # Some modes work just like other modes, but use different flags. We
48 # parameterize here, but still list the modes in the big case below,
49 # to make depend.m4 easier to write. Note that we *cannot* use a case
50 # here, because this file can only contain one case statement.
51 if test "$depmode" = hp; then
52 # HP compiler uses -M and no extra arg.
53 gccflag=-M
54 depmode=gcc
55 fi
56
57 if test "$depmode" = dashXmstdout; then
58 # This is just like dashmstdout with a different argument.
59 dashmflag=-xM
60 depmode=dashmstdout
61 fi
62
63 case "$depmode" in
64 gcc3)
65 ## gcc 3 implements dependency tracking that does exactly what
66 ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
67 ## it if -MD -MP comes after the -MF stuff. Hmm.
68 "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
69 stat=$?
70 if test $stat -eq 0; then :
71 else
72 rm -f "$tmpdepfile"
73 exit $stat
74 fi
75 mv "$tmpdepfile" "$depfile"
76 ;;
77
78 gcc)
79 ## There are various ways to get dependency output from gcc. Here's
80 ## why we pick this rather obscure method:
81 ## - Don't want to use -MD because we'd like the dependencies to end
82 ## up in a subdir. Having to rename by hand is ugly.
83 ## (We might end up doing this anyway to support other compilers.)
84 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
85 ## -MM, not -M (despite what the docs say).
86 ## - Using -M directly means running the compiler twice (even worse
87 ## than renaming).
88 if test -z "$gccflag"; then
89 gccflag=-MD,
90 fi
91 "$@" -Wp,"$gccflag$tmpdepfile"
92 stat=$?
93 if test $stat -eq 0; then :
94 else
95 rm -f "$tmpdepfile"
96 exit $stat
97 fi
98 rm -f "$depfile"
99 echo "$object : \\" > "$depfile"
100 alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
101 ## The second -e expression handles DOS-style file names with drive letters.
102 sed -e 's/^[^:]*: / /' \
103 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
104 ## This next piece of magic avoids the `deleted header file' problem.
105 ## The problem is that when a header file which appears in a .P file
106 ## is deleted, the dependency causes make to die (because there is
107 ## typically no way to rebuild the header). We avoid this by adding
108 ## dummy dependencies for each header file. Too bad gcc doesn't do
109 ## this for us directly.
110 tr ' ' '
111 ' < "$tmpdepfile" |
112 ## Some versions of gcc put a space before the `:'. On the theory
113 ## that the space means something, we add a space to the output as
114 ## well.
115 ## Some versions of the HPUX 10.20 sed can't process this invocation
116 ## correctly. Breaking it into two sed invocations is a workaround.
117 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
118 rm -f "$tmpdepfile"
119 ;;
120
121 hp)
122 # This case exists only to let depend.m4 do its work. It works by
123 # looking at the text of this script. This case will never be run,
124 # since it is checked for above.
125 exit 1
126 ;;
127
128 sgi)
129 if test "$libtool" = yes; then
130 "$@" "-Wp,-MDupdate,$tmpdepfile"
131 else
132 "$@" -MDupdate "$tmpdepfile"
133 fi
134 stat=$?
135 if test $stat -eq 0; then :
136 else
137 rm -f "$tmpdepfile"
138 exit $stat
139 fi
140 rm -f "$depfile"
141
142 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
143 echo "$object : \\" > "$depfile"
144
145 # Clip off the initial element (the dependent). Don't try to be
146 # clever and replace this with sed code, as IRIX sed won't handle
147 # lines with more than a fixed number of characters (4096 in
148 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
149 # the IRIX cc adds comments like `#:fec' to the end of the
150 # dependency line.
151 tr ' ' '
152 ' < "$tmpdepfile" \
153 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
154 tr '
155 ' ' ' >> $depfile
156 echo >> $depfile
157
158 # The second pass generates a dummy entry for each header file.
159 tr ' ' '
160 ' < "$tmpdepfile" \
161 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
162 >> $depfile
163 else
164 # The sourcefile does not contain any dependencies, so just
165 # store a dummy comment line, to avoid errors with the Makefile
166 # "include basename.Plo" scheme.
167 echo "#dummy" > "$depfile"
168 fi
169 rm -f "$tmpdepfile"
170 ;;
171
172 aix)
173 # The C for AIX Compiler uses -M and outputs the dependencies
174 # in a .u file. This file always lives in the current directory.
175 # Also, the AIX compiler puts `$object:' at the start of each line;
176 # $object doesn't have directory information.
177 stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
178 tmpdepfile="$stripped.u"
179 outname="$stripped.o"
180 if test "$libtool" = yes; then
181 "$@" -Wc,-M
182 else
183 "$@" -M
184 fi
185
186 stat=$?
187 if test $stat -eq 0; then :
188 else
189 rm -f "$tmpdepfile"
190 exit $stat
191 fi
192
193 if test -f "$tmpdepfile"; then
194 # Each line is of the form `foo.o: dependent.h'.
195 # Do two passes, one to just change these to
196 # `$object: dependent.h' and one to simply `dependent.h:'.
197 sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
198 sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
199 else
200 # The sourcefile does not contain any dependencies, so just
201 # store a dummy comment line, to avoid errors with the Makefile
202 # "include basename.Plo" scheme.
203 echo "#dummy" > "$depfile"
204 fi
205 rm -f "$tmpdepfile"
206 ;;
207
208 tru64)
209 # The Tru64 compiler uses -MD to generate dependencies as a side
210 # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
211 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
212 # dependencies in `foo.d' instead, so we check for that too.
213 # Subdirectories are respected.
214 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
215 test "x$dir" = "x$object" && dir=
216 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
217
218 if test "$libtool" = yes; then
219 tmpdepfile1="$dir.libs/$base.lo.d"
220 tmpdepfile2="$dir.libs/$base.d"
221 "$@" -Wc,-MD
222 else
223 tmpdepfile1="$dir$base.o.d"
224 tmpdepfile2="$dir$base.d"
225 "$@" -MD
226 fi
227
228 stat=$?
229 if test $stat -eq 0; then :
230 else
231 rm -f "$tmpdepfile1" "$tmpdepfile2"
232 exit $stat
233 fi
234
235 if test -f "$tmpdepfile1"; then
236 tmpdepfile="$tmpdepfile1"
237 else
238 tmpdepfile="$tmpdepfile2"
239 fi
240 if test -f "$tmpdepfile"; then
241 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
242 # That's a space and a tab in the [].
243 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
244 else
245 echo "#dummy" > "$depfile"
246 fi
247 rm -f "$tmpdepfile"
248 ;;
249
250 #nosideeffect)
251 # This comment above is used by automake to tell side-effect
252 # dependency tracking mechanisms from slower ones.
253
254 dashmstdout)
255 # Important note: in order to support this mode, a compiler *must*
256 # always write the proprocessed file to stdout, regardless of -o.
257 "$@" || exit $?
258
259 # Remove the call to Libtool.
260 if test "$libtool" = yes; then
261 while test $1 != '--mode=compile'; do
262 shift
263 done
264 shift
265 fi
266
267 # Remove `-o $object'. We will use -o /dev/null later,
268 # however we can't do the remplacement now because
269 # `-o $object' might simply not be used
270 IFS=" "
271 for arg
272 do
273 case $arg in
274 -o)
275 shift
276 ;;
277 $object)
278 shift
279 ;;
280 *)
281 set fnord "$@" "$arg"
282 shift # fnord
283 shift # $arg
284 ;;
285 esac
286 done
287
288 test -z "$dashmflag" && dashmflag=-M
289 "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
290 rm -f "$depfile"
291 cat < "$tmpdepfile" > "$depfile"
292 tr ' ' '
293 ' < "$tmpdepfile" | \
294 ## Some versions of the HPUX 10.20 sed can't process this invocation
295 ## correctly. Breaking it into two sed invocations is a workaround.
296 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
297 rm -f "$tmpdepfile"
298 ;;
299
300 dashXmstdout)
301 # This case only exists to satisfy depend.m4. It is never actually
302 # run, as this mode is specially recognized in the preamble.
303 exit 1
304 ;;
305
306 makedepend)
307 "$@" || exit $?
308 # X makedepend
309 shift
310 cleared=no
311 for arg in "$@"; do
312 case $cleared in
313 no)
314 set ""; shift
315 cleared=yes ;;
316 esac
317 case "$arg" in
318 -D*|-I*)
319 set fnord "$@" "$arg"; shift ;;
320 -*)
321 ;;
322 *)
323 set fnord "$@" "$arg"; shift ;;
324 esac
325 done
326 obj_suffix="`echo $object | sed 's/^.*\././'`"
327 touch "$tmpdepfile"
328 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
329 rm -f "$depfile"
330 cat < "$tmpdepfile" > "$depfile"
331 sed '1,2d' "$tmpdepfile" | tr ' ' '
332 ' | \
333 ## Some versions of the HPUX 10.20 sed can't process this invocation
334 ## correctly. Breaking it into two sed invocations is a workaround.
335 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
336 rm -f "$tmpdepfile" "$tmpdepfile".bak
337 ;;
338
339 cpp)
340 # Important note: in order to support this mode, a compiler *must*
341 # always write the proprocessed file to stdout.
342 "$@" || exit $?
343
344 # Remove the call to Libtool.
345 if test "$libtool" = yes; then
346 while test $1 != '--mode=compile'; do
347 shift
348 done
349 shift
350 fi
351
352 # Remove `-o $object'.
353 IFS=" "
354 for arg
355 do
356 case $arg in
357 -o)
358 shift
359 ;;
360 $object)
361 shift
362 ;;
363 *)
364 set fnord "$@" "$arg"
365 shift # fnord
366 shift # $arg
367 ;;
368 esac
369 done
370
371 "$@" -E |
372 sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
373 sed '$ s: \\$::' > "$tmpdepfile"
374 rm -f "$depfile"
375 echo "$object : \\" > "$depfile"
376 cat < "$tmpdepfile" >> "$depfile"
377 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
378 rm -f "$tmpdepfile"
379 ;;
380
381 msvisualcpp)
382 # Important note: in order to support this mode, a compiler *must*
383 # always write the proprocessed file to stdout, regardless of -o,
384 # because we must use -o when running libtool.
385 "$@" || exit $?
386 IFS=" "
387 for arg
388 do
389 case "$arg" in
390 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
391 set fnord "$@"
392 shift
393 shift
394 ;;
395 *)
396 set fnord "$@" "$arg"
397 shift
398 shift
399 ;;
400 esac
401 done
402 "$@" -E |
403 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
404 rm -f "$depfile"
405 echo "$object : \\" > "$depfile"
406 . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
407 echo " " >> "$depfile"
408 . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
409 rm -f "$tmpdepfile"
410 ;;
411
412 none)
413 exec "$@"
414 ;;
415
416 *)
417 echo "Unknown depmode $depmode" 1>&2
418 exit 1
419 ;;
420 esac
421
422 exit 0
+0
-276
saslauthd/config/install-sh less more
0 #!/bin/sh
1 #
2 # install - install a program, script, or datafile
3 # This comes from X11R5 (mit/util/scripts/install.sh).
4 #
5 # Copyright 1991 by the Massachusetts Institute of Technology
6 #
7 # Permission to use, copy, modify, distribute, and sell this software and its
8 # documentation for any purpose is hereby granted without fee, provided that
9 # the above copyright notice appear in all copies and that both that
10 # copyright notice and this permission notice appear in supporting
11 # documentation, and that the name of M.I.T. not be used in advertising or
12 # publicity pertaining to distribution of the software without specific,
13 # written prior permission. M.I.T. makes no representations about the
14 # suitability of this software for any purpose. It is provided "as is"
15 # without express or implied warranty.
16 #
17 # Calling this script install-sh is preferred over install.sh, to prevent
18 # `make' implicit rules from creating a file called install from it
19 # when there is no Makefile.
20 #
21 # This script is compatible with the BSD install script, but was written
22 # from scratch. It can only install one file at a time, a restriction
23 # shared with many OS's install programs.
24
25
26 # set DOITPROG to echo to test this script
27
28 # Don't use :- since 4.3BSD and earlier shells don't like it.
29 doit="${DOITPROG-}"
30
31
32 # put in absolute paths if you don't have them in your path; or use env. vars.
33
34 mvprog="${MVPROG-mv}"
35 cpprog="${CPPROG-cp}"
36 chmodprog="${CHMODPROG-chmod}"
37 chownprog="${CHOWNPROG-chown}"
38 chgrpprog="${CHGRPPROG-chgrp}"
39 stripprog="${STRIPPROG-strip}"
40 rmprog="${RMPROG-rm}"
41 mkdirprog="${MKDIRPROG-mkdir}"
42
43 transformbasename=""
44 transform_arg=""
45 instcmd="$mvprog"
46 chmodcmd="$chmodprog 0755"
47 chowncmd=""
48 chgrpcmd=""
49 stripcmd=""
50 rmcmd="$rmprog -f"
51 mvcmd="$mvprog"
52 src=""
53 dst=""
54 dir_arg=""
55
56 while [ x"$1" != x ]; do
57 case $1 in
58 -c) instcmd=$cpprog
59 shift
60 continue;;
61
62 -d) dir_arg=true
63 shift
64 continue;;
65
66 -m) chmodcmd="$chmodprog $2"
67 shift
68 shift
69 continue;;
70
71 -o) chowncmd="$chownprog $2"
72 shift
73 shift
74 continue;;
75
76 -g) chgrpcmd="$chgrpprog $2"
77 shift
78 shift
79 continue;;
80
81 -s) stripcmd=$stripprog
82 shift
83 continue;;
84
85 -t=*) transformarg=`echo $1 | sed 's/-t=//'`
86 shift
87 continue;;
88
89 -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
90 shift
91 continue;;
92
93 *) if [ x"$src" = x ]
94 then
95 src=$1
96 else
97 # this colon is to work around a 386BSD /bin/sh bug
98 :
99 dst=$1
100 fi
101 shift
102 continue;;
103 esac
104 done
105
106 if [ x"$src" = x ]
107 then
108 echo "$0: no input file specified" >&2
109 exit 1
110 else
111 :
112 fi
113
114 if [ x"$dir_arg" != x ]; then
115 dst=$src
116 src=""
117
118 if [ -d "$dst" ]; then
119 instcmd=:
120 chmodcmd=""
121 else
122 instcmd=$mkdirprog
123 fi
124 else
125
126 # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
127 # might cause directories to be created, which would be especially bad
128 # if $src (and thus $dsttmp) contains '*'.
129
130 if [ -f "$src" ] || [ -d "$src" ]
131 then
132 :
133 else
134 echo "$0: $src does not exist" >&2
135 exit 1
136 fi
137
138 if [ x"$dst" = x ]
139 then
140 echo "$0: no destination specified" >&2
141 exit 1
142 else
143 :
144 fi
145
146 # If destination is a directory, append the input filename; if your system
147 # does not like double slashes in filenames, you may need to add some logic
148
149 if [ -d "$dst" ]
150 then
151 dst=$dst/`basename "$src"`
152 else
153 :
154 fi
155 fi
156
157 ## this sed command emulates the dirname command
158 dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
159
160 # Make sure that the destination directory exists.
161 # this part is taken from Noah Friedman's mkinstalldirs script
162
163 # Skip lots of stat calls in the usual case.
164 if [ ! -d "$dstdir" ]; then
165 defaultIFS='
166 '
167 IFS="${IFS-$defaultIFS}"
168
169 oIFS=$IFS
170 # Some sh's can't handle IFS=/ for some reason.
171 IFS='%'
172 set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
173 IFS=$oIFS
174
175 pathcomp=''
176
177 while [ $# -ne 0 ] ; do
178 pathcomp=$pathcomp$1
179 shift
180
181 if [ ! -d "$pathcomp" ] ;
182 then
183 $mkdirprog "$pathcomp"
184 else
185 :
186 fi
187
188 pathcomp=$pathcomp/
189 done
190 fi
191
192 if [ x"$dir_arg" != x ]
193 then
194 $doit $instcmd "$dst" &&
195
196 if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
197 if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
198 if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
199 if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
200 else
201
202 # If we're going to rename the final executable, determine the name now.
203
204 if [ x"$transformarg" = x ]
205 then
206 dstfile=`basename "$dst"`
207 else
208 dstfile=`basename "$dst" $transformbasename |
209 sed $transformarg`$transformbasename
210 fi
211
212 # don't allow the sed command to completely eliminate the filename
213
214 if [ x"$dstfile" = x ]
215 then
216 dstfile=`basename "$dst"`
217 else
218 :
219 fi
220
221 # Make a couple of temp file names in the proper directory.
222
223 dsttmp=$dstdir/#inst.$$#
224 rmtmp=$dstdir/#rm.$$#
225
226 # Trap to clean up temp files at exit.
227
228 trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
229 trap '(exit $?); exit' 1 2 13 15
230
231 # Move or copy the file name to the temp name
232
233 $doit $instcmd "$src" "$dsttmp" &&
234
235 # and set any options; do chmod last to preserve setuid bits
236
237 # If any of these fail, we abort the whole thing. If we want to
238 # ignore errors from any of these, just make sure not to ignore
239 # errors from the above "$doit $instcmd $src $dsttmp" command.
240
241 if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
242 if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
243 if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
244 if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
245
246 # Now remove or move aside any old file at destination location. We try this
247 # two ways since rm can't unlink itself on some systems and the destination
248 # file might be busy for other reasons. In this case, the final cleanup
249 # might fail but the new file should still install successfully.
250
251 {
252 if [ -f "$dstdir/$dstfile" ]
253 then
254 $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
255 $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
256 {
257 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
258 (exit 1); exit
259 }
260 else
261 :
262 fi
263 } &&
264
265 # Now rename the file to the real destination.
266
267 $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
268
269 fi &&
270
271 # The final little trick to "correctly" pass the exit status to the exit trap.
272
273 {
274 (exit 0); exit
275 }
+0
-153
saslauthd/config/kerberos_v4.m4 less more
0 dnl checking for kerberos 4 libraries (and DES)
1
2 AC_DEFUN([SASL_DES_CHK], [
3 AC_ARG_WITH(des, [ --with-des=DIR with DES (look in DIR) [yes] ],
4 with_des=$withval,
5 with_des=yes)
6
7 LIB_DES=""
8 if test "$with_des" != no; then
9 if test -d $with_des; then
10 CPPFLAGS="$CPPFLAGS -I${with_des}/include"
11 LDFLAGS="$LDFLAGS -L${with_des}/lib"
12 fi
13
14 if test "$with_openssl" != no; then
15 dnl check for openssl installing -lcrypto, then make vanilla check
16 AC_CHECK_LIB(crypto, des_cbc_encrypt, [
17 AC_CHECK_HEADER(openssl/des.h, [AC_DEFINE(WITH_SSL_DES,[],[Use OpenSSL DES Implementation])
18 LIB_DES="-lcrypto";
19 with_des=yes],
20 with_des=no)],
21 with_des=no, $LIB_RSAREF)
22
23 dnl same test again, different symbol name
24 if test "$with_des" = no; then
25 AC_CHECK_LIB(crypto, DES_cbc_encrypt, [
26 AC_CHECK_HEADER(openssl/des.h, [AC_DEFINE(WITH_SSL_DES,[],[Use OpenSSL DES Implementation])
27 LIB_DES="-lcrypto";
28 with_des=yes],
29 with_des=no)],
30 with_des=no, $LIB_RSAREF)
31 fi
32 fi
33
34 if test "$with_des" = no; then
35 AC_CHECK_LIB(des, des_cbc_encrypt, [LIB_DES="-ldes";
36 with_des=yes], with_des=no)
37 fi
38
39 if test "$with_des" = no; then
40 AC_CHECK_LIB(des425, des_cbc_encrypt, [LIB_DES="-ldes425";
41 with_des=yes], with_des=no)
42 fi
43
44 if test "$with_des" = no; then
45 AC_CHECK_LIB(des524, des_cbc_encrypt, [LIB_DES="-ldes524";
46 with_des=yes], with_des=no)
47 fi
48
49 if test "$with_des" = no; then
50 dnl if openssl is around, we might be able to use that for des
51
52 dnl if openssl has been compiled with the rsaref2 libraries,
53 dnl we need to include the rsaref libraries in the crypto check
54 LIB_RSAREF=""
55 AC_CHECK_LIB(rsaref, RSAPublicEncrypt,
56 LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes,
57 cmu_have_rsaref=no)
58
59 AC_CHECK_LIB(crypto, des_cbc_encrypt, [
60 AC_CHECK_HEADER(openssl/des.h, [AC_DEFINE(WITH_SSL_DES,[],[Use OpenSSL DES Implementation])
61 LIB_DES="-lcrypto";
62 with_des=yes],
63 with_des=no)],
64 with_des=no, $LIB_RSAREF)
65 fi
66 fi
67
68 if test "$with_des" != no; then
69 AC_DEFINE(WITH_DES,[],[Use DES])
70 fi
71
72 AC_SUBST(LIB_DES)
73 ])
74
75 AC_DEFUN([SASL_KERBEROS_V4_CHK], [
76 AC_REQUIRE([SASL_DES_CHK])
77
78 AC_ARG_ENABLE(krb4, [ --enable-krb4 enable KERBEROS_V4 authentication [[no]] ],
79 krb4=$enableval,
80 krb4=no)
81
82 if test "$krb4" != no; then
83 dnl In order to compile kerberos4, we need libkrb and libdes.
84 dnl (We've already gotten libdes from SASL_DES_CHK)
85 dnl we might need -lresolv for kerberos
86 AC_CHECK_LIB(resolv,res_search)
87
88 dnl if we were ambitious, we would look more aggressively for the
89 dnl krb4 install
90 if test -d ${krb4}; then
91 AC_CACHE_CHECK(for Kerberos includes, cyrus_krbinclude, [
92 for krbhloc in include/kerberosIV include/kerberos include
93 do
94 if test -f ${krb4}/${krbhloc}/krb.h ; then
95 cyrus_krbinclude=${krb4}/${krbhloc}
96 break
97 fi
98 done
99 ])
100
101 if test -n "${cyrus_krbinclude}"; then
102 CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
103 fi
104 LDFLAGS="$LDFLAGS -L$krb4/lib"
105 fi
106
107 if test "$with_des" != no; then
108 AC_CHECK_HEADER(krb.h, [
109 AC_CHECK_LIB(com_err, com_err, [
110 AC_CHECK_LIB(krb, krb_mk_priv,
111 [COM_ERR="-lcom_err"; SASL_KRB_LIB="-lkrb"; krb4lib="yes"],
112 krb4lib=no, $LIB_DES -lcom_err)], [
113 AC_CHECK_LIB(krb, krb_mk_priv,
114 [COM_ERR=""; SASL_KRB_LIB="-lkrb"; krb4lib="yes"],
115 krb4lib=no, $LIB_DES)])], krb4="no")
116
117 if test "$krb4" != "no" -a "$krb4lib" = "no"; then
118 AC_CHECK_LIB(krb4, krb_mk_priv,
119 [COM_ERR=""; SASL_KRB_LIB="-lkrb4"; krb4=yes],
120 krb4=no, $LIB_DES)
121 fi
122 if test "$krb4" = no; then
123 AC_WARN(No Kerberos V4 found)
124 fi
125 else
126 AC_WARN(No DES library found for Kerberos V4 support)
127 krb4=no
128 fi
129 fi
130
131 if test "$krb4" != no; then
132 cmu_save_LIBS="$LIBS"
133 LIBS="$LIBS $SASL_KRB_LIB"
134 AC_CHECK_FUNCS(krb_get_err_text)
135 LIBS="$cmu_save_LIBS"
136 fi
137
138 AC_MSG_CHECKING(KERBEROS_V4)
139 if test "$krb4" != no; then
140 AC_MSG_RESULT(enabled)
141 SASL_MECHS="$SASL_MECHS libkerberos4.la"
142 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/kerberos4.c"
143 SASL_STATIC_OBJS="$SASL_STATIC_OBJS kerberos4.o"
144 AC_DEFINE(STATIC_KERBEROS4,[],[User KERBEROS_V4 Staticly])
145 AC_DEFINE(HAVE_KRB,[],[Do we have Kerberos 4 Support?])
146 SASL_KRB_LIB="$SASL_KRB_LIB $LIB_DES $COM_ERR"
147 else
148 AC_MSG_RESULT(disabled)
149 fi
150 AC_SUBST(SASL_KRB_LIB)
151 ])
152
+0
-430
saslauthd/config/libtool.m4 less more
0 ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
1 ## Copyright (C) 1996-1999 Free Software Foundation, Inc.
2 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3 ##
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2 of the License, or
7 ## (at your option) any later version.
8 ##
9 ## This program is distributed in the hope that it will be useful, but
10 ## WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 ## General Public License for more details.
13 ##
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program; if not, write to the Free Software
16 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 ##
18 ## As a special exception to the GNU General Public License, if you
19 ## distribute this file as part of a program that contains a
20 ## configuration script generated by Autoconf, you may include it under
21 ## the same distribution terms that you use for the rest of that program.
22
23 # serial 40 AC_PROG_LIBTOOL
24 AC_DEFUN([AC_PROG_LIBTOOL],
25 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
26
27 # Save cache, so that ltconfig can load it
28 AC_CACHE_SAVE
29
30 # Actually configure libtool. ac_aux_dir is where install-sh is found.
31 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
32 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
33 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
34 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
35 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
36 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
37 || AC_MSG_ERROR([libtool configure failed])
38
39 # Reload cache, that may have been modified by ltconfig
40 AC_CACHE_LOAD
41
42 # This can be used to rebuild libtool when needed
43 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
44
45 # Always use our own libtool.
46 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
47 AC_SUBST(LIBTOOL)dnl
48
49 # Redirect the config.log output again, so that the ltconfig log is not
50 # clobbered by the next message.
51 exec 5>>./config.log
52 ])
53
54 AC_DEFUN([AC_LIBTOOL_SETUP],
55 [AC_PREREQ(2.13)dnl
56 AC_REQUIRE([AC_ENABLE_SHARED])dnl
57 AC_REQUIRE([AC_ENABLE_STATIC])dnl
58 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
59 AC_REQUIRE([AC_CANONICAL_HOST])dnl
60 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
61 AC_REQUIRE([AC_PROG_RANLIB])dnl
62 AC_REQUIRE([AC_PROG_CC])dnl
63 AC_REQUIRE([AC_PROG_LD])dnl
64 AC_REQUIRE([AC_PROG_NM])dnl
65 AC_REQUIRE([AC_PROG_LN_S])dnl
66 dnl
67
68 case "$target" in
69 NONE) lt_target="$host" ;;
70 *) lt_target="$target" ;;
71 esac
72
73 # Check for any special flags to pass to ltconfig.
74 libtool_flags="--cache-file=$cache_file"
75 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
76 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
77 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
78 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
79 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
80 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
81 [libtool_flags="$libtool_flags --enable-dlopen"])
82 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
83 [libtool_flags="$libtool_flags --enable-win32-dll"])
84 AC_ARG_ENABLE(libtool-lock,
85 [ --disable-libtool-lock avoid locking (might break parallel builds)])
86 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
87 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
88
89 # Some flags need to be propagated to the compiler or linker for good
90 # libtool support.
91 case "$lt_target" in
92 *-*-irix6*)
93 # Find out which ABI we are using.
94 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
95 if AC_TRY_EVAL(ac_compile); then
96 case "`/usr/bin/file conftest.o`" in
97 *32-bit*)
98 LD="${LD-ld} -32"
99 ;;
100 *N32*)
101 LD="${LD-ld} -n32"
102 ;;
103 *64-bit*)
104 LD="${LD-ld} -64"
105 ;;
106 esac
107 fi
108 rm -rf conftest*
109 ;;
110
111 *-*-sco3.2v5*)
112 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
113 SAVE_CFLAGS="$CFLAGS"
114 CFLAGS="$CFLAGS -belf"
115 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
116 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
117 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
118 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
119 CFLAGS="$SAVE_CFLAGS"
120 fi
121 ;;
122
123 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
124 [*-*-cygwin* | *-*-mingw*)
125 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
126 AC_CHECK_TOOL(AS, as, false)
127 AC_CHECK_TOOL(OBJDUMP, objdump, false)
128 ;;
129 ])
130 esac
131 ])
132
133 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
134 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
135
136 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
137 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
138
139 # AC_ENABLE_SHARED - implement the --enable-shared flag
140 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
141 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
142 # `yes'.
143 AC_DEFUN([AC_ENABLE_SHARED], [dnl
144 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
145 AC_ARG_ENABLE(shared,
146 changequote(<<, >>)dnl
147 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
148 changequote([, ])dnl
149 [p=${PACKAGE-default}
150 case "$enableval" in
151 yes) enable_shared=yes ;;
152 no) enable_shared=no ;;
153 *)
154 enable_shared=no
155 # Look at the argument we got. We use all the common list separators.
156 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
157 for pkg in $enableval; do
158 if test "X$pkg" = "X$p"; then
159 enable_shared=yes
160 fi
161 done
162 IFS="$ac_save_ifs"
163 ;;
164 esac],
165 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
166 ])
167
168 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
169 AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
170 AC_ENABLE_SHARED(no)])
171
172 # AC_ENABLE_STATIC - implement the --enable-static flag
173 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
174 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
175 # `yes'.
176 AC_DEFUN([AC_ENABLE_STATIC], [dnl
177 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
178 AC_ARG_ENABLE(static,
179 changequote(<<, >>)dnl
180 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
181 changequote([, ])dnl
182 [p=${PACKAGE-default}
183 case "$enableval" in
184 yes) enable_static=yes ;;
185 no) enable_static=no ;;
186 *)
187 enable_static=no
188 # Look at the argument we got. We use all the common list separators.
189 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
190 for pkg in $enableval; do
191 if test "X$pkg" = "X$p"; then
192 enable_static=yes
193 fi
194 done
195 IFS="$ac_save_ifs"
196 ;;
197 esac],
198 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
199 ])
200
201 # AC_DISABLE_STATIC - set the default static flag to --disable-static
202 AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
203 AC_ENABLE_STATIC(no)])
204
205
206 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
207 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
208 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
209 # `yes'.
210 AC_DEFUN([AC_ENABLE_FAST_INSTALL], [dnl
211 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
212 AC_ARG_ENABLE(fast-install,
213 changequote(<<, >>)dnl
214 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
215 changequote([, ])dnl
216 [p=${PACKAGE-default}
217 case "$enableval" in
218 yes) enable_fast_install=yes ;;
219 no) enable_fast_install=no ;;
220 *)
221 enable_fast_install=no
222 # Look at the argument we got. We use all the common list separators.
223 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
224 for pkg in $enableval; do
225 if test "X$pkg" = "X$p"; then
226 enable_fast_install=yes
227 fi
228 done
229 IFS="$ac_save_ifs"
230 ;;
231 esac],
232 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
233 ])
234
235 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
236 AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
237 AC_ENABLE_FAST_INSTALL(no)])
238
239 # AC_PROG_LD - find the path to the GNU or non-GNU linker
240 AC_DEFUN([AC_PROG_LD],
241 [AC_ARG_WITH(gnu-ld,
242 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
243 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
244 AC_REQUIRE([AC_PROG_CC])dnl
245 AC_REQUIRE([AC_CANONICAL_HOST])dnl
246 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
247 ac_prog=ld
248 if test "$ac_cv_prog_gcc" = yes; then
249 # Check if gcc -print-prog-name=ld gives a path.
250 AC_MSG_CHECKING([for ld used by GCC])
251 ac_prog=`($CC -print-prog-name=ld) 2>&5`
252 case "$ac_prog" in
253 # Accept absolute paths.
254 changequote(,)dnl
255 [\\/]* | [A-Za-z]:[\\/]*)
256 re_direlt='/[^/][^/]*/\.\./'
257 changequote([,])dnl
258 # Canonicalize the path of ld
259 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
260 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
261 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
262 done
263 test -z "$LD" && LD="$ac_prog"
264 ;;
265 "")
266 # If it fails, then pretend we aren't using GCC.
267 ac_prog=ld
268 ;;
269 *)
270 # If it is relative, then search for the first ld in PATH.
271 with_gnu_ld=unknown
272 ;;
273 esac
274 elif test "$with_gnu_ld" = yes; then
275 AC_MSG_CHECKING([for GNU ld])
276 else
277 AC_MSG_CHECKING([for non-GNU ld])
278 fi
279 AC_CACHE_VAL(ac_cv_path_LD,
280 [if test -z "$LD"; then
281 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
282 for ac_dir in $PATH; do
283 test -z "$ac_dir" && ac_dir=.
284 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
285 ac_cv_path_LD="$ac_dir/$ac_prog"
286 # Check to see if the program is GNU ld. I'd rather use --version,
287 # but apparently some GNU ld's only accept -v.
288 # Break only if it was the GNU/non-GNU ld that we prefer.
289 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
290 test "$with_gnu_ld" != no && break
291 else
292 test "$with_gnu_ld" != yes && break
293 fi
294 fi
295 done
296 IFS="$ac_save_ifs"
297 else
298 ac_cv_path_LD="$LD" # Let the user override the test with a path.
299 fi])
300 LD="$ac_cv_path_LD"
301 if test -n "$LD"; then
302 AC_MSG_RESULT($LD)
303 else
304 AC_MSG_RESULT(no)
305 fi
306 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
307 AC_PROG_LD_GNU
308 ])
309
310 AC_DEFUN([AC_PROG_LD_GNU],
311 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
312 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
313 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
314 ac_cv_prog_gnu_ld=yes
315 else
316 ac_cv_prog_gnu_ld=no
317 fi])
318 ])
319
320 # AC_PROG_NM - find the path to a BSD-compatible name lister
321 AC_DEFUN([AC_PROG_NM],
322 [AC_MSG_CHECKING([for BSD-compatible nm])
323 AC_CACHE_VAL(ac_cv_path_NM,
324 [if test -n "$NM"; then
325 # Let the user override the test.
326 ac_cv_path_NM="$NM"
327 else
328 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
329 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
330 test -z "$ac_dir" && ac_dir=.
331 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
332 # Check to see if the nm accepts a BSD-compat flag.
333 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
334 # nm: unknown option "B" ignored
335 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
336 ac_cv_path_NM="$ac_dir/nm -B"
337 break
338 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
339 ac_cv_path_NM="$ac_dir/nm -p"
340 break
341 else
342 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
343 continue # so that we can try to find one that supports BSD flags
344 fi
345 fi
346 done
347 IFS="$ac_save_ifs"
348 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
349 fi])
350 NM="$ac_cv_path_NM"
351 AC_MSG_RESULT([$NM])
352 ])
353
354 # AC_CHECK_LIBM - check for math library
355 AC_DEFUN([AC_CHECK_LIBM],
356 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
357 LIBM=
358 case "$lt_target" in
359 *-*-beos* | *-*-cygwin*)
360 # These system don't have libm
361 ;;
362 *-ncr-sysv4.3*)
363 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
364 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
365 ;;
366 *)
367 AC_CHECK_LIB(m, main, LIBM="-lm")
368 ;;
369 esac
370 ])
371
372 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
373 # the libltdl convenience library, adds --enable-ltdl-convenience to
374 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
375 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
376 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
377 # '${top_builddir}/' (note the single quotes!) if your package is not
378 # flat, and, if you're not using automake, define top_builddir as
379 # appropriate in the Makefiles.
380 AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
381 case "$enable_ltdl_convenience" in
382 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
383 "") enable_ltdl_convenience=yes
384 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
385 esac
386 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
387 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
388 ])
389
390 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
391 # the libltdl installable library, and adds --enable-ltdl-install to
392 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
393 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
394 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
395 # '${top_builddir}/' (note the single quotes!) if your package is not
396 # flat, and, if you're not using automake, define top_builddir as
397 # appropriate in the Makefiles.
398 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
399 AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
400 AC_CHECK_LIB(ltdl, main,
401 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
402 [if test x"$enable_ltdl_install" = xno; then
403 AC_MSG_WARN([libltdl not installed, but installation disabled])
404 else
405 enable_ltdl_install=yes
406 fi
407 ])
408 if test x"$enable_ltdl_install" = x"yes"; then
409 ac_configure_args="$ac_configure_args --enable-ltdl-install"
410 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
411 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
412 else
413 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
414 LIBLTDL="-lltdl"
415 INCLTDL=
416 fi
417 ])
418
419 dnl old names
420 AC_DEFUN([AM_PROG_LIBTOOL], [indir([AC_PROG_LIBTOOL])])dnl
421 AC_DEFUN([AM_ENABLE_SHARED], [indir([AC_ENABLE_SHARED], $@)])dnl
422 AC_DEFUN([AM_ENABLE_STATIC], [indir([AC_ENABLE_STATIC], $@)])dnl
423 AC_DEFUN([AM_DISABLE_SHARED], [indir([AC_DISABLE_SHARED], $@)])dnl
424 AC_DEFUN([AM_DISABLE_STATIC], [indir([AC_DISABLE_STATIC], $@)])dnl
425 AC_DEFUN([AM_PROG_LD], [indir([AC_PROG_LD])])dnl
426 AC_DEFUN([AM_PROG_NM], [indir([AC_PROG_NM])])dnl
427
428 dnl This is just to silence aclocal about the macro not being used
429 ifelse([AC_DISABLE_FAST_INSTALL])dnl
+0
-3150
saslauthd/config/ltconfig less more
0 #! /bin/sh
1
2 # ltconfig - Create a system-specific libtool.
3 # Copyright (C) 1996-1999 Free Software Foundation, Inc.
4 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5 #
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 #
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that program.
24
25 # A lot of this script is taken from autoconf-2.10.
26
27 # Check that we are running under the correct shell.
28 SHELL=${CONFIG_SHELL-/bin/sh}
29 echo=echo
30 if test "X$1" = X--no-reexec; then
31 # Discard the --no-reexec flag, and continue.
32 shift
33 elif test "X$1" = X--fallback-echo; then
34 # Avoid inline document here, it may be left over
35 :
36 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
37 # Yippee, $echo works!
38 :
39 else
40 # Restart under the correct shell.
41 exec "$SHELL" "$0" --no-reexec ${1+"$@"}
42 fi
43
44 if test "X$1" = X--fallback-echo; then
45 # used as fallback echo
46 shift
47 cat <<EOF
48 $*
49 EOF
50 exit 0
51 fi
52
53 # Find the correct PATH separator. Usually this is `:', but
54 # DJGPP uses `;' like DOS.
55 if test "X${PATH_SEPARATOR+set}" != Xset; then
56 UNAME=${UNAME-`uname 2>/dev/null`}
57 case X$UNAME in
58 *-DOS) PATH_SEPARATOR=';' ;;
59 *) PATH_SEPARATOR=':' ;;
60 esac
61 fi
62
63 # The HP-UX ksh and POSIX shell print the target directory to stdout
64 # if CDPATH is set.
65 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
66
67 if test "X${echo_test_string+set}" != Xset; then
68 # find a string as large as possible, as long as the shell can cope with it
69 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
70 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
71 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
72 echo_test_string="`eval $cmd`" &&
73 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
74 break
75 fi
76 done
77 fi
78
79 if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
80 test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
81 # The Solaris, AIX, and Digital Unix default echo programs unquote
82 # backslashes. This makes it impossible to quote backslashes using
83 # echo "$something" | sed 's/\\/\\\\/g'
84 #
85 # So, first we look for a working echo in the user's PATH.
86
87 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
88 for dir in $PATH /usr/ucb; do
89 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
90 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
91 test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
92 echo="$dir/echo"
93 break
94 fi
95 done
96 IFS="$save_ifs"
97
98 if test "X$echo" = Xecho; then
99 # We didn't find a better echo, so look for alternatives.
100 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
101 test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
102 # This shell has a builtin print -r that does the trick.
103 echo='print -r'
104 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
105 test "X$CONFIG_SHELL" != X/bin/ksh; then
106 # If we have ksh, try running ltconfig again with it.
107 ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
108 export ORIGINAL_CONFIG_SHELL
109 CONFIG_SHELL=/bin/ksh
110 export CONFIG_SHELL
111 exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
112 else
113 # Try using printf.
114 echo='printf "%s\n"'
115 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
116 test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
117 # Cool, printf works
118 :
119 elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
120 test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
121 CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
122 export CONFIG_SHELL
123 SHELL="$CONFIG_SHELL"
124 export SHELL
125 echo="$CONFIG_SHELL $0 --fallback-echo"
126 elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
127 test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
128 echo="$CONFIG_SHELL $0 --fallback-echo"
129 else
130 # maybe with a smaller string...
131 prev=:
132
133 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
134 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
135 break
136 fi
137 prev="$cmd"
138 done
139
140 if test "$prev" != 'sed 50q "$0"'; then
141 echo_test_string=`eval $prev`
142 export echo_test_string
143 exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
144 else
145 # Oops. We lost completely, so just stick with echo.
146 echo=echo
147 fi
148 fi
149 fi
150 fi
151 fi
152
153 # Sed substitution that helps us do robust quoting. It backslashifies
154 # metacharacters that are still active within double-quoted strings.
155 Xsed='sed -e s/^X//'
156 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
157
158 # Same as above, but do not quote variable references.
159 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
160
161 # Sed substitution to delay expansion of an escaped shell variable in a
162 # double_quote_subst'ed string.
163 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
164
165 # The name of this program.
166 progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
167
168 # Constants:
169 PROGRAM=ltconfig
170 PACKAGE=libtool
171 VERSION=1.3.5
172 TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)"
173 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
174 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
175 rm="rm -f"
176
177 help="Try \`$progname --help' for more information."
178
179 # Global variables:
180 default_ofile=libtool
181 can_build_shared=yes
182 enable_shared=yes
183 # All known linkers require a `.a' archive for static linking (except M$VC,
184 # which needs '.lib').
185 enable_static=yes
186 enable_fast_install=yes
187 enable_dlopen=unknown
188 enable_win32_dll=no
189 ltmain=
190 silent=
191 srcdir=
192 ac_config_guess=
193 ac_config_sub=
194 host=
195 nonopt=
196 ofile="$default_ofile"
197 verify_host=yes
198 with_gcc=no
199 with_gnu_ld=no
200 need_locks=yes
201 ac_ext=c
202 objext=o
203 libext=a
204 exeext=
205 cache_file=
206
207 old_AR="$AR"
208 old_CC="$CC"
209 old_CFLAGS="$CFLAGS"
210 old_CPPFLAGS="$CPPFLAGS"
211 old_LDFLAGS="$LDFLAGS"
212 old_LD="$LD"
213 old_LN_S="$LN_S"
214 old_LIBS="$LIBS"
215 old_NM="$NM"
216 old_RANLIB="$RANLIB"
217 old_DLLTOOL="$DLLTOOL"
218 old_OBJDUMP="$OBJDUMP"
219 old_AS="$AS"
220
221 # Parse the command line options.
222 args=
223 prev=
224 for option
225 do
226 case "$option" in
227 -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
228 *) optarg= ;;
229 esac
230
231 # If the previous option needs an argument, assign it.
232 if test -n "$prev"; then
233 eval "$prev=\$option"
234 prev=
235 continue
236 fi
237
238 case "$option" in
239 --help) cat <<EOM
240 Usage: $progname [OPTION]... [HOST [LTMAIN]]
241
242 Generate a system-specific libtool script.
243
244 --debug enable verbose shell tracing
245 --disable-shared do not build shared libraries
246 --disable-static do not build static libraries
247 --disable-fast-install do not optimize for fast installation
248 --enable-dlopen enable dlopen support
249 --enable-win32-dll enable building dlls on win32 hosts
250 --help display this help and exit
251 --no-verify do not verify that HOST is a valid host type
252 -o, --output=FILE specify the output file [default=$default_ofile]
253 --quiet same as \`--silent'
254 --silent do not print informational messages
255 --srcdir=DIR find \`config.guess' in DIR
256 --version output version information and exit
257 --with-gcc assume that the GNU C compiler will be used
258 --with-gnu-ld assume that the C compiler uses the GNU linker
259 --disable-lock disable file locking
260 --cache-file=FILE configure cache file
261
262 LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
263 that provides basic libtool functionality.
264
265 HOST is the canonical host system name [default=guessed].
266 EOM
267 exit 0
268 ;;
269
270 --debug)
271 echo "$progname: enabling shell trace mode"
272 set -x
273 ;;
274
275 --disable-shared) enable_shared=no ;;
276
277 --disable-static) enable_static=no ;;
278
279 --disable-fast-install) enable_fast_install=no ;;
280
281 --enable-dlopen) enable_dlopen=yes ;;
282
283 --enable-win32-dll) enable_win32_dll=yes ;;
284
285 --quiet | --silent) silent=yes ;;
286
287 --srcdir) prev=srcdir ;;
288 --srcdir=*) srcdir="$optarg" ;;
289
290 --no-verify) verify_host=no ;;
291
292 --output | -o) prev=ofile ;;
293 --output=*) ofile="$optarg" ;;
294
295 --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
296
297 --with-gcc) with_gcc=yes ;;
298 --with-gnu-ld) with_gnu_ld=yes ;;
299
300 --disable-lock) need_locks=no ;;
301
302 --cache-file=*) cache_file="$optarg" ;;
303
304 -*)
305 echo "$progname: unrecognized option \`$option'" 1>&2
306 echo "$help" 1>&2
307 exit 1
308 ;;
309
310 *)
311 if test -z "$ltmain"; then
312 ltmain="$option"
313 elif test -z "$host"; then
314 # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
315 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
316 # echo "$progname: warning \`$option' is not a valid host type" 1>&2
317 # fi
318 host="$option"
319 else
320 echo "$progname: too many arguments" 1>&2
321 echo "$help" 1>&2
322 exit 1
323 fi ;;
324 esac
325 done
326
327 if test -z "$ltmain"; then
328 echo "$progname: you must specify a LTMAIN file" 1>&2
329 echo "$help" 1>&2
330 exit 1
331 fi
332
333 if test ! -f "$ltmain"; then
334 echo "$progname: \`$ltmain' does not exist" 1>&2
335 echo "$help" 1>&2
336 exit 1
337 fi
338
339 # Quote any args containing shell metacharacters.
340 ltconfig_args=
341 for arg
342 do
343 case "$arg" in
344 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
345 ltconfig_args="$ltconfig_args '$arg'" ;;
346 *) ltconfig_args="$ltconfig_args $arg" ;;
347 esac
348 done
349
350 # A relevant subset of AC_INIT.
351
352 # File descriptor usage:
353 # 0 standard input
354 # 1 file creation
355 # 2 errors and warnings
356 # 3 some systems may open it to /dev/tty
357 # 4 used on the Kubota Titan
358 # 5 compiler messages saved in config.log
359 # 6 checking for... messages and results
360 if test "$silent" = yes; then
361 exec 6>/dev/null
362 else
363 exec 6>&1
364 fi
365 exec 5>>./config.log
366
367 # NLS nuisances.
368 # Only set LANG and LC_ALL to C if already set.
369 # These must not be set unconditionally because not all systems understand
370 # e.g. LANG=C (notably SCO).
371 if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
372 if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi
373
374 if test -n "$cache_file" && test -r "$cache_file"; then
375 echo "loading cache $cache_file within ltconfig"
376 . $cache_file
377 fi
378
379 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
380 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
381 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
382 ac_n= ac_c='
383 ' ac_t=' '
384 else
385 ac_n=-n ac_c= ac_t=
386 fi
387 else
388 ac_n= ac_c='\c' ac_t=
389 fi
390
391 if test -z "$srcdir"; then
392 # Assume the source directory is the same one as the path to LTMAIN.
393 srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
394 test "$srcdir" = "$ltmain" && srcdir=.
395 fi
396
397 trap "$rm conftest*; exit 1" 1 2 15
398 if test "$verify_host" = yes; then
399 # Check for config.guess and config.sub.
400 ac_aux_dir=
401 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
402 if test -f $ac_dir/config.guess; then
403 ac_aux_dir=$ac_dir
404 break
405 fi
406 done
407 if test -z "$ac_aux_dir"; then
408 echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
409 echo "$help" 1>&2
410 exit 1
411 fi
412 ac_config_guess=$ac_aux_dir/config.guess
413 ac_config_sub=$ac_aux_dir/config.sub
414
415 # Make sure we can run config.sub.
416 if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
417 else
418 echo "$progname: cannot run $ac_config_sub" 1>&2
419 echo "$help" 1>&2
420 exit 1
421 fi
422
423 echo $ac_n "checking host system type""... $ac_c" 1>&6
424
425 host_alias=$host
426 case "$host_alias" in
427 "")
428 if host_alias=`$SHELL $ac_config_guess`; then :
429 else
430 echo "$progname: cannot guess host type; you must specify one" 1>&2
431 echo "$help" 1>&2
432 exit 1
433 fi ;;
434 esac
435 host=`$SHELL $ac_config_sub $host_alias`
436 echo "$ac_t$host" 1>&6
437
438 # Make sure the host verified.
439 test -z "$host" && exit 1
440
441 elif test -z "$host"; then
442 echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
443 echo "$help" 1>&2
444 exit 1
445 else
446 host_alias=$host
447 fi
448
449 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
450 case "$host_os" in
451 linux-gnu*) ;;
452 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
453 esac
454
455 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
456 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
457 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
458
459 case "$host_os" in
460 aix3*)
461 # AIX sometimes has problems with the GCC collect2 program. For some
462 # reason, if we set the COLLECT_NAMES environment variable, the problems
463 # vanish in a puff of smoke.
464 if test "X${COLLECT_NAMES+set}" != Xset; then
465 COLLECT_NAMES=
466 export COLLECT_NAMES
467 fi
468 ;;
469 esac
470
471 # Determine commands to create old-style static archives.
472 old_archive_cmds='$AR cru $oldlib$oldobjs'
473 old_postinstall_cmds='chmod 644 $oldlib'
474 old_postuninstall_cmds=
475
476 # Set a sane default for `AR'.
477 test -z "$AR" && AR=ar
478
479 # Set a sane default for `OBJDUMP'.
480 test -z "$OBJDUMP" && OBJDUMP=objdump
481
482 # If RANLIB is not set, then run the test.
483 if test "${RANLIB+set}" != "set"; then
484 result=no
485
486 echo $ac_n "checking for ranlib... $ac_c" 1>&6
487 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
488 for dir in $PATH; do
489 test -z "$dir" && dir=.
490 if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
491 RANLIB="ranlib"
492 result="ranlib"
493 break
494 fi
495 done
496 IFS="$save_ifs"
497
498 echo "$ac_t$result" 1>&6
499 fi
500
501 if test -n "$RANLIB"; then
502 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
503 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
504 fi
505
506 # Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
507 test -z "$DLLTOOL" && DLLTOOL=dlltool
508 test -z "$OBJDUMP" && OBJDUMP=objdump
509 test -z "$AS" && AS=as
510
511 # Check to see if we are using GCC.
512 if test "$with_gcc" != yes || test -z "$CC"; then
513 # If CC is not set, then try to find GCC or a usable CC.
514 if test -z "$CC"; then
515 echo $ac_n "checking for gcc... $ac_c" 1>&6
516 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
517 for dir in $PATH; do
518 test -z "$dir" && dir=.
519 if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then
520 CC="gcc"
521 break
522 fi
523 done
524 IFS="$save_ifs"
525
526 if test -n "$CC"; then
527 echo "$ac_t$CC" 1>&6
528 else
529 echo "$ac_t"no 1>&6
530 fi
531 fi
532
533 # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
534 if test -z "$CC"; then
535 echo $ac_n "checking for cc... $ac_c" 1>&6
536 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
537 cc_rejected=no
538 for dir in $PATH; do
539 test -z "$dir" && dir=.
540 if test -f $dir/cc || test -f $dir/cc$ac_exeext; then
541 if test "$dir/cc" = "/usr/ucb/cc"; then
542 cc_rejected=yes
543 continue
544 fi
545 CC="cc"
546 break
547 fi
548 done
549 IFS="$save_ifs"
550 if test $cc_rejected = yes; then
551 # We found a bogon in the path, so make sure we never use it.
552 set dummy $CC
553 shift
554 if test $# -gt 0; then
555 # We chose a different compiler from the bogus one.
556 # However, it has the same name, so the bogon will be chosen
557 # first if we set CC to just the name; use the full file name.
558 shift
559 set dummy "$dir/cc" "$@"
560 shift
561 CC="$@"
562 fi
563 fi
564
565 if test -n "$CC"; then
566 echo "$ac_t$CC" 1>&6
567 else
568 echo "$ac_t"no 1>&6
569 fi
570
571 if test -z "$CC"; then
572 echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
573 exit 1
574 fi
575 fi
576
577 # Now see if the compiler is really GCC.
578 with_gcc=no
579 echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
580 echo "$progname:581: checking whether we are using GNU C" >&5
581
582 $rm conftest.c
583 cat > conftest.c <<EOF
584 #ifdef __GNUC__
585 yes;
586 #endif
587 EOF
588 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
589 with_gcc=yes
590 fi
591 $rm conftest.c
592 echo "$ac_t$with_gcc" 1>&6
593 fi
594
595 # Allow CC to be a program name with arguments.
596 set dummy $CC
597 compiler="$2"
598
599 echo $ac_n "checking for object suffix... $ac_c" 1>&6
600 $rm conftest*
601 echo 'int i = 1;' > conftest.c
602 echo "$progname:603: checking for object suffix" >& 5
603 if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
604 # Append any warnings to the config.log.
605 cat conftest.err 1>&5
606
607 for ac_file in conftest.*; do
608 case $ac_file in
609 *.c) ;;
610 *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
611 esac
612 done
613 else
614 cat conftest.err 1>&5
615 echo "$progname: failed program was:" >&5
616 cat conftest.c >&5
617 fi
618 $rm conftest*
619 echo "$ac_t$objext" 1>&6
620
621 echo $ac_n "checking for executable suffix... $ac_c" 1>&6
622 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
623 echo $ac_n "(cached) $ac_c" 1>&6
624 else
625 ac_cv_exeext="no"
626 $rm conftest*
627 echo 'main () { return 0; }' > conftest.c
628 echo "$progname:629: checking for executable suffix" >& 5
629 if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
630 # Append any warnings to the config.log.
631 cat conftest.err 1>&5
632
633 for ac_file in conftest.*; do
634 case $ac_file in
635 *.c | *.err | *.$objext ) ;;
636 *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
637 esac
638 done
639 else
640 cat conftest.err 1>&5
641 echo "$progname: failed program was:" >&5
642 cat conftest.c >&5
643 fi
644 $rm conftest*
645 fi
646 if test "X$ac_cv_exeext" = Xno; then
647 exeext=""
648 else
649 exeext="$ac_cv_exeext"
650 fi
651 echo "$ac_t$ac_cv_exeext" 1>&6
652
653 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
654 pic_flag=
655 special_shlib_compile_flags=
656 wl=
657 link_static_flag=
658 no_builtin_flag=
659
660 if test "$with_gcc" = yes; then
661 wl='-Wl,'
662 link_static_flag='-static'
663
664 case "$host_os" in
665 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
666 # PIC is the default for these OSes.
667 ;;
668 aix*)
669 # Below there is a dirty hack to force normal static linking with -ldl
670 # The problem is because libdl dynamically linked with both libc and
671 # libC (AIX C++ library), which obviously doesn't included in libraries
672 # list by gcc. This cause undefined symbols with -static flags.
673 # This hack allows C programs to be linked with "-static -ldl", but
674 # we not sure about C++ programs.
675 link_static_flag="$link_static_flag ${wl}-lC"
676 ;;
677 cygwin* | mingw* | os2*)
678 # We can build DLLs from non-PIC.
679 ;;
680 darwin* | rhapsody*)
681 # PIC is the default on this platform
682 # Common symbols not allowed in MH_DYLIB files
683 pic_flag='-fno-common'
684 ;;
685 amigaos*)
686 # FIXME: we need at least 68020 code to build shared libraries, but
687 # adding the `-m68020' flag to GCC prevents building anything better,
688 # like `-m68040'.
689 pic_flag='-m68020 -resident32 -malways-restore-a4'
690 ;;
691 sysv4*MP*)
692 if test -d /usr/nec; then
693 pic_flag=-Kconform_pic
694 fi
695 ;;
696 *)
697 pic_flag='-fPIC'
698 ;;
699 esac
700 else
701 # PORTME Check for PIC flags for the system compiler.
702 case "$host_os" in
703 aix3* | aix4*)
704 # All AIX code is PIC.
705 link_static_flag='-bnso -bI:/lib/syscalls.exp'
706 ;;
707
708 hpux9* | hpux10* | hpux11*)
709 # Is there a better link_static_flag that works with the bundled CC?
710 wl='-Wl,'
711 link_static_flag="${wl}-a ${wl}archive"
712 pic_flag='+Z'
713 ;;
714
715 irix5* | irix6*)
716 wl='-Wl,'
717 link_static_flag='-non_shared'
718 # PIC (with -KPIC) is the default.
719 ;;
720
721 cygwin* | mingw* | os2*)
722 # We can build DLLs from non-PIC.
723 ;;
724
725 osf3* | osf4* | osf5*)
726 # All OSF/1 code is PIC.
727 wl='-Wl,'
728 link_static_flag='-non_shared'
729 ;;
730
731 sco3.2v5*)
732 pic_flag='-Kpic'
733 link_static_flag='-dn'
734 special_shlib_compile_flags='-belf'
735 ;;
736
737 solaris*)
738 pic_flag='-KPIC'
739 link_static_flag='-Bstatic'
740 wl='-Wl,'
741 ;;
742
743 sunos4*)
744 pic_flag='-PIC'
745 link_static_flag='-Bstatic'
746 wl='-Qoption ld '
747 ;;
748
749 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
750 pic_flag='-KPIC'
751 link_static_flag='-Bstatic'
752 wl='-Wl,'
753 ;;
754
755 uts4*)
756 pic_flag='-pic'
757 link_static_flag='-Bstatic'
758 ;;
759 sysv4*MP*)
760 if test -d /usr/nec ;then
761 pic_flag='-Kconform_pic'
762 link_static_flag='-Bstatic'
763 fi
764 ;;
765 *)
766 can_build_shared=no
767 ;;
768 esac
769 fi
770
771 if test -n "$pic_flag"; then
772 echo "$ac_t$pic_flag" 1>&6
773
774 # Check to make sure the pic_flag actually works.
775 echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
776 $rm conftest*
777 echo "int some_variable = 0;" > conftest.c
778 save_CFLAGS="$CFLAGS"
779 CFLAGS="$CFLAGS $pic_flag -DPIC"
780 echo "$progname:781: checking if $compiler PIC flag $pic_flag works" >&5
781 if { (eval echo $progname:782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
782 # Append any warnings to the config.log.
783 cat conftest.err 1>&5
784
785 case "$host_os" in
786 hpux9* | hpux10* | hpux11*)
787 # On HP-UX, both CC and GCC only warn that PIC is supported... then they
788 # create non-PIC objects. So, if there were any warnings, we assume that
789 # PIC is not supported.
790 if test -s conftest.err; then
791 echo "$ac_t"no 1>&6
792 can_build_shared=no
793 pic_flag=
794 else
795 echo "$ac_t"yes 1>&6
796 pic_flag=" $pic_flag"
797 fi
798 ;;
799 *)
800 echo "$ac_t"yes 1>&6
801 pic_flag=" $pic_flag"
802 ;;
803 esac
804 else
805 # Append any errors to the config.log.
806 cat conftest.err 1>&5
807 can_build_shared=no
808 pic_flag=
809 echo "$ac_t"no 1>&6
810 fi
811 CFLAGS="$save_CFLAGS"
812 $rm conftest*
813 else
814 echo "$ac_t"none 1>&6
815 fi
816
817 # Check to see if options -o and -c are simultaneously supported by compiler
818 echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
819 $rm -r conftest 2>/dev/null
820 mkdir conftest
821 cd conftest
822 $rm conftest*
823 echo "int some_variable = 0;" > conftest.c
824 mkdir out
825 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
826 # that will create temporary files in the current directory regardless of
827 # the output directory. Thus, making CWD read-only will cause this test
828 # to fail, enabling locking or at least warning the user not to do parallel
829 # builds.
830 chmod -w .
831 save_CFLAGS="$CFLAGS"
832 CFLAGS="$CFLAGS -o out/conftest2.o"
833 echo "$progname:834: checking if $compiler supports -c -o file.o" >&5
834 if { (eval echo $progname:835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
835
836 # The compiler can only warn and ignore the option if not recognized
837 # So say no if there are warnings
838 if test -s out/conftest.err; then
839 echo "$ac_t"no 1>&6
840 compiler_c_o=no
841 else
842 echo "$ac_t"yes 1>&6
843 compiler_c_o=yes
844 fi
845 else
846 # Append any errors to the config.log.
847 cat out/conftest.err 1>&5
848 compiler_c_o=no
849 echo "$ac_t"no 1>&6
850 fi
851 CFLAGS="$save_CFLAGS"
852 chmod u+w .
853 $rm conftest* out/*
854 rmdir out
855 cd ..
856 rmdir conftest
857 $rm -r conftest 2>/dev/null
858
859 if test x"$compiler_c_o" = x"yes"; then
860 # Check to see if we can write to a .lo
861 echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
862 $rm conftest*
863 echo "int some_variable = 0;" > conftest.c
864 save_CFLAGS="$CFLAGS"
865 CFLAGS="$CFLAGS -c -o conftest.lo"
866 echo "$progname:867: checking if $compiler supports -c -o file.lo" >&5
867 if { (eval echo $progname:868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
868
869 # The compiler can only warn and ignore the option if not recognized
870 # So say no if there are warnings
871 if test -s conftest.err; then
872 echo "$ac_t"no 1>&6
873 compiler_o_lo=no
874 else
875 echo "$ac_t"yes 1>&6
876 compiler_o_lo=yes
877 fi
878 else
879 # Append any errors to the config.log.
880 cat conftest.err 1>&5
881 compiler_o_lo=no
882 echo "$ac_t"no 1>&6
883 fi
884 CFLAGS="$save_CFLAGS"
885 $rm conftest*
886 else
887 compiler_o_lo=no
888 fi
889
890 # Check to see if we can do hard links to lock some files if needed
891 hard_links="nottested"
892 if test "$compiler_c_o" = no && test "$need_locks" != no; then
893 # do not overwrite the value of need_locks provided by the user
894 echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
895 hard_links=yes
896 $rm conftest*
897 ln conftest.a conftest.b 2>/dev/null && hard_links=no
898 touch conftest.a
899 ln conftest.a conftest.b 2>&5 || hard_links=no
900 ln conftest.a conftest.b 2>/dev/null && hard_links=no
901 echo "$ac_t$hard_links" 1>&6
902 $rm conftest*
903 if test "$hard_links" = no; then
904 echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
905 need_locks=warn
906 fi
907 else
908 need_locks=no
909 fi
910
911 if test "$with_gcc" = yes; then
912 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
913 echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
914 $rm conftest*
915 echo "int some_variable = 0;" > conftest.c
916 save_CFLAGS="$CFLAGS"
917 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
918 echo "$progname:919: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
919 if { (eval echo $progname:920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
920
921 # The compiler can only warn and ignore the option if not recognized
922 # So say no if there are warnings
923 if test -s conftest.err; then
924 echo "$ac_t"no 1>&6
925 compiler_rtti_exceptions=no
926 else
927 echo "$ac_t"yes 1>&6
928 compiler_rtti_exceptions=yes
929 fi
930 else
931 # Append any errors to the config.log.
932 cat conftest.err 1>&5
933 compiler_rtti_exceptions=no
934 echo "$ac_t"no 1>&6
935 fi
936 CFLAGS="$save_CFLAGS"
937 $rm conftest*
938
939 if test "$compiler_rtti_exceptions" = "yes"; then
940 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
941 else
942 no_builtin_flag=' -fno-builtin'
943 fi
944
945 fi
946
947 # Check for any special shared library compilation flags.
948 if test -n "$special_shlib_compile_flags"; then
949 echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
950 if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then :
951 else
952 echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
953 can_build_shared=no
954 fi
955 fi
956
957 echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
958 $rm conftest*
959 echo 'main(){return(0);}' > conftest.c
960 save_LDFLAGS="$LDFLAGS"
961 LDFLAGS="$LDFLAGS $link_static_flag"
962 echo "$progname:963: checking if $compiler static flag $link_static_flag works" >&5
963 if { (eval echo $progname:964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
964 echo "$ac_t$link_static_flag" 1>&6
965 else
966 echo "$ac_t"none 1>&6
967 link_static_flag=
968 fi
969 LDFLAGS="$save_LDFLAGS"
970 $rm conftest*
971
972 if test -z "$LN_S"; then
973 # Check to see if we can use ln -s, or we need hard links.
974 echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
975 $rm conftest.dat
976 if ln -s X conftest.dat 2>/dev/null; then
977 $rm conftest.dat
978 LN_S="ln -s"
979 else
980 LN_S=ln
981 fi
982 if test "$LN_S" = "ln -s"; then
983 echo "$ac_t"yes 1>&6
984 else
985 echo "$ac_t"no 1>&6
986 fi
987 fi
988
989 # Make sure LD is an absolute path.
990 if test -z "$LD"; then
991 ac_prog=ld
992 if test "$with_gcc" = yes; then
993 # Check if gcc -print-prog-name=ld gives a path.
994 echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
995 echo "$progname:996: checking for ld used by GCC" >&5
996 ac_prog=`($CC -print-prog-name=ld) 2>&5`
997 case "$ac_prog" in
998 # Accept absolute paths.
999 [\\/]* | [A-Za-z]:[\\/]*)
1000 re_direlt='/[^/][^/]*/\.\./'
1001 # Canonicalize the path of ld
1002 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1003 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1004 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1005 done
1006 test -z "$LD" && LD="$ac_prog"
1007 ;;
1008 "")
1009 # If it fails, then pretend we are not using GCC.
1010 ac_prog=ld
1011 ;;
1012 *)
1013 # If it is relative, then search for the first ld in PATH.
1014 with_gnu_ld=unknown
1015 ;;
1016 esac
1017 elif test "$with_gnu_ld" = yes; then
1018 echo $ac_n "checking for GNU ld... $ac_c" 1>&6
1019 echo "$progname:1020: checking for GNU ld" >&5
1020 else
1021 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1022 echo "$progname:1023: checking for non-GNU ld" >&5
1023 fi
1024
1025 if test -z "$LD"; then
1026 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
1027 for ac_dir in $PATH; do
1028 test -z "$ac_dir" && ac_dir=.
1029 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1030 LD="$ac_dir/$ac_prog"
1031 # Check to see if the program is GNU ld. I'd rather use --version,
1032 # but apparently some GNU ld's only accept -v.
1033 # Break only if it was the GNU/non-GNU ld that we prefer.
1034 if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1035 test "$with_gnu_ld" != no && break
1036 else
1037 test "$with_gnu_ld" != yes && break
1038 fi
1039 fi
1040 done
1041 IFS="$ac_save_ifs"
1042 fi
1043
1044 if test -n "$LD"; then
1045 echo "$ac_t$LD" 1>&6
1046 else
1047 echo "$ac_t"no 1>&6
1048 fi
1049
1050 if test -z "$LD"; then
1051 echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
1052 exit 1
1053 fi
1054 fi
1055
1056 # Check to see if it really is or is not GNU ld.
1057 echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
1058 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1059 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1060 with_gnu_ld=yes
1061 else
1062 with_gnu_ld=no
1063 fi
1064 echo "$ac_t$with_gnu_ld" 1>&6
1065
1066 # See if the linker supports building shared libraries.
1067 echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
1068
1069 allow_undefined_flag=
1070 no_undefined_flag=
1071 need_lib_prefix=unknown
1072 need_version=unknown
1073 # when you set need_version to no, make sure it does not cause -set_version
1074 # flags to be left without arguments
1075 archive_cmds=
1076 archive_expsym_cmds=
1077 old_archive_from_new_cmds=
1078 export_dynamic_flag_spec=
1079 whole_archive_flag_spec=
1080 thread_safe_flag_spec=
1081 hardcode_libdir_flag_spec=
1082 hardcode_libdir_separator=
1083 hardcode_direct=no
1084 hardcode_minus_L=no
1085 hardcode_shlibpath_var=unsupported
1086 runpath_var=
1087 always_export_symbols=no
1088 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1089 # include_expsyms should be a list of space-separated symbols to be *always*
1090 # included in the symbol list
1091 include_expsyms=
1092 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1093 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1094 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1095 # as well as any symbol that contains `d'.
1096 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1097 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1098 # platforms (ab)use it in PIC code, but their linkers get confused if
1099 # the symbol is explicitly referenced. Since portable code cannot
1100 # rely on this symbol name, it's probably fine to never include it in
1101 # preloaded symbol tables.
1102
1103 case "$host_os" in
1104 cygwin* | mingw*)
1105 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1106 # When not using gcc, we currently assume that we are using
1107 # Microsoft Visual C++.
1108 if test "$with_gcc" != yes; then
1109 with_gnu_ld=no
1110 fi
1111 ;;
1112
1113 esac
1114
1115 ld_shlibs=yes
1116 if test "$with_gnu_ld" = yes; then
1117 # If archive_cmds runs LD, not CC, wlarc should be empty
1118 wlarc='${wl}'
1119
1120 # See if GNU ld supports shared libraries.
1121 case "$host_os" in
1122 aix3* | aix4*)
1123 # On AIX, the GNU linker is very broken
1124 ld_shlibs=no
1125 cat <<EOF 1>&2
1126
1127 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1128 *** to be unable to reliably create shared libraries on AIX.
1129 *** Therefore, libtool is disabling shared libraries support. If you
1130 *** really care for shared libraries, you may want to modify your PATH
1131 *** so that a non-GNU linker is found, and then restart.
1132
1133 EOF
1134 ;;
1135
1136 amigaos*)
1137 archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
1138 hardcode_libdir_flag_spec='-L$libdir'
1139 hardcode_minus_L=yes
1140
1141 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1142 # that the semantics of dynamic libraries on AmigaOS, at least up
1143 # to version 4, is to share data among multiple programs linked
1144 # with the same dynamic library. Since this doesn't match the
1145 # behavior of shared libraries on other platforms, we can use
1146 # them.
1147 ld_shlibs=no
1148 ;;
1149
1150 beos*)
1151 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1152 allow_undefined_flag=unsupported
1153 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1154 # support --undefined. This deserves some investigation. FIXME
1155 archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1156 else
1157 ld_shlibs=no
1158 fi
1159 ;;
1160
1161 cygwin* | mingw*)
1162 # hardcode_libdir_flag_spec is actually meaningless, as there is
1163 # no search path for DLLs.
1164 hardcode_libdir_flag_spec='-L$libdir'
1165 allow_undefined_flag=unsupported
1166 always_export_symbols=yes
1167
1168 # Extract the symbol export list from an `--export-all' def file,
1169 # then regenerate the def file from the symbol export list, so that
1170 # the compiled dll only exports the symbol export list.
1171 # Be careful not to strip the DATA tag left by newer dlltools.
1172 export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
1173 test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
1174 $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~
1175 sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols'
1176
1177 # If DATA tags from a recent dlltool are present, honour them!
1178 archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
1179 _lt_hint=1;
1180 cat $export_symbols | while read symbol; do
1181 set dummy \$symbol;
1182 case \$# in
1183 2) echo " \$2 @ \$_lt_hint ; " >> $objdir/$soname-def;;
1184 *) echo " \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;;
1185 esac;
1186 _lt_hint=`expr 1 + \$_lt_hint`;
1187 done~
1188 test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
1189 test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
1190 $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
1191 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
1192 $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
1193 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
1194 $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
1195
1196 old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
1197 ;;
1198
1199 netbsd*)
1200 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1201 archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1202 archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1203 else
1204 archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
1205 # can we support soname and/or expsyms with a.out? -oliva
1206 fi
1207 ;;
1208
1209 solaris* | sysv5*)
1210 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1211 ld_shlibs=no
1212 cat <<EOF 1>&2
1213
1214 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1215 *** create shared libraries on Solaris systems. Therefore, libtool
1216 *** is disabling shared libraries support. We urge you to upgrade GNU
1217 *** binutils to release 2.9.1 or newer. Another option is to modify
1218 *** your PATH or compiler configuration so that the native linker is
1219 *** used, and then restart.
1220
1221 EOF
1222 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1223 archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1224 archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1225 else
1226 ld_shlibs=no
1227 fi
1228 ;;
1229
1230 sunos4*)
1231 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
1232 wlarc=
1233 hardcode_direct=yes
1234 hardcode_shlibpath_var=no
1235 ;;
1236
1237 *)
1238 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1239 archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1240 archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1241 else
1242 ld_shlibs=no
1243 fi
1244 ;;
1245 esac
1246
1247 if test "$ld_shlibs" = yes; then
1248 runpath_var=LD_RUN_PATH
1249 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1250 export_dynamic_flag_spec='${wl}--export-dynamic'
1251 case $host_os in
1252 cygwin* | mingw*)
1253 # dlltool doesn't understand --whole-archive et. al.
1254 whole_archive_flag_spec=
1255 ;;
1256 *)
1257 # ancient GNU ld didn't support --whole-archive et. al.
1258 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1259 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1260 else
1261 whole_archive_flag_spec=
1262 fi
1263 ;;
1264 esac
1265 fi
1266 else
1267 # PORTME fill in a description of your system's linker (not GNU ld)
1268 case "$host_os" in
1269 aix3*)
1270 allow_undefined_flag=unsupported
1271 always_export_symbols=yes
1272 archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
1273 # Note: this linker hardcodes the directories in LIBPATH if there
1274 # are no directories specified by -L.
1275 hardcode_minus_L=yes
1276 if test "$with_gcc" = yes && test -z "$link_static_flag"; then
1277 # Neither direct hardcoding nor static linking is supported with a
1278 # broken collect2.
1279 hardcode_direct=unsupported
1280 fi
1281 ;;
1282
1283 aix4*)
1284 hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
1285 hardcode_libdir_separator=':'
1286 if test "$with_gcc" = yes; then
1287 collect2name=`${CC} -print-prog-name=collect2`
1288 if test -f "$collect2name" && \
1289 strings "$collect2name" | grep resolve_lib_name >/dev/null
1290 then
1291 # We have reworked collect2
1292 hardcode_direct=yes
1293 else
1294 # We have old collect2
1295 hardcode_direct=unsupported
1296 # It fails to find uninstalled libraries when the uninstalled
1297 # path is not listed in the libpath. Setting hardcode_minus_L
1298 # to unsupported forces relinking
1299 hardcode_minus_L=yes
1300 hardcode_libdir_flag_spec='-L$libdir'
1301 hardcode_libdir_separator=
1302 fi
1303 shared_flag='-shared'
1304 else
1305 shared_flag='${wl}-bM:SRE'
1306 hardcode_direct=yes
1307 fi
1308 allow_undefined_flag=' ${wl}-berok'
1309 archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
1310 archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
1311 case "$host_os" in aix4.[01]|aix4.[01].*)
1312 # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
1313 always_export_symbols=yes ;;
1314 esac
1315 ;;
1316
1317 amigaos*)
1318 archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
1319 hardcode_libdir_flag_spec='-L$libdir'
1320 hardcode_minus_L=yes
1321 # see comment about different semantics on the GNU ld section
1322 ld_shlibs=no
1323 ;;
1324
1325 cygwin* | mingw*)
1326 # When not using gcc, we currently assume that we are using
1327 # Microsoft Visual C++.
1328 # hardcode_libdir_flag_spec is actually meaningless, as there is
1329 # no search path for DLLs.
1330 hardcode_libdir_flag_spec=' '
1331 allow_undefined_flag=unsupported
1332 # Tell ltmain to make .lib files, not .a files.
1333 libext=lib
1334 # FIXME: Setting linknames here is a bad hack.
1335 archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1336 # The linker will automatically build a .lib file if we build a DLL.
1337 old_archive_from_new_cmds='true'
1338 # FIXME: Should let the user specify the lib program.
1339 old_archive_cmds='lib /OUT:$oldlib$oldobjs'
1340 fix_srcfile_path='`cygpath -w $srcfile`'
1341 ;;
1342
1343 freebsd1*)
1344 ld_shlibs=no
1345 ;;
1346
1347 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1348 # support. Future versions do this automatically, but an explicit c++rt0.o
1349 # does not break anything, and helps significantly (at the cost of a little
1350 # extra space).
1351 freebsd2.2*)
1352 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
1353 hardcode_libdir_flag_spec='-R$libdir'
1354 hardcode_direct=yes
1355 hardcode_shlibpath_var=no
1356 ;;
1357
1358 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
1359 freebsd2*)
1360 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
1361 hardcode_direct=yes
1362 hardcode_minus_L=yes
1363 hardcode_shlibpath_var=no
1364 ;;
1365
1366 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1367 freebsd*)
1368 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
1369 hardcode_libdir_flag_spec='-R$libdir'
1370 hardcode_direct=yes
1371 hardcode_shlibpath_var=no
1372 ;;
1373
1374 darwin[15].* | rhapsody*)
1375 allow_undefined_flag='-undefined error'
1376 archive_cmds='$CC $(test x$module = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts $(test x$module != xyes && echo -install_name $rpath/$soname) $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)'
1377 # We need to add '_' to the symbols in $export_symbols first
1378 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib'
1379 hardcode_direct=yes
1380 hardcode_shlibpath_var=no
1381 whole_archive_flag_spec='-all_load $convenience'
1382 ;;
1383
1384 # Mac OS X v10.2 uses bash for /bin/sh instead of zsh, and the quoting syntax is incompatible
1385 darwin*)
1386 allow_undefined_flag='-undefined error'
1387 archive_cmds='$CC $(test x$module = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts $(test x$module != xyes && echo -install_name $rpath/$soname $tmp_verstring)'
1388 # We need to add '_' to the symbols in $export_symbols first
1389 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib'
1390 hardcode_direct=yes
1391 hardcode_shlibpath_var=no
1392 whole_archive_flag_spec='-all_load $convenience'
1393 ;;
1394
1395 hpux9* | hpux10* | hpux11*)
1396 case "$host_os" in
1397 hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
1398 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
1399 esac
1400 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1401 hardcode_libdir_separator=:
1402 hardcode_direct=yes
1403 hardcode_minus_L=yes # Not in the search PATH, but as the default
1404 # location of the library.
1405 export_dynamic_flag_spec='${wl}-E'
1406 ;;
1407
1408 irix5* | irix6*)
1409 if test "$with_gcc" = yes; then
1410 archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
1411 else
1412 archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
1413 fi
1414 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1415 hardcode_libdir_separator=:
1416 ;;
1417
1418 netbsd*)
1419 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1420 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out
1421 else
1422 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF
1423 fi
1424 hardcode_libdir_flag_spec='${wl}-R$libdir'
1425 hardcode_direct=yes
1426 hardcode_shlibpath_var=no
1427 ;;
1428
1429 openbsd*)
1430 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
1431 hardcode_libdir_flag_spec='-R$libdir'
1432 hardcode_direct=yes
1433 hardcode_shlibpath_var=no
1434 ;;
1435
1436 os2*)
1437 hardcode_libdir_flag_spec='-L$libdir'
1438 hardcode_minus_L=yes
1439 allow_undefined_flag=unsupported
1440 archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def'
1441 old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
1442 ;;
1443
1444 osf3*)
1445 if test "$with_gcc" = yes; then
1446 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1447 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
1448 else
1449 allow_undefined_flag=' -expect_unresolved \*'
1450 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
1451 fi
1452 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1453 hardcode_libdir_separator=:
1454 ;;
1455
1456 osf4* | osf5*) # As osf3* with the addition of the -msym flag
1457 if test "$with_gcc" = yes; then
1458 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1459 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
1460 else
1461 allow_undefined_flag=' -expect_unresolved \*'
1462 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
1463 fi
1464 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1465 hardcode_libdir_separator=:
1466 ;;
1467
1468 sco3.2v5*)
1469 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1470 hardcode_shlibpath_var=no
1471 runpath_var=LD_RUN_PATH
1472 hardcode_runpath_var=yes
1473 ;;
1474
1475 solaris*)
1476 no_undefined_flag=' -z text'
1477 # $CC -shared without GNU ld will not create a library from C++
1478 # object files and a static libstdc++, better avoid it by now
1479 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
1480 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1481 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
1482 hardcode_libdir_flag_spec='-R$libdir'
1483 hardcode_shlibpath_var=no
1484 case "$host_os" in
1485 solaris2.[0-5] | solaris2.[0-5].*) ;;
1486 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
1487 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
1488 esac
1489 ;;
1490
1491 sunos4*)
1492 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
1493 hardcode_libdir_flag_spec='-L$libdir'
1494 hardcode_direct=yes
1495 hardcode_minus_L=yes
1496 hardcode_shlibpath_var=no
1497 ;;
1498
1499 sysv4)
1500 if test "x$host_vendor" = xsequent; then
1501 # Use $CC to link under sequent, because it throws in some extra .o
1502 # files that make .init and .fini sections work.
1503 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts'
1504 else
1505 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1506 fi
1507 runpath_var='LD_RUN_PATH'
1508 hardcode_shlibpath_var=no
1509 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
1510 ;;
1511
1512 sysv4.3*)
1513 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1514 hardcode_shlibpath_var=no
1515 export_dynamic_flag_spec='-Bexport'
1516 ;;
1517
1518 sysv5*)
1519 no_undefined_flag=' -z text'
1520 # $CC -shared without GNU ld will not create a library from C++
1521 # object files and a static libstdc++, better avoid it by now
1522 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
1523 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1524 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
1525 hardcode_libdir_flag_spec=
1526 hardcode_shlibpath_var=no
1527 runpath_var='LD_RUN_PATH'
1528 ;;
1529
1530 uts4*)
1531 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1532 hardcode_libdir_flag_spec='-L$libdir'
1533 hardcode_shlibpath_var=no
1534 ;;
1535
1536 dgux*)
1537 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1538 hardcode_libdir_flag_spec='-L$libdir'
1539 hardcode_shlibpath_var=no
1540 ;;
1541
1542 sysv4*MP*)
1543 if test -d /usr/nec; then
1544 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1545 hardcode_shlibpath_var=no
1546 runpath_var=LD_RUN_PATH
1547 hardcode_runpath_var=yes
1548 ld_shlibs=yes
1549 fi
1550 ;;
1551
1552 sysv4.2uw2*)
1553 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
1554 hardcode_direct=yes
1555 hardcode_minus_L=no
1556 hardcode_shlibpath_var=no
1557 hardcode_runpath_var=yes
1558 runpath_var=LD_RUN_PATH
1559 ;;
1560
1561 unixware7*)
1562 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1563 runpath_var='LD_RUN_PATH'
1564 hardcode_shlibpath_var=no
1565 ;;
1566
1567 *)
1568 ld_shlibs=no
1569 ;;
1570 esac
1571 fi
1572 echo "$ac_t$ld_shlibs" 1>&6
1573 test "$ld_shlibs" = no && can_build_shared=no
1574
1575 if test -z "$NM"; then
1576 echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
1577 case "$NM" in
1578 [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
1579 *)
1580 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
1581 for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
1582 test -z "$ac_dir" && ac_dir=.
1583 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then
1584 # Check to see if the nm accepts a BSD-compat flag.
1585 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1586 # nm: unknown option "B" ignored
1587 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1588 NM="$ac_dir/nm -B"
1589 break
1590 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1591 NM="$ac_dir/nm -p"
1592 break
1593 else
1594 NM=${NM="$ac_dir/nm"} # keep the first match, but
1595 continue # so that we can try to find one that supports BSD flags
1596 fi
1597 fi
1598 done
1599 IFS="$ac_save_ifs"
1600 test -z "$NM" && NM=nm
1601 ;;
1602 esac
1603 echo "$ac_t$NM" 1>&6
1604 fi
1605
1606 # Check for command to grab the raw symbol name followed by C symbol from nm.
1607 echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
1608
1609 # These are sane defaults that work on at least a few old systems.
1610 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
1611
1612 # Character class describing NM global symbol codes.
1613 symcode='[BCDEGRST]'
1614
1615 # Regexp to match symbols that can be accessed directly from C.
1616 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1617
1618 # Transform the above into a raw symbol and a C symbol.
1619 symxfrm='\1 \2\3 \3'
1620
1621 # Transform an extracted symbol line into a proper C declaration
1622 global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1623
1624 # Define system-specific variables.
1625 case "$host_os" in
1626 aix*)
1627 symcode='[BCDT]'
1628 ;;
1629 cygwin* | mingw*)
1630 symcode='[ABCDGISTW]'
1631 ;;
1632 hpux*) # Its linker distinguishes data from code symbols
1633 global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
1634 ;;
1635 irix*)
1636 symcode='[BCDEGRST]'
1637 ;;
1638 solaris*)
1639 symcode='[BDT]'
1640 ;;
1641 sysv4)
1642 symcode='[DFNSTU]'
1643 ;;
1644 esac
1645
1646 # If we're using GNU nm, then use its standard symbol codes.
1647 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1648 symcode='[ABCDGISTW]'
1649 fi
1650
1651 # Try without a prefix undercore, then with it.
1652 for ac_symprfx in "" "_"; do
1653
1654 # Write the raw and C identifiers.
1655 global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'"
1656
1657 # Check to see that the pipe works correctly.
1658 pipe_works=no
1659 $rm conftest*
1660 cat > conftest.c <<EOF
1661 #ifdef __cplusplus
1662 extern "C" {
1663 #endif
1664 char nm_test_var;
1665 void nm_test_func(){}
1666 #ifdef __cplusplus
1667 }
1668 #endif
1669 main(){nm_test_var='a';nm_test_func();return(0);}
1670 EOF
1671
1672 echo "$progname:1662: checking if global_symbol_pipe works" >&5
1673 if { (eval echo $progname:1663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
1674 # Now try to grab the symbols.
1675 nlist=conftest.nm
1676 if { echo "$progname:1666: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
1677
1678 # Try sorting and uniquifying the output.
1679 if sort "$nlist" | uniq > "$nlist"T; then
1680 mv -f "$nlist"T "$nlist"
1681 else
1682 rm -f "$nlist"T
1683 fi
1684
1685 # Make sure that we snagged all the symbols we need.
1686 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1687 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1688 cat <<EOF > conftest.c
1689 #ifdef __cplusplus
1690 extern "C" {
1691 #endif
1692
1693 EOF
1694 # Now generate the symbol file.
1695 eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
1696
1697 cat <<EOF >> conftest.c
1698 #if defined (__STDC__) && __STDC__
1699 # define lt_ptr_t void *
1700 #else
1701 # define lt_ptr_t char *
1702 # define const
1703 #endif
1704
1705 /* The mapping between symbol names and symbols. */
1706 const struct {
1707 const char *name;
1708 lt_ptr_t address;
1709 }
1710 lt_preloaded_symbols[] =
1711 {
1712 EOF
1713 sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
1714 cat <<\EOF >> conftest.c
1715 {0, (lt_ptr_t) 0}
1716 };
1717
1718 #ifdef __cplusplus
1719 }
1720 #endif
1721 EOF
1722 # Now try linking the two files.
1723 mv conftest.$objext conftstm.$objext
1724 save_LIBS="$LIBS"
1725 save_CFLAGS="$CFLAGS"
1726 LIBS="conftstm.$objext"
1727 CFLAGS="$CFLAGS$no_builtin_flag"
1728 if { (eval echo $progname:1718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1729 pipe_works=yes
1730 else
1731 echo "$progname: failed program was:" >&5
1732 cat conftest.c >&5
1733 fi
1734 LIBS="$save_LIBS"
1735 else
1736 echo "cannot find nm_test_func in $nlist" >&5
1737 fi
1738 else
1739 echo "cannot find nm_test_var in $nlist" >&5
1740 fi
1741 else
1742 echo "cannot run $global_symbol_pipe" >&5
1743 fi
1744 else
1745 echo "$progname: failed program was:" >&5
1746 cat conftest.c >&5
1747 fi
1748 $rm conftest* conftst*
1749
1750 # Do not use the global_symbol_pipe unless it works.
1751 if test "$pipe_works" = yes; then
1752 break
1753 else
1754 global_symbol_pipe=
1755 fi
1756 done
1757 if test "$pipe_works" = yes; then
1758 echo "${ac_t}ok" 1>&6
1759 else
1760 echo "${ac_t}failed" 1>&6
1761 fi
1762
1763 if test -z "$global_symbol_pipe"; then
1764 global_symbol_to_cdecl=
1765 fi
1766
1767 # Check hardcoding attributes.
1768 echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
1769 hardcode_action=
1770 if test -n "$hardcode_libdir_flag_spec" || \
1771 test -n "$runpath_var"; then
1772
1773 # We can hardcode non-existant directories.
1774 if test "$hardcode_direct" != no &&
1775 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1776 # have to relink, otherwise we might link with an installed library
1777 # when we should be linking with a yet-to-be-installed one
1778 ## test "$hardcode_shlibpath_var" != no &&
1779 test "$hardcode_minus_L" != no; then
1780 # Linking always hardcodes the temporary library directory.
1781 hardcode_action=relink
1782 else
1783 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1784 hardcode_action=immediate
1785 fi
1786 else
1787 # We cannot hardcode anything, or else we can only hardcode existing
1788 # directories.
1789 hardcode_action=unsupported
1790 fi
1791 echo "$ac_t$hardcode_action" 1>&6
1792
1793
1794 reload_flag=
1795 reload_cmds='$LD$reload_flag -o $output$reload_objs'
1796 echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
1797 # PORTME Some linkers may need a different reload flag.
1798 reload_flag='-r'
1799 echo "$ac_t$reload_flag" 1>&6
1800 test -n "$reload_flag" && reload_flag=" $reload_flag"
1801
1802 # PORTME Fill in your ld.so characteristics
1803 library_names_spec=
1804 libname_spec='lib$name'
1805 soname_spec=
1806 postinstall_cmds=
1807 postuninstall_cmds=
1808 finish_cmds=
1809 finish_eval=
1810 shlibpath_var=
1811 shlibpath_overrides_runpath=unknown
1812 version_type=none
1813 dynamic_linker="$host_os ld.so"
1814 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1815 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1816 file_magic_cmd=
1817 file_magic_test_file=
1818 deplibs_check_method='unknown'
1819 # Need to set the preceding variable on all platforms that support
1820 # interlibrary dependencies.
1821 # 'none' -- dependencies not supported.
1822 # `unknown' -- same as none, but documents that we really don't know.
1823 # 'pass_all' -- all dependencies passed with no checks.
1824 # 'test_compile' -- check by making test program.
1825 # 'file_magic [regex]' -- check by looking for files in library path
1826 # which responds to the $file_magic_cmd with a given egrep regex.
1827 # If you have `file' or equivalent on your system and you're not sure
1828 # whether `pass_all' will *always* work, you probably want this one.
1829 echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
1830 case "$host_os" in
1831 aix3*)
1832 version_type=linux
1833 library_names_spec='${libname}${release}.so$versuffix $libname.a'
1834 shlibpath_var=LIBPATH
1835
1836 # AIX has no versioning support, so we append a major version to the name.
1837 soname_spec='${libname}${release}.so$major'
1838 ;;
1839
1840 aix4*)
1841 version_type=linux
1842 # AIX has no versioning support, so currently we can not hardcode correct
1843 # soname into executable. Probably we can add versioning support to
1844 # collect2, so additional links can be useful in future.
1845 # We preserve .a as extension for shared libraries though AIX4.2
1846 # and later linker supports .so
1847 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
1848 shlibpath_var=LIBPATH
1849 deplibs_check_method=pass_all
1850 ;;
1851
1852 amigaos*)
1853 library_names_spec='$libname.ixlibrary $libname.a'
1854 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1855 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
1856 ;;
1857
1858 beos*)
1859 library_names_spec='${libname}.so'
1860 dynamic_linker="$host_os ld.so"
1861 shlibpath_var=LIBRARY_PATH
1862 deplibs_check_method=pass_all
1863 lt_cv_dlopen="load_add_on"
1864 lt_cv_dlopen_libs=
1865 lt_cv_dlopen_self=yes
1866 ;;
1867
1868 bsdi4*)
1869 version_type=linux
1870 need_version=no
1871 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1872 soname_spec='${libname}${release}.so$major'
1873 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1874 shlibpath_var=LD_LIBRARY_PATH
1875 deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1876 file_magic_cmd=/usr/bin/file
1877 file_magic_test_file=/shlib/libc.so
1878 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1879 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1880 export_dynamic_flag_spec=-rdynamic
1881 # the default ld.so.conf also contains /usr/contrib/lib and
1882 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1883 # libtool to hard-code these into programs
1884 ;;
1885
1886 cygwin* | mingw*)
1887 version_type=windows
1888 need_version=no
1889 need_lib_prefix=no
1890 if test "$with_gcc" = yes; then
1891 library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
1892 else
1893 library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
1894 fi
1895 dynamic_linker='Win32 ld.exe'
1896 deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1897 file_magic_cmd='${OBJDUMP} -f'
1898 # FIXME: first we should search . and the directory the executable is in
1899 shlibpath_var=PATH
1900 lt_cv_dlopen="LoadLibrary"
1901 lt_cv_dlopen_libs=
1902 ;;
1903
1904 freebsd1*)
1905 dynamic_linker=no
1906 ;;
1907
1908 freebsd*)
1909 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1910 version_type=freebsd-$objformat
1911 case "$version_type" in
1912 freebsd-elf*)
1913 deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
1914 file_magic_cmd=/usr/bin/file
1915 file_magic_test_file=`echo /usr/lib/libc.so*`
1916 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1917 need_version=no
1918 need_lib_prefix=no
1919 ;;
1920 freebsd-*)
1921 deplibs_check_method=unknown
1922 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
1923 need_version=yes
1924 ;;
1925 esac
1926 shlibpath_var=LD_LIBRARY_PATH
1927 case "$host_os" in
1928 freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*)
1929 shlibpath_overrides_runpath=yes
1930 ;;
1931 *) # from 3.2 on
1932 shlibpath_overrides_runpath=no
1933 ;;
1934 esac
1935 ;;
1936
1937 darwin* | rhapsody*)
1938 dynamic_linker="$host_os dyld"
1939 version_type=darwin
1940 need_lib_prefix=no
1941 need_version=no
1942 deplibs_check_method='file_magic Mach-O (64-bit )?dynamically linked shared library'
1943 file_magic_cmd='/usr/bin/file -L'
1944 case "$host_os" in
1945 rhapsody* | darwin1.[012])
1946 file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1947 ;;
1948 *) # Darwin 1.3 on
1949 file_magic_test_file='/usr/lib/libSystem.dylib'
1950 ;;
1951 esac
1952 library_names_spec='${libname}${release}${versuffix}.$(test x$module = xyes && echo so || echo dylib) ${libname}${release}${major}.$(test x$module = xyes && echo so || echo dylib) ${libname}.$(test x$module = xyes && echo so || echo dylib)'
1953 soname_spec='${libname}${release}${major}.$(test x$module = xyes && echo so || echo dylib)'
1954 shlibpath_overrides_runpath=yes
1955 shlibpath_var=DYLD_LIBRARY_PATH
1956 ;;
1957
1958 gnu*)
1959 version_type=linux
1960 need_lib_prefix=no
1961 need_version=no
1962 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
1963 soname_spec='${libname}${release}.so$major'
1964 shlibpath_var=LD_LIBRARY_PATH
1965 ;;
1966
1967 hpux9* | hpux10* | hpux11*)
1968 # Give a soname corresponding to the major version so that dld.sl refuses to
1969 # link against other versions.
1970 dynamic_linker="$host_os dld.sl"
1971 version_type=sunos
1972 need_lib_prefix=no
1973 need_version=no
1974 shlibpath_var=SHLIB_PATH
1975 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1976 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1977 soname_spec='${libname}${release}.sl$major'
1978 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1979 postinstall_cmds='chmod 555 $lib'
1980 case "$host_os" in
1981 hpux10.20*)
1982 # TODO: Does this work for hpux-11 too?
1983 deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1984 file_magic_cmd=/usr/bin/file
1985 file_magic_test_file=/usr/lib/libc.sl
1986 ;;
1987 esac
1988 ;;
1989
1990 irix5* | irix6*)
1991 version_type=irix
1992 need_lib_prefix=no
1993 need_version=no
1994 soname_spec='${libname}${release}.so.$major'
1995 library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
1996 case "$host_os" in
1997 irix5*)
1998 libsuff= shlibsuff=
1999 # this will be overridden with pass_all, but let us keep it just in case
2000 deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2001 ;;
2002 *)
2003 case "$LD" in # libtool.m4 will add one of these switches to LD
2004 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2005 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2006 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2007 *) libsuff= shlibsuff= libmagic=never-match;;
2008 esac
2009 ;;
2010 esac
2011 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2012 shlibpath_overrides_runpath=no
2013 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2014 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2015 file_magic_cmd=/usr/bin/file
2016 file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2017 deplibs_check_method='pass_all'
2018 ;;
2019
2020 # No shared lib support for Linux oldld, aout, or coff.
2021 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2022 dynamic_linker=no
2023 ;;
2024
2025 # This must be Linux ELF.
2026 linux-gnu*)
2027 version_type=linux
2028 need_lib_prefix=no
2029 need_version=no
2030 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2031 soname_spec='${libname}${release}.so$major'
2032 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2033 shlibpath_var=LD_LIBRARY_PATH
2034 shlibpath_overrides_runpath=no
2035 deplibs_check_method=pass_all
2036
2037 if test -f /lib/ld.so.1; then
2038 dynamic_linker='GNU ld.so'
2039 else
2040 # Only the GNU ld.so supports shared libraries on MkLinux.
2041 case "$host_cpu" in
2042 powerpc*) dynamic_linker=no ;;
2043 *) dynamic_linker='Linux ld.so' ;;
2044 esac
2045 fi
2046 ;;
2047
2048 netbsd*)
2049 version_type=sunos
2050 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2051 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2052 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2053 dynamic_linker='NetBSD (a.out) ld.so'
2054 else
2055 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2056 soname_spec='${libname}${release}.so$major'
2057 dynamic_linker='NetBSD ld.elf_so'
2058 fi
2059 shlibpath_var=LD_LIBRARY_PATH
2060 ;;
2061
2062 openbsd*)
2063 version_type=sunos
2064 if test "$with_gnu_ld" = yes; then
2065 need_lib_prefix=no
2066 need_version=no
2067 fi
2068 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2069 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2070 shlibpath_var=LD_LIBRARY_PATH
2071 ;;
2072
2073 os2*)
2074 libname_spec='$name'
2075 need_lib_prefix=no
2076 library_names_spec='$libname.dll $libname.a'
2077 dynamic_linker='OS/2 ld.exe'
2078 shlibpath_var=LIBPATH
2079 ;;
2080
2081 osf3* | osf4* | osf5*)
2082 version_type=osf
2083 need_version=no
2084 soname_spec='${libname}${release}.so'
2085 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2086 shlibpath_var=LD_LIBRARY_PATH
2087 # this will be overridden with pass_all, but let us keep it just in case
2088 deplibs_check_method='file_magic COFF format alpha shared library'
2089 file_magic_cmd=/usr/bin/file
2090 file_magic_test_file=/shlib/libc.so
2091 deplibs_check_method='pass_all'
2092 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2093 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2094 ;;
2095
2096 sco3.2v5*)
2097 version_type=osf
2098 soname_spec='${libname}${release}.so$major'
2099 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2100 shlibpath_var=LD_LIBRARY_PATH
2101 ;;
2102
2103 solaris*)
2104 version_type=linux
2105 need_lib_prefix=no
2106 need_version=no
2107 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2108 soname_spec='${libname}${release}.so$major'
2109 shlibpath_var=LD_LIBRARY_PATH
2110 shlibpath_overrides_runpath=yes
2111 # ldd complains unless libraries are executable
2112 postinstall_cmds='chmod +x $lib'
2113 deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib"
2114 file_magic_cmd=/usr/bin/file
2115 file_magic_test_file=/lib/libc.so
2116 ;;
2117
2118 sunos4*)
2119 version_type=sunos
2120 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2121 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2122 shlibpath_var=LD_LIBRARY_PATH
2123 shlibpath_overrides_runpath=yes
2124 if test "$with_gnu_ld" = yes; then
2125 need_lib_prefix=no
2126 fi
2127 need_version=yes
2128 ;;
2129
2130 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2131 version_type=linux
2132 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2133 soname_spec='${libname}${release}.so$major'
2134 shlibpath_var=LD_LIBRARY_PATH
2135 case "$host_vendor" in
2136 sequent)
2137 file_magic_cmd='/bin/file'
2138 deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
2139 ;;
2140 ncr)
2141 deplibs_check_method='pass_all'
2142 ;;
2143 motorola)
2144 need_lib_prefix=no
2145 need_version=no
2146 shlibpath_overrides_runpath=no
2147 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2148 deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
2149 file_magic_cmd=/usr/bin/file
2150 file_magic_test_file=`echo /usr/lib/libc.so*`
2151 ;;
2152 esac
2153 ;;
2154
2155 uts4*)
2156 version_type=linux
2157 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2158 soname_spec='${libname}${release}.so$major'
2159 shlibpath_var=LD_LIBRARY_PATH
2160 ;;
2161
2162 dgux*)
2163 version_type=linux
2164 need_lib_prefix=no
2165 need_version=no
2166 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2167 soname_spec='${libname}${release}.so$major'
2168 shlibpath_var=LD_LIBRARY_PATH
2169 ;;
2170
2171 sysv4*MP*)
2172 if test -d /usr/nec ;then
2173 version_type=linux
2174 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2175 soname_spec='$libname.so.$major'
2176 shlibpath_var=LD_LIBRARY_PATH
2177 fi
2178 ;;
2179
2180 *)
2181 dynamic_linker=no
2182 ;;
2183 esac
2184 echo "$ac_t$dynamic_linker" 1>&6
2185 test "$dynamic_linker" = no && can_build_shared=no
2186
2187 # Report the final consequences.
2188 echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
2189
2190 # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
2191 # configure.in, otherwise build static only libraries.
2192 case "$host_os" in
2193 cygwin* | mingw* | os2*)
2194 if test x$can_build_shared = xyes; then
2195 test x$enable_win32_dll = xno && can_build_shared=no
2196 echo "checking if package supports dlls... $can_build_shared" 1>&6
2197 fi
2198 ;;
2199 esac
2200
2201 if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
2202 case "$deplibs_check_method" in
2203 "file_magic "*)
2204 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2205 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2206 egrep "$file_magic_regex" > /dev/null; then
2207 :
2208 else
2209 cat <<EOF 1>&2
2210
2211 *** Warning: the command libtool uses to detect shared libraries,
2212 *** $file_magic_cmd, produces output that libtool cannot recognize.
2213 *** The result is that libtool may fail to recognize shared libraries
2214 *** as such. This will affect the creation of libtool libraries that
2215 *** depend on shared libraries, but programs linked with such libtool
2216 *** libraries will work regardless of this problem. Nevertheless, you
2217 *** may want to report the problem to your system manager and/or to
2218 *** bug-libtool@gnu.org
2219
2220 EOF
2221 fi ;;
2222 esac
2223 fi
2224
2225 echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
2226 test "$can_build_shared" = "no" && enable_shared=no
2227
2228 # On AIX, shared libraries and static libraries use the same namespace, and
2229 # are all built from PIC.
2230 case "$host_os" in
2231 aix3*)
2232 test "$enable_shared" = yes && enable_static=no
2233 if test -n "$RANLIB"; then
2234 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2235 postinstall_cmds='$RANLIB $lib'
2236 fi
2237 ;;
2238
2239 aix4*)
2240 test "$enable_shared" = yes && enable_static=no
2241 ;;
2242 esac
2243
2244 echo "$ac_t$enable_shared" 1>&6
2245
2246 # Make sure either enable_shared or enable_static is yes.
2247 test "$enable_shared" = yes || enable_static=yes
2248
2249 # Propagate what we've learned...
2250 ac_cv_can_build_shared="$can_build_shared"
2251
2252 echo "checking whether to build static libraries... $enable_static" 1>&6
2253
2254 if test "$hardcode_action" = relink; then
2255 # Fast installation is not supported
2256 enable_fast_install=no
2257 elif test "$shlibpath_overrides_runpath" = yes ||
2258 test "$enable_shared" = no; then
2259 # Fast installation is not necessary
2260 enable_fast_install=needless
2261 fi
2262
2263 echo $ac_n "checking for objdir... $ac_c" 1>&6
2264 rm -f .libs 2>/dev/null
2265 mkdir .libs 2>/dev/null
2266 if test -d .libs; then
2267 objdir=.libs
2268 else
2269 # MS-DOS does not allow filenames that begin with a dot.
2270 objdir=_libs
2271 fi
2272 rmdir .libs 2>/dev/null
2273 echo "$ac_t$objdir" 1>&6
2274
2275 if test "x$enable_dlopen" != xyes; then
2276 enable_dlopen=unknown
2277 enable_dlopen_self=unknown
2278 enable_dlopen_self_static=unknown
2279 else
2280 if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
2281 lt_cv_dlopen=no lt_cv_dlopen_libs=
2282 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2283 echo "$progname:2270: checking for dlopen in -ldl" >&5
2284 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2285 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2286 echo $ac_n "(cached) $ac_c" 1>&6
2287 else
2288 ac_save_LIBS="$LIBS"
2289 LIBS="-ldl $LIBS"
2290 cat > conftest.$ac_ext <<EOF
2291 #line 2278 "ltconfig"
2292 /* Override any gcc2 internal prototype to avoid an error. */
2293 /* We use char because int might match the return type of a gcc2
2294 builtin and then its argument prototype would still apply. */
2295 #ifdef __cplusplus
2296 extern "C"
2297 #endif
2298 char dlopen();
2299
2300 int main() {
2301 dlopen()
2302 ; return 0; }
2303 EOF
2304 if { (eval echo $progname:2291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2305 rm -rf conftest*
2306 eval "ac_cv_lib_$ac_lib_var=yes"
2307 else
2308 echo "$progname: failed program was:" >&5
2309 cat conftest.$ac_ext >&5
2310 rm -rf conftest*
2311 eval "ac_cv_lib_$ac_lib_var=no"
2312 fi
2313 rm -f conftest*
2314 LIBS="$ac_save_LIBS"
2315
2316 fi
2317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2318 echo "$ac_t""yes" 1>&6
2319 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
2320 else
2321 echo "$ac_t""no" 1>&6
2322 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
2323 echo "$progname:2310: checking for dlopen" >&5
2324 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
2325 echo $ac_n "(cached) $ac_c" 1>&6
2326 else
2327 cat > conftest.$ac_ext <<EOF
2328 #line 2315 "ltconfig"
2329 /* System header to define __stub macros and hopefully few prototypes,
2330 which can conflict with char dlopen(); below. */
2331 #include <assert.h>
2332 /* Override any gcc2 internal prototype to avoid an error. */
2333 /* We use char because int might match the return type of a gcc2
2334 builtin and then its argument prototype would still apply. */
2335 #ifdef __cplusplus
2336 extern "C"
2337 #endif
2338 char dlopen();
2339
2340 int main() {
2341
2342 /* The GNU C library defines this for functions which it implements
2343 to always fail with ENOSYS. Some functions are actually named
2344 something starting with __ and the normal name is an alias. */
2345 #if defined (__stub_dlopen) || defined (__stub___dlopen)
2346 choke me
2347 #else
2348 dlopen();
2349 #endif
2350
2351 ; return 0; }
2352 EOF
2353 if { (eval echo $progname:2340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2354 rm -rf conftest*
2355 eval "ac_cv_func_dlopen=yes"
2356 else
2357 echo "$progname: failed program was:" >&5
2358 cat conftest.$ac_ext >&5
2359 rm -rf conftest*
2360 eval "ac_cv_func_dlopen=no"
2361 fi
2362 rm -f conftest*
2363 fi
2364 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
2365 echo "$ac_t""yes" 1>&6
2366 lt_cv_dlopen="dlopen"
2367 else
2368 echo "$ac_t""no" 1>&6
2369 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
2370 echo "$progname:2357: checking for dld_link in -ldld" >&5
2371 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
2372 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2373 echo $ac_n "(cached) $ac_c" 1>&6
2374 else
2375 ac_save_LIBS="$LIBS"
2376 LIBS="-ldld $LIBS"
2377 cat > conftest.$ac_ext <<EOF
2378 #line 2365 "ltconfig"
2379 /* Override any gcc2 internal prototype to avoid an error. */
2380 /* We use char because int might match the return type of a gcc2
2381 builtin and then its argument prototype would still apply. */
2382 #ifdef __cplusplus
2383 extern "C"
2384 #endif
2385 char dld_link();
2386
2387 int main() {
2388 dld_link()
2389 ; return 0; }
2390 EOF
2391 if { (eval echo $progname:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2392 rm -rf conftest*
2393 eval "ac_cv_lib_$ac_lib_var=yes"
2394 else
2395 echo "$progname: failed program was:" >&5
2396 cat conftest.$ac_ext >&5
2397 rm -rf conftest*
2398 eval "ac_cv_lib_$ac_lib_var=no"
2399 fi
2400 rm -f conftest*
2401 LIBS="$ac_save_LIBS"
2402
2403 fi
2404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2405 echo "$ac_t""yes" 1>&6
2406 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
2407 else
2408 echo "$ac_t""no" 1>&6
2409 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
2410 echo "$progname:2397: checking for shl_load" >&5
2411 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
2412 echo $ac_n "(cached) $ac_c" 1>&6
2413 else
2414 cat > conftest.$ac_ext <<EOF
2415 #line 2402 "ltconfig"
2416 /* System header to define __stub macros and hopefully few prototypes,
2417 which can conflict with char shl_load(); below. */
2418 #include <assert.h>
2419 /* Override any gcc2 internal prototype to avoid an error. */
2420 /* We use char because int might match the return type of a gcc2
2421 builtin and then its argument prototype would still apply. */
2422 #ifdef __cplusplus
2423 extern "C"
2424 #endif
2425 char shl_load();
2426
2427 int main() {
2428
2429 /* The GNU C library defines this for functions which it implements
2430 to always fail with ENOSYS. Some functions are actually named
2431 something starting with __ and the normal name is an alias. */
2432 #if defined (__stub_shl_load) || defined (__stub___shl_load)
2433 choke me
2434 #else
2435 shl_load();
2436 #endif
2437
2438 ; return 0; }
2439 EOF
2440 if { (eval echo $progname:2427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2441 rm -rf conftest*
2442 eval "ac_cv_func_shl_load=yes"
2443 else
2444 echo "$progname: failed program was:" >&5
2445 cat conftest.$ac_ext >&5
2446 rm -rf conftest*
2447 eval "ac_cv_func_shl_load=no"
2448 fi
2449 rm -f conftest*
2450 fi
2451
2452 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
2453 echo "$ac_t""yes" 1>&6
2454 lt_cv_dlopen="shl_load"
2455 else
2456 echo "$ac_t""no" 1>&6
2457 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
2458 echo "$progname:2445: checking for shl_load in -ldld" >&5
2459 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
2460 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2461 echo $ac_n "(cached) $ac_c" 1>&6
2462 else
2463 ac_save_LIBS="$LIBS"
2464 LIBS="-ldld $LIBS"
2465 cat > conftest.$ac_ext <<EOF
2466 #line 2453 "ltconfig"
2467 #include "confdefs.h"
2468 /* Override any gcc2 internal prototype to avoid an error. */
2469 /* We use char because int might match the return type of a gcc2
2470 builtin and then its argument prototype would still apply. */
2471 #ifdef __cplusplus
2472 extern "C"
2473 #endif
2474 char shl_load();
2475
2476 int main() {
2477 shl_load()
2478 ; return 0; }
2479 EOF
2480 if { (eval echo $progname:2467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2481 rm -rf conftest*
2482 eval "ac_cv_lib_$ac_lib_var=yes"
2483 else
2484 echo "$progname: failed program was:" >&5
2485 cat conftest.$ac_ext >&5
2486 rm -rf conftest*
2487 eval "ac_cv_lib_$ac_lib_var=no"
2488 fi
2489 rm -f conftest*
2490 LIBS="$ac_save_LIBS"
2491
2492 fi
2493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2494 echo "$ac_t""yes" 1>&6
2495 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
2496 else
2497 echo "$ac_t""no" 1>&6
2498 fi
2499
2500
2501 fi
2502
2503
2504 fi
2505
2506
2507 fi
2508
2509
2510 fi
2511
2512 fi
2513
2514 if test "x$lt_cv_dlopen" != xno; then
2515 enable_dlopen=yes
2516 fi
2517
2518 case "$lt_cv_dlopen" in
2519 dlopen)
2520 for ac_hdr in dlfcn.h; do
2521 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2522 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2523 echo "$progname:2510: checking for $ac_hdr" >&5
2524 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2525 echo $ac_n "(cached) $ac_c" 1>&6
2526 else
2527 cat > conftest.$ac_ext <<EOF
2528 #line 2515 "ltconfig"
2529 #include <$ac_hdr>
2530 int fnord = 0;
2531 EOF
2532 ac_try="$ac_compile >/dev/null 2>conftest.out"
2533 { (eval echo $progname:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2535 if test -z "$ac_err"; then
2536 rm -rf conftest*
2537 eval "ac_cv_header_$ac_safe=yes"
2538 else
2539 echo "$ac_err" >&5
2540 echo "$progname: failed program was:" >&5
2541 cat conftest.$ac_ext >&5
2542 rm -rf conftest*
2543 eval "ac_cv_header_$ac_safe=no"
2544 fi
2545 rm -f conftest*
2546 fi
2547 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2548 echo "$ac_t""yes" 1>&6
2549 else
2550 echo "$ac_t""no" 1>&6
2551 fi
2552 done
2553
2554 if test "x$ac_cv_header_dlfcn_h" = xyes; then
2555 CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2556 fi
2557 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2558 LIBS="$lt_cv_dlopen_libs $LIBS"
2559
2560 echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
2561 echo "$progname:2548: checking whether a program can dlopen itself" >&5
2562 if test "${lt_cv_dlopen_self+set}" = set; then
2563 echo $ac_n "(cached) $ac_c" 1>&6
2564 else
2565 if test "$cross_compiling" = yes; then
2566 lt_cv_dlopen_self=cross
2567 else
2568 cat > conftest.c <<EOF
2569 #line 2556 "ltconfig"
2570
2571 #if HAVE_DLFCN_H
2572 #include <dlfcn.h>
2573 #endif
2574
2575 #include <stdio.h>
2576
2577 #ifdef RTLD_GLOBAL
2578 # define LTDL_GLOBAL RTLD_GLOBAL
2579 #else
2580 # ifdef DL_GLOBAL
2581 # define LTDL_GLOBAL DL_GLOBAL
2582 # else
2583 # define LTDL_GLOBAL 0
2584 # endif
2585 #endif
2586
2587 /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
2588 find out it does not work in some platform. */
2589 #ifndef LTDL_LAZY_OR_NOW
2590 # ifdef RTLD_LAZY
2591 # define LTDL_LAZY_OR_NOW RTLD_LAZY
2592 # else
2593 # ifdef DL_LAZY
2594 # define LTDL_LAZY_OR_NOW DL_LAZY
2595 # else
2596 # ifdef RTLD_NOW
2597 # define LTDL_LAZY_OR_NOW RTLD_NOW
2598 # else
2599 # ifdef DL_NOW
2600 # define LTDL_LAZY_OR_NOW DL_NOW
2601 # else
2602 # define LTDL_LAZY_OR_NOW 0
2603 # endif
2604 # endif
2605 # endif
2606 # endif
2607 #endif
2608
2609 fnord() { int i=42;}
2610 main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
2611 if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
2612 if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
2613
2614 EOF
2615 if { (eval echo $progname:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2616 then
2617 lt_cv_dlopen_self=yes
2618 else
2619 echo "$progname: failed program was:" >&5
2620 cat conftest.$ac_ext >&5
2621 rm -fr conftest*
2622 lt_cv_dlopen_self=no
2623 fi
2624 rm -fr conftest*
2625 fi
2626
2627 fi
2628
2629 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
2630
2631 if test "$lt_cv_dlopen_self" = yes; then
2632 LDFLAGS="$LDFLAGS $link_static_flag"
2633 echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
2634 echo "$progname:2621: checking whether a statically linked program can dlopen itself" >&5
2635 if test "${lt_cv_dlopen_self_static+set}" = set; then
2636 echo $ac_n "(cached) $ac_c" 1>&6
2637 else
2638 if test "$cross_compiling" = yes; then
2639 lt_cv_dlopen_self_static=cross
2640 else
2641 cat > conftest.c <<EOF
2642 #line 2629 "ltconfig"
2643
2644 #if HAVE_DLFCN_H
2645 #include <dlfcn.h>
2646 #endif
2647
2648 #include <stdio.h>
2649
2650 #ifdef RTLD_GLOBAL
2651 # define LTDL_GLOBAL RTLD_GLOBAL
2652 #else
2653 # ifdef DL_GLOBAL
2654 # define LTDL_GLOBAL DL_GLOBAL
2655 # else
2656 # define LTDL_GLOBAL 0
2657 # endif
2658 #endif
2659
2660 /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
2661 find out it does not work in some platform. */
2662 #ifndef LTDL_LAZY_OR_NOW
2663 # ifdef RTLD_LAZY
2664 # define LTDL_LAZY_OR_NOW RTLD_LAZY
2665 # else
2666 # ifdef DL_LAZY
2667 # define LTDL_LAZY_OR_NOW DL_LAZY
2668 # else
2669 # ifdef RTLD_NOW
2670 # define LTDL_LAZY_OR_NOW RTLD_NOW
2671 # else
2672 # ifdef DL_NOW
2673 # define LTDL_LAZY_OR_NOW DL_NOW
2674 # else
2675 # define LTDL_LAZY_OR_NOW 0
2676 # endif
2677 # endif
2678 # endif
2679 # endif
2680 #endif
2681
2682 fnord() { int i=42;}
2683 main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
2684 if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
2685 if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
2686
2687 EOF
2688 if { (eval echo $progname:2675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2689 then
2690 lt_cv_dlopen_self_static=yes
2691 else
2692 echo "$progname: failed program was:" >&5
2693 cat conftest.$ac_ext >&5
2694 rm -fr conftest*
2695 lt_cv_dlopen_self_static=no
2696 fi
2697 rm -fr conftest*
2698 fi
2699
2700 fi
2701
2702 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
2703 fi
2704 ;;
2705 esac
2706
2707 case "$lt_cv_dlopen_self" in
2708 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2709 *) enable_dlopen_self=unknown ;;
2710 esac
2711
2712 case "$lt_cv_dlopen_self_static" in
2713 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2714 *) enable_dlopen_self_static=unknown ;;
2715 esac
2716 fi
2717
2718 # Copy echo and quote the copy, instead of the original, because it is
2719 # used later.
2720 ltecho="$echo"
2721 if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
2722 ltecho="$CONFIG_SHELL \$0 --fallback-echo"
2723 fi
2724 LTSHELL="$SHELL"
2725
2726 LTCONFIG_VERSION="$VERSION"
2727
2728 # Only quote variables if we're using ltmain.sh.
2729 case "$ltmain" in
2730 *.sh)
2731 # Now quote all the things that may contain metacharacters.
2732 for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
2733 old_LD old_LDFLAGS old_LIBS \
2734 old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
2735 AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
2736 reload_flag reload_cmds wl \
2737 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2738 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2739 library_names_spec soname_spec \
2740 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2741 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \
2742 file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \
2743 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2744 hardcode_libdir_flag_spec hardcode_libdir_separator \
2745 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2746 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
2747
2748 case "$var" in
2749 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2750 old_postinstall_cmds | old_postuninstall_cmds | \
2751 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2752 postinstall_cmds | postuninstall_cmds | \
2753 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2754 # Double-quote double-evaled strings.
2755 eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2756 ;;
2757 *)
2758 eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2759 ;;
2760 esac
2761 done
2762
2763 case "$ltecho" in
2764 *'\$0 --fallback-echo"')
2765 ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
2766 ;;
2767 esac
2768
2769 trap "$rm \"$ofile\"; exit 1" 1 2 15
2770 echo "creating $ofile"
2771 $rm "$ofile"
2772 cat <<EOF > "$ofile"
2773 #! $SHELL
2774
2775 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2776 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2777 # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
2778 #
2779 # Copyright (C) 1996-1999 Free Software Foundation, Inc.
2780 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2781 #
2782 # This program is free software; you can redistribute it and/or modify
2783 # it under the terms of the GNU General Public License as published by
2784 # the Free Software Foundation; either version 2 of the License, or
2785 # (at your option) any later version.
2786 #
2787 # This program is distributed in the hope that it will be useful, but
2788 # WITHOUT ANY WARRANTY; without even the implied warranty of
2789 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2790 # General Public License for more details.
2791 #
2792 # You should have received a copy of the GNU General Public License
2793 # along with this program; if not, write to the Free Software
2794 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2795 #
2796 # As a special exception to the GNU General Public License, if you
2797 # distribute this file as part of a program that contains a
2798 # configuration script generated by Autoconf, you may include it under
2799 # the same distribution terms that you use for the rest of that program.
2800
2801 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
2802 Xsed="sed -e s/^X//"
2803
2804 # The HP-UX ksh and POSIX shell print the target directory to stdout
2805 # if CDPATH is set.
2806 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2807
2808 ### BEGIN LIBTOOL CONFIG
2809 EOF
2810 cfgfile="$ofile"
2811 ;;
2812
2813 *)
2814 # Double-quote the variables that need it (for aesthetics).
2815 for var in old_CC old_CFLAGS old_CPPFLAGS \
2816 old_LD old_LDFLAGS old_LIBS \
2817 old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
2818 eval "$var=\\\"\$var\\\""
2819 done
2820
2821 # Just create a config file.
2822 cfgfile="$ofile.cfg"
2823 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
2824 echo "creating $cfgfile"
2825 $rm "$cfgfile"
2826 cat <<EOF > "$cfgfile"
2827 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
2828 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2829 EOF
2830 ;;
2831 esac
2832
2833 cat <<EOF >> "$cfgfile"
2834 # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2835 #
2836 # CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
2837 # LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
2838 # NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
2839 # DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
2840 # $0$ltconfig_args
2841 #
2842 # Compiler and other test output produced by $progname, useful for
2843 # debugging $progname, is in ./config.log if it exists.
2844
2845 # The version of $progname that generated this script.
2846 LTCONFIG_VERSION=$LTCONFIG_VERSION
2847
2848 # Shell to use when invoking shell scripts.
2849 SHELL=$LTSHELL
2850
2851 # Whether or not to build shared libraries.
2852 build_libtool_libs=$enable_shared
2853
2854 # Whether or not to build static libraries.
2855 build_old_libs=$enable_static
2856
2857 # Whether or not to optimize for fast installation.
2858 fast_install=$enable_fast_install
2859
2860 # The host system.
2861 host_alias=$host_alias
2862 host=$host
2863
2864 # An echo program that does not interpret backslashes.
2865 echo=$ltecho
2866
2867 # The archiver.
2868 AR=$AR
2869
2870 # The default C compiler.
2871 CC=$CC
2872
2873 # The linker used to build libraries.
2874 LD=$LD
2875
2876 # Whether we need hard or soft links.
2877 LN_S=$LN_S
2878
2879 # A BSD-compatible nm program.
2880 NM=$NM
2881
2882 # Used on cygwin: DLL creation program.
2883 DLLTOOL="$DLLTOOL"
2884
2885 # Used on cygwin: object dumper.
2886 OBJDUMP="$OBJDUMP"
2887
2888 # Used on cygwin: assembler.
2889 AS="$AS"
2890
2891 # The name of the directory that contains temporary libtool files.
2892 objdir=$objdir
2893
2894 # How to create reloadable object files.
2895 reload_flag=$reload_flag
2896 reload_cmds=$reload_cmds
2897
2898 # How to pass a linker flag through the compiler.
2899 wl=$wl
2900
2901 # Object file suffix (normally "o").
2902 objext="$objext"
2903
2904 # Old archive suffix (normally "a").
2905 libext="$libext"
2906
2907 # Executable file suffix (normally "").
2908 exeext="$exeext"
2909
2910 # Additional compiler flags for building library objects.
2911 pic_flag=$pic_flag
2912
2913 # Does compiler simultaneously support -c and -o options?
2914 compiler_c_o=$compiler_c_o
2915
2916 # Can we write directly to a .lo ?
2917 compiler_o_lo=$compiler_o_lo
2918
2919 # Must we lock files when doing compilation ?
2920 need_locks=$need_locks
2921
2922 # Do we need the lib prefix for modules?
2923 need_lib_prefix=$need_lib_prefix
2924
2925 # Do we need a version for libraries?
2926 need_version=$need_version
2927
2928 # Whether dlopen is supported.
2929 dlopen=$enable_dlopen
2930
2931 # Whether dlopen of programs is supported.
2932 dlopen_self=$enable_dlopen_self
2933
2934 # Whether dlopen of statically linked programs is supported.
2935 dlopen_self_static=$enable_dlopen_self_static
2936
2937 # Compiler flag to prevent dynamic linking.
2938 link_static_flag=$link_static_flag
2939
2940 # Compiler flag to turn off builtin functions.
2941 no_builtin_flag=$no_builtin_flag
2942
2943 # Compiler flag to allow reflexive dlopens.
2944 export_dynamic_flag_spec=$export_dynamic_flag_spec
2945
2946 # Compiler flag to generate shared objects directly from archives.
2947 whole_archive_flag_spec=$whole_archive_flag_spec
2948
2949 # Compiler flag to generate thread-safe objects.
2950 thread_safe_flag_spec=$thread_safe_flag_spec
2951
2952 # Library versioning type.
2953 version_type=$version_type
2954
2955 # Format of library name prefix.
2956 libname_spec=$libname_spec
2957
2958 # List of archive names. First name is the real one, the rest are links.
2959 # The last name is the one that the linker finds with -lNAME.
2960 library_names_spec=$library_names_spec
2961
2962 # The coded name of the library, if different from the real name.
2963 soname_spec=$soname_spec
2964
2965 # Commands used to build and install an old-style archive.
2966 RANLIB=$RANLIB
2967 old_archive_cmds=$old_archive_cmds
2968 old_postinstall_cmds=$old_postinstall_cmds
2969 old_postuninstall_cmds=$old_postuninstall_cmds
2970
2971 # Create an old-style archive from a shared archive.
2972 old_archive_from_new_cmds=$old_archive_from_new_cmds
2973
2974 # Commands used to build and install a shared archive.
2975 archive_cmds=$archive_cmds
2976 archive_expsym_cmds=$archive_expsym_cmds
2977 postinstall_cmds=$postinstall_cmds
2978 postuninstall_cmds=$postuninstall_cmds
2979
2980 # Method to check whether dependent libraries are shared objects.
2981 deplibs_check_method=$deplibs_check_method
2982
2983 # Command to use when deplibs_check_method == file_magic.
2984 file_magic_cmd=$file_magic_cmd
2985
2986 # Flag that allows shared libraries with undefined symbols to be built.
2987 allow_undefined_flag=$allow_undefined_flag
2988
2989 # Flag that forces no undefined symbols.
2990 no_undefined_flag=$no_undefined_flag
2991
2992 # Commands used to finish a libtool library installation in a directory.
2993 finish_cmds=$finish_cmds
2994
2995 # Same as above, but a single script fragment to be evaled but not shown.
2996 finish_eval=$finish_eval
2997
2998 # Take the output of nm and produce a listing of raw symbols and C names.
2999 global_symbol_pipe=$global_symbol_pipe
3000
3001 # Transform the output of nm in a proper C declaration
3002 global_symbol_to_cdecl=$global_symbol_to_cdecl
3003
3004 # This is the shared library runtime path variable.
3005 runpath_var=$runpath_var
3006
3007 # This is the shared library path variable.
3008 shlibpath_var=$shlibpath_var
3009
3010 # Is shlibpath searched before the hard-coded library search path?
3011 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3012
3013 # How to hardcode a shared library path into an executable.
3014 hardcode_action=$hardcode_action
3015
3016 # Flag to hardcode \$libdir into a binary during linking.
3017 # This must work even if \$libdir does not exist.
3018 hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
3019
3020 # Whether we need a single -rpath flag with a separated argument.
3021 hardcode_libdir_separator=$hardcode_libdir_separator
3022
3023 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3024 # resulting binary.
3025 hardcode_direct=$hardcode_direct
3026
3027 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3028 # resulting binary.
3029 hardcode_minus_L=$hardcode_minus_L
3030
3031 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3032 # the resulting binary.
3033 hardcode_shlibpath_var=$hardcode_shlibpath_var
3034
3035 # Compile-time system search path for libraries
3036 sys_lib_search_path_spec=$sys_lib_search_path_spec
3037
3038 # Run-time system search path for libraries
3039 sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
3040
3041 # Fix the shell variable \$srcfile for the compiler.
3042 fix_srcfile_path="$fix_srcfile_path"
3043
3044 # Set to yes if exported symbols are required.
3045 always_export_symbols=$always_export_symbols
3046
3047 # The commands to list exported symbols.
3048 export_symbols_cmds=$export_symbols_cmds
3049
3050 # Symbols that should not be listed in the preloaded symbols.
3051 exclude_expsyms=$exclude_expsyms
3052
3053 # Symbols that must always be exported.
3054 include_expsyms=$include_expsyms
3055
3056 EOF
3057
3058 case "$ltmain" in
3059 *.sh)
3060 echo '### END LIBTOOL CONFIG' >> "$ofile"
3061 echo >> "$ofile"
3062 case "$host_os" in
3063 aix3*)
3064 cat <<\EOF >> "$ofile"
3065
3066 # AIX sometimes has problems with the GCC collect2 program. For some
3067 # reason, if we set the COLLECT_NAMES environment variable, the problems
3068 # vanish in a puff of smoke.
3069 if test "X${COLLECT_NAMES+set}" != Xset; then
3070 COLLECT_NAMES=
3071 export COLLECT_NAMES
3072 fi
3073 EOF
3074 ;;
3075 esac
3076
3077 # Append the ltmain.sh script.
3078 sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
3079 # We use sed instead of cat because bash on DJGPP gets confused if
3080 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3081 # text mode, it properly converts lines to CR/LF. This bash problem
3082 # is reportedly fixed, but why not run on old versions too?
3083
3084 chmod +x "$ofile"
3085 ;;
3086
3087 *)
3088 # Compile the libtool program.
3089 echo "FIXME: would compile $ltmain"
3090 ;;
3091 esac
3092
3093 test -n "$cache_file" || exit 0
3094
3095 # AC_CACHE_SAVE
3096 trap '' 1 2 15
3097 cat > confcache <<\EOF
3098 # This file is a shell script that caches the results of configure
3099 # tests run on this system so they can be shared between configure
3100 # scripts and configure runs. It is not useful on other systems.
3101 # If it contains results you don't want to keep, you may remove or edit it.
3102 #
3103 # By default, configure uses ./config.cache as the cache file,
3104 # creating it if it does not exist already. You can give configure
3105 # the --cache-file=FILE option to use a different cache file; that is
3106 # what configure does when it calls configure scripts in
3107 # subdirectories, so they share the cache.
3108 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3109 # config.status only pays attention to the cache file if you give it the
3110 # --recheck option to rerun configure.
3111 #
3112 EOF
3113 # The following way of writing the cache mishandles newlines in values,
3114 # but we know of no workaround that is simple, portable, and efficient.
3115 # So, don't put newlines in cache variables' values.
3116 # Ultrix sh set writes to stderr and can't be redirected directly,
3117 # and sets the high bit in the cache file unless we assign to the vars.
3118 (set) 2>&1 |
3119 case `(ac_space=' '; set | grep ac_space) 2>&1` in
3120 *ac_space=\ *)
3121 # `set' does not quote correctly, so add quotes (double-quote substitution
3122 # turns \\\\ into \\, and sed turns \\ into \).
3123 sed -n \
3124 -e "s/'/'\\\\''/g" \
3125 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3126 ;;
3127 *)
3128 # `set' quotes correctly as required by POSIX, so do not add quotes.
3129 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3130 ;;
3131 esac >> confcache
3132 if cmp -s $cache_file confcache; then
3133 :
3134 else
3135 if test -w $cache_file; then
3136 echo "updating cache $cache_file"
3137 cat confcache > $cache_file
3138 else
3139 echo "not updating unwritable cache $cache_file"
3140 fi
3141 fi
3142 rm -f confcache
3143
3144 exit 0
3145
3146 # Local Variables:
3147 # mode:shell-script
3148 # sh-indentation:2
3149 # End:
+0
-4053
saslauthd/config/ltmain.sh less more
0 # ltmain.sh - Provide generalized library-building support services.
1 # NOTE: Changing this file will not affect anything until you rerun ltconfig.
2 #
3 # Copyright (C) 1996-1999 Free Software Foundation, Inc.
4 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 #
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that program.
24
25 # Check that we have a working $echo.
26 if test "X$1" = X--no-reexec; then
27 # Discard the --no-reexec flag, and continue.
28 shift
29 elif test "X$1" = X--fallback-echo; then
30 # Avoid inline document here, it may be left over
31 :
32 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
33 # Yippee, $echo works!
34 :
35 else
36 # Restart under the correct shell, and then maybe $echo will work.
37 exec $SHELL "$0" --no-reexec ${1+"$@"}
38 fi
39
40 if test "X$1" = X--fallback-echo; then
41 # used as fallback echo
42 shift
43 cat <<EOF
44 $*
45 EOF
46 exit 0
47 fi
48
49 # The name of this program.
50 progname=`$echo "$0" | sed 's%^.*/%%'`
51 modename="$progname"
52
53 # Constants.
54 PROGRAM=ltmain.sh
55 PACKAGE=libtool
56 VERSION=1.3.5
57 TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)"
58
59 default_mode=
60 help="Try \`$progname --help' for more information."
61 magic="%%%MAGIC variable%%%"
62 mkdir="mkdir"
63 mv="mv -f"
64 rm="rm -f"
65
66 # Sed substitution that helps us do robust quoting. It backslashifies
67 # metacharacters that are still active within double-quoted strings.
68 Xsed='sed -e 1s/^X//'
69 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
70 # test EBCDIC or ASCII
71 case `echo '' | od -x` in
72 *15*) # EBCDIC based system
73 SP2NL='tr \100 \025'
74 NL2SP='tr \025 \100'
75 ;;
76 *) # Assume ASCII based system
77 SP2NL='tr \040 \012'
78 NL2SP='tr \015\012 \040\040'
79 ;;
80 esac
81
82 # NLS nuisances.
83 # Only set LANG and LC_ALL to C if already set.
84 # These must not be set unconditionally because not all systems understand
85 # e.g. LANG=C (notably SCO).
86 # We save the old values to restore during execute mode.
87 if test "${LC_ALL+set}" = set; then
88 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
89 fi
90 if test "${LANG+set}" = set; then
91 save_LANG="$LANG"; LANG=C; export LANG
92 fi
93
94 if test "$LTCONFIG_VERSION" != "$VERSION"; then
95 echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
96 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
97 exit 1
98 fi
99
100 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
101 echo "$modename: not configured to build any kind of library" 1>&2
102 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
103 exit 1
104 fi
105
106 # Global variables.
107 mode=$default_mode
108 nonopt=
109 prev=
110 prevopt=
111 run=
112 show="$echo"
113 show_help=
114 execute_dlfiles=
115 lo2o="s/\\.lo\$/.${objext}/"
116 o2lo="s/\\.${objext}\$/.lo/"
117
118 # Parse our command line options once, thoroughly.
119 while test $# -gt 0
120 do
121 arg="$1"
122 shift
123
124 case "$arg" in
125 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
126 *) optarg= ;;
127 esac
128
129 # If the previous option needs an argument, assign it.
130 if test -n "$prev"; then
131 case "$prev" in
132 execute_dlfiles)
133 eval "$prev=\"\$$prev \$arg\""
134 ;;
135 *)
136 eval "$prev=\$arg"
137 ;;
138 esac
139
140 prev=
141 prevopt=
142 continue
143 fi
144
145 # Have we seen a non-optional argument yet?
146 case "$arg" in
147 --help)
148 show_help=yes
149 ;;
150
151 --version)
152 echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
153 exit 0
154 ;;
155
156 --config)
157 sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
158 exit 0
159 ;;
160
161 --debug)
162 echo "$progname: enabling shell trace mode"
163 set -x
164 ;;
165
166 --dry-run | -n)
167 run=:
168 ;;
169
170 --features)
171 echo "host: $host"
172 if test "$build_libtool_libs" = yes; then
173 echo "enable shared libraries"
174 else
175 echo "disable shared libraries"
176 fi
177 if test "$build_old_libs" = yes; then
178 echo "enable static libraries"
179 else
180 echo "disable static libraries"
181 fi
182 exit 0
183 ;;
184
185 --finish) mode="finish" ;;
186
187 --mode) prevopt="--mode" prev=mode ;;
188 --mode=*) mode="$optarg" ;;
189
190 --quiet | --silent)
191 show=:
192 ;;
193
194 -dlopen)
195 prevopt="-dlopen"
196 prev=execute_dlfiles
197 ;;
198
199 -*)
200 $echo "$modename: unrecognized option \`$arg'" 1>&2
201 $echo "$help" 1>&2
202 exit 1
203 ;;
204
205 *)
206 nonopt="$arg"
207 break
208 ;;
209 esac
210 done
211
212 if test -n "$prevopt"; then
213 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
214 $echo "$help" 1>&2
215 exit 1
216 fi
217
218 if test -z "$show_help"; then
219
220 # Infer the operation mode.
221 if test -z "$mode"; then
222 case "$nonopt" in
223 *cc | *++ | gcc* | *-gcc*)
224 mode=link
225 for arg
226 do
227 case "$arg" in
228 -c)
229 mode=compile
230 break
231 ;;
232 esac
233 done
234 ;;
235 *db | *dbx | *strace | *truss)
236 mode=execute
237 ;;
238 *install*|cp|mv)
239 mode=install
240 ;;
241 *rm)
242 mode=uninstall
243 ;;
244 *)
245 # If we have no mode, but dlfiles were specified, then do execute mode.
246 test -n "$execute_dlfiles" && mode=execute
247
248 # Just use the default operation mode.
249 if test -z "$mode"; then
250 if test -n "$nonopt"; then
251 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
252 else
253 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
254 fi
255 fi
256 ;;
257 esac
258 fi
259
260 # Only execute mode is allowed to have -dlopen flags.
261 if test -n "$execute_dlfiles" && test "$mode" != execute; then
262 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
263 $echo "$help" 1>&2
264 exit 1
265 fi
266
267 # Change the help message to a mode-specific one.
268 generic_help="$help"
269 help="Try \`$modename --help --mode=$mode' for more information."
270
271 # These modes are in order of execution frequency so that they run quickly.
272 case "$mode" in
273 # libtool compile mode
274 compile)
275 modename="$modename: compile"
276 # Get the compilation command and the source file.
277 base_compile=
278 lastarg=
279 srcfile="$nonopt"
280 suppress_output=
281
282 user_target=no
283 for arg
284 do
285 # Accept any command-line options.
286 case "$arg" in
287 -o)
288 if test "$user_target" != "no"; then
289 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
290 exit 1
291 fi
292 user_target=next
293 ;;
294
295 -static)
296 build_old_libs=yes
297 continue
298 ;;
299 esac
300
301 case "$user_target" in
302 next)
303 # The next one is the -o target name
304 user_target=yes
305 continue
306 ;;
307 yes)
308 # We got the output file
309 user_target=set
310 libobj="$arg"
311 continue
312 ;;
313 esac
314
315 # Accept the current argument as the source file.
316 lastarg="$srcfile"
317 srcfile="$arg"
318
319 # Aesthetically quote the previous argument.
320
321 # Backslashify any backslashes, double quotes, and dollar signs.
322 # These are the only characters that are still specially
323 # interpreted inside of double-quoted scrings.
324 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
325
326 # Double-quote args containing other shell metacharacters.
327 # Many Bourne shells cannot handle close brackets correctly in scan
328 # sets, so we specify it separately.
329 case "$lastarg" in
330 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
331 lastarg="\"$lastarg\""
332 ;;
333 esac
334
335 # Add the previous argument to base_compile.
336 if test -z "$base_compile"; then
337 base_compile="$lastarg"
338 else
339 base_compile="$base_compile $lastarg"
340 fi
341 done
342
343 case "$user_target" in
344 set)
345 ;;
346 no)
347 # Get the name of the library object.
348 libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
349 ;;
350 *)
351 $echo "$modename: you must specify a target with \`-o'" 1>&2
352 exit 1
353 ;;
354 esac
355
356 # Recognize several different file suffixes.
357 # If the user specifies -o file.o, it is replaced with file.lo
358 xform='[cCFSfmso]'
359 case "$libobj" in
360 *.ada) xform=ada ;;
361 *.adb) xform=adb ;;
362 *.ads) xform=ads ;;
363 *.asm) xform=asm ;;
364 *.c++) xform=c++ ;;
365 *.cc) xform=cc ;;
366 *.cpp) xform=cpp ;;
367 *.cxx) xform=cxx ;;
368 *.f90) xform=f90 ;;
369 *.for) xform=for ;;
370 esac
371
372 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
373
374 case "$libobj" in
375 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
376 *)
377 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
378 exit 1
379 ;;
380 esac
381
382 if test -z "$base_compile"; then
383 $echo "$modename: you must specify a compilation command" 1>&2
384 $echo "$help" 1>&2
385 exit 1
386 fi
387
388 # Delete any leftover library objects.
389 if test "$build_old_libs" = yes; then
390 removelist="$obj $libobj"
391 else
392 removelist="$libobj"
393 fi
394
395 $run $rm $removelist
396 trap "$run $rm $removelist; exit 1" 1 2 15
397
398 # Calculate the filename of the output object if compiler does
399 # not support -o with -c
400 if test "$compiler_c_o" = no; then
401 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
402 lockfile="$output_obj.lock"
403 removelist="$removelist $output_obj $lockfile"
404 trap "$run $rm $removelist; exit 1" 1 2 15
405 else
406 need_locks=no
407 lockfile=
408 fi
409
410 # Lock this critical section if it is needed
411 # We use this script file to make the link, it avoids creating a new file
412 if test "$need_locks" = yes; then
413 until ln "$0" "$lockfile" 2>/dev/null; do
414 $show "Waiting for $lockfile to be removed"
415 sleep 2
416 done
417 elif test "$need_locks" = warn; then
418 if test -f "$lockfile"; then
419 echo "\
420 *** ERROR, $lockfile exists and contains:
421 `cat $lockfile 2>/dev/null`
422
423 This indicates that another process is trying to use the same
424 temporary object file, and libtool could not work around it because
425 your compiler does not support \`-c' and \`-o' together. If you
426 repeat this compilation, it may succeed, by chance, but you had better
427 avoid parallel builds (make -j) in this platform, or get a better
428 compiler."
429
430 $run $rm $removelist
431 exit 1
432 fi
433 echo $srcfile > "$lockfile"
434 fi
435
436 if test -n "$fix_srcfile_path"; then
437 eval srcfile=\"$fix_srcfile_path\"
438 fi
439
440 # Only build a PIC object if we are building libtool libraries.
441 if test "$build_libtool_libs" = yes; then
442 # Without this assignment, base_compile gets emptied.
443 fbsd_hideous_sh_bug=$base_compile
444
445 # All platforms use -DPIC, to notify preprocessed assembler code.
446 command="$base_compile $srcfile $pic_flag -DPIC"
447 if test "$build_old_libs" = yes; then
448 lo_libobj="$libobj"
449 dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
450 if test "X$dir" = "X$libobj"; then
451 dir="$objdir"
452 else
453 dir="$dir/$objdir"
454 fi
455 libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
456
457 if test -d "$dir"; then
458 $show "$rm $libobj"
459 $run $rm $libobj
460 else
461 $show "$mkdir $dir"
462 $run $mkdir $dir
463 status=$?
464 if test $status -ne 0 && test ! -d $dir; then
465 exit $status
466 fi
467 fi
468 fi
469 if test "$compiler_o_lo" = yes; then
470 output_obj="$libobj"
471 command="$command -o $output_obj"
472 elif test "$compiler_c_o" = yes; then
473 output_obj="$obj"
474 command="$command -o $output_obj"
475 fi
476
477 $run $rm "$output_obj"
478 $show "$command"
479 if $run eval "$command"; then :
480 else
481 test -n "$output_obj" && $run $rm $removelist
482 exit 1
483 fi
484
485 if test "$need_locks" = warn &&
486 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
487 echo "\
488 *** ERROR, $lockfile contains:
489 `cat $lockfile 2>/dev/null`
490
491 but it should contain:
492 $srcfile
493
494 This indicates that another process is trying to use the same
495 temporary object file, and libtool could not work around it because
496 your compiler does not support \`-c' and \`-o' together. If you
497 repeat this compilation, it may succeed, by chance, but you had better
498 avoid parallel builds (make -j) in this platform, or get a better
499 compiler."
500
501 $run $rm $removelist
502 exit 1
503 fi
504
505 # Just move the object if needed, then go on to compile the next one
506 if test x"$output_obj" != x"$libobj"; then
507 $show "$mv $output_obj $libobj"
508 if $run $mv $output_obj $libobj; then :
509 else
510 error=$?
511 $run $rm $removelist
512 exit $error
513 fi
514 fi
515
516 # If we have no pic_flag, then copy the object into place and finish.
517 if test -z "$pic_flag" && test "$build_old_libs" = yes; then
518 # Rename the .lo from within objdir to obj
519 if test -f $obj; then
520 $show $rm $obj
521 $run $rm $obj
522 fi
523
524 $show "$mv $libobj $obj"
525 if $run $mv $libobj $obj; then :
526 else
527 error=$?
528 $run $rm $removelist
529 exit $error
530 fi
531
532 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
533 if test "X$xdir" = "X$obj"; then
534 xdir="."
535 else
536 xdir="$xdir"
537 fi
538 baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
539 libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
540 # Now arrange that obj and lo_libobj become the same file
541 $show "(cd $xdir && $LN_S $baseobj $libobj)"
542 if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
543 exit 0
544 else
545 error=$?
546 $run $rm $removelist
547 exit $error
548 fi
549 fi
550
551 # Allow error messages only from the first compilation.
552 suppress_output=' >/dev/null 2>&1'
553 fi
554
555 # Only build a position-dependent object if we build old libraries.
556 if test "$build_old_libs" = yes; then
557 command="$base_compile $srcfile"
558 if test "$compiler_c_o" = yes; then
559 command="$command -o $obj"
560 output_obj="$obj"
561 fi
562
563 # Suppress compiler output if we already did a PIC compilation.
564 command="$command$suppress_output"
565 $run $rm "$output_obj"
566 $show "$command"
567 if $run eval "$command"; then :
568 else
569 $run $rm $removelist
570 exit 1
571 fi
572
573 if test "$need_locks" = warn &&
574 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
575 echo "\
576 *** ERROR, $lockfile contains:
577 `cat $lockfile 2>/dev/null`
578
579 but it should contain:
580 $srcfile
581
582 This indicates that another process is trying to use the same
583 temporary object file, and libtool could not work around it because
584 your compiler does not support \`-c' and \`-o' together. If you
585 repeat this compilation, it may succeed, by chance, but you had better
586 avoid parallel builds (make -j) in this platform, or get a better
587 compiler."
588
589 $run $rm $removelist
590 exit 1
591 fi
592
593 # Just move the object if needed
594 if test x"$output_obj" != x"$obj"; then
595 $show "$mv $output_obj $obj"
596 if $run $mv $output_obj $obj; then :
597 else
598 error=$?
599 $run $rm $removelist
600 exit $error
601 fi
602 fi
603
604 # Create an invalid libtool object if no PIC, so that we do not
605 # accidentally link it into a program.
606 if test "$build_libtool_libs" != yes; then
607 $show "echo timestamp > $libobj"
608 $run eval "echo timestamp > \$libobj" || exit $?
609 else
610 # Move the .lo from within objdir
611 $show "$mv $libobj $lo_libobj"
612 if $run $mv $libobj $lo_libobj; then :
613 else
614 error=$?
615 $run $rm $removelist
616 exit $error
617 fi
618 fi
619 fi
620
621 # Unlock the critical section if it was locked
622 if test "$need_locks" != no; then
623 $rm "$lockfile"
624 fi
625
626 exit 0
627 ;;
628
629 # libtool link mode
630 link)
631 modename="$modename: link"
632 case "$host" in
633 *-*-cygwin* | *-*-mingw* | *-*-os2*)
634 # It is impossible to link a dll without this setting, and
635 # we shouldn't force the makefile maintainer to figure out
636 # which system we are compiling for in order to pass an extra
637 # flag for every libtool invokation.
638 # allow_undefined=no
639
640 # FIXME: Unfortunately, there are problems with the above when trying
641 # to make a dll which has undefined symbols, in which case not
642 # even a static library is built. For now, we need to specify
643 # -no-undefined on the libtool link line when we can be certain
644 # that all symbols are satisfied, otherwise we get a static library.
645 allow_undefined=yes
646
647 # This is a source program that is used to create dlls on Windows
648 # Don't remove nor modify the starting and closing comments
649 # /* ltdll.c starts here */
650 # #define WIN32_LEAN_AND_MEAN
651 # #include <windows.h>
652 # #undef WIN32_LEAN_AND_MEAN
653 # #include <stdio.h>
654 #
655 # #ifndef __CYGWIN__
656 # # ifdef __CYGWIN32__
657 # # define __CYGWIN__ __CYGWIN32__
658 # # endif
659 # #endif
660 #
661 # #ifdef __cplusplus
662 # extern "C" {
663 # #endif
664 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
665 # #ifdef __cplusplus
666 # }
667 # #endif
668 #
669 # #ifdef __CYGWIN__
670 # #include <cygwin/cygwin_dll.h>
671 # DECLARE_CYGWIN_DLL( DllMain );
672 # #endif
673 # HINSTANCE __hDllInstance_base;
674 #
675 # BOOL APIENTRY
676 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
677 # {
678 # __hDllInstance_base = hInst;
679 # return TRUE;
680 # }
681 # /* ltdll.c ends here */
682 # This is a source program that is used to create import libraries
683 # on Windows for dlls which lack them. Don't remove nor modify the
684 # starting and closing comments
685 # /* impgen.c starts here */
686 # /* Copyright (C) 1999 Free Software Foundation, Inc.
687 #
688 # This file is part of GNU libtool.
689 #
690 # This program is free software; you can redistribute it and/or modify
691 # it under the terms of the GNU General Public License as published by
692 # the Free Software Foundation; either version 2 of the License, or
693 # (at your option) any later version.
694 #
695 # This program is distributed in the hope that it will be useful,
696 # but WITHOUT ANY WARRANTY; without even the implied warranty of
697 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
698 # GNU General Public License for more details.
699 #
700 # You should have received a copy of the GNU General Public License
701 # along with this program; if not, write to the Free Software
702 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
703 # */
704 #
705 # #include <stdio.h> /* for printf() */
706 # #include <unistd.h> /* for open(), lseek(), read() */
707 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
708 # #include <string.h> /* for strdup() */
709 #
710 # static unsigned int
711 # pe_get16 (fd, offset)
712 # int fd;
713 # int offset;
714 # {
715 # unsigned char b[2];
716 # lseek (fd, offset, SEEK_SET);
717 # read (fd, b, 2);
718 # return b[0] + (b[1]<<8);
719 # }
720 #
721 # static unsigned int
722 # pe_get32 (fd, offset)
723 # int fd;
724 # int offset;
725 # {
726 # unsigned char b[4];
727 # lseek (fd, offset, SEEK_SET);
728 # read (fd, b, 4);
729 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
730 # }
731 #
732 # static unsigned int
733 # pe_as32 (ptr)
734 # void *ptr;
735 # {
736 # unsigned char *b = ptr;
737 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
738 # }
739 #
740 # int
741 # main (argc, argv)
742 # int argc;
743 # char *argv[];
744 # {
745 # int dll;
746 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
747 # unsigned long export_rva, export_size, nsections, secptr, expptr;
748 # unsigned long name_rvas, nexp;
749 # unsigned char *expdata, *erva;
750 # char *filename, *dll_name;
751 #
752 # filename = argv[1];
753 #
754 # dll = open(filename, O_RDONLY|O_BINARY);
755 # if (!dll)
756 # return 1;
757 #
758 # dll_name = filename;
759 #
760 # for (i=0; filename[i]; i++)
761 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
762 # dll_name = filename + i +1;
763 #
764 # pe_header_offset = pe_get32 (dll, 0x3c);
765 # opthdr_ofs = pe_header_offset + 4 + 20;
766 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
767 #
768 # if (num_entries < 1) /* no exports */
769 # return 1;
770 #
771 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
772 # export_size = pe_get32 (dll, opthdr_ofs + 100);
773 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
774 # secptr = (pe_header_offset + 4 + 20 +
775 # pe_get16 (dll, pe_header_offset + 4 + 16));
776 #
777 # expptr = 0;
778 # for (i = 0; i < nsections; i++)
779 # {
780 # char sname[8];
781 # unsigned long secptr1 = secptr + 40 * i;
782 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
783 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
784 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
785 # lseek(dll, secptr1, SEEK_SET);
786 # read(dll, sname, 8);
787 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
788 # {
789 # expptr = fptr + (export_rva - vaddr);
790 # if (export_rva + export_size > vaddr + vsize)
791 # export_size = vsize - (export_rva - vaddr);
792 # break;
793 # }
794 # }
795 #
796 # expdata = (unsigned char*)malloc(export_size);
797 # lseek (dll, expptr, SEEK_SET);
798 # read (dll, expdata, export_size);
799 # erva = expdata - export_rva;
800 #
801 # nexp = pe_as32 (expdata+24);
802 # name_rvas = pe_as32 (expdata+32);
803 #
804 # printf ("EXPORTS\n");
805 # for (i = 0; i<nexp; i++)
806 # {
807 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
808 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
809 # }
810 #
811 # return 0;
812 # }
813 # /* impgen.c ends here */
814 ;;
815 *)
816 allow_undefined=yes
817 ;;
818 esac
819 compile_command="$nonopt"
820 finalize_command="$nonopt"
821
822 compile_rpath=
823 finalize_rpath=
824 compile_shlibpath=
825 finalize_shlibpath=
826 convenience=
827 old_convenience=
828 deplibs=
829 linkopts=
830
831 if test -n "$shlibpath_var"; then
832 # get the directories listed in $shlibpath_var
833 eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
834 else
835 lib_search_path=
836 fi
837 # now prepend the system-specific ones
838 eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
839 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
840
841 avoid_version=no
842 dlfiles=
843 dlprefiles=
844 dlself=no
845 export_dynamic=no
846 export_symbols=
847 export_symbols_regex=
848 generated=
849 libobjs=
850 link_against_libtool_libs=
851 ltlibs=
852 module=no
853 objs=
854 prefer_static_libs=no
855 preload=no
856 prev=
857 prevarg=
858 release=
859 rpath=
860 xrpath=
861 perm_rpath=
862 temp_rpath=
863 thread_safe=no
864 vinfo=
865
866 # We need to know -static, to get the right output filenames.
867 for arg
868 do
869 case "$arg" in
870 -all-static | -static)
871 if test "X$arg" = "X-all-static"; then
872 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
873 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
874 fi
875 if test -n "$link_static_flag"; then
876 dlopen_self=$dlopen_self_static
877 fi
878 else
879 if test -z "$pic_flag" && test -n "$link_static_flag"; then
880 dlopen_self=$dlopen_self_static
881 fi
882 fi
883 build_libtool_libs=no
884 build_old_libs=yes
885 prefer_static_libs=yes
886 break
887 ;;
888 esac
889 done
890
891 # See if our shared archives depend on static archives.
892 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
893
894 # Go through the arguments, transforming them on the way.
895 while test $# -gt 0; do
896 arg="$1"
897 shift
898
899 # If the previous option needs an argument, assign it.
900 if test -n "$prev"; then
901 case "$prev" in
902 output)
903 compile_command="$compile_command @OUTPUT@"
904 finalize_command="$finalize_command @OUTPUT@"
905 ;;
906 esac
907
908 case "$prev" in
909 dlfiles|dlprefiles)
910 if test "$preload" = no; then
911 # Add the symbol object into the linking commands.
912 compile_command="$compile_command @SYMFILE@"
913 finalize_command="$finalize_command @SYMFILE@"
914 preload=yes
915 fi
916 case "$arg" in
917 *.la | *.lo) ;; # We handle these cases below.
918 force)
919 if test "$dlself" = no; then
920 dlself=needless
921 export_dynamic=yes
922 fi
923 prev=
924 continue
925 ;;
926 self)
927 if test "$prev" = dlprefiles; then
928 dlself=yes
929 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
930 dlself=yes
931 else
932 dlself=needless
933 export_dynamic=yes
934 fi
935 prev=
936 continue
937 ;;
938 *)
939 if test "$prev" = dlfiles; then
940 dlfiles="$dlfiles $arg"
941 else
942 dlprefiles="$dlprefiles $arg"
943 fi
944 prev=
945 ;;
946 esac
947 ;;
948 expsyms)
949 export_symbols="$arg"
950 if test ! -f "$arg"; then
951 $echo "$modename: symbol file \`$arg' does not exist"
952 exit 1
953 fi
954 prev=
955 continue
956 ;;
957 expsyms_regex)
958 export_symbols_regex="$arg"
959 prev=
960 continue
961 ;;
962 release)
963 release="-$arg"
964 prev=
965 continue
966 ;;
967 rpath | xrpath)
968 # We need an absolute path.
969 case "$arg" in
970 [\\/]* | [A-Za-z]:[\\/]*) ;;
971 *)
972 $echo "$modename: only absolute run-paths are allowed" 1>&2
973 exit 1
974 ;;
975 esac
976 if test "$prev" = rpath; then
977 case "$rpath " in
978 *" $arg "*) ;;
979 *) rpath="$rpath $arg" ;;
980 esac
981 else
982 case "$xrpath " in
983 *" $arg "*) ;;
984 *) xrpath="$xrpath $arg" ;;
985 esac
986 fi
987 prev=
988 continue
989 ;;
990 *)
991 eval "$prev=\"\$arg\""
992 prev=
993 continue
994 ;;
995 esac
996 fi
997
998 prevarg="$arg"
999
1000 case "$arg" in
1001 -all-static)
1002 if test -n "$link_static_flag"; then
1003 compile_command="$compile_command $link_static_flag"
1004 finalize_command="$finalize_command $link_static_flag"
1005 fi
1006 continue
1007 ;;
1008
1009 -allow-undefined)
1010 # FIXME: remove this flag sometime in the future.
1011 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1012 continue
1013 ;;
1014
1015 -avoid-version)
1016 avoid_version=yes
1017 continue
1018 ;;
1019
1020 -dlopen)
1021 prev=dlfiles
1022 continue
1023 ;;
1024
1025 -dlpreopen)
1026 prev=dlprefiles
1027 continue
1028 ;;
1029
1030 -export-dynamic)
1031 export_dynamic=yes
1032 continue
1033 ;;
1034
1035 -export-symbols | -export-symbols-regex)
1036 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1037 $echo "$modename: not more than one -exported-symbols argument allowed"
1038 exit 1
1039 fi
1040 if test "X$arg" = "X-export-symbols"; then
1041 prev=expsyms
1042 else
1043 prev=expsyms_regex
1044 fi
1045 continue
1046 ;;
1047
1048 -L*)
1049 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1050 # We need an absolute path.
1051 case "$dir" in
1052 [\\/]* | [A-Za-z]:[\\/]*) ;;
1053 *)
1054 absdir=`cd "$dir" && pwd`
1055 if test -z "$absdir"; then
1056 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
1057 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
1058 absdir="$dir"
1059 fi
1060 dir="$absdir"
1061 ;;
1062 esac
1063 case " $deplibs " in
1064 *" $arg "*) ;;
1065 *) deplibs="$deplibs $arg";;
1066 esac
1067 case " $lib_search_path " in
1068 *" $dir "*) ;;
1069 *) lib_search_path="$lib_search_path $dir";;
1070 esac
1071 case "$host" in
1072 *-*-cygwin* | *-*-mingw* | *-*-os2*)
1073 dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
1074 case ":$dllsearchpath:" in
1075 ::) dllsearchpath="$dllsearchdir";;
1076 *":$dllsearchdir:"*) ;;
1077 *) dllsearchpath="$dllsearchpath:$dllsearchdir";;
1078 esac
1079 ;;
1080 esac
1081 ;;
1082
1083 -l*)
1084 if test "$arg" = "-lc"; then
1085 case "$host" in
1086 *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
1087 # These systems don't actually have c library (as such)
1088 continue
1089 ;;
1090 *-*-rhapsody* | *-*-darwin1.[012])
1091 # Rhapsody C library is in the System framework
1092 deplibs="$deplibs -framework System"
1093 continue
1094 ;;
1095 esac
1096 elif test "$arg" = "-lm"; then
1097 case "$host" in
1098 *-*-cygwin* | *-*-beos*)
1099 # These systems don't actually have math library (as such)
1100 continue
1101 ;;
1102 *-*-rhapsody* | *-*-darwin1.[012])
1103 # Rhapsody math library is in the System framework
1104 deplibs="$deplibs -framework System"
1105 continue
1106 ;;
1107 esac
1108 fi
1109 deplibs="$deplibs $arg"
1110 ;;
1111
1112 -module)
1113 module=yes
1114 continue
1115 ;;
1116
1117 -no-undefined)
1118 allow_undefined=no
1119 continue
1120 ;;
1121
1122 -o) prev=output ;;
1123
1124 -release)
1125 prev=release
1126 continue
1127 ;;
1128
1129 -rpath)
1130 prev=rpath
1131 continue
1132 ;;
1133
1134 -R)
1135 prev=xrpath
1136 continue
1137 ;;
1138
1139 -R*)
1140 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1141 # We need an absolute path.
1142 case "$dir" in
1143 [\\/]* | [A-Za-z]:[\\/]*) ;;
1144 *)
1145 $echo "$modename: only absolute run-paths are allowed" 1>&2
1146 exit 1
1147 ;;
1148 esac
1149 case "$xrpath " in
1150 *" $dir "*) ;;
1151 *) xrpath="$xrpath $dir" ;;
1152 esac
1153 continue
1154 ;;
1155
1156 -static)
1157 # If we have no pic_flag, then this is the same as -all-static.
1158 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1159 compile_command="$compile_command $link_static_flag"
1160 finalize_command="$finalize_command $link_static_flag"
1161 fi
1162 continue
1163 ;;
1164
1165 -thread-safe)
1166 thread_safe=yes
1167 continue
1168 ;;
1169
1170 -version-info)
1171 prev=vinfo
1172 continue
1173 ;;
1174
1175 # Some other compiler flag.
1176 -* | +*)
1177 # Unknown arguments in both finalize_command and compile_command need
1178 # to be aesthetically quoted because they are evaled later.
1179 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1180 case "$arg" in
1181 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
1182 arg="\"$arg\""
1183 ;;
1184 esac
1185 ;;
1186
1187 *.o | *.obj | *.a | *.lib)
1188 # A standard object.
1189 objs="$objs $arg"
1190 ;;
1191
1192 *.lo)
1193 # A library object.
1194 if test "$prev" = dlfiles; then
1195 dlfiles="$dlfiles $arg"
1196 if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then
1197 prev=
1198 continue
1199 else
1200 # If libtool objects are unsupported, then we need to preload.
1201 prev=dlprefiles
1202 fi
1203 fi
1204
1205 if test "$prev" = dlprefiles; then
1206 # Preload the old-style object.
1207 dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
1208 prev=
1209 fi
1210 libobjs="$libobjs $arg"
1211 ;;
1212
1213 *.la)
1214 # A libtool-controlled library.
1215
1216 dlname=
1217 libdir=
1218 library_names=
1219 old_library=
1220
1221 # Check to see that this really is a libtool archive.
1222 if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
1223 else
1224 $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
1225 exit 1
1226 fi
1227
1228 # If the library was installed with an old release of libtool,
1229 # it will not redefine variable installed.
1230 installed=yes
1231
1232 # Read the .la file
1233 # If there is no directory component, then add one.
1234 case "$arg" in
1235 */* | *\\*) . $arg ;;
1236 *) . ./$arg ;;
1237 esac
1238
1239 # Get the name of the library we link against.
1240 linklib=
1241 for l in $old_library $library_names; do
1242 linklib="$l"
1243 done
1244
1245 if test -z "$linklib"; then
1246 $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
1247 exit 1
1248 fi
1249
1250 # Find the relevant object directory and library name.
1251 name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
1252
1253 if test "X$installed" = Xyes; then
1254 dir="$libdir"
1255 else
1256 dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1257 if test "X$dir" = "X$arg"; then
1258 dir="$objdir"
1259 else
1260 dir="$dir/$objdir"
1261 fi
1262 fi
1263
1264 if test -n "$dependency_libs"; then
1265 # Extract -R and -L from dependency_libs
1266 temp_deplibs=
1267 for deplib in $dependency_libs; do
1268 case "$deplib" in
1269 -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
1270 case " $rpath $xrpath " in
1271 *" $temp_xrpath "*) ;;
1272 *) xrpath="$xrpath $temp_xrpath";;
1273 esac;;
1274 -L*) case "$compile_command $temp_deplibs " in
1275 *" $deplib "*) ;;
1276 *) temp_deplibs="$temp_deplibs $deplib";;
1277 esac
1278 temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1279 case " $lib_search_path " in
1280 *" $temp_dir "*) ;;
1281 *) lib_search_path="$lib_search_path $temp_dir";;
1282 esac
1283 ;;
1284 *) temp_deplibs="$temp_deplibs $deplib";;
1285 esac
1286 done
1287 dependency_libs="$temp_deplibs"
1288 fi
1289
1290 if test -z "$libdir"; then
1291 # It is a libtool convenience library, so add in its objects.
1292 convenience="$convenience $dir/$old_library"
1293 old_convenience="$old_convenience $dir/$old_library"
1294 deplibs="$deplibs$dependency_libs"
1295 compile_command="$compile_command $dir/$old_library$dependency_libs"
1296 finalize_command="$finalize_command $dir/$old_library$dependency_libs"
1297 continue
1298 fi
1299
1300 # This library was specified with -dlopen.
1301 if test "$prev" = dlfiles; then
1302 dlfiles="$dlfiles $arg"
1303 if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then
1304 # If there is no dlname, no dlopen support or we're linking statically,
1305 # we need to preload.
1306 prev=dlprefiles
1307 else
1308 # We should not create a dependency on this library, but we
1309 # may need any libraries it requires.
1310 compile_command="$compile_command$dependency_libs"
1311 finalize_command="$finalize_command$dependency_libs"
1312 prev=
1313 continue
1314 fi
1315 fi
1316
1317 # The library was specified with -dlpreopen.
1318 if test "$prev" = dlprefiles; then
1319 # Prefer using a static library (so that no silly _DYNAMIC symbols
1320 # are required to link).
1321 if test -n "$old_library"; then
1322 dlprefiles="$dlprefiles $dir/$old_library"
1323 else
1324 dlprefiles="$dlprefiles $dir/$linklib"
1325 fi
1326 prev=
1327 fi
1328
1329 if test -n "$library_names" &&
1330 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
1331 link_against_libtool_libs="$link_against_libtool_libs $arg"
1332 if test -n "$shlibpath_var"; then
1333 # Make sure the rpath contains only unique directories.
1334 case "$temp_rpath " in
1335 *" $dir "*) ;;
1336 *) temp_rpath="$temp_rpath $dir" ;;
1337 esac
1338 fi
1339
1340 # We need an absolute path.
1341 case "$dir" in
1342 [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;;
1343 *)
1344 absdir=`cd "$dir" && pwd`
1345 if test -z "$absdir"; then
1346 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
1347 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
1348 absdir="$dir"
1349 fi
1350 ;;
1351 esac
1352
1353 # This is the magic to use -rpath.
1354 # Skip directories that are in the system default run-time
1355 # search path, unless they have been requested with -R.
1356 case " $sys_lib_dlsearch_path " in
1357 *" $absdir "*) ;;
1358 *)
1359 case "$compile_rpath " in
1360 *" $absdir "*) ;;
1361 *) compile_rpath="$compile_rpath $absdir"
1362 esac
1363 ;;
1364 esac
1365
1366 case " $sys_lib_dlsearch_path " in
1367 *" $libdir "*) ;;
1368 *)
1369 case "$finalize_rpath " in
1370 *" $libdir "*) ;;
1371 *) finalize_rpath="$finalize_rpath $libdir"
1372 esac
1373 ;;
1374 esac
1375
1376 lib_linked=yes
1377 case "$hardcode_action" in
1378 immediate | unsupported)
1379 if test "$hardcode_direct" = no; then
1380 compile_command="$compile_command $dir/$linklib"
1381 deplibs="$deplibs $dir/$linklib"
1382 case "$host" in
1383 *-*-cygwin* | *-*-mingw* | *-*-os2*)
1384 dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
1385 if test -n "$dllsearchpath"; then
1386 dllsearchpath="$dllsearchpath:$dllsearchdir"
1387 else
1388 dllsearchpath="$dllsearchdir"
1389 fi
1390 ;;
1391 esac
1392 elif test "$hardcode_minus_L" = no; then
1393 case "$host" in
1394 *-*-sunos*)
1395 compile_shlibpath="$compile_shlibpath$dir:"
1396 ;;
1397 esac
1398 case "$compile_command " in
1399 *" -L$dir "*) ;;
1400 *) compile_command="$compile_command -L$dir";;
1401 esac
1402 compile_command="$compile_command -l$name"
1403 deplibs="$deplibs -L$dir -l$name"
1404 elif test "$hardcode_shlibpath_var" = no; then
1405 case ":$compile_shlibpath:" in
1406 *":$dir:"*) ;;
1407 *) compile_shlibpath="$compile_shlibpath$dir:";;
1408 esac
1409 compile_command="$compile_command -l$name"
1410 deplibs="$deplibs -l$name"
1411 else
1412 lib_linked=no
1413 fi
1414 ;;
1415
1416 relink)
1417 if test "$hardcode_direct" = yes; then
1418 compile_command="$compile_command $absdir/$linklib"
1419 deplibs="$deplibs $absdir/$linklib"
1420 elif test "$hardcode_minus_L" = yes; then
1421 case "$compile_command " in
1422 *" -L$absdir "*) ;;
1423 *) compile_command="$compile_command -L$absdir";;
1424 esac
1425 compile_command="$compile_command -l$name"
1426 deplibs="$deplibs -L$absdir -l$name"
1427 elif test "$hardcode_shlibpath_var" = yes; then
1428 case ":$compile_shlibpath:" in
1429 *":$absdir:"*) ;;
1430 *) compile_shlibpath="$compile_shlibpath$absdir:";;
1431 esac
1432 compile_command="$compile_command -l$name"
1433 deplibs="$deplibs -l$name"
1434 else
1435 lib_linked=no
1436 fi
1437 ;;
1438
1439 *)
1440 lib_linked=no
1441 ;;
1442 esac
1443
1444 if test "$lib_linked" != yes; then
1445 $echo "$modename: configuration error: unsupported hardcode properties"
1446 exit 1
1447 fi
1448
1449 # Finalize command for both is simple: just hardcode it.
1450 if test "$hardcode_direct" = yes; then
1451 finalize_command="$finalize_command $libdir/$linklib"
1452 elif test "$hardcode_minus_L" = yes; then
1453 case "$finalize_command " in
1454 *" -L$libdir "*) ;;
1455 *) finalize_command="$finalize_command -L$libdir";;
1456 esac
1457 finalize_command="$finalize_command -l$name"
1458 elif test "$hardcode_shlibpath_var" = yes; then
1459 case ":$finalize_shlibpath:" in
1460 *":$libdir:"*) ;;
1461 *) finalize_shlibpath="$finalize_shlibpath$libdir:";;
1462 esac
1463 finalize_command="$finalize_command -l$name"
1464 else
1465 # We cannot seem to hardcode it, guess we'll fake it.
1466 case "$finalize_command " in
1467 *" -L$dir "*) ;;
1468 *) finalize_command="$finalize_command -L$libdir";;
1469 esac
1470 finalize_command="$finalize_command -l$name"
1471 fi
1472 else
1473 # Transform directly to old archives if we don't build new libraries.
1474 if test -n "$pic_flag" && test -z "$old_library"; then
1475 $echo "$modename: cannot find static library for \`$arg'" 1>&2
1476 exit 1
1477 fi
1478
1479 # Here we assume that one of hardcode_direct or hardcode_minus_L
1480 # is not unsupported. This is valid on all known static and
1481 # shared platforms.
1482 if test "$hardcode_direct" != unsupported; then
1483 test -n "$old_library" && linklib="$old_library"
1484 compile_command="$compile_command $dir/$linklib"
1485 finalize_command="$finalize_command $dir/$linklib"
1486 else
1487 case "$compile_command " in
1488 *" -L$dir "*) ;;
1489 *) compile_command="$compile_command -L$dir";;
1490 esac
1491 compile_command="$compile_command -l$name"
1492 case "$finalize_command " in
1493 *" -L$dir "*) ;;
1494 *) finalize_command="$finalize_command -L$dir";;
1495 esac
1496 finalize_command="$finalize_command -l$name"
1497 fi
1498 fi
1499
1500 # Add in any libraries that this one depends upon.
1501 compile_command="$compile_command$dependency_libs"
1502 finalize_command="$finalize_command$dependency_libs"
1503 continue
1504 ;;
1505
1506 # Some other compiler argument.
1507 *)
1508 # Unknown arguments in both finalize_command and compile_command need
1509 # to be aesthetically quoted because they are evaled later.
1510 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1511 case "$arg" in
1512 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
1513 arg="\"$arg\""
1514 ;;
1515 esac
1516 ;;
1517 esac
1518
1519 # Now actually substitute the argument into the commands.
1520 if test -n "$arg"; then
1521 compile_command="$compile_command $arg"
1522 finalize_command="$finalize_command $arg"
1523 fi
1524 done
1525
1526 if test -n "$prev"; then
1527 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1528 $echo "$help" 1>&2
1529 exit 1
1530 fi
1531
1532 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1533 eval arg=\"$export_dynamic_flag_spec\"
1534 compile_command="$compile_command $arg"
1535 finalize_command="$finalize_command $arg"
1536 fi
1537
1538 oldlibs=
1539 # calculate the name of the file, without its directory
1540 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
1541 libobjs_save="$libobjs"
1542
1543 case "$output" in
1544 "")
1545 $echo "$modename: you must specify an output file" 1>&2
1546 $echo "$help" 1>&2
1547 exit 1
1548 ;;
1549
1550 *.a | *.lib)
1551 if test -n "$link_against_libtool_libs"; then
1552 $echo "$modename: error: cannot link libtool libraries into archives" 1>&2
1553 exit 1
1554 fi
1555
1556 if test -n "$deplibs"; then
1557 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
1558 fi
1559
1560 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
1561 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
1562 fi
1563
1564 if test -n "$rpath"; then
1565 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
1566 fi
1567
1568 if test -n "$xrpath"; then
1569 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
1570 fi
1571
1572 if test -n "$vinfo"; then
1573 $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
1574 fi
1575
1576 if test -n "$release"; then
1577 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
1578 fi
1579
1580 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1581 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
1582 fi
1583
1584 # Now set the variables for building old libraries.
1585 build_libtool_libs=no
1586 oldlibs="$output"
1587 ;;
1588
1589 *.la)
1590 # Make sure we only generate libraries of the form `libNAME.la'.
1591 case "$outputname" in
1592 lib*)
1593 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
1594 eval libname=\"$libname_spec\"
1595 ;;
1596 *)
1597 if test "$module" = no; then
1598 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
1599 $echo "$help" 1>&2
1600 exit 1
1601 fi
1602 if test "$need_lib_prefix" != no; then
1603 # Add the "lib" prefix for modules if required
1604 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
1605 eval libname=\"$libname_spec\"
1606 else
1607 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
1608 fi
1609 ;;
1610 esac
1611
1612 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1613 if test "X$output_objdir" = "X$output"; then
1614 output_objdir="$objdir"
1615 else
1616 output_objdir="$output_objdir/$objdir"
1617 fi
1618
1619 if test -n "$objs"; then
1620 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
1621 exit 1
1622 fi
1623
1624 # How the heck are we supposed to write a wrapper for a shared library?
1625 if test -n "$link_against_libtool_libs"; then
1626 $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
1627 exit 1
1628 fi
1629
1630 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
1631 $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
1632 fi
1633
1634 set dummy $rpath
1635 if test $# -gt 2; then
1636 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
1637 fi
1638 install_libdir="$2"
1639
1640 oldlibs=
1641 if test -z "$rpath"; then
1642 if test "$build_libtool_libs" = yes; then
1643 # Building a libtool convenience library.
1644 libext=al
1645 oldlibs="$output_objdir/$libname.$libext $oldlibs"
1646 build_libtool_libs=convenience
1647 build_old_libs=yes
1648 fi
1649 dependency_libs="$deplibs"
1650
1651 if test -n "$vinfo"; then
1652 $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
1653 fi
1654
1655 if test -n "$release"; then
1656 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
1657 fi
1658 else
1659
1660 # Parse the version information argument.
1661 IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
1662 set dummy $vinfo 0 0 0
1663 IFS="$save_ifs"
1664
1665 if test -n "$8"; then
1666 $echo "$modename: too many parameters to \`-version-info'" 1>&2
1667 $echo "$help" 1>&2
1668 exit 1
1669 fi
1670
1671 current="$2"
1672 revision="$3"
1673 age="$4"
1674
1675 # Check that each of the things are valid numbers.
1676 case "$current" in
1677 0 | [1-9] | [1-9][0-9]*) ;;
1678 *)
1679 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
1680 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1681 exit 1
1682 ;;
1683 esac
1684
1685 case "$revision" in
1686 0 | [1-9] | [1-9][0-9]*) ;;
1687 *)
1688 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
1689 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1690 exit 1
1691 ;;
1692 esac
1693
1694 case "$age" in
1695 0 | [1-9] | [1-9][0-9]*) ;;
1696 *)
1697 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
1698 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1699 exit 1
1700 ;;
1701 esac
1702
1703 if test $age -gt $current; then
1704 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
1705 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1706 exit 1
1707 fi
1708
1709 # Calculate the version variables.
1710 major=
1711 versuffix=
1712 verstring=
1713 case "$version_type" in
1714 none) ;;
1715
1716 irix)
1717 major=`expr $current - $age + 1`
1718 versuffix="$major.$revision"
1719 verstring="sgi$major.$revision"
1720
1721 # Add in all the interfaces that we are compatible with.
1722 loop=$revision
1723 while test $loop != 0; do
1724 iface=`expr $revision - $loop`
1725 loop=`expr $loop - 1`
1726 verstring="sgi$major.$iface:$verstring"
1727 done
1728 ;;
1729
1730 linux)
1731 major=.`expr $current - $age`
1732 versuffix="$major.$age.$revision"
1733 ;;
1734
1735 osf)
1736 major=`expr $current - $age`
1737 versuffix=".$current.$age.$revision"
1738 verstring="$current.$age.$revision"
1739
1740 # Add in all the interfaces that we are compatible with.
1741 loop=$age
1742 while test $loop != 0; do
1743 iface=`expr $current - $loop`
1744 loop=`expr $loop - 1`
1745 verstring="$verstring:${iface}.0"
1746 done
1747
1748 # Make executables depend on our current version.
1749 verstring="$verstring:${current}.0"
1750 ;;
1751
1752 sunos)
1753 major=".$current"
1754 versuffix=".$current.$revision"
1755 ;;
1756
1757 freebsd-aout)
1758 major=".$current"
1759 versuffix=".$current.$revision";
1760 ;;
1761
1762 freebsd-elf)
1763 major=".$current"
1764 versuffix=".$current";
1765 ;;
1766
1767 windows)
1768 # Like Linux, but with '-' rather than '.', since we only
1769 # want one extension on Windows 95.
1770 major=`expr $current - $age`
1771 versuffix="-$major-$age-$revision"
1772 ;;
1773
1774 darwin)
1775 # Like Linux, but with the current version available in
1776 # verstring for coding it into the library header
1777 major=.`expr $current - $age`
1778 versuffix="$major.$age.$revision"
1779 # Darwin ld doesn't like 0 for these options...
1780 minor_current=`expr $current + 1`
1781 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
1782 ;;
1783
1784 *)
1785 $echo "$modename: unknown library version type \`$version_type'" 1>&2
1786 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
1787 exit 1
1788 ;;
1789 esac
1790
1791 # Clear the version info if we defaulted, and they specified a release.
1792 if test -z "$vinfo" && test -n "$release"; then
1793 major=
1794 verstring="0.0"
1795 if test "$need_version" = no; then
1796 versuffix=
1797 else
1798 versuffix=".0.0"
1799 fi
1800 fi
1801
1802 # Remove version info from name if versioning should be avoided
1803 if test "$avoid_version" = yes && test "$need_version" = no; then
1804 major=
1805 versuffix=
1806 verstring=""
1807 fi
1808
1809 # Check to see if the archive will have undefined symbols.
1810 if test "$allow_undefined" = yes; then
1811 if test "$allow_undefined_flag" = unsupported; then
1812 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
1813 build_libtool_libs=no
1814 build_old_libs=yes
1815 fi
1816 else
1817 # Don't allow undefined symbols.
1818 allow_undefined_flag="$no_undefined_flag"
1819 fi
1820
1821 dependency_libs="$deplibs"
1822 case "$host" in
1823 *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
1824 # these systems don't actually have a c library (as such)!
1825 ;;
1826 *-*-rhapsody* | *-*-darwin1.[012])
1827 # Rhapsody C library is in the System framework
1828 deplibs="$deplibs -framework System"
1829 ;;
1830 *)
1831 # Add libc to deplibs on all other systems.
1832 deplibs="$deplibs -lc"
1833 ;;
1834 esac
1835 fi
1836
1837 # Create the output directory, or remove our outputs if we need to.
1838 if test -d $output_objdir; then
1839 $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
1840 $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
1841 else
1842 $show "$mkdir $output_objdir"
1843 $run $mkdir $output_objdir
1844 status=$?
1845 if test $status -ne 0 && test ! -d $output_objdir; then
1846 exit $status
1847 fi
1848 fi
1849
1850 # Now set the variables for building old libraries.
1851 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
1852 oldlibs="$oldlibs $output_objdir/$libname.$libext"
1853
1854 # Transform .lo files to .o files.
1855 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
1856 fi
1857
1858 if test "$build_libtool_libs" = yes; then
1859 # Transform deplibs into only deplibs that can be linked in shared.
1860 name_save=$name
1861 libname_save=$libname
1862 release_save=$release
1863 versuffix_save=$versuffix
1864 major_save=$major
1865 # I'm not sure if I'm treating the release correctly. I think
1866 # release should show up in the -l (ie -lgmp5) so we don't want to
1867 # add it in twice. Is that correct?
1868 release=""
1869 versuffix=""
1870 major=""
1871 newdeplibs=
1872 droppeddeps=no
1873 case "$deplibs_check_method" in
1874 pass_all)
1875 # Don't check for shared/static. Everything works.
1876 # This might be a little naive. We might want to check
1877 # whether the library exists or not. But this is on
1878 # osf3 & osf4 and I'm not really sure... Just
1879 # implementing what was already the behaviour.
1880 newdeplibs=$deplibs
1881 ;;
1882 test_compile)
1883 # This code stresses the "libraries are programs" paradigm to its
1884 # limits. Maybe even breaks it. We compile a program, linking it
1885 # against the deplibs as a proxy for the library. Then we can check
1886 # whether they linked in statically or dynamically with ldd.
1887 $rm conftest.c
1888 cat > conftest.c <<EOF
1889 int main() { return 0; }
1890 EOF
1891 $rm conftest
1892 $CC -o conftest conftest.c $deplibs
1893 if test $? -eq 0 ; then
1894 ldd_output=`ldd conftest`
1895 for i in $deplibs; do
1896 name="`expr X$i : 'X-l\(.*\)'`"
1897 # If $name is empty we are operating on a -L argument.
1898 if test "$name" != "" ; then
1899 libname=`eval \\$echo \"$libname_spec\"`
1900 deplib_matches=`eval \\$echo \"$library_names_spec\"`
1901 set dummy $deplib_matches
1902 deplib_match=$2
1903 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
1904 newdeplibs="$newdeplibs $i"
1905 else
1906 droppeddeps=yes
1907 echo
1908 echo "*** Warning: This library needs some functionality provided by $i."
1909 echo "*** I have the capability to make that library automatically link in when"
1910 echo "*** you link to this library. But I can only do this if you have a"
1911 echo "*** shared version of the library, which you do not appear to have."
1912 fi
1913 else
1914 newdeplibs="$newdeplibs $i"
1915 fi
1916 done
1917 else
1918 # Error occured in the first compile. Let's try to salvage the situation:
1919 # Compile a seperate program for each library.
1920 for i in $deplibs; do
1921 name="`expr X$i : 'X-l\(.*\)'`"
1922 # If $name is empty we are operating on a -L argument.
1923 if test "$name" != "" ; then
1924 $rm conftest
1925 $CC -o conftest conftest.c $i
1926 # Did it work?
1927 if test $? -eq 0 ; then
1928 ldd_output=`ldd conftest`
1929 libname=`eval \\$echo \"$libname_spec\"`
1930 deplib_matches=`eval \\$echo \"$library_names_spec\"`
1931 set dummy $deplib_matches
1932 deplib_match=$2
1933 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
1934 newdeplibs="$newdeplibs $i"
1935 else
1936 droppeddeps=yes
1937 echo
1938 echo "*** Warning: This library needs some functionality provided by $i."
1939 echo "*** I have the capability to make that library automatically link in when"
1940 echo "*** you link to this library. But I can only do this if you have a"
1941 echo "*** shared version of the library, which you do not appear to have."
1942 fi
1943 else
1944 droppeddeps=yes
1945 echo
1946 echo "*** Warning! Library $i is needed by this library but I was not able to"
1947 echo "*** make it link in! You will probably need to install it or some"
1948 echo "*** library that it depends on before this library will be fully"
1949 echo "*** functional. Installing it before continuing would be even better."
1950 fi
1951 else
1952 newdeplibs="$newdeplibs $i"
1953 fi
1954 done
1955 fi
1956 ;;
1957 file_magic*)
1958 set dummy $deplibs_check_method
1959 file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`"
1960 for a_deplib in $deplibs; do
1961 name="`expr X$a_deplib : 'X-l\(.*\)'`"
1962 # If $name is empty we are operating on a -L argument.
1963 if test "$name" != "" ; then
1964 libname=`eval \\$echo \"$libname_spec\"`
1965 for i in $lib_search_path; do
1966 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
1967 for potent_lib in $potential_libs; do
1968 # Follow soft links.
1969 if ls -lLd "$potent_lib" 2>/dev/null \
1970 | grep " -> " >/dev/null; then
1971 continue
1972 fi
1973 # The statement above tries to avoid entering an
1974 # endless loop below, in case of cyclic links.
1975 # We might still enter an endless loop, since a link
1976 # loop can be closed while we follow links,
1977 # but so what?
1978 potlib="$potent_lib"
1979 while test -h "$potlib" 2>/dev/null; do
1980 potliblink=`ls -ld $potlib | sed 's/.* -> //'`
1981 case "$potliblink" in
1982 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
1983 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
1984 esac
1985 done
1986 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
1987 | sed 10q \
1988 | egrep "$file_magic_regex" > /dev/null; then
1989 newdeplibs="$newdeplibs $a_deplib"
1990 a_deplib=""
1991 break 2
1992 fi
1993 done
1994 done
1995 if test -n "$a_deplib" ; then
1996 droppeddeps=yes
1997 echo
1998 echo "*** Warning: This library needs some functionality provided by $a_deplib."
1999 echo "*** I have the capability to make that library automatically link in when"
2000 echo "*** you link to this library. But I can only do this if you have a"
2001 echo "*** shared version of the library, which you do not appear to have."
2002 fi
2003 else
2004 # Add a -L argument.
2005 newdeplibs="$newdeplibs $a_deplib"
2006 fi
2007 done # Gone through all deplibs.
2008 ;;
2009 none | unknown | *)
2010 newdeplibs=""
2011 if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
2012 -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
2013 grep . >/dev/null; then
2014 echo
2015 if test "X$deplibs_check_method" = "Xnone"; then
2016 echo "*** Warning: inter-library dependencies are not supported in this platform."
2017 else
2018 echo "*** Warning: inter-library dependencies are not known to be supported."
2019 fi
2020 echo "*** All declared inter-library dependencies are being dropped."
2021 droppeddeps=yes
2022 fi
2023 ;;
2024 esac
2025 versuffix=$versuffix_save
2026 major=$major_save
2027 release=$release_save
2028 libname=$libname_save
2029 name=$name_save
2030
2031 if test "$droppeddeps" = yes; then
2032 if test "$module" = yes; then
2033 echo
2034 echo "*** Warning: libtool could not satisfy all declared inter-library"
2035 echo "*** dependencies of module $libname. Therefore, libtool will create"
2036 echo "*** a static module, that should work as long as the dlopening"
2037 echo "*** application is linked with the -dlopen flag."
2038 if test -z "$global_symbol_pipe"; then
2039 echo
2040 echo "*** However, this would only work if libtool was able to extract symbol"
2041 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2042 echo "*** not find such a program. So, this module is probably useless."
2043 echo "*** \`nm' from GNU binutils and a full rebuild may help."
2044 fi
2045 if test "$build_old_libs" = no; then
2046 oldlibs="$output_objdir/$libname.$libext"
2047 build_libtool_libs=module
2048 build_old_libs=yes
2049 else
2050 build_libtool_libs=no
2051 fi
2052 else
2053 echo "*** The inter-library dependencies that have been dropped here will be"
2054 echo "*** automatically added whenever a program is linked with this library"
2055 echo "*** or is declared to -dlopen it."
2056 fi
2057 fi
2058 # Done checking deplibs!
2059 deplibs=$newdeplibs
2060 fi
2061
2062 # All the library-specific variables (install_libdir is set above).
2063 library_names=
2064 old_library=
2065 dlname=
2066
2067 # Test again, we may have decided not to build it any more
2068 if test "$build_libtool_libs" = yes; then
2069 # Get the real and link names of the library.
2070 eval library_names=\"$library_names_spec\"
2071 set dummy $library_names
2072 realname="$2"
2073 shift; shift
2074
2075 if test -n "$soname_spec"; then
2076 eval soname=\"$soname_spec\"
2077 else
2078 soname="$realname"
2079 fi
2080
2081 lib="$output_objdir/$realname"
2082 for link
2083 do
2084 linknames="$linknames $link"
2085 done
2086
2087 # Ensure that we have .o objects for linkers which dislike .lo
2088 # (e.g. aix) in case we are running --disable-static
2089 for obj in $libobjs; do
2090 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
2091 if test "X$xdir" = "X$obj"; then
2092 xdir="."
2093 else
2094 xdir="$xdir"
2095 fi
2096 baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
2097 oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
2098 if test ! -f $xdir/$oldobj; then
2099 $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
2100 $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
2101 fi
2102 done
2103
2104 # Use standard objects if they are pic
2105 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2106
2107 # Prepare the list of exported symbols
2108 if test -z "$export_symbols"; then
2109 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
2110 $show "generating symbol list for \`$libname.la'"
2111 export_symbols="$output_objdir/$libname.exp"
2112 $run $rm $export_symbols
2113 eval cmds=\"$export_symbols_cmds\"
2114 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2115 for cmd in $cmds; do
2116 IFS="$save_ifs"
2117 $show "$cmd"
2118 $run eval "$cmd" || exit $?
2119 done
2120 IFS="$save_ifs"
2121 if test -n "$export_symbols_regex"; then
2122 $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
2123 $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
2124 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
2125 $run eval '$mv "${export_symbols}T" "$export_symbols"'
2126 fi
2127 fi
2128 fi
2129
2130 if test -n "$export_symbols" && test -n "$include_expsyms"; then
2131 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
2132 fi
2133
2134 if test -n "$convenience"; then
2135 if test -n "$whole_archive_flag_spec"; then
2136 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
2137 else
2138 gentop="$output_objdir/${outputname}x"
2139 $show "${rm}r $gentop"
2140 $run ${rm}r "$gentop"
2141 $show "mkdir $gentop"
2142 $run mkdir "$gentop"
2143 status=$?
2144 if test $status -ne 0 && test ! -d "$gentop"; then
2145 exit $status
2146 fi
2147 generated="$generated $gentop"
2148
2149 for xlib in $convenience; do
2150 # Extract the objects.
2151 case "$xlib" in
2152 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
2153 *) xabs=`pwd`"/$xlib" ;;
2154 esac
2155 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
2156 xdir="$gentop/$xlib"
2157
2158 $show "${rm}r $xdir"
2159 $run ${rm}r "$xdir"
2160 $show "mkdir $xdir"
2161 $run mkdir "$xdir"
2162 status=$?
2163 if test $status -ne 0 && test ! -d "$xdir"; then
2164 exit $status
2165 fi
2166 $show "(cd $xdir && $AR x $xabs)"
2167 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
2168
2169 libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
2170 done
2171 fi
2172 fi
2173
2174 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
2175 eval flag=\"$thread_safe_flag_spec\"
2176 linkopts="$linkopts $flag"
2177 fi
2178
2179 # Do each of the archive commands.
2180 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
2181 eval cmds=\"$archive_expsym_cmds\"
2182 else
2183 eval cmds=\"$archive_cmds\"
2184 fi
2185 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2186 for cmd in $cmds; do
2187 IFS="$save_ifs"
2188 $show "$cmd"
2189 $run eval "$cmd" || exit $?
2190 done
2191 IFS="$save_ifs"
2192
2193 # Create links to the real library.
2194 for linkname in $linknames; do
2195 if test "$realname" != "$linkname"; then
2196 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
2197 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
2198 fi
2199 done
2200
2201 # If -module or -export-dynamic was specified, set the dlname.
2202 if test "$module" = yes || test "$export_dynamic" = yes; then
2203 # On all known operating systems, these are identical.
2204 dlname="$soname"
2205 fi
2206 fi
2207 ;;
2208
2209 *.lo | *.o | *.obj)
2210 if test -n "$link_against_libtool_libs"; then
2211 $echo "$modename: error: cannot link libtool libraries into objects" 1>&2
2212 exit 1
2213 fi
2214
2215 if test -n "$deplibs"; then
2216 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
2217 fi
2218
2219 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2220 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
2221 fi
2222
2223 if test -n "$rpath"; then
2224 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
2225 fi
2226
2227 if test -n "$xrpath"; then
2228 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
2229 fi
2230
2231 if test -n "$vinfo"; then
2232 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
2233 fi
2234
2235 if test -n "$release"; then
2236 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
2237 fi
2238
2239 case "$output" in
2240 *.lo)
2241 if test -n "$objs"; then
2242 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
2243 exit 1
2244 fi
2245 libobj="$output"
2246 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
2247 ;;
2248 *)
2249 libobj=
2250 obj="$output"
2251 ;;
2252 esac
2253
2254 # Delete the old objects.
2255 $run $rm $obj $libobj
2256
2257 # Objects from convenience libraries. This assumes
2258 # single-version convenience libraries. Whenever we create
2259 # different ones for PIC/non-PIC, this we'll have to duplicate
2260 # the extraction.
2261 reload_conv_objs=
2262 gentop=
2263 # reload_cmds runs $LD directly, so let us get rid of
2264 # -Wl from whole_archive_flag_spec
2265 wl=
2266
2267 if test -n "$convenience"; then
2268 if test -n "$whole_archive_flag_spec"; then
2269 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
2270 else
2271 gentop="$output_objdir/${obj}x"
2272 $show "${rm}r $gentop"
2273 $run ${rm}r "$gentop"
2274 $show "mkdir $gentop"
2275 $run mkdir "$gentop"
2276 status=$?
2277 if test $status -ne 0 && test ! -d "$gentop"; then
2278 exit $status
2279 fi
2280 generated="$generated $gentop"
2281
2282 for xlib in $convenience; do
2283 # Extract the objects.
2284 case "$xlib" in
2285 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
2286 *) xabs=`pwd`"/$xlib" ;;
2287 esac
2288 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
2289 xdir="$gentop/$xlib"
2290
2291 $show "${rm}r $xdir"
2292 $run ${rm}r "$xdir"
2293 $show "mkdir $xdir"
2294 $run mkdir "$xdir"
2295 status=$?
2296 if test $status -ne 0 && test ! -d "$xdir"; then
2297 exit $status
2298 fi
2299 $show "(cd $xdir && $AR x $xabs)"
2300 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
2301
2302 reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
2303 done
2304 fi
2305 fi
2306
2307 # Create the old-style object.
2308 reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs"
2309
2310 output="$obj"
2311 eval cmds=\"$reload_cmds\"
2312 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2313 for cmd in $cmds; do
2314 IFS="$save_ifs"
2315 $show "$cmd"
2316 $run eval "$cmd" || exit $?
2317 done
2318 IFS="$save_ifs"
2319
2320 # Exit if we aren't doing a library object file.
2321 if test -z "$libobj"; then
2322 if test -n "$gentop"; then
2323 $show "${rm}r $gentop"
2324 $run ${rm}r $gentop
2325 fi
2326
2327 exit 0
2328 fi
2329
2330 if test "$build_libtool_libs" != yes; then
2331 if test -n "$gentop"; then
2332 $show "${rm}r $gentop"
2333 $run ${rm}r $gentop
2334 fi
2335
2336 # Create an invalid libtool object if no PIC, so that we don't
2337 # accidentally link it into a program.
2338 $show "echo timestamp > $libobj"
2339 $run eval "echo timestamp > $libobj" || exit $?
2340 exit 0
2341 fi
2342
2343 if test -n "$pic_flag"; then
2344 # Only do commands if we really have different PIC objects.
2345 reload_objs="$libobjs $reload_conv_objs"
2346 output="$libobj"
2347 eval cmds=\"$reload_cmds\"
2348 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2349 for cmd in $cmds; do
2350 IFS="$save_ifs"
2351 $show "$cmd"
2352 $run eval "$cmd" || exit $?
2353 done
2354 IFS="$save_ifs"
2355 else
2356 # Just create a symlink.
2357 $show $rm $libobj
2358 $run $rm $libobj
2359 xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
2360 if test "X$xdir" = "X$libobj"; then
2361 xdir="."
2362 else
2363 xdir="$xdir"
2364 fi
2365 baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
2366 oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
2367 $show "(cd $xdir && $LN_S $oldobj $baseobj)"
2368 $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
2369 fi
2370
2371 if test -n "$gentop"; then
2372 $show "${rm}r $gentop"
2373 $run ${rm}r $gentop
2374 fi
2375
2376 exit 0
2377 ;;
2378
2379 # Anything else should be a program.
2380 *)
2381 if test -n "$vinfo"; then
2382 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
2383 fi
2384
2385 if test -n "$release"; then
2386 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
2387 fi
2388
2389 if test "$preload" = yes; then
2390 if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
2391 test "$dlopen_self_static" = unknown; then
2392 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
2393 fi
2394 fi
2395
2396 if test -n "$rpath$xrpath"; then
2397 # If the user specified any rpath flags, then add them.
2398 for libdir in $rpath $xrpath; do
2399 # This is the magic to use -rpath.
2400 case "$compile_rpath " in
2401 *" $libdir "*) ;;
2402 *) compile_rpath="$compile_rpath $libdir" ;;
2403 esac
2404 case "$finalize_rpath " in
2405 *" $libdir "*) ;;
2406 *) finalize_rpath="$finalize_rpath $libdir" ;;
2407 esac
2408 done
2409 fi
2410
2411 # Now hardcode the library paths
2412 rpath=
2413 hardcode_libdirs=
2414 for libdir in $compile_rpath $finalize_rpath; do
2415 if test -n "$hardcode_libdir_flag_spec"; then
2416 if test -n "$hardcode_libdir_separator"; then
2417 if test -z "$hardcode_libdirs"; then
2418 hardcode_libdirs="$libdir"
2419 else
2420 # Just accumulate the unique libdirs.
2421 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
2422 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
2423 ;;
2424 *)
2425 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
2426 ;;
2427 esac
2428 fi
2429 else
2430 eval flag=\"$hardcode_libdir_flag_spec\"
2431 rpath="$rpath $flag"
2432 fi
2433 elif test -n "$runpath_var"; then
2434 case "$perm_rpath " in
2435 *" $libdir "*) ;;
2436 *) perm_rpath="$perm_rpath $libdir" ;;
2437 esac
2438 fi
2439 done
2440 # Substitute the hardcoded libdirs into the rpath.
2441 if test -n "$hardcode_libdir_separator" &&
2442 test -n "$hardcode_libdirs"; then
2443 libdir="$hardcode_libdirs"
2444 eval rpath=\" $hardcode_libdir_flag_spec\"
2445 fi
2446 compile_rpath="$rpath"
2447
2448 rpath=
2449 hardcode_libdirs=
2450 for libdir in $finalize_rpath; do
2451 if test -n "$hardcode_libdir_flag_spec"; then
2452 if test -n "$hardcode_libdir_separator"; then
2453 if test -z "$hardcode_libdirs"; then
2454 hardcode_libdirs="$libdir"
2455 else
2456 # Just accumulate the unique libdirs.
2457 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
2458 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
2459 ;;
2460 *)
2461 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
2462 ;;
2463 esac
2464 fi
2465 else
2466 eval flag=\"$hardcode_libdir_flag_spec\"
2467 rpath="$rpath $flag"
2468 fi
2469 elif test -n "$runpath_var"; then
2470 case "$finalize_perm_rpath " in
2471 *" $libdir "*) ;;
2472 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
2473 esac
2474 fi
2475 done
2476 # Substitute the hardcoded libdirs into the rpath.
2477 if test -n "$hardcode_libdir_separator" &&
2478 test -n "$hardcode_libdirs"; then
2479 libdir="$hardcode_libdirs"
2480 eval rpath=\" $hardcode_libdir_flag_spec\"
2481 fi
2482 finalize_rpath="$rpath"
2483
2484 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2485 if test "X$output_objdir" = "X$output"; then
2486 output_objdir="$objdir"
2487 else
2488 output_objdir="$output_objdir/$objdir"
2489 fi
2490
2491 # Create the binary in the object directory, then wrap it.
2492 if test ! -d $output_objdir; then
2493 $show "$mkdir $output_objdir"
2494 $run $mkdir $output_objdir
2495 status=$?
2496 if test $status -ne 0 && test ! -d $output_objdir; then
2497 exit $status
2498 fi
2499 fi
2500
2501 if test -n "$libobjs" && test "$build_old_libs" = yes; then
2502 # Transform all the library objects into standard objects.
2503 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2504 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2505 fi
2506
2507 dlsyms=
2508 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2509 if test -n "$NM" && test -n "$global_symbol_pipe"; then
2510 dlsyms="${outputname}S.c"
2511 else
2512 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
2513 fi
2514 fi
2515
2516 if test -n "$dlsyms"; then
2517 case "$dlsyms" in
2518 "") ;;
2519 *.c)
2520 # Discover the nlist of each of the dlfiles.
2521 nlist="$output_objdir/${outputname}.nm"
2522
2523 $show "$rm $nlist ${nlist}S ${nlist}T"
2524 $run $rm "$nlist" "${nlist}S" "${nlist}T"
2525
2526 # Parse the name list into a source file.
2527 $show "creating $output_objdir/$dlsyms"
2528
2529 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
2530 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
2531 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
2532
2533 #ifdef __cplusplus
2534 extern \"C\" {
2535 #endif
2536
2537 /* Prevent the only kind of declaration conflicts we can make. */
2538 #define lt_preloaded_symbols some_other_symbol
2539
2540 /* External symbol declarations for the compiler. */\
2541 "
2542
2543 if test "$dlself" = yes; then
2544 $show "generating symbol list for \`$output'"
2545
2546 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
2547
2548 # Add our own program objects to the symbol list.
2549 progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2550 for arg in $progfiles; do
2551 $show "extracting global C symbols from \`$arg'"
2552 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
2553 done
2554
2555 if test -n "$exclude_expsyms"; then
2556 $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
2557 $run eval '$mv "$nlist"T "$nlist"'
2558 fi
2559
2560 if test -n "$export_symbols_regex"; then
2561 $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
2562 $run eval '$mv "$nlist"T "$nlist"'
2563 fi
2564
2565 # Prepare the list of exported symbols
2566 if test -z "$export_symbols"; then
2567 export_symbols="$output_objdir/$output.exp"
2568 $run $rm $export_symbols
2569 $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
2570 else
2571 $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
2572 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
2573 $run eval 'mv "$nlist"T "$nlist"'
2574 fi
2575 fi
2576
2577 for arg in $dlprefiles; do
2578 $show "extracting global C symbols from \`$arg'"
2579 name=`echo "$arg" | sed -e 's%^.*/%%'`
2580 $run eval 'echo ": $name " >> "$nlist"'
2581 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
2582 done
2583
2584 if test -z "$run"; then
2585 # Make sure we have at least an empty file.
2586 test -f "$nlist" || : > "$nlist"
2587
2588 if test -n "$exclude_expsyms"; then
2589 egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
2590 $mv "$nlist"T "$nlist"
2591 fi
2592
2593 # Try sorting and uniquifying the output.
2594 if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
2595 :
2596 else
2597 grep -v "^: " < "$nlist" > "$nlist"S
2598 fi
2599
2600 if test -f "$nlist"S; then
2601 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
2602 else
2603 echo '/* NONE */' >> "$output_objdir/$dlsyms"
2604 fi
2605
2606 $echo >> "$output_objdir/$dlsyms" "\
2607
2608 #undef lt_preloaded_symbols
2609
2610 #if defined (__STDC__) && __STDC__
2611 # define lt_ptr_t void *
2612 #else
2613 # define lt_ptr_t char *
2614 # define const
2615 #endif
2616
2617 /* The mapping between symbol names and symbols. */
2618 const struct {
2619 const char *name;
2620 lt_ptr_t address;
2621 }
2622 lt_preloaded_symbols[] =
2623 {\
2624 "
2625
2626 sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
2627 -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
2628 < "$nlist" >> "$output_objdir/$dlsyms"
2629
2630 $echo >> "$output_objdir/$dlsyms" "\
2631 {0, (lt_ptr_t) 0}
2632 };
2633
2634 /* This works around a problem in FreeBSD linker */
2635 #ifdef FREEBSD_WORKAROUND
2636 static const void *lt_preloaded_setup() {
2637 return lt_preloaded_symbols;
2638 }
2639 #endif
2640
2641 #ifdef __cplusplus
2642 }
2643 #endif\
2644 "
2645 fi
2646
2647 pic_flag_for_symtable=
2648 case "$host" in
2649 # compiling the symbol table file with pic_flag works around
2650 # a FreeBSD bug that causes programs to crash when -lm is
2651 # linked before any other PIC object. But we must not use
2652 # pic_flag when linking with -static. The problem exists in
2653 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
2654 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
2655 case "$compile_command " in
2656 *" -static "*) ;;
2657 *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
2658 esac;;
2659 *-*-hpux*)
2660 case "$compile_command " in
2661 *" -static "*) ;;
2662 *) pic_flag_for_symtable=" $pic_flag -DPIC";;
2663 esac
2664 esac
2665
2666 # Now compile the dynamic symbol file.
2667 $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
2668 $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
2669
2670 # Clean up the generated files.
2671 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
2672 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
2673
2674 # Transform the symbol file into the correct name.
2675 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
2676 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
2677 ;;
2678 *)
2679 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
2680 exit 1
2681 ;;
2682 esac
2683 else
2684 # We keep going just in case the user didn't refer to
2685 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
2686 # really was required.
2687
2688 # Nullify the symbol file.
2689 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
2690 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
2691 fi
2692
2693 if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
2694 # Replace the output file specification.
2695 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
2696 link_command="$compile_command$compile_rpath"
2697
2698 # We have no uninstalled library dependencies, so finalize right now.
2699 $show "$link_command"
2700 $run eval "$link_command"
2701 status=$?
2702
2703 # Delete the generated files.
2704 if test -n "$dlsyms"; then
2705 $show "$rm $output_objdir/${outputname}S.${objext}"
2706 $run $rm "$output_objdir/${outputname}S.${objext}"
2707 fi
2708
2709 exit $status
2710 fi
2711
2712 if test -n "$shlibpath_var"; then
2713 # We should set the shlibpath_var
2714 rpath=
2715 for dir in $temp_rpath; do
2716 case "$dir" in
2717 [\\/]* | [A-Za-z]:[\\/]*)
2718 # Absolute path.
2719 rpath="$rpath$dir:"
2720 ;;
2721 *)
2722 # Relative path: add a thisdir entry.
2723 rpath="$rpath\$thisdir/$dir:"
2724 ;;
2725 esac
2726 done
2727 temp_rpath="$rpath"
2728 fi
2729
2730 if test -n "$compile_shlibpath$finalize_shlibpath"; then
2731 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
2732 fi
2733 if test -n "$finalize_shlibpath"; then
2734 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
2735 fi
2736
2737 compile_var=
2738 finalize_var=
2739 if test -n "$runpath_var"; then
2740 if test -n "$perm_rpath"; then
2741 # We should set the runpath_var.
2742 rpath=
2743 for dir in $perm_rpath; do
2744 rpath="$rpath$dir:"
2745 done
2746 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
2747 fi
2748 if test -n "$finalize_perm_rpath"; then
2749 # We should set the runpath_var.
2750 rpath=
2751 for dir in $finalize_perm_rpath; do
2752 rpath="$rpath$dir:"
2753 done
2754 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
2755 fi
2756 fi
2757
2758 if test "$hardcode_action" = relink; then
2759 # Fast installation is not supported
2760 link_command="$compile_var$compile_command$compile_rpath"
2761 relink_command="$finalize_var$finalize_command$finalize_rpath"
2762
2763 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
2764 $echo "$modename: \`$output' will be relinked during installation" 1>&2
2765 else
2766 if test "$fast_install" != no; then
2767 link_command="$finalize_var$compile_command$finalize_rpath"
2768 if test "$fast_install" = yes; then
2769 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
2770 else
2771 # fast_install is set to needless
2772 relink_command=
2773 fi
2774 else
2775 link_command="$compile_var$compile_command$compile_rpath"
2776 relink_command="$finalize_var$finalize_command$finalize_rpath"
2777 fi
2778 fi
2779
2780 # Replace the output file specification.
2781 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
2782
2783 # Delete the old output files.
2784 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
2785
2786 $show "$link_command"
2787 $run eval "$link_command" || exit $?
2788
2789 # Now create the wrapper script.
2790 $show "creating $output"
2791
2792 # Quote the relink command for shipping.
2793 if test -n "$relink_command"; then
2794 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
2795 fi
2796
2797 # Quote $echo for shipping.
2798 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
2799 case "$0" in
2800 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
2801 *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
2802 esac
2803 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
2804 else
2805 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
2806 fi
2807
2808 # Only actually do things if our run command is non-null.
2809 if test -z "$run"; then
2810 # win32 will think the script is a binary if it has
2811 # a .exe suffix, so we strip it off here.
2812 case $output in
2813 *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
2814 esac
2815 $rm $output
2816 trap "$rm $output; exit 1" 1 2 15
2817
2818 $echo > $output "\
2819 #! $SHELL
2820
2821 # $output - temporary wrapper script for $objdir/$outputname
2822 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
2823 #
2824 # The $output program cannot be directly executed until all the libtool
2825 # libraries that it depends on are installed.
2826 #
2827 # This wrapper script should never be moved out of the build directory.
2828 # If it is, it will not operate correctly.
2829
2830 # Sed substitution that helps us do robust quoting. It backslashifies
2831 # metacharacters that are still active within double-quoted strings.
2832 Xsed='sed -e 1s/^X//'
2833 sed_quote_subst='$sed_quote_subst'
2834
2835 # The HP-UX ksh and POSIX shell print the target directory to stdout
2836 # if CDPATH is set.
2837 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
2838
2839 relink_command=\"$relink_command\"
2840
2841 # This environment variable determines our operation mode.
2842 if test \"\$libtool_install_magic\" = \"$magic\"; then
2843 # install mode needs the following variable:
2844 link_against_libtool_libs='$link_against_libtool_libs'
2845 else
2846 # When we are sourced in execute mode, \$file and \$echo are already set.
2847 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2848 echo=\"$qecho\"
2849 file=\"\$0\"
2850 # Make sure echo works.
2851 if test \"X\$1\" = X--no-reexec; then
2852 # Discard the --no-reexec flag, and continue.
2853 shift
2854 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
2855 # Yippee, \$echo works!
2856 :
2857 else
2858 # Restart under the correct shell, and then maybe \$echo will work.
2859 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
2860 fi
2861 fi\
2862 "
2863 $echo >> $output "\
2864
2865 # Find the directory that this script lives in.
2866 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
2867 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
2868
2869 # Follow symbolic links until we get to the real thisdir.
2870 file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
2871 while test -n \"\$file\"; do
2872 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
2873
2874 # If there was a directory component, then change thisdir.
2875 if test \"x\$destdir\" != \"x\$file\"; then
2876 case \"\$destdir\" in
2877 [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
2878 *) thisdir=\"\$thisdir/\$destdir\" ;;
2879 esac
2880 fi
2881
2882 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
2883 file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
2884 done
2885
2886 # Try to get the absolute directory name.
2887 absdir=\`cd \"\$thisdir\" && pwd\`
2888 test -n \"\$absdir\" && thisdir=\"\$absdir\"
2889 "
2890
2891 if test "$fast_install" = yes; then
2892 echo >> $output "\
2893 program=lt-'$outputname'
2894 progdir=\"\$thisdir/$objdir\"
2895
2896 if test ! -f \"\$progdir/\$program\" || \\
2897 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
2898 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
2899
2900 file=\"\$\$-\$program\"
2901
2902 if test ! -d \"\$progdir\"; then
2903 $mkdir \"\$progdir\"
2904 else
2905 $rm \"\$progdir/\$file\"
2906 fi"
2907
2908 echo >> $output "\
2909
2910 # relink executable if necessary
2911 if test -n \"\$relink_command\"; then
2912 if (cd \"\$thisdir\" && eval \$relink_command); then :
2913 else
2914 $rm \"\$progdir/\$file\"
2915 exit 1
2916 fi
2917 fi
2918
2919 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
2920 { $rm \"\$progdir/\$program\";
2921 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
2922 $rm \"\$progdir/\$file\"
2923 fi"
2924 else
2925 echo >> $output "\
2926 program='$outputname'
2927 progdir=\"\$thisdir/$objdir\"
2928 "
2929 fi
2930
2931 echo >> $output "\
2932
2933 if test -f \"\$progdir/\$program\"; then"
2934
2935 # Export our shlibpath_var if we have one.
2936 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
2937 $echo >> $output "\
2938 # Add our own library path to $shlibpath_var
2939 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
2940
2941 # Some systems cannot cope with colon-terminated $shlibpath_var
2942 # The second colon is a workaround for a bug in BeOS R4 sed
2943 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
2944
2945 export $shlibpath_var
2946 "
2947 fi
2948
2949 # fixup the dll searchpath if we need to.
2950 if test -n "$dllsearchpath"; then
2951 $echo >> $output "\
2952 # Add the dll search path components to the executable PATH
2953 PATH=$dllsearchpath:\$PATH
2954 "
2955 fi
2956
2957 $echo >> $output "\
2958 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2959 # Run the actual program with our arguments.
2960 "
2961 case $host in
2962 # win32 systems need to use the prog path for dll
2963 # lookup to work
2964 *-*-cygwin*)
2965 $echo >> $output "\
2966 exec \$progdir/\$program \${1+\"\$@\"}
2967 "
2968 ;;
2969
2970 # Backslashes separate directories on plain windows
2971 *-*-mingw | *-*-os2*)
2972 $echo >> $output "\
2973 exec \$progdir\\\\\$program \${1+\"\$@\"}
2974 "
2975 ;;
2976
2977 *)
2978 $echo >> $output "\
2979 # Export the path to the program.
2980 PATH=\"\$progdir:\$PATH\"
2981 export PATH
2982
2983 exec \$program \${1+\"\$@\"}
2984 "
2985 ;;
2986 esac
2987 $echo >> $output "\
2988 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
2989 exit 1
2990 fi
2991 else
2992 # The program doesn't exist.
2993 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
2994 \$echo \"This script is just a wrapper for \$program.\" 1>&2
2995 echo \"See the $PACKAGE documentation for more information.\" 1>&2
2996 exit 1
2997 fi
2998 fi\
2999 "
3000 chmod +x $output
3001 fi
3002 exit 0
3003 ;;
3004 esac
3005
3006 # See if we need to build an old-fashioned archive.
3007 for oldlib in $oldlibs; do
3008
3009 if test "$build_libtool_libs" = convenience; then
3010 oldobjs="$libobjs_save"
3011 addlibs="$convenience"
3012 build_libtool_libs=no
3013 else
3014 if test "$build_libtool_libs" = module; then
3015 oldobjs="$libobjs_save"
3016 build_libtool_libs=no
3017 else
3018 oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
3019 fi
3020 addlibs="$old_convenience"
3021 fi
3022
3023 if test -n "$addlibs"; then
3024 gentop="$output_objdir/${outputname}x"
3025 $show "${rm}r $gentop"
3026 $run ${rm}r "$gentop"
3027 $show "mkdir $gentop"
3028 $run mkdir "$gentop"
3029 status=$?
3030 if test $status -ne 0 && test ! -d "$gentop"; then
3031 exit $status
3032 fi
3033 generated="$generated $gentop"
3034
3035 # Add in members from convenience archives.
3036 for xlib in $addlibs; do
3037 # Extract the objects.
3038 case "$xlib" in
3039 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3040 *) xabs=`pwd`"/$xlib" ;;
3041 esac
3042 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3043 xdir="$gentop/$xlib"
3044
3045 $show "${rm}r $xdir"
3046 $run ${rm}r "$xdir"
3047 $show "mkdir $xdir"
3048 $run mkdir "$xdir"
3049 status=$?
3050 if test $status -ne 0 && test ! -d "$xdir"; then
3051 exit $status
3052 fi
3053 $show "(cd $xdir && $AR x $xabs)"
3054 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3055
3056 oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
3057 done
3058 fi
3059
3060 # Do each command in the archive commands.
3061 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
3062 eval cmds=\"$old_archive_from_new_cmds\"
3063 else
3064 # Ensure that we have .o objects in place in case we decided
3065 # not to build a shared library, and have fallen back to building
3066 # static libs even though --disable-static was passed!
3067 for oldobj in $oldobjs; do
3068 if test ! -f $oldobj; then
3069 xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
3070 if test "X$xdir" = "X$oldobj"; then
3071 xdir="."
3072 else
3073 xdir="$xdir"
3074 fi
3075 baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
3076 obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
3077 $show "(cd $xdir && ${LN_S} $obj $baseobj)"
3078 $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
3079 fi
3080 done
3081
3082 eval cmds=\"$old_archive_cmds\"
3083 fi
3084 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3085 for cmd in $cmds; do
3086 IFS="$save_ifs"
3087 $show "$cmd"
3088 $run eval "$cmd" || exit $?
3089 done
3090 IFS="$save_ifs"
3091 done
3092
3093 if test -n "$generated"; then
3094 $show "${rm}r$generated"
3095 $run ${rm}r$generated
3096 fi
3097
3098 # Now create the libtool archive.
3099 case "$output" in
3100 *.la)
3101 old_library=
3102 test "$build_old_libs" = yes && old_library="$libname.$libext"
3103 $show "creating $output"
3104
3105 if test -n "$xrpath"; then
3106 temp_xrpath=
3107 for libdir in $xrpath; do
3108 temp_xrpath="$temp_xrpath -R$libdir"
3109 done
3110 dependency_libs="$temp_xrpath $dependency_libs"
3111 fi
3112
3113 # Only create the output if not a dry run.
3114 if test -z "$run"; then
3115 for installed in no yes; do
3116 if test "$installed" = yes; then
3117 if test -z "$install_libdir"; then
3118 break
3119 fi
3120 output="$output_objdir/$outputname"i
3121 fi
3122 $rm $output
3123 $echo > $output "\
3124 # $outputname - a libtool library file
3125 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
3126 #
3127 # Please DO NOT delete this file!
3128 # It is necessary for linking the library.
3129
3130 # The name that we can dlopen(3).
3131 dlname='$dlname'
3132
3133 # Names of this library.
3134 library_names='$library_names'
3135
3136 # The name of the static archive.
3137 old_library='$old_library'
3138
3139 # Libraries that this one depends upon.
3140 dependency_libs='$dependency_libs'
3141
3142 # Version information for $libname.
3143 current=$current
3144 age=$age
3145 revision=$revision
3146
3147 # Is this an already installed library?
3148 installed=$installed
3149
3150 # Directory that this library needs to be installed in:
3151 libdir='$install_libdir'\
3152 "
3153 done
3154 fi
3155
3156 # Do a symbolic link so that the libtool archive can be found in
3157 # LD_LIBRARY_PATH before the program is installed.
3158 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
3159 $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $?
3160 ;;
3161 esac
3162 exit 0
3163 ;;
3164
3165 # libtool install mode
3166 install)
3167 modename="$modename: install"
3168
3169 # There may be an optional sh(1) argument at the beginning of
3170 # install_prog (especially on Windows NT).
3171 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
3172 # Aesthetically quote it.
3173 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
3174 case "$arg" in
3175 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
3176 arg="\"$arg\""
3177 ;;
3178 esac
3179 install_prog="$arg "
3180 arg="$1"
3181 shift
3182 else
3183 install_prog=
3184 arg="$nonopt"
3185 fi
3186
3187 # The real first argument should be the name of the installation program.
3188 # Aesthetically quote it.
3189 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
3190 case "$arg" in
3191 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
3192 arg="\"$arg\""
3193 ;;
3194 esac
3195 install_prog="$install_prog$arg"
3196
3197 # We need to accept at least all the BSD install flags.
3198 dest=
3199 files=
3200 opts=
3201 prev=
3202 install_type=
3203 isdir=no
3204 stripme=
3205 for arg
3206 do
3207 if test -n "$dest"; then
3208 files="$files $dest"
3209 dest="$arg"
3210 continue
3211 fi
3212
3213 case "$arg" in
3214 -d) isdir=yes ;;
3215 -f) prev="-f" ;;
3216 -g) prev="-g" ;;
3217 -m) prev="-m" ;;
3218 -o) prev="-o" ;;
3219 -s)
3220 stripme=" -s"
3221 continue
3222 ;;
3223 -*) ;;
3224
3225 *)
3226 # If the previous option needed an argument, then skip it.
3227 if test -n "$prev"; then
3228 prev=
3229 else
3230 dest="$arg"
3231 continue
3232 fi
3233 ;;
3234 esac
3235
3236 # Aesthetically quote the argument.
3237 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
3238 case "$arg" in
3239 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
3240 arg="\"$arg\""
3241 ;;
3242 esac
3243 install_prog="$install_prog $arg"
3244 done
3245
3246 if test -z "$install_prog"; then
3247 $echo "$modename: you must specify an install program" 1>&2
3248 $echo "$help" 1>&2
3249 exit 1
3250 fi
3251
3252 if test -n "$prev"; then
3253 $echo "$modename: the \`$prev' option requires an argument" 1>&2
3254 $echo "$help" 1>&2
3255 exit 1
3256 fi
3257
3258 if test -z "$files"; then
3259 if test -z "$dest"; then
3260 $echo "$modename: no file or destination specified" 1>&2
3261 else
3262 $echo "$modename: you must specify a destination" 1>&2
3263 fi
3264 $echo "$help" 1>&2
3265 exit 1
3266 fi
3267
3268 # Strip any trailing slash from the destination.
3269 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
3270
3271 # Check to see that the destination is a directory.
3272 test -d "$dest" && isdir=yes
3273 if test "$isdir" = yes; then
3274 destdir="$dest"
3275 destname=
3276 else
3277 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
3278 test "X$destdir" = "X$dest" && destdir=.
3279 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
3280
3281 # Not a directory, so check to see that there is only one file specified.
3282 set dummy $files
3283 if test $# -gt 2; then
3284 $echo "$modename: \`$dest' is not a directory" 1>&2
3285 $echo "$help" 1>&2
3286 exit 1
3287 fi
3288 fi
3289 case "$destdir" in
3290 [\\/]* | [A-Za-z]:[\\/]*) ;;
3291 *)
3292 for file in $files; do
3293 case "$file" in
3294 *.lo) ;;
3295 *)
3296 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
3297 $echo "$help" 1>&2
3298 exit 1
3299 ;;
3300 esac
3301 done
3302 ;;
3303 esac
3304
3305 # This variable tells wrapper scripts just to set variables rather
3306 # than running their programs.
3307 libtool_install_magic="$magic"
3308
3309 staticlibs=
3310 future_libdirs=
3311 current_libdirs=
3312 for file in $files; do
3313
3314 # Do each installation.
3315 case "$file" in
3316 *.a | *.lib)
3317 # Do the static libraries later.
3318 staticlibs="$staticlibs $file"
3319 ;;
3320
3321 *.la)
3322 # Check to see that this really is a libtool archive.
3323 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
3324 else
3325 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
3326 $echo "$help" 1>&2
3327 exit 1
3328 fi
3329
3330 library_names=
3331 old_library=
3332 # If there is no directory component, then add one.
3333 case "$file" in
3334 */* | *\\*) . $file ;;
3335 *) . ./$file ;;
3336 esac
3337
3338 # Add the libdir to current_libdirs if it is the destination.
3339 if test "X$destdir" = "X$libdir"; then
3340 case "$current_libdirs " in
3341 *" $libdir "*) ;;
3342 *) current_libdirs="$current_libdirs $libdir" ;;
3343 esac
3344 else
3345 # Note the libdir as a future libdir.
3346 case "$future_libdirs " in
3347 *" $libdir "*) ;;
3348 *) future_libdirs="$future_libdirs $libdir" ;;
3349 esac
3350 fi
3351
3352 dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
3353 test "X$dir" = "X$file/" && dir=
3354 dir="$dir$objdir"
3355
3356 # See the names of the shared library.
3357 set dummy $library_names
3358 if test -n "$2"; then
3359 realname="$2"
3360 shift
3361 shift
3362
3363 # Install the shared library and build the symlinks.
3364 $show "$install_prog $dir/$realname $destdir/$realname"
3365 $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
3366
3367 if test $# -gt 0; then
3368 # Delete the old symlinks, and create new ones.
3369 for linkname
3370 do
3371 if test "$linkname" != "$realname"; then
3372 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
3373 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
3374 fi
3375 done
3376 fi
3377
3378 # Do each command in the postinstall commands.
3379 lib="$destdir/$realname"
3380 eval cmds=\"$postinstall_cmds\"
3381 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3382 for cmd in $cmds; do
3383 IFS="$save_ifs"
3384 $show "$cmd"
3385 $run eval "$cmd" || exit $?
3386 done
3387 IFS="$save_ifs"
3388 fi
3389
3390 # Install the pseudo-library for information purposes.
3391 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3392 instname="$dir/$name"i
3393 $show "$install_prog $instname $destdir/$name"
3394 $run eval "$install_prog $instname $destdir/$name" || exit $?
3395
3396 # Maybe install the static library, too.
3397 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
3398 ;;
3399
3400 *.lo)
3401 # Install (i.e. copy) a libtool object.
3402
3403 # Figure out destination file name, if it wasn't already specified.
3404 if test -n "$destname"; then
3405 destfile="$destdir/$destname"
3406 else
3407 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3408 destfile="$destdir/$destfile"
3409 fi
3410
3411 # Deduce the name of the destination old-style object file.
3412 case "$destfile" in
3413 *.lo)
3414 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
3415 ;;
3416 *.o | *.obj)
3417 staticdest="$destfile"
3418 destfile=
3419 ;;
3420 *)
3421 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
3422 $echo "$help" 1>&2
3423 exit 1
3424 ;;
3425 esac
3426
3427 # Install the libtool object if requested.
3428 if test -n "$destfile"; then
3429 $show "$install_prog $file $destfile"
3430 $run eval "$install_prog $file $destfile" || exit $?
3431 fi
3432
3433 # Install the old object if enabled.
3434 if test "$build_old_libs" = yes; then
3435 # Deduce the name of the old-style object file.
3436 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
3437
3438 $show "$install_prog $staticobj $staticdest"
3439 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
3440 fi
3441 exit 0
3442 ;;
3443
3444 *)
3445 # Figure out destination file name, if it wasn't already specified.
3446 if test -n "$destname"; then
3447 destfile="$destdir/$destname"
3448 else
3449 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3450 destfile="$destdir/$destfile"
3451 fi
3452
3453 # Do a test to see if this is really a libtool program.
3454 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
3455 link_against_libtool_libs=
3456 relink_command=
3457
3458 # If there is no directory component, then add one.
3459 case "$file" in
3460 */* | *\\*) . $file ;;
3461 *) . ./$file ;;
3462 esac
3463
3464 # Check the variables that should have been set.
3465 if test -z "$link_against_libtool_libs"; then
3466 $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
3467 exit 1
3468 fi
3469
3470 finalize=yes
3471 for lib in $link_against_libtool_libs; do
3472 # Check to see that each library is installed.
3473 libdir=
3474 if test -f "$lib"; then
3475 # If there is no directory component, then add one.
3476 case "$lib" in
3477 */* | *\\*) . $lib ;;
3478 *) . ./$lib ;;
3479 esac
3480 fi
3481 libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
3482 if test -n "$libdir" && test ! -f "$libfile"; then
3483 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
3484 finalize=no
3485 fi
3486 done
3487
3488 outputname=
3489 if test "$fast_install" = no && test -n "$relink_command"; then
3490 if test "$finalize" = yes && test -z "$run"; then
3491 tmpdir="/tmp"
3492 test -n "$TMPDIR" && tmpdir="$TMPDIR"
3493 tmpdir="$tmpdir/libtool-$$"
3494 if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
3495 else
3496 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
3497 continue
3498 fi
3499 outputname="$tmpdir/$file"
3500 # Replace the output file specification.
3501 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
3502
3503 $show "$relink_command"
3504 if $run eval "$relink_command"; then :
3505 else
3506 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
3507 ${rm}r "$tmpdir"
3508 continue
3509 fi
3510 file="$outputname"
3511 else
3512 $echo "$modename: warning: cannot relink \`$file'" 1>&2
3513 fi
3514 else
3515 # Install the binary that we compiled earlier.
3516 file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
3517 fi
3518 fi
3519
3520 $show "$install_prog$stripme $file $destfile"
3521 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
3522 test -n "$outputname" && ${rm}r "$tmpdir"
3523 ;;
3524 esac
3525 done
3526
3527 for file in $staticlibs; do
3528 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3529
3530 # Set up the ranlib parameters.
3531 oldlib="$destdir/$name"
3532
3533 $show "$install_prog $file $oldlib"
3534 $run eval "$install_prog \$file \$oldlib" || exit $?
3535
3536 # Do each command in the postinstall commands.
3537 eval cmds=\"$old_postinstall_cmds\"
3538 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3539 for cmd in $cmds; do
3540 IFS="$save_ifs"
3541 $show "$cmd"
3542 $run eval "$cmd" || exit $?
3543 done
3544 IFS="$save_ifs"
3545 done
3546
3547 if test -n "$future_libdirs"; then
3548 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
3549 fi
3550
3551 if test -n "$current_libdirs"; then
3552 # Maybe just do a dry run.
3553 test -n "$run" && current_libdirs=" -n$current_libdirs"
3554 exec $SHELL $0 --finish$current_libdirs
3555 exit 1
3556 fi
3557
3558 exit 0
3559 ;;
3560
3561 # libtool finish mode
3562 finish)
3563 modename="$modename: finish"
3564 libdirs="$nonopt"
3565 admincmds=
3566
3567 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
3568 for dir
3569 do
3570 libdirs="$libdirs $dir"
3571 done
3572
3573 for libdir in $libdirs; do
3574 if test -n "$finish_cmds"; then
3575 # Do each command in the finish commands.
3576 eval cmds=\"$finish_cmds\"
3577 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3578 for cmd in $cmds; do
3579 IFS="$save_ifs"
3580 $show "$cmd"
3581 $run eval "$cmd" || admincmds="$admincmds
3582 $cmd"
3583 done
3584 IFS="$save_ifs"
3585 fi
3586 if test -n "$finish_eval"; then
3587 # Do the single finish_eval.
3588 eval cmds=\"$finish_eval\"
3589 $run eval "$cmds" || admincmds="$admincmds
3590 $cmds"
3591 fi
3592 done
3593 fi
3594
3595 # Exit here if they wanted silent mode.
3596 test "$show" = : && exit 0
3597
3598 echo "----------------------------------------------------------------------"
3599 echo "Libraries have been installed in:"
3600 for libdir in $libdirs; do
3601 echo " $libdir"
3602 done
3603 echo
3604 echo "If you ever happen to want to link against installed libraries"
3605 echo "in a given directory, LIBDIR, you must either use libtool, and"
3606 echo "specify the full pathname of the library, or use \`-LLIBDIR'"
3607 echo "flag during linking and do at least one of the following:"
3608 if test -n "$shlibpath_var"; then
3609 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
3610 echo " during execution"
3611 fi
3612 if test -n "$runpath_var"; then
3613 echo " - add LIBDIR to the \`$runpath_var' environment variable"
3614 echo " during linking"
3615 fi
3616 if test -n "$hardcode_libdir_flag_spec"; then
3617 libdir=LIBDIR
3618 eval flag=\"$hardcode_libdir_flag_spec\"
3619
3620 echo " - use the \`$flag' linker flag"
3621 fi
3622 if test -n "$admincmds"; then
3623 echo " - have your system administrator run these commands:$admincmds"
3624 fi
3625 if test -f /etc/ld.so.conf; then
3626 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
3627 fi
3628 echo
3629 echo "See any operating system documentation about shared libraries for"
3630 echo "more information, such as the ld(1) and ld.so(8) manual pages."
3631 echo "----------------------------------------------------------------------"
3632 exit 0
3633 ;;
3634
3635 # libtool execute mode
3636 execute)
3637 modename="$modename: execute"
3638
3639 # The first argument is the command name.
3640 cmd="$nonopt"
3641 if test -z "$cmd"; then
3642 $echo "$modename: you must specify a COMMAND" 1>&2
3643 $echo "$help"
3644 exit 1
3645 fi
3646
3647 # Handle -dlopen flags immediately.
3648 for file in $execute_dlfiles; do
3649 if test ! -f "$file"; then
3650 $echo "$modename: \`$file' is not a file" 1>&2
3651 $echo "$help" 1>&2
3652 exit 1
3653 fi
3654
3655 dir=
3656 case "$file" in
3657 *.la)
3658 # Check to see that this really is a libtool archive.
3659 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
3660 else
3661 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
3662 $echo "$help" 1>&2
3663 exit 1
3664 fi
3665
3666 # Read the libtool library.
3667 dlname=
3668 library_names=
3669
3670 # If there is no directory component, then add one.
3671 case "$file" in
3672 */* | *\\*) . $file ;;
3673 *) . ./$file ;;
3674 esac
3675
3676 # Skip this library if it cannot be dlopened.
3677 if test -z "$dlname"; then
3678 # Warn if it was a shared library.
3679 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
3680 continue
3681 fi
3682
3683 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
3684 test "X$dir" = "X$file" && dir=.
3685
3686 if test -f "$dir/$objdir/$dlname"; then
3687 dir="$dir/$objdir"
3688 else
3689 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
3690 exit 1
3691 fi
3692 ;;
3693
3694 *.lo)
3695 # Just add the directory containing the .lo file.
3696 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
3697 test "X$dir" = "X$file" && dir=.
3698 ;;
3699
3700 *)
3701 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
3702 continue
3703 ;;
3704 esac
3705
3706 # Get the absolute pathname.
3707 absdir=`cd "$dir" && pwd`
3708 test -n "$absdir" && dir="$absdir"
3709
3710 # Now add the directory to shlibpath_var.
3711 if eval "test -z \"\$$shlibpath_var\""; then
3712 eval "$shlibpath_var=\"\$dir\""
3713 else
3714 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
3715 fi
3716 done
3717
3718 # This variable tells wrapper scripts just to set shlibpath_var
3719 # rather than running their programs.
3720 libtool_execute_magic="$magic"
3721
3722 # Check if any of the arguments is a wrapper script.
3723 args=
3724 for file
3725 do
3726 case "$file" in
3727 -*) ;;
3728 *)
3729 # Do a test to see if this is really a libtool program.
3730 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
3731 # If there is no directory component, then add one.
3732 case "$file" in
3733 */* | *\\*) . $file ;;
3734 *) . ./$file ;;
3735 esac
3736
3737 # Transform arg to wrapped name.
3738 file="$progdir/$program"
3739 fi
3740 ;;
3741 esac
3742 # Quote arguments (to preserve shell metacharacters).
3743 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
3744 args="$args \"$file\""
3745 done
3746
3747 if test -z "$run"; then
3748 if test -n "$shlibpath_var"; then
3749 # Export the shlibpath_var.
3750 eval "export $shlibpath_var"
3751 fi
3752
3753 # Restore saved enviroment variables
3754 if test "${save_LC_ALL+set}" = set; then
3755 LC_ALL="$save_LC_ALL"; export LC_ALL
3756 fi
3757 if test "${save_LANG+set}" = set; then
3758 LANG="$save_LANG"; export LANG
3759 fi
3760
3761 # Now actually exec the command.
3762 eval "exec \$cmd$args"
3763
3764 $echo "$modename: cannot exec \$cmd$args"
3765 exit 1
3766 else
3767 # Display what would be done.
3768 if test -n "$shlibpath_var"; then
3769 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
3770 $echo "export $shlibpath_var"
3771 fi
3772 $echo "$cmd$args"
3773 exit 0
3774 fi
3775 ;;
3776
3777 # libtool uninstall mode
3778 uninstall)
3779 modename="$modename: uninstall"
3780 rm="$nonopt"
3781 files=
3782
3783 for arg
3784 do
3785 case "$arg" in
3786 -*) rm="$rm $arg" ;;
3787 *) files="$files $arg" ;;
3788 esac
3789 done
3790
3791 if test -z "$rm"; then
3792 $echo "$modename: you must specify an RM program" 1>&2
3793 $echo "$help" 1>&2
3794 exit 1
3795 fi
3796
3797 for file in $files; do
3798 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
3799 test "X$dir" = "X$file" && dir=.
3800 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3801
3802 rmfiles="$file"
3803
3804 case "$name" in
3805 *.la)
3806 # Possibly a libtool archive, so verify it.
3807 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
3808 . $dir/$name
3809
3810 # Delete the libtool libraries and symlinks.
3811 for n in $library_names; do
3812 rmfiles="$rmfiles $dir/$n"
3813 done
3814 test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
3815
3816 $show "$rm $rmfiles"
3817 $run $rm $rmfiles
3818
3819 if test -n "$library_names"; then
3820 # Do each command in the postuninstall commands.
3821 eval cmds=\"$postuninstall_cmds\"
3822 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3823 for cmd in $cmds; do
3824 IFS="$save_ifs"
3825 $show "$cmd"
3826 $run eval "$cmd"
3827 done
3828 IFS="$save_ifs"
3829 fi
3830
3831 if test -n "$old_library"; then
3832 # Do each command in the old_postuninstall commands.
3833 eval cmds=\"$old_postuninstall_cmds\"
3834 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3835 for cmd in $cmds; do
3836 IFS="$save_ifs"
3837 $show "$cmd"
3838 $run eval "$cmd"
3839 done
3840 IFS="$save_ifs"
3841 fi
3842
3843 # FIXME: should reinstall the best remaining shared library.
3844 fi
3845 ;;
3846
3847 *.lo)
3848 if test "$build_old_libs" = yes; then
3849 oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
3850 rmfiles="$rmfiles $dir/$oldobj"
3851 fi
3852 $show "$rm $rmfiles"
3853 $run $rm $rmfiles
3854 ;;
3855
3856 *)
3857 $show "$rm $rmfiles"
3858 $run $rm $rmfiles
3859 ;;
3860 esac
3861 done
3862 exit 0
3863 ;;
3864
3865 "")
3866 $echo "$modename: you must specify a MODE" 1>&2
3867 $echo "$generic_help" 1>&2
3868 exit 1
3869 ;;
3870 esac
3871
3872 $echo "$modename: invalid operation mode \`$mode'" 1>&2
3873 $echo "$generic_help" 1>&2
3874 exit 1
3875 fi # test -z "$show_help"
3876
3877 # We need to display help for each of the modes.
3878 case "$mode" in
3879 "") $echo \
3880 "Usage: $modename [OPTION]... [MODE-ARG]...
3881
3882 Provide generalized library-building support services.
3883
3884 --config show all configuration variables
3885 --debug enable verbose shell tracing
3886 -n, --dry-run display commands without modifying any files
3887 --features display basic configuration information and exit
3888 --finish same as \`--mode=finish'
3889 --help display this help message and exit
3890 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
3891 --quiet same as \`--silent'
3892 --silent don't print informational messages
3893 --version print version information
3894
3895 MODE must be one of the following:
3896
3897 compile compile a source file into a libtool object
3898 execute automatically set library path, then run a program
3899 finish complete the installation of libtool libraries
3900 install install libraries or executables
3901 link create a library or an executable
3902 uninstall remove libraries from an installed directory
3903
3904 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
3905 a more detailed description of MODE."
3906 exit 0
3907 ;;
3908
3909 compile)
3910 $echo \
3911 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
3912
3913 Compile a source file into a libtool library object.
3914
3915 This mode accepts the following additional options:
3916
3917 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
3918 -static always build a \`.o' file suitable for static linking
3919
3920 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
3921 from the given SOURCEFILE.
3922
3923 The output file name is determined by removing the directory component from
3924 SOURCEFILE, then substituting the C source code suffix \`.c' with the
3925 library object suffix, \`.lo'."
3926 ;;
3927
3928 execute)
3929 $echo \
3930 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
3931
3932 Automatically set library path, then run a program.
3933
3934 This mode accepts the following additional options:
3935
3936 -dlopen FILE add the directory containing FILE to the library path
3937
3938 This mode sets the library path environment variable according to \`-dlopen'
3939 flags.
3940
3941 If any of the ARGS are libtool executable wrappers, then they are translated
3942 into their corresponding uninstalled binary, and any of their required library
3943 directories are added to the library path.
3944
3945 Then, COMMAND is executed, with ARGS as arguments."
3946 ;;
3947
3948 finish)
3949 $echo \
3950 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
3951
3952 Complete the installation of libtool libraries.
3953
3954 Each LIBDIR is a directory that contains libtool libraries.
3955
3956 The commands that this mode executes may require superuser privileges. Use
3957 the \`--dry-run' option if you just want to see what would be executed."
3958 ;;
3959
3960 install)
3961 $echo \
3962 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
3963
3964 Install executables or libraries.
3965
3966 INSTALL-COMMAND is the installation command. The first component should be
3967 either the \`install' or \`cp' program.
3968
3969 The rest of the components are interpreted as arguments to that command (only
3970 BSD-compatible install options are recognized)."
3971 ;;
3972
3973 link)
3974 $echo \
3975 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
3976
3977 Link object files or libraries together to form another library, or to
3978 create an executable program.
3979
3980 LINK-COMMAND is a command using the C compiler that you would use to create
3981 a program from several object files.
3982
3983 The following components of LINK-COMMAND are treated specially:
3984
3985 -all-static do not do any dynamic linking at all
3986 -avoid-version do not add a version suffix if possible
3987 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
3988 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
3989 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
3990 -export-symbols SYMFILE
3991 try to export only the symbols listed in SYMFILE
3992 -export-symbols-regex REGEX
3993 try to export only the symbols matching REGEX
3994 -LLIBDIR search LIBDIR for required installed libraries
3995 -lNAME OUTPUT-FILE requires the installed library libNAME
3996 -module build a library that can dlopened
3997 -no-undefined declare that a library does not refer to external symbols
3998 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
3999 -release RELEASE specify package release information
4000 -rpath LIBDIR the created library will eventually be installed in LIBDIR
4001 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
4002 -static do not do any dynamic linking of libtool libraries
4003 -version-info CURRENT[:REVISION[:AGE]]
4004 specify library version info [each variable defaults to 0]
4005
4006 All other options (arguments beginning with \`-') are ignored.
4007
4008 Every other argument is treated as a filename. Files ending in \`.la' are
4009 treated as uninstalled libtool libraries, other files are standard or library
4010 object files.
4011
4012 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
4013 only library objects (\`.lo' files) may be specified, and \`-rpath' is
4014 required, except when creating a convenience library.
4015
4016 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
4017 using \`ar' and \`ranlib', or on Windows using \`lib'.
4018
4019 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
4020 is created, otherwise an executable program is created."
4021 ;;
4022
4023 uninstall)
4024 $echo \
4025 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
4026
4027 Remove libraries from an installation directory.
4028
4029 RM is the name of the program to use to delete files associated with each FILE
4030 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
4031 to RM.
4032
4033 If FILE is a libtool library, all the files associated with it are deleted.
4034 Otherwise, only FILE itself is deleted using RM."
4035 ;;
4036
4037 *)
4038 $echo "$modename: invalid operation mode \`$mode'" 1>&2
4039 $echo "$help" 1>&2
4040 exit 1
4041 ;;
4042 esac
4043
4044 echo
4045 $echo "Try \`$modename --help' for more information about other modes."
4046
4047 exit 0
4048
4049 # Local Variables:
4050 # mode:shell-script
4051 # sh-indentation:2
4052 # End:
+0
-336
saslauthd/config/missing less more
0 #! /bin/sh
1 # Common stub for a few missing GNU programs while installing.
2 # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
3 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
8 # any later version.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 # 02111-1307, USA.
19
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that program.
24
25 if test $# -eq 0; then
26 echo 1>&2 "Try \`$0 --help' for more information"
27 exit 1
28 fi
29
30 run=:
31
32 # In the cases where this matters, `missing' is being run in the
33 # srcdir already.
34 if test -f configure.ac; then
35 configure_ac=configure.ac
36 else
37 configure_ac=configure.in
38 fi
39
40 case "$1" in
41 --run)
42 # Try to run requested program, and just exit if it succeeds.
43 run=
44 shift
45 "$@" && exit 0
46 ;;
47 esac
48
49 # If it does not exist, or fails to run (possibly an outdated version),
50 # try to emulate it.
51 case "$1" in
52
53 -h|--h|--he|--hel|--help)
54 echo "\
55 $0 [OPTION]... PROGRAM [ARGUMENT]...
56
57 Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
58 error status if there is no known handling for PROGRAM.
59
60 Options:
61 -h, --help display this help and exit
62 -v, --version output version information and exit
63 --run try to run the given command, and emulate it if it fails
64
65 Supported PROGRAM values:
66 aclocal touch file \`aclocal.m4'
67 autoconf touch file \`configure'
68 autoheader touch file \`config.h.in'
69 automake touch all \`Makefile.in' files
70 bison create \`y.tab.[ch]', if possible, from existing .[ch]
71 flex create \`lex.yy.c', if possible, from existing .c
72 help2man touch the output file
73 lex create \`lex.yy.c', if possible, from existing .c
74 makeinfo touch the output file
75 tar try tar, gnutar, gtar, then tar without non-portable flags
76 yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
77 ;;
78
79 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
80 echo "missing 0.4 - GNU automake"
81 ;;
82
83 -*)
84 echo 1>&2 "$0: Unknown \`$1' option"
85 echo 1>&2 "Try \`$0 --help' for more information"
86 exit 1
87 ;;
88
89 aclocal*)
90 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
91 # We have it, but it failed.
92 exit 1
93 fi
94
95 echo 1>&2 "\
96 WARNING: \`$1' is missing on your system. You should only need it if
97 you modified \`acinclude.m4' or \`${configure_ac}'. You might want
98 to install the \`Automake' and \`Perl' packages. Grab them from
99 any GNU archive site."
100 touch aclocal.m4
101 ;;
102
103 autoconf)
104 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
105 # We have it, but it failed.
106 exit 1
107 fi
108
109 echo 1>&2 "\
110 WARNING: \`$1' is missing on your system. You should only need it if
111 you modified \`${configure_ac}'. You might want to install the
112 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
113 archive site."
114 touch configure
115 ;;
116
117 autoheader)
118 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
119 # We have it, but it failed.
120 exit 1
121 fi
122
123 echo 1>&2 "\
124 WARNING: \`$1' is missing on your system. You should only need it if
125 you modified \`acconfig.h' or \`${configure_ac}'. You might want
126 to install the \`Autoconf' and \`GNU m4' packages. Grab them
127 from any GNU archive site."
128 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
129 test -z "$files" && files="config.h"
130 touch_files=
131 for f in $files; do
132 case "$f" in
133 *:*) touch_files="$touch_files "`echo "$f" |
134 sed -e 's/^[^:]*://' -e 's/:.*//'`;;
135 *) touch_files="$touch_files $f.in";;
136 esac
137 done
138 touch $touch_files
139 ;;
140
141 automake*)
142 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
143 # We have it, but it failed.
144 exit 1
145 fi
146
147 echo 1>&2 "\
148 WARNING: \`$1' is missing on your system. You should only need it if
149 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
150 You might want to install the \`Automake' and \`Perl' packages.
151 Grab them from any GNU archive site."
152 find . -type f -name Makefile.am -print |
153 sed 's/\.am$/.in/' |
154 while read f; do touch "$f"; done
155 ;;
156
157 autom4te)
158 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
159 # We have it, but it failed.
160 exit 1
161 fi
162
163 echo 1>&2 "\
164 WARNING: \`$1' is needed, and you do not seem to have it handy on your
165 system. You might have modified some files without having the
166 proper tools for further handling them.
167 You can get \`$1Help2man' as part of \`Autoconf' from any GNU
168 archive site."
169
170 file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
171 test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
172 if test -f "$file"; then
173 touch $file
174 else
175 test -z "$file" || exec >$file
176 echo "#! /bin/sh"
177 echo "# Created by GNU Automake missing as a replacement of"
178 echo "# $ $@"
179 echo "exit 0"
180 chmod +x $file
181 exit 1
182 fi
183 ;;
184
185 bison|yacc)
186 echo 1>&2 "\
187 WARNING: \`$1' is missing on your system. You should only need it if
188 you modified a \`.y' file. You may need the \`Bison' package
189 in order for those modifications to take effect. You can get
190 \`Bison' from any GNU archive site."
191 rm -f y.tab.c y.tab.h
192 if [ $# -ne 1 ]; then
193 eval LASTARG="\${$#}"
194 case "$LASTARG" in
195 *.y)
196 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
197 if [ -f "$SRCFILE" ]; then
198 cp "$SRCFILE" y.tab.c
199 fi
200 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
201 if [ -f "$SRCFILE" ]; then
202 cp "$SRCFILE" y.tab.h
203 fi
204 ;;
205 esac
206 fi
207 if [ ! -f y.tab.h ]; then
208 echo >y.tab.h
209 fi
210 if [ ! -f y.tab.c ]; then
211 echo 'main() { return 0; }' >y.tab.c
212 fi
213 ;;
214
215 lex|flex)
216 echo 1>&2 "\
217 WARNING: \`$1' is missing on your system. You should only need it if
218 you modified a \`.l' file. You may need the \`Flex' package
219 in order for those modifications to take effect. You can get
220 \`Flex' from any GNU archive site."
221 rm -f lex.yy.c
222 if [ $# -ne 1 ]; then
223 eval LASTARG="\${$#}"
224 case "$LASTARG" in
225 *.l)
226 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
227 if [ -f "$SRCFILE" ]; then
228 cp "$SRCFILE" lex.yy.c
229 fi
230 ;;
231 esac
232 fi
233 if [ ! -f lex.yy.c ]; then
234 echo 'main() { return 0; }' >lex.yy.c
235 fi
236 ;;
237
238 help2man)
239 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
240 # We have it, but it failed.
241 exit 1
242 fi
243
244 echo 1>&2 "\
245 WARNING: \`$1' is missing on your system. You should only need it if
246 you modified a dependency of a manual page. You may need the
247 \`Help2man' package in order for those modifications to take
248 effect. You can get \`Help2man' from any GNU archive site."
249
250 file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
251 if test -z "$file"; then
252 file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
253 fi
254 if [ -f "$file" ]; then
255 touch $file
256 else
257 test -z "$file" || exec >$file
258 echo ".ab help2man is required to generate this page"
259 exit 1
260 fi
261 ;;
262
263 makeinfo)
264 if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
265 # We have makeinfo, but it failed.
266 exit 1
267 fi
268
269 echo 1>&2 "\
270 WARNING: \`$1' is missing on your system. You should only need it if
271 you modified a \`.texi' or \`.texinfo' file, or any other file
272 indirectly affecting the aspect of the manual. The spurious
273 call might also be the consequence of using a buggy \`make' (AIX,
274 DU, IRIX). You might want to install the \`Texinfo' package or
275 the \`GNU make' package. Grab either from any GNU archive site."
276 file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
277 if test -z "$file"; then
278 file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
279 file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
280 fi
281 touch $file
282 ;;
283
284 tar)
285 shift
286 if test -n "$run"; then
287 echo 1>&2 "ERROR: \`tar' requires --run"
288 exit 1
289 fi
290
291 # We have already tried tar in the generic part.
292 # Look for gnutar/gtar before invocation to avoid ugly error
293 # messages.
294 if (gnutar --version > /dev/null 2>&1); then
295 gnutar "$@" && exit 0
296 fi
297 if (gtar --version > /dev/null 2>&1); then
298 gtar "$@" && exit 0
299 fi
300 firstarg="$1"
301 if shift; then
302 case "$firstarg" in
303 *o*)
304 firstarg=`echo "$firstarg" | sed s/o//`
305 tar "$firstarg" "$@" && exit 0
306 ;;
307 esac
308 case "$firstarg" in
309 *h*)
310 firstarg=`echo "$firstarg" | sed s/h//`
311 tar "$firstarg" "$@" && exit 0
312 ;;
313 esac
314 fi
315
316 echo 1>&2 "\
317 WARNING: I can't seem to be able to run \`tar' with the given arguments.
318 You may want to install GNU tar or Free paxutils, or check the
319 command line arguments."
320 exit 1
321 ;;
322
323 *)
324 echo 1>&2 "\
325 WARNING: \`$1' is needed, and you do not seem to have it handy on your
326 system. You might have modified some files without having the
327 proper tools for further handling them. Check the \`README' file,
328 it often tells you about the needed prerequirements for installing
329 this package. You may also peek at any GNU archive site, in case
330 some other package would contain this missing \`$1' program."
331 exit 1
332 ;;
333 esac
334
335 exit 0
+0
-111
saslauthd/config/mkinstalldirs less more
0 #! /bin/sh
1 # mkinstalldirs --- make directory hierarchy
2 # Author: Noah Friedman <friedman@prep.ai.mit.edu>
3 # Created: 1993-05-16
4 # Public domain
5
6 errstatus=0
7 dirmode=""
8
9 usage="\
10 Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
11
12 # process command line arguments
13 while test $# -gt 0 ; do
14 case $1 in
15 -h | --help | --h*) # -h for help
16 echo "$usage" 1>&2
17 exit 0
18 ;;
19 -m) # -m PERM arg
20 shift
21 test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
22 dirmode=$1
23 shift
24 ;;
25 --) # stop option processing
26 shift
27 break
28 ;;
29 -*) # unknown option
30 echo "$usage" 1>&2
31 exit 1
32 ;;
33 *) # first non-opt arg
34 break
35 ;;
36 esac
37 done
38
39 for file
40 do
41 if test -d "$file"; then
42 shift
43 else
44 break
45 fi
46 done
47
48 case $# in
49 0) exit 0 ;;
50 esac
51
52 case $dirmode in
53 '')
54 if mkdir -p -- . 2>/dev/null; then
55 echo "mkdir -p -- $*"
56 exec mkdir -p -- "$@"
57 fi
58 ;;
59 *)
60 if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
61 echo "mkdir -m $dirmode -p -- $*"
62 exec mkdir -m "$dirmode" -p -- "$@"
63 fi
64 ;;
65 esac
66
67 for file
68 do
69 set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
70 shift
71
72 pathcomp=
73 for d
74 do
75 pathcomp="$pathcomp$d"
76 case $pathcomp in
77 -*) pathcomp=./$pathcomp ;;
78 esac
79
80 if test ! -d "$pathcomp"; then
81 echo "mkdir $pathcomp"
82
83 mkdir "$pathcomp" || lasterr=$?
84
85 if test ! -d "$pathcomp"; then
86 errstatus=$lasterr
87 else
88 if test ! -z "$dirmode"; then
89 echo "chmod $dirmode $pathcomp"
90 lasterr=""
91 chmod "$dirmode" "$pathcomp" || lasterr=$?
92
93 if test ! -z "$lasterr"; then
94 errstatus=$lasterr
95 fi
96 fi
97 fi
98 fi
99
100 pathcomp="$pathcomp/"
101 done
102 done
103
104 exit $errstatus
105
106 # Local Variables:
107 # mode: shell-script
108 # sh-indentation: 2
109 # End:
110 # mkinstalldirs ends here
+0
-32
saslauthd/config/plain.m4 less more
0 dnl Check for PLAIN (and therefore crypt)
1
2 AC_DEFUN([SASL_PLAIN_CHK],[
3 AC_REQUIRE([SASL2_CRYPT_CHK])
4
5 dnl PLAIN
6 AC_ARG_ENABLE(plain, [ --enable-plain enable PLAIN authentication [yes] ],
7 plain=$enableval,
8 plain=yes)
9
10 PLAIN_LIBS=""
11 if test "$plain" != no; then
12 dnl In order to compile plain, we need crypt.
13 if test "$cmu_have_crypt" = yes; then
14 PLAIN_LIBS=$LIB_CRYPT
15 fi
16 fi
17 AC_SUBST(PLAIN_LIBS)
18
19 AC_MSG_CHECKING(PLAIN)
20 if test "$plain" != no; then
21 AC_MSG_RESULT(enabled)
22 SASL_MECHS="$SASL_MECHS libplain.la"
23 if test "$enable_static" = yes; then
24 SASL_STATIC_OBJS="$SASL_STATIC_OBJS plain.o"
25 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/plain.c"
26 AC_DEFINE(STATIC_PLAIN,[],[Link PLAIN Staticly])
27 fi
28 else
29 AC_MSG_RESULT(disabled)
30 fi
31 ])
+0
-156
saslauthd/config/sasldb.m4 less more
0 dnl Functions to check what database to use for libsasldb
1
2 dnl Berkeley DB specific checks first..
3
4 dnl Figure out what database type we're using
5 AC_DEFUN([SASL_DB_CHECK], [
6 cmu_save_LIBS="$LIBS"
7 AC_ARG_WITH(dblib, [ --with-dblib=DBLIB set the DB library to use [berkeley] ],
8 dblib=$withval,
9 dblib=auto_detect)
10
11 CYRUS_BERKELEY_DB_OPTS()
12
13 SASL_DB_LIB=""
14
15 case "$dblib" in
16 dnl this is unbelievably painful due to confusion over what db-3 should be
17 dnl named. arg.
18 berkeley)
19 CYRUS_BERKELEY_DB_CHK()
20 CPPFLAGS="${CPPFLAGS} ${BDB_INCADD}"
21 SASL_DB_INC=$BDB_INCADD
22 SASL_DB_LIB="${BDB_LIBADD}"
23 ;;
24 gdbm)
25 AC_ARG_WITH(gdbm,[ --with-gdbm=PATH use gdbm from PATH],
26 with_gdbm="${withval}")
27
28 case "$with_gdbm" in
29 ""|yes)
30 AC_CHECK_HEADER(gdbm.h, [
31 AC_CHECK_LIB(gdbm, gdbm_open, SASL_DB_LIB="-lgdbm",
32 dblib="no")],
33 dblib="no")
34 ;;
35 *)
36 if test -d $with_gdbm; then
37 CPPFLAGS="${CPPFLAGS} -I${with_gdbm}/include"
38 LDFLAGS="${LDFLAGS} -L${with_gdbm}/lib"
39 SASL_DB_LIB="-lgdbm"
40 else
41 with_gdbm="no"
42 fi
43 esac
44 ;;
45 ndbm)
46 dnl We want to attempt to use -lndbm if we can, just in case
47 dnl there's some version of it installed and overriding libc
48 AC_CHECK_HEADER(ndbm.h, [
49 AC_CHECK_LIB(ndbm, dbm_open, SASL_DB_LIB="-lndbm", [
50 AC_CHECK_FUNC(dbm_open,,dblib="no")])],
51 dblib="no")
52 ;;
53 auto_detect)
54 dnl How about berkeley db?
55 CYRUS_BERKELEY_DB_CHK()
56 if test "$dblib" = no; then
57 dnl How about ndbm?
58 AC_CHECK_HEADER(ndbm.h, [
59 AC_CHECK_LIB(ndbm, dbm_open,
60 dblib="ndbm"; SASL_DB_LIB="-lndbm",
61 dblib="weird")],
62 dblib="no")
63 if test "$dblib" = "weird"; then
64 dnl Is ndbm in the standard library?
65 AC_CHECK_FUNC(dbm_open, dblib="ndbm", dblib="no")
66 fi
67
68 if test "$dblib" = no; then
69 dnl Can we use gdbm?
70 AC_CHECK_HEADER(gdbm.h, [
71 AC_CHECK_LIB(gdbm, gdbm_open, dblib="gdbm";
72 SASL_DB_LIB="-lgdbm", dblib="no")],
73 dblib="no")
74 fi
75 else
76 dnl we took Berkeley
77 CPPFLAGS="${CPPFLAGS} ${BDB_INCADD}"
78 SASL_DB_INC=$BDB_INCADD
79 SASL_DB_LIB="${BDB_LIBADD}"
80 fi
81 ;;
82 none)
83 ;;
84 no)
85 ;;
86 *)
87 AC_MSG_WARN([Bad DB library implementation specified;])
88 AC_ERROR([Use either \"berkeley\", \"gdbm\", \"ndbm\" or \"none\"])
89 dblib=no
90 ;;
91 esac
92 LIBS="$cmu_save_LIBS"
93
94 AC_MSG_CHECKING(DB library to use)
95 AC_MSG_RESULT($dblib)
96
97 SASL_DB_BACKEND="db_${dblib}.lo"
98 SASL_DB_BACKEND_STATIC="db_${dblib}.o allockey.o"
99 SASL_DB_BACKEND_STATIC_SRCS="\$(top_srcdir)/sasldb/db_${dblib}.c \$(top_srcdir)/sasldb/allockey.c"
100 SASL_DB_UTILS="saslpasswd2 sasldblistusers2"
101 SASL_DB_MANS="saslpasswd2.8 sasldblistusers2.8"
102
103 case "$dblib" in
104 gdbm)
105 SASL_MECHS="$SASL_MECHS libsasldb.la"
106 AC_DEFINE(SASL_GDBM,[],[Use GDBM for SASLdb])
107 ;;
108 ndbm)
109 SASL_MECHS="$SASL_MECHS libsasldb.la"
110 AC_DEFINE(SASL_NDBM,[],[Use NDBM for SASLdb])
111 ;;
112 berkeley)
113 SASL_MECHS="$SASL_MECHS libsasldb.la"
114 AC_DEFINE(SASL_BERKELEYDB,[],[Use BerkeleyDB for SASLdb])
115 ;;
116 *)
117 AC_MSG_WARN([Disabling SASL authentication database support])
118 dnl note that we do not add libsasldb.la to SASL_MECHS, since it
119 dnl will just fail to load anyway.
120 SASL_DB_BACKEND="db_none.lo"
121 SASL_DB_BACKEND_STATIC="db_none.o"
122 SASL_DB_BACKEND_STATIC_SRCS="\$(top_srcdir)/sasldb/db_none.c"
123 SASL_DB_UTILS=""
124 SASL_DB_MANS=""
125 SASL_DB_LIB=""
126 ;;
127 esac
128
129 if test "$enable_static" = yes; then
130 if test "$dblib" != "none"; then
131 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/sasldb.c $SASL_DB_BACKEND_STATIC_SRCS"
132 SASL_STATIC_OBJS="$SASL_STATIC_OBJS sasldb.o $SASL_DB_BACKEND_STATIC"
133 AC_DEFINE(STATIC_SASLDB,[],[Link SASLdb Staticly])
134 else
135 SASL_STATIC_OBJS="$SASL_STATIC_OBJS $SASL_DB_BACKEND_STATIC"
136 SASL_STATIC_SRCS="$SASL_STATIC_SRCS $SASL_DB_BACKEND_STATIC_SRCS"
137 fi
138 fi
139
140 AC_SUBST(SASL_DB_UTILS)
141 AC_SUBST(SASL_DB_MANS)
142 AC_SUBST(SASL_DB_BACKEND)
143 AC_SUBST(SASL_DB_BACKEND_STATIC)
144 AC_SUBST(SASL_DB_INC)
145 AC_SUBST(SASL_DB_LIB)
146 ])
147
148 dnl Figure out what database path we're using
149 AC_DEFUN([SASL_DB_PATH_CHECK], [
150 AC_ARG_WITH(dbpath, [ --with-dbpath=PATH set the DB path to use [/etc/sasldb2] ],
151 dbpath=$withval,
152 dbpath=/etc/sasldb2)
153 AC_MSG_CHECKING(DB path to use)
154 AC_MSG_RESULT($dbpath)
155 AC_DEFINE_UNQUOTED(SASL_DB_PATH, "$dbpath", [Path to default SASLdb database])])
+0
-15984
saslauthd/configure less more
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.63.
3 #
4 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
5 # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
6 # This configure script is free software; the Free Software Foundation
7 # gives unlimited permission to copy, distribute and modify it.
8 ## --------------------- ##
9 ## M4sh Initialization. ##
10 ## --------------------- ##
11
12 # Be more Bourne compatible
13 DUALCASE=1; export DUALCASE # for MKS sh
14 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15 emulate sh
16 NULLCMD=:
17 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18 # is contrary to our usage. Disable this feature.
19 alias -g '${1+"$@"}'='"$@"'
20 setopt NO_GLOB_SUBST
21 else
22 case `(set -o) 2>/dev/null` in
23 *posix*) set -o posix ;;
24 esac
25
26 fi
27
28
29
30
31 # PATH needs CR
32 # Avoid depending upon Character Ranges.
33 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
35 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36 as_cr_digits='0123456789'
37 as_cr_alnum=$as_cr_Letters$as_cr_digits
38
39 as_nl='
40 '
41 export as_nl
42 # Printing a long string crashes Solaris 7 /usr/bin/printf.
43 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='printf %s\n'
48 as_echo_n='printf %s'
49 else
50 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
52 as_echo_n='/usr/ucb/echo -n'
53 else
54 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
55 as_echo_n_body='eval
56 arg=$1;
57 case $arg in
58 *"$as_nl"*)
59 expr "X$arg" : "X\\(.*\\)$as_nl";
60 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
61 esac;
62 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
63 '
64 export as_echo_n_body
65 as_echo_n='sh -c $as_echo_n_body as_echo'
66 fi
67 export as_echo_body
68 as_echo='sh -c $as_echo_body as_echo'
69 fi
70
71 # The user is always right.
72 if test "${PATH_SEPARATOR+set}" != set; then
73 PATH_SEPARATOR=:
74 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
75 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
76 PATH_SEPARATOR=';'
77 }
78 fi
79
80 # Support unset when possible.
81 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
82 as_unset=unset
83 else
84 as_unset=false
85 fi
86
87
88 # IFS
89 # We need space, tab and new line, in precisely that order. Quoting is
90 # there to prevent editors from complaining about space-tab.
91 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
92 # splitting by setting IFS to empty value.)
93 IFS=" "" $as_nl"
94
95 # Find who we are. Look in the path if we contain no directory separator.
96 case $0 in
97 *[\\/]* ) as_myself=$0 ;;
98 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
99 for as_dir in $PATH
100 do
101 IFS=$as_save_IFS
102 test -z "$as_dir" && as_dir=.
103 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104 done
105 IFS=$as_save_IFS
106
107 ;;
108 esac
109 # We did not find ourselves, most probably we were run as `sh COMMAND'
110 # in which case we are not to be found in the path.
111 if test "x$as_myself" = x; then
112 as_myself=$0
113 fi
114 if test ! -f "$as_myself"; then
115 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 { (exit 1); exit 1; }
117 fi
118
119 # Work around bugs in pre-3.0 UWIN ksh.
120 for as_var in ENV MAIL MAILPATH
121 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
122 done
123 PS1='$ '
124 PS2='> '
125 PS4='+ '
126
127 # NLS nuisances.
128 LC_ALL=C
129 export LC_ALL
130 LANGUAGE=C
131 export LANGUAGE
132
133 # Required to use basename.
134 if expr a : '\(a\)' >/dev/null 2>&1 &&
135 test "X`expr 00001 : '.*\(...\)'`" = X001; then
136 as_expr=expr
137 else
138 as_expr=false
139 fi
140
141 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
142 as_basename=basename
143 else
144 as_basename=false
145 fi
146
147
148 # Name of the executable.
149 as_me=`$as_basename -- "$0" ||
150 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
151 X"$0" : 'X\(//\)$' \| \
152 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
153 $as_echo X/"$0" |
154 sed '/^.*\/\([^/][^/]*\)\/*$/{
155 s//\1/
156 q
157 }
158 /^X\/\(\/\/\)$/{
159 s//\1/
160 q
161 }
162 /^X\/\(\/\).*/{
163 s//\1/
164 q
165 }
166 s/.*/./; q'`
167
168 # CDPATH.
169 $as_unset CDPATH
170
171
172 if test "x$CONFIG_SHELL" = x; then
173 if (eval ":") 2>/dev/null; then
174 as_have_required=yes
175 else
176 as_have_required=no
177 fi
178
179 if test $as_have_required = yes && (eval ":
180 (as_func_return () {
181 (exit \$1)
182 }
183 as_func_success () {
184 as_func_return 0
185 }
186 as_func_failure () {
187 as_func_return 1
188 }
189 as_func_ret_success () {
190 return 0
191 }
192 as_func_ret_failure () {
193 return 1
194 }
195
196 exitcode=0
197 if as_func_success; then
198 :
199 else
200 exitcode=1
201 echo as_func_success failed.
202 fi
203
204 if as_func_failure; then
205 exitcode=1
206 echo as_func_failure succeeded.
207 fi
208
209 if as_func_ret_success; then
210 :
211 else
212 exitcode=1
213 echo as_func_ret_success failed.
214 fi
215
216 if as_func_ret_failure; then
217 exitcode=1
218 echo as_func_ret_failure succeeded.
219 fi
220
221 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
222 :
223 else
224 exitcode=1
225 echo positional parameters were not saved.
226 fi
227
228 test \$exitcode = 0) || { (exit 1); exit 1; }
229
230 (
231 as_lineno_1=\$LINENO
232 as_lineno_2=\$LINENO
233 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
234 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
235 ") 2> /dev/null; then
236 :
237 else
238 as_candidate_shells=
239 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
240 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
241 do
242 IFS=$as_save_IFS
243 test -z "$as_dir" && as_dir=.
244 case $as_dir in
245 /*)
246 for as_base in sh bash ksh sh5; do
247 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
248 done;;
249 esac
250 done
251 IFS=$as_save_IFS
252
253
254 for as_shell in $as_candidate_shells $SHELL; do
255 # Try only shells that exist, to save several forks.
256 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
257 { ("$as_shell") 2> /dev/null <<\_ASEOF
258 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
259 emulate sh
260 NULLCMD=:
261 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
262 # is contrary to our usage. Disable this feature.
263 alias -g '${1+"$@"}'='"$@"'
264 setopt NO_GLOB_SUBST
265 else
266 case `(set -o) 2>/dev/null` in
267 *posix*) set -o posix ;;
268 esac
269
270 fi
271
272
273 :
274 _ASEOF
275 }; then
276 CONFIG_SHELL=$as_shell
277 as_have_required=yes
278 if { "$as_shell" 2> /dev/null <<\_ASEOF
279 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
280 emulate sh
281 NULLCMD=:
282 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
283 # is contrary to our usage. Disable this feature.
284 alias -g '${1+"$@"}'='"$@"'
285 setopt NO_GLOB_SUBST
286 else
287 case `(set -o) 2>/dev/null` in
288 *posix*) set -o posix ;;
289 esac
290
291 fi
292
293
294 :
295 (as_func_return () {
296 (exit $1)
297 }
298 as_func_success () {
299 as_func_return 0
300 }
301 as_func_failure () {
302 as_func_return 1
303 }
304 as_func_ret_success () {
305 return 0
306 }
307 as_func_ret_failure () {
308 return 1
309 }
310
311 exitcode=0
312 if as_func_success; then
313 :
314 else
315 exitcode=1
316 echo as_func_success failed.
317 fi
318
319 if as_func_failure; then
320 exitcode=1
321 echo as_func_failure succeeded.
322 fi
323
324 if as_func_ret_success; then
325 :
326 else
327 exitcode=1
328 echo as_func_ret_success failed.
329 fi
330
331 if as_func_ret_failure; then
332 exitcode=1
333 echo as_func_ret_failure succeeded.
334 fi
335
336 if ( set x; as_func_ret_success y && test x = "$1" ); then
337 :
338 else
339 exitcode=1
340 echo positional parameters were not saved.
341 fi
342
343 test $exitcode = 0) || { (exit 1); exit 1; }
344
345 (
346 as_lineno_1=$LINENO
347 as_lineno_2=$LINENO
348 test "x$as_lineno_1" != "x$as_lineno_2" &&
349 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
350
351 _ASEOF
352 }; then
353 break
354 fi
355
356 fi
357
358 done
359
360 if test "x$CONFIG_SHELL" != x; then
361 for as_var in BASH_ENV ENV
362 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
363 done
364 export CONFIG_SHELL
365 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
366 fi
367
368
369 if test $as_have_required = no; then
370 echo This script requires a shell more modern than all the
371 echo shells that I found on your system. Please install a
372 echo modern shell, or manually run the script under such a
373 echo shell if you do have one.
374 { (exit 1); exit 1; }
375 fi
376
377
378 fi
379
380 fi
381
382
383
384 (eval "as_func_return () {
385 (exit \$1)
386 }
387 as_func_success () {
388 as_func_return 0
389 }
390 as_func_failure () {
391 as_func_return 1
392 }
393 as_func_ret_success () {
394 return 0
395 }
396 as_func_ret_failure () {
397 return 1
398 }
399
400 exitcode=0
401 if as_func_success; then
402 :
403 else
404 exitcode=1
405 echo as_func_success failed.
406 fi
407
408 if as_func_failure; then
409 exitcode=1
410 echo as_func_failure succeeded.
411 fi
412
413 if as_func_ret_success; then
414 :
415 else
416 exitcode=1
417 echo as_func_ret_success failed.
418 fi
419
420 if as_func_ret_failure; then
421 exitcode=1
422 echo as_func_ret_failure succeeded.
423 fi
424
425 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
426 :
427 else
428 exitcode=1
429 echo positional parameters were not saved.
430 fi
431
432 test \$exitcode = 0") || {
433 echo No shell found that supports shell functions.
434 echo Please tell bug-autoconf@gnu.org about your system,
435 echo including any error possibly output before this message.
436 echo This can help us improve future autoconf versions.
437 echo Configuration will now proceed without shell functions.
438 }
439
440
441
442 as_lineno_1=$LINENO
443 as_lineno_2=$LINENO
444 test "x$as_lineno_1" != "x$as_lineno_2" &&
445 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
446
447 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
448 # uniformly replaced by the line number. The first 'sed' inserts a
449 # line-number line after each line using $LINENO; the second 'sed'
450 # does the real work. The second script uses 'N' to pair each
451 # line-number line with the line containing $LINENO, and appends
452 # trailing '-' during substitution so that $LINENO is not a special
453 # case at line end.
454 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
455 # scripts with optimization help from Paolo Bonzini. Blame Lee
456 # E. McMahon (1931-1989) for sed's syntax. :-)
457 sed -n '
458 p
459 /[$]LINENO/=
460 ' <$as_myself |
461 sed '
462 s/[$]LINENO.*/&-/
463 t lineno
464 b
465 :lineno
466 N
467 :loop
468 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
469 t loop
470 s/-\n.*//
471 ' >$as_me.lineno &&
472 chmod +x "$as_me.lineno" ||
473 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
474 { (exit 1); exit 1; }; }
475
476 # Don't try to exec as it changes $[0], causing all sort of problems
477 # (the dirname of $[0] is not the place where we might find the
478 # original and so on. Autoconf is especially sensitive to this).
479 . "./$as_me.lineno"
480 # Exit status is that of the last command.
481 exit
482 }
483
484
485 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
486 as_dirname=dirname
487 else
488 as_dirname=false
489 fi
490
491 ECHO_C= ECHO_N= ECHO_T=
492 case `echo -n x` in
493 -n*)
494 case `echo 'x\c'` in
495 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
496 *) ECHO_C='\c';;
497 esac;;
498 *)
499 ECHO_N='-n';;
500 esac
501 if expr a : '\(a\)' >/dev/null 2>&1 &&
502 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503 as_expr=expr
504 else
505 as_expr=false
506 fi
507
508 rm -f conf$$ conf$$.exe conf$$.file
509 if test -d conf$$.dir; then
510 rm -f conf$$.dir/conf$$.file
511 else
512 rm -f conf$$.dir
513 mkdir conf$$.dir 2>/dev/null
514 fi
515 if (echo >conf$$.file) 2>/dev/null; then
516 if ln -s conf$$.file conf$$ 2>/dev/null; then
517 as_ln_s='ln -s'
518 # ... but there are two gotchas:
519 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
520 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
521 # In both cases, we have to default to `cp -p'.
522 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
523 as_ln_s='cp -p'
524 elif ln conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s=ln
526 else
527 as_ln_s='cp -p'
528 fi
529 else
530 as_ln_s='cp -p'
531 fi
532 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
533 rmdir conf$$.dir 2>/dev/null
534
535 if mkdir -p . 2>/dev/null; then
536 as_mkdir_p=:
537 else
538 test -d ./-p && rmdir ./-p
539 as_mkdir_p=false
540 fi
541
542 if test -x / >/dev/null 2>&1; then
543 as_test_x='test -x'
544 else
545 if ls -dL / >/dev/null 2>&1; then
546 as_ls_L_option=L
547 else
548 as_ls_L_option=
549 fi
550 as_test_x='
551 eval sh -c '\''
552 if test -d "$1"; then
553 test -d "$1/.";
554 else
555 case $1 in
556 -*)set "./$1";;
557 esac;
558 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
559 ???[sx]*):;;*)false;;esac;fi
560 '\'' sh
561 '
562 fi
563 as_executable_p=$as_test_x
564
565 # Sed expression to map a string onto a valid CPP name.
566 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
567
568 # Sed expression to map a string onto a valid variable name.
569 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
570
571
572
573 exec 7<&0 </dev/null 6>&1
574
575 # Name of the host.
576 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
577 # so uname gets run too.
578 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
579
580 #
581 # Initializations.
582 #
583 ac_default_prefix=/usr/local
584 ac_clean_files=
585 ac_config_libobj_dir=.
586 LIBOBJS=
587 cross_compiling=no
588 subdirs=
589 MFLAGS=
590 MAKEFLAGS=
591 SHELL=${CONFIG_SHELL-/bin/sh}
592
593 # Identity of this package.
594 PACKAGE_NAME=
595 PACKAGE_TARNAME=
596 PACKAGE_VERSION=
597 PACKAGE_STRING=
598 PACKAGE_BUGREPORT=
599
600 ac_unique_file="mechanisms.h"
601 # Factoring default headers for most tests.
602 ac_includes_default="\
603 #include <stdio.h>
604 #ifdef HAVE_SYS_TYPES_H
605 # include <sys/types.h>
606 #endif
607 #ifdef HAVE_SYS_STAT_H
608 # include <sys/stat.h>
609 #endif
610 #ifdef STDC_HEADERS
611 # include <stdlib.h>
612 # include <stddef.h>
613 #else
614 # ifdef HAVE_STDLIB_H
615 # include <stdlib.h>
616 # endif
617 #endif
618 #ifdef HAVE_STRING_H
619 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
620 # include <memory.h>
621 # endif
622 # include <string.h>
623 #endif
624 #ifdef HAVE_STRINGS_H
625 # include <strings.h>
626 #endif
627 #ifdef HAVE_INTTYPES_H
628 # include <inttypes.h>
629 #endif
630 #ifdef HAVE_STDINT_H
631 # include <stdint.h>
632 #endif
633 #ifdef HAVE_UNISTD_H
634 # include <unistd.h>
635 #endif"
636
637 ac_subst_vars='am__EXEEXT_FALSE
638 am__EXEEXT_TRUE
639 LIBOBJS
640 LTLIBOBJS
641 LDAP_LIBS
642 LIB_PAM
643 MAIN_COMPAT_OBJ
644 SASL_DB_LIB
645 SASL_DB_INC
646 SASL_DB_BACKEND_STATIC
647 SASL_DB_BACKEND
648 SASL_DB_MANS
649 SASL_DB_UTILS
650 LIB_SIA
651 GSSAPIBASE_LIBS
652 GSSAPI_LIBS
653 LIB_CRYPT
654 SASL_KRB_LIB
655 LIB_DES
656 CMU_LIB_SUBDIR
657 EGREP
658 GREP
659 LIB_SOCKET
660 LN_S
661 CPP
662 am__fastdepCC_FALSE
663 am__fastdepCC_TRUE
664 CCDEPMODE
665 AMDEPBACKSLASH
666 AMDEP_FALSE
667 AMDEP_TRUE
668 am__quote
669 am__include
670 DEPDIR
671 OBJEXT
672 EXEEXT
673 ac_ct_CC
674 CPPFLAGS
675 LDFLAGS
676 CFLAGS
677 CC
678 am__untar
679 am__tar
680 AMTAR
681 am__leading_dot
682 SET_MAKE
683 AWK
684 mkdir_p
685 MKDIR_P
686 INSTALL_STRIP_PROGRAM
687 STRIP
688 install_sh
689 MAKEINFO
690 AUTOHEADER
691 AUTOMAKE
692 AUTOCONF
693 ACLOCAL
694 VERSION
695 PACKAGE
696 CYGPATH_W
697 am__isrc
698 INSTALL_DATA
699 INSTALL_SCRIPT
700 INSTALL_PROGRAM
701 SASLAUTHD_FALSE
702 SASLAUTHD_TRUE
703 host_os
704 host_vendor
705 host_cpu
706 host
707 build_os
708 build_vendor
709 build_cpu
710 build
711 target_alias
712 host_alias
713 build_alias
714 LIBS
715 ECHO_T
716 ECHO_N
717 ECHO_C
718 DEFS
719 mandir
720 localedir
721 libdir
722 psdir
723 pdfdir
724 dvidir
725 htmldir
726 infodir
727 docdir
728 oldincludedir
729 includedir
730 localstatedir
731 sharedstatedir
732 sysconfdir
733 datadir
734 datarootdir
735 libexecdir
736 sbindir
737 bindir
738 program_transform_name
739 prefix
740 exec_prefix
741 PACKAGE_BUGREPORT
742 PACKAGE_STRING
743 PACKAGE_VERSION
744 PACKAGE_TARNAME
745 PACKAGE_NAME
746 PATH_SEPARATOR
747 SHELL'
748 ac_subst_files=''
749 ac_user_opts='
750 enable_option_checking
751 with_saslauthd
752 enable_dependency_tracking
753 with_lib_subdir
754 with_openssl
755 with_des
756 enable_krb4
757 enable_gssapi
758 with_gss_impl
759 enable_sia
760 enable_auth_sasldb
761 with_dbpath
762 with_dblib
763 with_bdb_libdir
764 with_bdb_incdir
765 with_gdbm
766 enable_httpform
767 with_pam
768 with_ipctype
769 with_ldap
770 '
771 ac_precious_vars='build_alias
772 host_alias
773 target_alias
774 CC
775 CFLAGS
776 LDFLAGS
777 LIBS
778 CPPFLAGS
779 CPP'
780
781
782 # Initialize some variables set by options.
783 ac_init_help=
784 ac_init_version=false
785 ac_unrecognized_opts=
786 ac_unrecognized_sep=
787 # The variables have the same names as the options, with
788 # dashes changed to underlines.
789 cache_file=/dev/null
790 exec_prefix=NONE
791 no_create=
792 no_recursion=
793 prefix=NONE
794 program_prefix=NONE
795 program_suffix=NONE
796 program_transform_name=s,x,x,
797 silent=
798 site=
799 srcdir=
800 verbose=
801 x_includes=NONE
802 x_libraries=NONE
803
804 # Installation directory options.
805 # These are left unexpanded so users can "make install exec_prefix=/foo"
806 # and all the variables that are supposed to be based on exec_prefix
807 # by default will actually change.
808 # Use braces instead of parens because sh, perl, etc. also accept them.
809 # (The list follows the same order as the GNU Coding Standards.)
810 bindir='${exec_prefix}/bin'
811 sbindir='${exec_prefix}/sbin'
812 libexecdir='${exec_prefix}/libexec'
813 datarootdir='${prefix}/share'
814 datadir='${datarootdir}'
815 sysconfdir='${prefix}/etc'
816 sharedstatedir='${prefix}/com'
817 localstatedir='${prefix}/var'
818 includedir='${prefix}/include'
819 oldincludedir='/usr/include'
820 docdir='${datarootdir}/doc/${PACKAGE}'
821 infodir='${datarootdir}/info'
822 htmldir='${docdir}'
823 dvidir='${docdir}'
824 pdfdir='${docdir}'
825 psdir='${docdir}'
826 libdir='${exec_prefix}/lib'
827 localedir='${datarootdir}/locale'
828 mandir='${datarootdir}/man'
829
830 ac_prev=
831 ac_dashdash=
832 for ac_option
833 do
834 # If the previous option needs an argument, assign it.
835 if test -n "$ac_prev"; then
836 eval $ac_prev=\$ac_option
837 ac_prev=
838 continue
839 fi
840
841 case $ac_option in
842 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
843 *) ac_optarg=yes ;;
844 esac
845
846 # Accept the important Cygnus configure options, so we can diagnose typos.
847
848 case $ac_dashdash$ac_option in
849 --)
850 ac_dashdash=yes ;;
851
852 -bindir | --bindir | --bindi | --bind | --bin | --bi)
853 ac_prev=bindir ;;
854 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
855 bindir=$ac_optarg ;;
856
857 -build | --build | --buil | --bui | --bu)
858 ac_prev=build_alias ;;
859 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
860 build_alias=$ac_optarg ;;
861
862 -cache-file | --cache-file | --cache-fil | --cache-fi \
863 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
864 ac_prev=cache_file ;;
865 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
866 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
867 cache_file=$ac_optarg ;;
868
869 --config-cache | -C)
870 cache_file=config.cache ;;
871
872 -datadir | --datadir | --datadi | --datad)
873 ac_prev=datadir ;;
874 -datadir=* | --datadir=* | --datadi=* | --datad=*)
875 datadir=$ac_optarg ;;
876
877 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
878 | --dataroo | --dataro | --datar)
879 ac_prev=datarootdir ;;
880 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
881 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
882 datarootdir=$ac_optarg ;;
883
884 -disable-* | --disable-*)
885 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
886 # Reject names that are not valid shell variable names.
887 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
888 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
889 { (exit 1); exit 1; }; }
890 ac_useropt_orig=$ac_useropt
891 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
892 case $ac_user_opts in
893 *"
894 "enable_$ac_useropt"
895 "*) ;;
896 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
897 ac_unrecognized_sep=', ';;
898 esac
899 eval enable_$ac_useropt=no ;;
900
901 -docdir | --docdir | --docdi | --doc | --do)
902 ac_prev=docdir ;;
903 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
904 docdir=$ac_optarg ;;
905
906 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
907 ac_prev=dvidir ;;
908 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
909 dvidir=$ac_optarg ;;
910
911 -enable-* | --enable-*)
912 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
913 # Reject names that are not valid shell variable names.
914 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
915 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
916 { (exit 1); exit 1; }; }
917 ac_useropt_orig=$ac_useropt
918 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
919 case $ac_user_opts in
920 *"
921 "enable_$ac_useropt"
922 "*) ;;
923 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
924 ac_unrecognized_sep=', ';;
925 esac
926 eval enable_$ac_useropt=\$ac_optarg ;;
927
928 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
929 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
930 | --exec | --exe | --ex)
931 ac_prev=exec_prefix ;;
932 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
933 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
934 | --exec=* | --exe=* | --ex=*)
935 exec_prefix=$ac_optarg ;;
936
937 -gas | --gas | --ga | --g)
938 # Obsolete; use --with-gas.
939 with_gas=yes ;;
940
941 -help | --help | --hel | --he | -h)
942 ac_init_help=long ;;
943 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
944 ac_init_help=recursive ;;
945 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
946 ac_init_help=short ;;
947
948 -host | --host | --hos | --ho)
949 ac_prev=host_alias ;;
950 -host=* | --host=* | --hos=* | --ho=*)
951 host_alias=$ac_optarg ;;
952
953 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
954 ac_prev=htmldir ;;
955 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
956 | --ht=*)
957 htmldir=$ac_optarg ;;
958
959 -includedir | --includedir | --includedi | --included | --include \
960 | --includ | --inclu | --incl | --inc)
961 ac_prev=includedir ;;
962 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
963 | --includ=* | --inclu=* | --incl=* | --inc=*)
964 includedir=$ac_optarg ;;
965
966 -infodir | --infodir | --infodi | --infod | --info | --inf)
967 ac_prev=infodir ;;
968 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
969 infodir=$ac_optarg ;;
970
971 -libdir | --libdir | --libdi | --libd)
972 ac_prev=libdir ;;
973 -libdir=* | --libdir=* | --libdi=* | --libd=*)
974 libdir=$ac_optarg ;;
975
976 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
977 | --libexe | --libex | --libe)
978 ac_prev=libexecdir ;;
979 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
980 | --libexe=* | --libex=* | --libe=*)
981 libexecdir=$ac_optarg ;;
982
983 -localedir | --localedir | --localedi | --localed | --locale)
984 ac_prev=localedir ;;
985 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
986 localedir=$ac_optarg ;;
987
988 -localstatedir | --localstatedir | --localstatedi | --localstated \
989 | --localstate | --localstat | --localsta | --localst | --locals)
990 ac_prev=localstatedir ;;
991 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
992 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
993 localstatedir=$ac_optarg ;;
994
995 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
996 ac_prev=mandir ;;
997 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
998 mandir=$ac_optarg ;;
999
1000 -nfp | --nfp | --nf)
1001 # Obsolete; use --without-fp.
1002 with_fp=no ;;
1003
1004 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1005 | --no-cr | --no-c | -n)
1006 no_create=yes ;;
1007
1008 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1009 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1010 no_recursion=yes ;;
1011
1012 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1013 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1014 | --oldin | --oldi | --old | --ol | --o)
1015 ac_prev=oldincludedir ;;
1016 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1017 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1018 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1019 oldincludedir=$ac_optarg ;;
1020
1021 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1022 ac_prev=prefix ;;
1023 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1024 prefix=$ac_optarg ;;
1025
1026 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1027 | --program-pre | --program-pr | --program-p)
1028 ac_prev=program_prefix ;;
1029 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1030 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1031 program_prefix=$ac_optarg ;;
1032
1033 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1034 | --program-suf | --program-su | --program-s)
1035 ac_prev=program_suffix ;;
1036 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1037 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1038 program_suffix=$ac_optarg ;;
1039
1040 -program-transform-name | --program-transform-name \
1041 | --program-transform-nam | --program-transform-na \
1042 | --program-transform-n | --program-transform- \
1043 | --program-transform | --program-transfor \
1044 | --program-transfo | --program-transf \
1045 | --program-trans | --program-tran \
1046 | --progr-tra | --program-tr | --program-t)
1047 ac_prev=program_transform_name ;;
1048 -program-transform-name=* | --program-transform-name=* \
1049 | --program-transform-nam=* | --program-transform-na=* \
1050 | --program-transform-n=* | --program-transform-=* \
1051 | --program-transform=* | --program-transfor=* \
1052 | --program-transfo=* | --program-transf=* \
1053 | --program-trans=* | --program-tran=* \
1054 | --progr-tra=* | --program-tr=* | --program-t=*)
1055 program_transform_name=$ac_optarg ;;
1056
1057 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1058 ac_prev=pdfdir ;;
1059 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1060 pdfdir=$ac_optarg ;;
1061
1062 -psdir | --psdir | --psdi | --psd | --ps)
1063 ac_prev=psdir ;;
1064 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1065 psdir=$ac_optarg ;;
1066
1067 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1068 | -silent | --silent | --silen | --sile | --sil)
1069 silent=yes ;;
1070
1071 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1072 ac_prev=sbindir ;;
1073 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1074 | --sbi=* | --sb=*)
1075 sbindir=$ac_optarg ;;
1076
1077 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1078 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1079 | --sharedst | --shareds | --shared | --share | --shar \
1080 | --sha | --sh)
1081 ac_prev=sharedstatedir ;;
1082 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1083 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1084 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1085 | --sha=* | --sh=*)
1086 sharedstatedir=$ac_optarg ;;
1087
1088 -site | --site | --sit)
1089 ac_prev=site ;;
1090 -site=* | --site=* | --sit=*)
1091 site=$ac_optarg ;;
1092
1093 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1094 ac_prev=srcdir ;;
1095 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1096 srcdir=$ac_optarg ;;
1097
1098 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1099 | --syscon | --sysco | --sysc | --sys | --sy)
1100 ac_prev=sysconfdir ;;
1101 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1102 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1103 sysconfdir=$ac_optarg ;;
1104
1105 -target | --target | --targe | --targ | --tar | --ta | --t)
1106 ac_prev=target_alias ;;
1107 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1108 target_alias=$ac_optarg ;;
1109
1110 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1111 verbose=yes ;;
1112
1113 -version | --version | --versio | --versi | --vers | -V)
1114 ac_init_version=: ;;
1115
1116 -with-* | --with-*)
1117 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1118 # Reject names that are not valid shell variable names.
1119 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1120 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1121 { (exit 1); exit 1; }; }
1122 ac_useropt_orig=$ac_useropt
1123 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1124 case $ac_user_opts in
1125 *"
1126 "with_$ac_useropt"
1127 "*) ;;
1128 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1129 ac_unrecognized_sep=', ';;
1130 esac
1131 eval with_$ac_useropt=\$ac_optarg ;;
1132
1133 -without-* | --without-*)
1134 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1135 # Reject names that are not valid shell variable names.
1136 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1137 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1138 { (exit 1); exit 1; }; }
1139 ac_useropt_orig=$ac_useropt
1140 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1141 case $ac_user_opts in
1142 *"
1143 "with_$ac_useropt"
1144 "*) ;;
1145 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1146 ac_unrecognized_sep=', ';;
1147 esac
1148 eval with_$ac_useropt=no ;;
1149
1150 --x)
1151 # Obsolete; use --with-x.
1152 with_x=yes ;;
1153
1154 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1155 | --x-incl | --x-inc | --x-in | --x-i)
1156 ac_prev=x_includes ;;
1157 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1158 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1159 x_includes=$ac_optarg ;;
1160
1161 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1162 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1163 ac_prev=x_libraries ;;
1164 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1165 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1166 x_libraries=$ac_optarg ;;
1167
1168 -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
1169 Try \`$0 --help' for more information." >&2
1170 { (exit 1); exit 1; }; }
1171 ;;
1172
1173 *=*)
1174 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1175 # Reject names that are not valid shell variable names.
1176 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1177 { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1178 { (exit 1); exit 1; }; }
1179 eval $ac_envvar=\$ac_optarg
1180 export $ac_envvar ;;
1181
1182 *)
1183 # FIXME: should be removed in autoconf 3.0.
1184 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1185 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1186 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1187 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1188 ;;
1189
1190 esac
1191 done
1192
1193 if test -n "$ac_prev"; then
1194 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1195 { $as_echo "$as_me: error: missing argument to $ac_option" >&2
1196 { (exit 1); exit 1; }; }
1197 fi
1198
1199 if test -n "$ac_unrecognized_opts"; then
1200 case $enable_option_checking in
1201 no) ;;
1202 fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1203 { (exit 1); exit 1; }; } ;;
1204 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1205 esac
1206 fi
1207
1208 # Check all directory arguments for consistency.
1209 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1210 datadir sysconfdir sharedstatedir localstatedir includedir \
1211 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1212 libdir localedir mandir
1213 do
1214 eval ac_val=\$$ac_var
1215 # Remove trailing slashes.
1216 case $ac_val in
1217 */ )
1218 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1219 eval $ac_var=\$ac_val;;
1220 esac
1221 # Be sure to have absolute directory names.
1222 case $ac_val in
1223 [\\/$]* | ?:[\\/]* ) continue;;
1224 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1225 esac
1226 { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1227 { (exit 1); exit 1; }; }
1228 done
1229
1230 # There might be people who depend on the old broken behavior: `$host'
1231 # used to hold the argument of --host etc.
1232 # FIXME: To remove some day.
1233 build=$build_alias
1234 host=$host_alias
1235 target=$target_alias
1236
1237 # FIXME: To remove some day.
1238 if test "x$host_alias" != x; then
1239 if test "x$build_alias" = x; then
1240 cross_compiling=maybe
1241 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1242 If a cross compiler is detected then cross compile mode will be used." >&2
1243 elif test "x$build_alias" != "x$host_alias"; then
1244 cross_compiling=yes
1245 fi
1246 fi
1247
1248 ac_tool_prefix=
1249 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1250
1251 test "$silent" = yes && exec 6>/dev/null
1252
1253
1254 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1255 ac_ls_di=`ls -di .` &&
1256 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1257 { $as_echo "$as_me: error: working directory cannot be determined" >&2
1258 { (exit 1); exit 1; }; }
1259 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1260 { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
1261 { (exit 1); exit 1; }; }
1262
1263
1264 # Find the source files, if location was not specified.
1265 if test -z "$srcdir"; then
1266 ac_srcdir_defaulted=yes
1267 # Try the directory containing this script, then the parent directory.
1268 ac_confdir=`$as_dirname -- "$as_myself" ||
1269 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1270 X"$as_myself" : 'X\(//\)[^/]' \| \
1271 X"$as_myself" : 'X\(//\)$' \| \
1272 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1273 $as_echo X"$as_myself" |
1274 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1275 s//\1/
1276 q
1277 }
1278 /^X\(\/\/\)[^/].*/{
1279 s//\1/
1280 q
1281 }
1282 /^X\(\/\/\)$/{
1283 s//\1/
1284 q
1285 }
1286 /^X\(\/\).*/{
1287 s//\1/
1288 q
1289 }
1290 s/.*/./; q'`
1291 srcdir=$ac_confdir
1292 if test ! -r "$srcdir/$ac_unique_file"; then
1293 srcdir=..
1294 fi
1295 else
1296 ac_srcdir_defaulted=no
1297 fi
1298 if test ! -r "$srcdir/$ac_unique_file"; then
1299 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1300 { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1301 { (exit 1); exit 1; }; }
1302 fi
1303 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1304 ac_abs_confdir=`(
1305 cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
1306 { (exit 1); exit 1; }; }
1307 pwd)`
1308 # When building in place, set srcdir=.
1309 if test "$ac_abs_confdir" = "$ac_pwd"; then
1310 srcdir=.
1311 fi
1312 # Remove unnecessary trailing slashes from srcdir.
1313 # Double slashes in file names in object file debugging info
1314 # mess up M-x gdb in Emacs.
1315 case $srcdir in
1316 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1317 esac
1318 for ac_var in $ac_precious_vars; do
1319 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1320 eval ac_env_${ac_var}_value=\$${ac_var}
1321 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1322 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1323 done
1324
1325 #
1326 # Report the --help message.
1327 #
1328 if test "$ac_init_help" = "long"; then
1329 # Omit some internal or obsolete options to make the list less imposing.
1330 # This message is too long to be a string in the A/UX 3.1 sh.
1331 cat <<_ACEOF
1332 \`configure' configures this package to adapt to many kinds of systems.
1333
1334 Usage: $0 [OPTION]... [VAR=VALUE]...
1335
1336 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1337 VAR=VALUE. See below for descriptions of some of the useful variables.
1338
1339 Defaults for the options are specified in brackets.
1340
1341 Configuration:
1342 -h, --help display this help and exit
1343 --help=short display options specific to this package
1344 --help=recursive display the short help of all the included packages
1345 -V, --version display version information and exit
1346 -q, --quiet, --silent do not print \`checking...' messages
1347 --cache-file=FILE cache test results in FILE [disabled]
1348 -C, --config-cache alias for \`--cache-file=config.cache'
1349 -n, --no-create do not create output files
1350 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1351
1352 Installation directories:
1353 --prefix=PREFIX install architecture-independent files in PREFIX
1354 [$ac_default_prefix]
1355 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1356 [PREFIX]
1357
1358 By default, \`make install' will install all the files in
1359 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1360 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1361 for instance \`--prefix=\$HOME'.
1362
1363 For better control, use the options below.
1364
1365 Fine tuning of the installation directories:
1366 --bindir=DIR user executables [EPREFIX/bin]
1367 --sbindir=DIR system admin executables [EPREFIX/sbin]
1368 --libexecdir=DIR program executables [EPREFIX/libexec]
1369 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1370 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1371 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1372 --libdir=DIR object code libraries [EPREFIX/lib]
1373 --includedir=DIR C header files [PREFIX/include]
1374 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1375 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1376 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1377 --infodir=DIR info documentation [DATAROOTDIR/info]
1378 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1379 --mandir=DIR man documentation [DATAROOTDIR/man]
1380 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1381 --htmldir=DIR html documentation [DOCDIR]
1382 --dvidir=DIR dvi documentation [DOCDIR]
1383 --pdfdir=DIR pdf documentation [DOCDIR]
1384 --psdir=DIR ps documentation [DOCDIR]
1385 _ACEOF
1386
1387 cat <<\_ACEOF
1388
1389 Program names:
1390 --program-prefix=PREFIX prepend PREFIX to installed program names
1391 --program-suffix=SUFFIX append SUFFIX to installed program names
1392 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1393
1394 System types:
1395 --build=BUILD configure for building on BUILD [guessed]
1396 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1397 _ACEOF
1398 fi
1399
1400 if test -n "$ac_init_help"; then
1401
1402 cat <<\_ACEOF
1403
1404 Optional Features:
1405 --disable-option-checking ignore unrecognized --enable/--with options
1406 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1407 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1408 --disable-dependency-tracking speeds up one-time build
1409 --enable-dependency-tracking do not reject slow dependency extractors
1410 --enable-krb4 enable KERBEROS_V4 authentication [no]
1411 --enable-gssapi=<DIR> enable GSSAPI authentication [yes]
1412 --enable-sia enable SIA authentication no
1413 --enable-auth-sasldb enable experimental SASLdb authentication module no
1414 --enable-httpform enable HTTP form authentication [no]
1415
1416 Optional Packages:
1417 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1418 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1419 --with-saslauthd=DIR enable use of the saslauth daemon using state dir DIR
1420 --with-lib-subdir=DIR Find libraries in DIR instead of lib
1421 --with-openssl=PATH use OpenSSL from PATH
1422 --with-des=DIR with DES (look in DIR) yes
1423 --with-gss_impl={heimdal|mit|cybersafe|seam|auto}
1424 choose specific GSSAPI implementation [[auto]]
1425 --with-dbpath=PATH set the DB path to use /etc/sasldb2
1426 --with-dblib=DBLIB set the DB library to use berkeley
1427 --with-bdb-libdir=DIR Berkeley DB lib files are in DIR
1428 --with-bdb-incdir=DIR Berkeley DB include files are in DIR
1429 --with-gdbm=PATH use gdbm from PATH
1430 --with-pam=DIR use PAM (rooted in DIR) yes
1431 --with-ipctype={unix,doors} use ipctype unix
1432 --with-ldap=DIR use LDAP (in DIR) no
1433
1434 Some influential environment variables:
1435 CC C compiler command
1436 CFLAGS C compiler flags
1437 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1438 nonstandard directory <lib dir>
1439 LIBS libraries to pass to the linker, e.g. -l<library>
1440 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1441 you have headers in a nonstandard directory <include dir>
1442 CPP C preprocessor
1443
1444 Use these variables to override the choices made by `configure' or to help
1445 it to find libraries and programs with nonstandard names/locations.
1446
1447 _ACEOF
1448 ac_status=$?
1449 fi
1450
1451 if test "$ac_init_help" = "recursive"; then
1452 # If there are subdirs, report their specific --help.
1453 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1454 test -d "$ac_dir" ||
1455 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1456 continue
1457 ac_builddir=.
1458
1459 case "$ac_dir" in
1460 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1461 *)
1462 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1463 # A ".." for each directory in $ac_dir_suffix.
1464 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1465 case $ac_top_builddir_sub in
1466 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1467 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1468 esac ;;
1469 esac
1470 ac_abs_top_builddir=$ac_pwd
1471 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1472 # for backward compatibility:
1473 ac_top_builddir=$ac_top_build_prefix
1474
1475 case $srcdir in
1476 .) # We are building in place.
1477 ac_srcdir=.
1478 ac_top_srcdir=$ac_top_builddir_sub
1479 ac_abs_top_srcdir=$ac_pwd ;;
1480 [\\/]* | ?:[\\/]* ) # Absolute name.
1481 ac_srcdir=$srcdir$ac_dir_suffix;
1482 ac_top_srcdir=$srcdir
1483 ac_abs_top_srcdir=$srcdir ;;
1484 *) # Relative name.
1485 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1486 ac_top_srcdir=$ac_top_build_prefix$srcdir
1487 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1488 esac
1489 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1490
1491 cd "$ac_dir" || { ac_status=$?; continue; }
1492 # Check for guested configure.
1493 if test -f "$ac_srcdir/configure.gnu"; then
1494 echo &&
1495 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1496 elif test -f "$ac_srcdir/configure"; then
1497 echo &&
1498 $SHELL "$ac_srcdir/configure" --help=recursive
1499 else
1500 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1501 fi || ac_status=$?
1502 cd "$ac_pwd" || { ac_status=$?; break; }
1503 done
1504 fi
1505
1506 test -n "$ac_init_help" && exit $ac_status
1507 if $ac_init_version; then
1508 cat <<\_ACEOF
1509 configure
1510 generated by GNU Autoconf 2.63
1511
1512 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1513 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1514 This configure script is free software; the Free Software Foundation
1515 gives unlimited permission to copy, distribute and modify it.
1516 _ACEOF
1517 exit
1518 fi
1519 cat >config.log <<_ACEOF
1520 This file contains any messages produced by compilers while
1521 running configure, to aid debugging if configure makes a mistake.
1522
1523 It was created by $as_me, which was
1524 generated by GNU Autoconf 2.63. Invocation command line was
1525
1526 $ $0 $@
1527
1528 _ACEOF
1529 exec 5>>config.log
1530 {
1531 cat <<_ASUNAME
1532 ## --------- ##
1533 ## Platform. ##
1534 ## --------- ##
1535
1536 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1537 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1538 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1539 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1540 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1541
1542 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1543 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1544
1545 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1546 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1547 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1548 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1549 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1550 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1551 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1552
1553 _ASUNAME
1554
1555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1556 for as_dir in $PATH
1557 do
1558 IFS=$as_save_IFS
1559 test -z "$as_dir" && as_dir=.
1560 $as_echo "PATH: $as_dir"
1561 done
1562 IFS=$as_save_IFS
1563
1564 } >&5
1565
1566 cat >&5 <<_ACEOF
1567
1568
1569 ## ----------- ##
1570 ## Core tests. ##
1571 ## ----------- ##
1572
1573 _ACEOF
1574
1575
1576 # Keep a trace of the command line.
1577 # Strip out --no-create and --no-recursion so they do not pile up.
1578 # Strip out --silent because we don't want to record it for future runs.
1579 # Also quote any args containing shell meta-characters.
1580 # Make two passes to allow for proper duplicate-argument suppression.
1581 ac_configure_args=
1582 ac_configure_args0=
1583 ac_configure_args1=
1584 ac_must_keep_next=false
1585 for ac_pass in 1 2
1586 do
1587 for ac_arg
1588 do
1589 case $ac_arg in
1590 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1591 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1592 | -silent | --silent | --silen | --sile | --sil)
1593 continue ;;
1594 *\'*)
1595 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1596 esac
1597 case $ac_pass in
1598 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1599 2)
1600 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1601 if test $ac_must_keep_next = true; then
1602 ac_must_keep_next=false # Got value, back to normal.
1603 else
1604 case $ac_arg in
1605 *=* | --config-cache | -C | -disable-* | --disable-* \
1606 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1607 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1608 | -with-* | --with-* | -without-* | --without-* | --x)
1609 case "$ac_configure_args0 " in
1610 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1611 esac
1612 ;;
1613 -* ) ac_must_keep_next=true ;;
1614 esac
1615 fi
1616 ac_configure_args="$ac_configure_args '$ac_arg'"
1617 ;;
1618 esac
1619 done
1620 done
1621 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1622 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1623
1624 # When interrupted or exit'd, cleanup temporary files, and complete
1625 # config.log. We remove comments because anyway the quotes in there
1626 # would cause problems or look ugly.
1627 # WARNING: Use '\'' to represent an apostrophe within the trap.
1628 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1629 trap 'exit_status=$?
1630 # Save into config.log some information that might help in debugging.
1631 {
1632 echo
1633
1634 cat <<\_ASBOX
1635 ## ---------------- ##
1636 ## Cache variables. ##
1637 ## ---------------- ##
1638 _ASBOX
1639 echo
1640 # The following way of writing the cache mishandles newlines in values,
1641 (
1642 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1643 eval ac_val=\$$ac_var
1644 case $ac_val in #(
1645 *${as_nl}*)
1646 case $ac_var in #(
1647 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1648 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1649 esac
1650 case $ac_var in #(
1651 _ | IFS | as_nl) ;; #(
1652 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1653 *) $as_unset $ac_var ;;
1654 esac ;;
1655 esac
1656 done
1657 (set) 2>&1 |
1658 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1659 *${as_nl}ac_space=\ *)
1660 sed -n \
1661 "s/'\''/'\''\\\\'\'''\''/g;
1662 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1663 ;; #(
1664 *)
1665 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1666 ;;
1667 esac |
1668 sort
1669 )
1670 echo
1671
1672 cat <<\_ASBOX
1673 ## ----------------- ##
1674 ## Output variables. ##
1675 ## ----------------- ##
1676 _ASBOX
1677 echo
1678 for ac_var in $ac_subst_vars
1679 do
1680 eval ac_val=\$$ac_var
1681 case $ac_val in
1682 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1683 esac
1684 $as_echo "$ac_var='\''$ac_val'\''"
1685 done | sort
1686 echo
1687
1688 if test -n "$ac_subst_files"; then
1689 cat <<\_ASBOX
1690 ## ------------------- ##
1691 ## File substitutions. ##
1692 ## ------------------- ##
1693 _ASBOX
1694 echo
1695 for ac_var in $ac_subst_files
1696 do
1697 eval ac_val=\$$ac_var
1698 case $ac_val in
1699 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1700 esac
1701 $as_echo "$ac_var='\''$ac_val'\''"
1702 done | sort
1703 echo
1704 fi
1705
1706 if test -s confdefs.h; then
1707 cat <<\_ASBOX
1708 ## ----------- ##
1709 ## confdefs.h. ##
1710 ## ----------- ##
1711 _ASBOX
1712 echo
1713 cat confdefs.h
1714 echo
1715 fi
1716 test "$ac_signal" != 0 &&
1717 $as_echo "$as_me: caught signal $ac_signal"
1718 $as_echo "$as_me: exit $exit_status"
1719 } >&5
1720 rm -f core *.core core.conftest.* &&
1721 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1722 exit $exit_status
1723 ' 0
1724 for ac_signal in 1 2 13 15; do
1725 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1726 done
1727 ac_signal=0
1728
1729 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1730 rm -f -r conftest* confdefs.h
1731
1732 # Predefined preprocessor variables.
1733
1734 cat >>confdefs.h <<_ACEOF
1735 #define PACKAGE_NAME "$PACKAGE_NAME"
1736 _ACEOF
1737
1738
1739 cat >>confdefs.h <<_ACEOF
1740 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1741 _ACEOF
1742
1743
1744 cat >>confdefs.h <<_ACEOF
1745 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1746 _ACEOF
1747
1748
1749 cat >>confdefs.h <<_ACEOF
1750 #define PACKAGE_STRING "$PACKAGE_STRING"
1751 _ACEOF
1752
1753
1754 cat >>confdefs.h <<_ACEOF
1755 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1756 _ACEOF
1757
1758
1759 # Let the site file select an alternate cache file if it wants to.
1760 # Prefer an explicitly selected file to automatically selected ones.
1761 ac_site_file1=NONE
1762 ac_site_file2=NONE
1763 if test -n "$CONFIG_SITE"; then
1764 ac_site_file1=$CONFIG_SITE
1765 elif test "x$prefix" != xNONE; then
1766 ac_site_file1=$prefix/share/config.site
1767 ac_site_file2=$prefix/etc/config.site
1768 else
1769 ac_site_file1=$ac_default_prefix/share/config.site
1770 ac_site_file2=$ac_default_prefix/etc/config.site
1771 fi
1772 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1773 do
1774 test "x$ac_site_file" = xNONE && continue
1775 if test -r "$ac_site_file"; then
1776 { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1777 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1778 sed 's/^/| /' "$ac_site_file" >&5
1779 . "$ac_site_file"
1780 fi
1781 done
1782
1783 if test -r "$cache_file"; then
1784 # Some versions of bash will fail to source /dev/null (special
1785 # files actually), so we avoid doing that.
1786 if test -f "$cache_file"; then
1787 { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1788 $as_echo "$as_me: loading cache $cache_file" >&6;}
1789 case $cache_file in
1790 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1791 *) . "./$cache_file";;
1792 esac
1793 fi
1794 else
1795 { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1796 $as_echo "$as_me: creating cache $cache_file" >&6;}
1797 >$cache_file
1798 fi
1799
1800 # Check that the precious variables saved in the cache have kept the same
1801 # value.
1802 ac_cache_corrupted=false
1803 for ac_var in $ac_precious_vars; do
1804 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1805 eval ac_new_set=\$ac_env_${ac_var}_set
1806 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1807 eval ac_new_val=\$ac_env_${ac_var}_value
1808 case $ac_old_set,$ac_new_set in
1809 set,)
1810 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1811 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1812 ac_cache_corrupted=: ;;
1813 ,set)
1814 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1815 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1816 ac_cache_corrupted=: ;;
1817 ,);;
1818 *)
1819 if test "x$ac_old_val" != "x$ac_new_val"; then
1820 # differences in whitespace do not lead to failure.
1821 ac_old_val_w=`echo x $ac_old_val`
1822 ac_new_val_w=`echo x $ac_new_val`
1823 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1824 { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1825 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1826 ac_cache_corrupted=:
1827 else
1828 { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1829 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1830 eval $ac_var=\$ac_old_val
1831 fi
1832 { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1833 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
1834 { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1835 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
1836 fi;;
1837 esac
1838 # Pass precious variables to config.status.
1839 if test "$ac_new_set" = set; then
1840 case $ac_new_val in
1841 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1842 *) ac_arg=$ac_var=$ac_new_val ;;
1843 esac
1844 case " $ac_configure_args " in
1845 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1846 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1847 esac
1848 fi
1849 done
1850 if $ac_cache_corrupted; then
1851 { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1852 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1853 { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1854 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1855 { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1856 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1857 { (exit 1); exit 1; }; }
1858 fi
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876 ac_ext=c
1877 ac_cpp='$CPP $CPPFLAGS'
1878 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1879 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1880 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1881
1882
1883
1884
1885 ac_aux_dir=
1886 for ac_dir in config "$srcdir"/config; do
1887 if test -f "$ac_dir/install-sh"; then
1888 ac_aux_dir=$ac_dir
1889 ac_install_sh="$ac_aux_dir/install-sh -c"
1890 break
1891 elif test -f "$ac_dir/install.sh"; then
1892 ac_aux_dir=$ac_dir
1893 ac_install_sh="$ac_aux_dir/install.sh -c"
1894 break
1895 elif test -f "$ac_dir/shtool"; then
1896 ac_aux_dir=$ac_dir
1897 ac_install_sh="$ac_aux_dir/shtool install -c"
1898 break
1899 fi
1900 done
1901 if test -z "$ac_aux_dir"; then
1902 { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
1903 $as_echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
1904 { (exit 1); exit 1; }; }
1905 fi
1906
1907 # These three variables are undocumented and unsupported,
1908 # and are intended to be withdrawn in a future Autoconf release.
1909 # They can cause serious problems if a builder's source tree is in a directory
1910 # whose full name contains unusual characters.
1911 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
1912 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
1913 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
1914
1915
1916 # Make sure we can run config.sub.
1917 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
1918 { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
1919 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
1920 { (exit 1); exit 1; }; }
1921
1922 { $as_echo "$as_me:$LINENO: checking build system type" >&5
1923 $as_echo_n "checking build system type... " >&6; }
1924 if test "${ac_cv_build+set}" = set; then
1925 $as_echo_n "(cached) " >&6
1926 else
1927 ac_build_alias=$build_alias
1928 test "x$ac_build_alias" = x &&
1929 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
1930 test "x$ac_build_alias" = x &&
1931 { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
1932 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1933 { (exit 1); exit 1; }; }
1934 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
1935 { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
1936 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
1937 { (exit 1); exit 1; }; }
1938
1939 fi
1940 { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
1941 $as_echo "$ac_cv_build" >&6; }
1942 case $ac_cv_build in
1943 *-*-*) ;;
1944 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
1945 $as_echo "$as_me: error: invalid value of canonical build" >&2;}
1946 { (exit 1); exit 1; }; };;
1947 esac
1948 build=$ac_cv_build
1949 ac_save_IFS=$IFS; IFS='-'
1950 set x $ac_cv_build
1951 shift
1952 build_cpu=$1
1953 build_vendor=$2
1954 shift; shift
1955 # Remember, the first character of IFS is used to create $*,
1956 # except with old shells:
1957 build_os=$*
1958 IFS=$ac_save_IFS
1959 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
1960
1961
1962 { $as_echo "$as_me:$LINENO: checking host system type" >&5
1963 $as_echo_n "checking host system type... " >&6; }
1964 if test "${ac_cv_host+set}" = set; then
1965 $as_echo_n "(cached) " >&6
1966 else
1967 if test "x$host_alias" = x; then
1968 ac_cv_host=$ac_cv_build
1969 else
1970 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
1971 { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
1972 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
1973 { (exit 1); exit 1; }; }
1974 fi
1975
1976 fi
1977 { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
1978 $as_echo "$ac_cv_host" >&6; }
1979 case $ac_cv_host in
1980 *-*-*) ;;
1981 *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
1982 $as_echo "$as_me: error: invalid value of canonical host" >&2;}
1983 { (exit 1); exit 1; }; };;
1984 esac
1985 host=$ac_cv_host
1986 ac_save_IFS=$IFS; IFS='-'
1987 set x $ac_cv_host
1988 shift
1989 host_cpu=$1
1990 host_vendor=$2
1991 shift; shift
1992 # Remember, the first character of IFS is used to create $*,
1993 # except with old shells:
1994 host_os=$*
1995 IFS=$ac_save_IFS
1996 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
1997
1998
1999
2000
2001 # Check whether --with-saslauthd was given.
2002 if test "${with_saslauthd+set}" = set; then
2003 withval=$with_saslauthd; with_saslauthd=$withval
2004 else
2005 with_saslauthd=yes
2006 fi
2007
2008 if test "$with_saslauthd" = yes; then
2009 with_saslauthd="/var/state/saslauthd"
2010 fi
2011
2012 cat >>confdefs.h <<\_ACEOF
2013 #define HAVE_SASLAUTHD /**/
2014 _ACEOF
2015
2016
2017 cat >>confdefs.h <<_ACEOF
2018 #define PATH_SASLAUTHD_RUNDIR "$with_saslauthd"
2019 _ACEOF
2020
2021 if test "$with_saslauthd" != no; then
2022 SASLAUTHD_TRUE=
2023 SASLAUTHD_FALSE='#'
2024 else
2025 SASLAUTHD_TRUE='#'
2026 SASLAUTHD_FALSE=
2027 fi
2028
2029
2030 am__api_version='1.11'
2031
2032 # Find a good install program. We prefer a C program (faster),
2033 # so one script is as good as another. But avoid the broken or
2034 # incompatible versions:
2035 # SysV /etc/install, /usr/sbin/install
2036 # SunOS /usr/etc/install
2037 # IRIX /sbin/install
2038 # AIX /bin/install
2039 # AmigaOS /C/install, which installs bootblocks on floppy discs
2040 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2041 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2042 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2043 # OS/2's system install, which has a completely different semantic
2044 # ./install, which can be erroneously created by make from ./install.sh.
2045 # Reject install programs that cannot install multiple files.
2046 { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2047 $as_echo_n "checking for a BSD-compatible install... " >&6; }
2048 if test -z "$INSTALL"; then
2049 if test "${ac_cv_path_install+set}" = set; then
2050 $as_echo_n "(cached) " >&6
2051 else
2052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2053 for as_dir in $PATH
2054 do
2055 IFS=$as_save_IFS
2056 test -z "$as_dir" && as_dir=.
2057 # Account for people who put trailing slashes in PATH elements.
2058 case $as_dir/ in
2059 ./ | .// | /cC/* | \
2060 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2061 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
2062 /usr/ucb/* ) ;;
2063 *)
2064 # OSF1 and SCO ODT 3.0 have their own names for install.
2065 # Don't use installbsd from OSF since it installs stuff as root
2066 # by default.
2067 for ac_prog in ginstall scoinst install; do
2068 for ac_exec_ext in '' $ac_executable_extensions; do
2069 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
2070 if test $ac_prog = install &&
2071 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2072 # AIX install. It has an incompatible calling convention.
2073 :
2074 elif test $ac_prog = install &&
2075 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2076 # program-specific install script used by HP pwplus--don't use.
2077 :
2078 else
2079 rm -rf conftest.one conftest.two conftest.dir
2080 echo one > conftest.one
2081 echo two > conftest.two
2082 mkdir conftest.dir
2083 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2084 test -s conftest.one && test -s conftest.two &&
2085 test -s conftest.dir/conftest.one &&
2086 test -s conftest.dir/conftest.two
2087 then
2088 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2089 break 3
2090 fi
2091 fi
2092 fi
2093 done
2094 done
2095 ;;
2096 esac
2097
2098 done
2099 IFS=$as_save_IFS
2100
2101 rm -rf conftest.one conftest.two conftest.dir
2102
2103 fi
2104 if test "${ac_cv_path_install+set}" = set; then
2105 INSTALL=$ac_cv_path_install
2106 else
2107 # As a last resort, use the slow shell script. Don't cache a
2108 # value for INSTALL within a source directory, because that will
2109 # break other packages using the cache if that directory is
2110 # removed, or if the value is a relative name.
2111 INSTALL=$ac_install_sh
2112 fi
2113 fi
2114 { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
2115 $as_echo "$INSTALL" >&6; }
2116
2117 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2118 # It thinks the first close brace ends the variable substitution.
2119 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2120
2121 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2122
2123 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2124
2125 { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
2126 $as_echo_n "checking whether build environment is sane... " >&6; }
2127 # Just in case
2128 sleep 1
2129 echo timestamp > conftest.file
2130 # Reject unsafe characters in $srcdir or the absolute working directory
2131 # name. Accept space and tab only in the latter.
2132 am_lf='
2133 '
2134 case `pwd` in
2135 *[\\\"\#\$\&\'\`$am_lf]*)
2136 { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5
2137 $as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
2138 { (exit 1); exit 1; }; };;
2139 esac
2140 case $srcdir in
2141 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2142 { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
2143 $as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
2144 { (exit 1); exit 1; }; };;
2145 esac
2146
2147 # Do `set' in a subshell so we don't clobber the current shell's
2148 # arguments. Must try -L first in case configure is actually a
2149 # symlink; some systems play weird games with the mod time of symlinks
2150 # (eg FreeBSD returns the mod time of the symlink's containing
2151 # directory).
2152 if (
2153 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2154 if test "$*" = "X"; then
2155 # -L didn't work.
2156 set X `ls -t "$srcdir/configure" conftest.file`
2157 fi
2158 rm -f conftest.file
2159 if test "$*" != "X $srcdir/configure conftest.file" \
2160 && test "$*" != "X conftest.file $srcdir/configure"; then
2161
2162 # If neither matched, then we have a broken ls. This can happen
2163 # if, for instance, CONFIG_SHELL is bash and it inherits a
2164 # broken ls alias from the environment. This has actually
2165 # happened. Such a system could not be considered "sane".
2166 { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
2167 alias in your environment" >&5
2168 $as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
2169 alias in your environment" >&2;}
2170 { (exit 1); exit 1; }; }
2171 fi
2172
2173 test "$2" = conftest.file
2174 )
2175 then
2176 # Ok.
2177 :
2178 else
2179 { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
2180 Check your system clock" >&5
2181 $as_echo "$as_me: error: newly created file is older than distributed files!
2182 Check your system clock" >&2;}
2183 { (exit 1); exit 1; }; }
2184 fi
2185 { $as_echo "$as_me:$LINENO: result: yes" >&5
2186 $as_echo "yes" >&6; }
2187 test "$program_prefix" != NONE &&
2188 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2189 # Use a double $ so make ignores it.
2190 test "$program_suffix" != NONE &&
2191 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2192 # Double any \ or $.
2193 # By default was `s,x,x', remove it if useless.
2194 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2195 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
2196
2197 # expand $ac_aux_dir to an absolute path
2198 am_aux_dir=`cd $ac_aux_dir && pwd`
2199
2200 if test x"${MISSING+set}" != xset; then
2201 case $am_aux_dir in
2202 *\ * | *\ *)
2203 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2204 *)
2205 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2206 esac
2207 fi
2208 # Use eval to expand $SHELL
2209 if eval "$MISSING --run true"; then
2210 am_missing_run="$MISSING --run "
2211 else
2212 am_missing_run=
2213 { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
2214 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
2215 fi
2216
2217 if test x"${install_sh}" != xset; then
2218 case $am_aux_dir in
2219 *\ * | *\ *)
2220 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2221 *)
2222 install_sh="\${SHELL} $am_aux_dir/install-sh"
2223 esac
2224 fi
2225
2226 # Installed binaries are usually stripped using `strip' when the user
2227 # run `make install-strip'. However `strip' might not be the right
2228 # tool to use in cross-compilation environments, therefore Automake
2229 # will honor the `STRIP' environment variable to overrule this program.
2230 if test "$cross_compiling" != no; then
2231 if test -n "$ac_tool_prefix"; then
2232 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2233 set dummy ${ac_tool_prefix}strip; ac_word=$2
2234 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2235 $as_echo_n "checking for $ac_word... " >&6; }
2236 if test "${ac_cv_prog_STRIP+set}" = set; then
2237 $as_echo_n "(cached) " >&6
2238 else
2239 if test -n "$STRIP"; then
2240 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2241 else
2242 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2243 for as_dir in $PATH
2244 do
2245 IFS=$as_save_IFS
2246 test -z "$as_dir" && as_dir=.
2247 for ac_exec_ext in '' $ac_executable_extensions; do
2248 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2249 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2250 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2251 break 2
2252 fi
2253 done
2254 done
2255 IFS=$as_save_IFS
2256
2257 fi
2258 fi
2259 STRIP=$ac_cv_prog_STRIP
2260 if test -n "$STRIP"; then
2261 { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
2262 $as_echo "$STRIP" >&6; }
2263 else
2264 { $as_echo "$as_me:$LINENO: result: no" >&5
2265 $as_echo "no" >&6; }
2266 fi
2267
2268
2269 fi
2270 if test -z "$ac_cv_prog_STRIP"; then
2271 ac_ct_STRIP=$STRIP
2272 # Extract the first word of "strip", so it can be a program name with args.
2273 set dummy strip; ac_word=$2
2274 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2275 $as_echo_n "checking for $ac_word... " >&6; }
2276 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
2277 $as_echo_n "(cached) " >&6
2278 else
2279 if test -n "$ac_ct_STRIP"; then
2280 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2281 else
2282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2283 for as_dir in $PATH
2284 do
2285 IFS=$as_save_IFS
2286 test -z "$as_dir" && as_dir=.
2287 for ac_exec_ext in '' $ac_executable_extensions; do
2288 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2289 ac_cv_prog_ac_ct_STRIP="strip"
2290 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2291 break 2
2292 fi
2293 done
2294 done
2295 IFS=$as_save_IFS
2296
2297 fi
2298 fi
2299 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2300 if test -n "$ac_ct_STRIP"; then
2301 { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
2302 $as_echo "$ac_ct_STRIP" >&6; }
2303 else
2304 { $as_echo "$as_me:$LINENO: result: no" >&5
2305 $as_echo "no" >&6; }
2306 fi
2307
2308 if test "x$ac_ct_STRIP" = x; then
2309 STRIP=":"
2310 else
2311 case $cross_compiling:$ac_tool_warned in
2312 yes:)
2313 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2314 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2315 ac_tool_warned=yes ;;
2316 esac
2317 STRIP=$ac_ct_STRIP
2318 fi
2319 else
2320 STRIP="$ac_cv_prog_STRIP"
2321 fi
2322
2323 fi
2324 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2325
2326 { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
2327 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
2328 if test -z "$MKDIR_P"; then
2329 if test "${ac_cv_path_mkdir+set}" = set; then
2330 $as_echo_n "(cached) " >&6
2331 else
2332 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2333 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2334 do
2335 IFS=$as_save_IFS
2336 test -z "$as_dir" && as_dir=.
2337 for ac_prog in mkdir gmkdir; do
2338 for ac_exec_ext in '' $ac_executable_extensions; do
2339 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
2340 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2341 'mkdir (GNU coreutils) '* | \
2342 'mkdir (coreutils) '* | \
2343 'mkdir (fileutils) '4.1*)
2344 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2345 break 3;;
2346 esac
2347 done
2348 done
2349 done
2350 IFS=$as_save_IFS
2351
2352 fi
2353
2354 if test "${ac_cv_path_mkdir+set}" = set; then
2355 MKDIR_P="$ac_cv_path_mkdir -p"
2356 else
2357 # As a last resort, use the slow shell script. Don't cache a
2358 # value for MKDIR_P within a source directory, because that will
2359 # break other packages using the cache if that directory is
2360 # removed, or if the value is a relative name.
2361 test -d ./--version && rmdir ./--version
2362 MKDIR_P="$ac_install_sh -d"
2363 fi
2364 fi
2365 { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
2366 $as_echo "$MKDIR_P" >&6; }
2367
2368 mkdir_p="$MKDIR_P"
2369 case $mkdir_p in
2370 [\\/$]* | ?:[\\/]*) ;;
2371 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2372 esac
2373
2374 for ac_prog in gawk mawk nawk awk
2375 do
2376 # Extract the first word of "$ac_prog", so it can be a program name with args.
2377 set dummy $ac_prog; ac_word=$2
2378 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2379 $as_echo_n "checking for $ac_word... " >&6; }
2380 if test "${ac_cv_prog_AWK+set}" = set; then
2381 $as_echo_n "(cached) " >&6
2382 else
2383 if test -n "$AWK"; then
2384 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2385 else
2386 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2387 for as_dir in $PATH
2388 do
2389 IFS=$as_save_IFS
2390 test -z "$as_dir" && as_dir=.
2391 for ac_exec_ext in '' $ac_executable_extensions; do
2392 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2393 ac_cv_prog_AWK="$ac_prog"
2394 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2395 break 2
2396 fi
2397 done
2398 done
2399 IFS=$as_save_IFS
2400
2401 fi
2402 fi
2403 AWK=$ac_cv_prog_AWK
2404 if test -n "$AWK"; then
2405 { $as_echo "$as_me:$LINENO: result: $AWK" >&5
2406 $as_echo "$AWK" >&6; }
2407 else
2408 { $as_echo "$as_me:$LINENO: result: no" >&5
2409 $as_echo "no" >&6; }
2410 fi
2411
2412
2413 test -n "$AWK" && break
2414 done
2415
2416 { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2417 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2418 set x ${MAKE-make}
2419 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2420 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
2421 $as_echo_n "(cached) " >&6
2422 else
2423 cat >conftest.make <<\_ACEOF
2424 SHELL = /bin/sh
2425 all:
2426 @echo '@@@%%%=$(MAKE)=@@@%%%'
2427 _ACEOF
2428 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2429 case `${MAKE-make} -f conftest.make 2>/dev/null` in
2430 *@@@%%%=?*=@@@%%%*)
2431 eval ac_cv_prog_make_${ac_make}_set=yes;;
2432 *)
2433 eval ac_cv_prog_make_${ac_make}_set=no;;
2434 esac
2435 rm -f conftest.make
2436 fi
2437 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2438 { $as_echo "$as_me:$LINENO: result: yes" >&5
2439 $as_echo "yes" >&6; }
2440 SET_MAKE=
2441 else
2442 { $as_echo "$as_me:$LINENO: result: no" >&5
2443 $as_echo "no" >&6; }
2444 SET_MAKE="MAKE=${MAKE-make}"
2445 fi
2446
2447 rm -rf .tst 2>/dev/null
2448 mkdir .tst 2>/dev/null
2449 if test -d .tst; then
2450 am__leading_dot=.
2451 else
2452 am__leading_dot=_
2453 fi
2454 rmdir .tst 2>/dev/null
2455
2456 if test "`cd $srcdir && pwd`" != "`pwd`"; then
2457 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2458 # is not polluted with repeated "-I."
2459 am__isrc=' -I$(srcdir)'
2460 # test to see if srcdir already configured
2461 if test -f $srcdir/config.status; then
2462 { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
2463 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
2464 { (exit 1); exit 1; }; }
2465 fi
2466 fi
2467
2468 # test whether we have cygpath
2469 if test -z "$CYGPATH_W"; then
2470 if (cygpath --version) >/dev/null 2>/dev/null; then
2471 CYGPATH_W='cygpath -w'
2472 else
2473 CYGPATH_W=echo
2474 fi
2475 fi
2476
2477
2478 # Define the identity of the package.
2479 PACKAGE=saslauthd
2480 VERSION=2.1.26
2481
2482
2483 cat >>confdefs.h <<_ACEOF
2484 #define PACKAGE "$PACKAGE"
2485 _ACEOF
2486
2487
2488 cat >>confdefs.h <<_ACEOF
2489 #define VERSION "$VERSION"
2490 _ACEOF
2491
2492 # Some tools Automake needs.
2493
2494 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2495
2496
2497 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2498
2499
2500 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2501
2502
2503 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2504
2505
2506 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2507
2508 # We need awk for the "check" target. The system "awk" is bad on
2509 # some platforms.
2510 # Always define AMTAR for backward compatibility.
2511
2512 AMTAR=${AMTAR-"${am_missing_run}tar"}
2513
2514 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2515
2516
2517
2518
2519
2520
2521
2522 ACLOCAL="$ACLOCAL -I \$(top_srcdir)/cmulocal"
2523
2524
2525 ac_ext=c
2526 ac_cpp='$CPP $CPPFLAGS'
2527 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2528 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2529 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2530 if test -n "$ac_tool_prefix"; then
2531 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2532 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2533 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2534 $as_echo_n "checking for $ac_word... " >&6; }
2535 if test "${ac_cv_prog_CC+set}" = set; then
2536 $as_echo_n "(cached) " >&6
2537 else
2538 if test -n "$CC"; then
2539 ac_cv_prog_CC="$CC" # Let the user override the test.
2540 else
2541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2542 for as_dir in $PATH
2543 do
2544 IFS=$as_save_IFS
2545 test -z "$as_dir" && as_dir=.
2546 for ac_exec_ext in '' $ac_executable_extensions; do
2547 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2548 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2549 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2550 break 2
2551 fi
2552 done
2553 done
2554 IFS=$as_save_IFS
2555
2556 fi
2557 fi
2558 CC=$ac_cv_prog_CC
2559 if test -n "$CC"; then
2560 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2561 $as_echo "$CC" >&6; }
2562 else
2563 { $as_echo "$as_me:$LINENO: result: no" >&5
2564 $as_echo "no" >&6; }
2565 fi
2566
2567
2568 fi
2569 if test -z "$ac_cv_prog_CC"; then
2570 ac_ct_CC=$CC
2571 # Extract the first word of "gcc", so it can be a program name with args.
2572 set dummy gcc; ac_word=$2
2573 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2574 $as_echo_n "checking for $ac_word... " >&6; }
2575 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2576 $as_echo_n "(cached) " >&6
2577 else
2578 if test -n "$ac_ct_CC"; then
2579 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2580 else
2581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2582 for as_dir in $PATH
2583 do
2584 IFS=$as_save_IFS
2585 test -z "$as_dir" && as_dir=.
2586 for ac_exec_ext in '' $ac_executable_extensions; do
2587 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2588 ac_cv_prog_ac_ct_CC="gcc"
2589 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2590 break 2
2591 fi
2592 done
2593 done
2594 IFS=$as_save_IFS
2595
2596 fi
2597 fi
2598 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2599 if test -n "$ac_ct_CC"; then
2600 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2601 $as_echo "$ac_ct_CC" >&6; }
2602 else
2603 { $as_echo "$as_me:$LINENO: result: no" >&5
2604 $as_echo "no" >&6; }
2605 fi
2606
2607 if test "x$ac_ct_CC" = x; then
2608 CC=""
2609 else
2610 case $cross_compiling:$ac_tool_warned in
2611 yes:)
2612 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2613 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2614 ac_tool_warned=yes ;;
2615 esac
2616 CC=$ac_ct_CC
2617 fi
2618 else
2619 CC="$ac_cv_prog_CC"
2620 fi
2621
2622 if test -z "$CC"; then
2623 if test -n "$ac_tool_prefix"; then
2624 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2625 set dummy ${ac_tool_prefix}cc; ac_word=$2
2626 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2627 $as_echo_n "checking for $ac_word... " >&6; }
2628 if test "${ac_cv_prog_CC+set}" = set; then
2629 $as_echo_n "(cached) " >&6
2630 else
2631 if test -n "$CC"; then
2632 ac_cv_prog_CC="$CC" # Let the user override the test.
2633 else
2634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2635 for as_dir in $PATH
2636 do
2637 IFS=$as_save_IFS
2638 test -z "$as_dir" && as_dir=.
2639 for ac_exec_ext in '' $ac_executable_extensions; do
2640 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2641 ac_cv_prog_CC="${ac_tool_prefix}cc"
2642 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2643 break 2
2644 fi
2645 done
2646 done
2647 IFS=$as_save_IFS
2648
2649 fi
2650 fi
2651 CC=$ac_cv_prog_CC
2652 if test -n "$CC"; then
2653 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2654 $as_echo "$CC" >&6; }
2655 else
2656 { $as_echo "$as_me:$LINENO: result: no" >&5
2657 $as_echo "no" >&6; }
2658 fi
2659
2660
2661 fi
2662 fi
2663 if test -z "$CC"; then
2664 # Extract the first word of "cc", so it can be a program name with args.
2665 set dummy cc; ac_word=$2
2666 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2667 $as_echo_n "checking for $ac_word... " >&6; }
2668 if test "${ac_cv_prog_CC+set}" = set; then
2669 $as_echo_n "(cached) " >&6
2670 else
2671 if test -n "$CC"; then
2672 ac_cv_prog_CC="$CC" # Let the user override the test.
2673 else
2674 ac_prog_rejected=no
2675 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2676 for as_dir in $PATH
2677 do
2678 IFS=$as_save_IFS
2679 test -z "$as_dir" && as_dir=.
2680 for ac_exec_ext in '' $ac_executable_extensions; do
2681 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2682 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2683 ac_prog_rejected=yes
2684 continue
2685 fi
2686 ac_cv_prog_CC="cc"
2687 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2688 break 2
2689 fi
2690 done
2691 done
2692 IFS=$as_save_IFS
2693
2694 if test $ac_prog_rejected = yes; then
2695 # We found a bogon in the path, so make sure we never use it.
2696 set dummy $ac_cv_prog_CC
2697 shift
2698 if test $# != 0; then
2699 # We chose a different compiler from the bogus one.
2700 # However, it has the same basename, so the bogon will be chosen
2701 # first if we set CC to just the basename; use the full file name.
2702 shift
2703 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2704 fi
2705 fi
2706 fi
2707 fi
2708 CC=$ac_cv_prog_CC
2709 if test -n "$CC"; then
2710 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2711 $as_echo "$CC" >&6; }
2712 else
2713 { $as_echo "$as_me:$LINENO: result: no" >&5
2714 $as_echo "no" >&6; }
2715 fi
2716
2717
2718 fi
2719 if test -z "$CC"; then
2720 if test -n "$ac_tool_prefix"; then
2721 for ac_prog in cl.exe
2722 do
2723 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2724 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2725 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2726 $as_echo_n "checking for $ac_word... " >&6; }
2727 if test "${ac_cv_prog_CC+set}" = set; then
2728 $as_echo_n "(cached) " >&6
2729 else
2730 if test -n "$CC"; then
2731 ac_cv_prog_CC="$CC" # Let the user override the test.
2732 else
2733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2734 for as_dir in $PATH
2735 do
2736 IFS=$as_save_IFS
2737 test -z "$as_dir" && as_dir=.
2738 for ac_exec_ext in '' $ac_executable_extensions; do
2739 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2740 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2741 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2742 break 2
2743 fi
2744 done
2745 done
2746 IFS=$as_save_IFS
2747
2748 fi
2749 fi
2750 CC=$ac_cv_prog_CC
2751 if test -n "$CC"; then
2752 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2753 $as_echo "$CC" >&6; }
2754 else
2755 { $as_echo "$as_me:$LINENO: result: no" >&5
2756 $as_echo "no" >&6; }
2757 fi
2758
2759
2760 test -n "$CC" && break
2761 done
2762 fi
2763 if test -z "$CC"; then
2764 ac_ct_CC=$CC
2765 for ac_prog in cl.exe
2766 do
2767 # Extract the first word of "$ac_prog", so it can be a program name with args.
2768 set dummy $ac_prog; ac_word=$2
2769 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2770 $as_echo_n "checking for $ac_word... " >&6; }
2771 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2772 $as_echo_n "(cached) " >&6
2773 else
2774 if test -n "$ac_ct_CC"; then
2775 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2776 else
2777 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2778 for as_dir in $PATH
2779 do
2780 IFS=$as_save_IFS
2781 test -z "$as_dir" && as_dir=.
2782 for ac_exec_ext in '' $ac_executable_extensions; do
2783 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2784 ac_cv_prog_ac_ct_CC="$ac_prog"
2785 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2786 break 2
2787 fi
2788 done
2789 done
2790 IFS=$as_save_IFS
2791
2792 fi
2793 fi
2794 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2795 if test -n "$ac_ct_CC"; then
2796 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2797 $as_echo "$ac_ct_CC" >&6; }
2798 else
2799 { $as_echo "$as_me:$LINENO: result: no" >&5
2800 $as_echo "no" >&6; }
2801 fi
2802
2803
2804 test -n "$ac_ct_CC" && break
2805 done
2806
2807 if test "x$ac_ct_CC" = x; then
2808 CC=""
2809 else
2810 case $cross_compiling:$ac_tool_warned in
2811 yes:)
2812 { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2813 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2814 ac_tool_warned=yes ;;
2815 esac
2816 CC=$ac_ct_CC
2817 fi
2818 fi
2819
2820 fi
2821
2822
2823 test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2824 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2825 { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2826 See \`config.log' for more details." >&5
2827 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH
2828 See \`config.log' for more details." >&2;}
2829 { (exit 1); exit 1; }; }; }
2830
2831 # Provide some information about the compiler.
2832 $as_echo "$as_me:$LINENO: checking for C compiler version" >&5
2833 set X $ac_compile
2834 ac_compiler=$2
2835 { (ac_try="$ac_compiler --version >&5"
2836 case "(($ac_try" in
2837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2838 *) ac_try_echo=$ac_try;;
2839 esac
2840 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2841 $as_echo "$ac_try_echo") >&5
2842 (eval "$ac_compiler --version >&5") 2>&5
2843 ac_status=$?
2844 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2845 (exit $ac_status); }
2846 { (ac_try="$ac_compiler -v >&5"
2847 case "(($ac_try" in
2848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2849 *) ac_try_echo=$ac_try;;
2850 esac
2851 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2852 $as_echo "$ac_try_echo") >&5
2853 (eval "$ac_compiler -v >&5") 2>&5
2854 ac_status=$?
2855 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2856 (exit $ac_status); }
2857 { (ac_try="$ac_compiler -V >&5"
2858 case "(($ac_try" in
2859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2860 *) ac_try_echo=$ac_try;;
2861 esac
2862 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2863 $as_echo "$ac_try_echo") >&5
2864 (eval "$ac_compiler -V >&5") 2>&5
2865 ac_status=$?
2866 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2867 (exit $ac_status); }
2868
2869 cat >conftest.$ac_ext <<_ACEOF
2870 /* confdefs.h. */
2871 _ACEOF
2872 cat confdefs.h >>conftest.$ac_ext
2873 cat >>conftest.$ac_ext <<_ACEOF
2874 /* end confdefs.h. */
2875
2876 int
2877 main ()
2878 {
2879
2880 ;
2881 return 0;
2882 }
2883 _ACEOF
2884 ac_clean_files_save=$ac_clean_files
2885 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2886 # Try to create an executable without -o first, disregard a.out.
2887 # It will help us diagnose broken compilers, and finding out an intuition
2888 # of exeext.
2889 { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2890 $as_echo_n "checking for C compiler default output file name... " >&6; }
2891 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2892
2893 # The possible output files:
2894 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2895
2896 ac_rmfiles=
2897 for ac_file in $ac_files
2898 do
2899 case $ac_file in
2900 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2901 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2902 esac
2903 done
2904 rm -f $ac_rmfiles
2905
2906 if { (ac_try="$ac_link_default"
2907 case "(($ac_try" in
2908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2909 *) ac_try_echo=$ac_try;;
2910 esac
2911 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2912 $as_echo "$ac_try_echo") >&5
2913 (eval "$ac_link_default") 2>&5
2914 ac_status=$?
2915 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2916 (exit $ac_status); }; then
2917 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2918 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2919 # in a Makefile. We should not override ac_cv_exeext if it was cached,
2920 # so that the user can short-circuit this test for compilers unknown to
2921 # Autoconf.
2922 for ac_file in $ac_files ''
2923 do
2924 test -f "$ac_file" || continue
2925 case $ac_file in
2926 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2927 ;;
2928 [ab].out )
2929 # We found the default executable, but exeext='' is most
2930 # certainly right.
2931 break;;
2932 *.* )
2933 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2934 then :; else
2935 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2936 fi
2937 # We set ac_cv_exeext here because the later test for it is not
2938 # safe: cross compilers may not add the suffix if given an `-o'
2939 # argument, so we may need to know it at that point already.
2940 # Even if this section looks crufty: it has the advantage of
2941 # actually working.
2942 break;;
2943 * )
2944 break;;
2945 esac
2946 done
2947 test "$ac_cv_exeext" = no && ac_cv_exeext=
2948
2949 else
2950 ac_file=''
2951 fi
2952
2953 { $as_echo "$as_me:$LINENO: result: $ac_file" >&5
2954 $as_echo "$ac_file" >&6; }
2955 if test -z "$ac_file"; then
2956 $as_echo "$as_me: failed program was:" >&5
2957 sed 's/^/| /' conftest.$ac_ext >&5
2958
2959 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2960 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2961 { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
2962 See \`config.log' for more details." >&5
2963 $as_echo "$as_me: error: C compiler cannot create executables
2964 See \`config.log' for more details." >&2;}
2965 { (exit 77); exit 77; }; }; }
2966 fi
2967
2968 ac_exeext=$ac_cv_exeext
2969
2970 # Check that the compiler produces executables we can run. If not, either
2971 # the compiler is broken, or we cross compile.
2972 { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2973 $as_echo_n "checking whether the C compiler works... " >&6; }
2974 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2975 # If not cross compiling, check that we can run a simple program.
2976 if test "$cross_compiling" != yes; then
2977 if { ac_try='./$ac_file'
2978 { (case "(($ac_try" in
2979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2980 *) ac_try_echo=$ac_try;;
2981 esac
2982 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2983 $as_echo "$ac_try_echo") >&5
2984 (eval "$ac_try") 2>&5
2985 ac_status=$?
2986 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
2987 (exit $ac_status); }; }; then
2988 cross_compiling=no
2989 else
2990 if test "$cross_compiling" = maybe; then
2991 cross_compiling=yes
2992 else
2993 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2994 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2995 { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
2996 If you meant to cross compile, use \`--host'.
2997 See \`config.log' for more details." >&5
2998 $as_echo "$as_me: error: cannot run C compiled programs.
2999 If you meant to cross compile, use \`--host'.
3000 See \`config.log' for more details." >&2;}
3001 { (exit 1); exit 1; }; }; }
3002 fi
3003 fi
3004 fi
3005 { $as_echo "$as_me:$LINENO: result: yes" >&5
3006 $as_echo "yes" >&6; }
3007
3008 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3009 ac_clean_files=$ac_clean_files_save
3010 # Check that the compiler produces executables we can run. If not, either
3011 # the compiler is broken, or we cross compile.
3012 { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3013 $as_echo_n "checking whether we are cross compiling... " >&6; }
3014 { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
3015 $as_echo "$cross_compiling" >&6; }
3016
3017 { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
3018 $as_echo_n "checking for suffix of executables... " >&6; }
3019 if { (ac_try="$ac_link"
3020 case "(($ac_try" in
3021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3022 *) ac_try_echo=$ac_try;;
3023 esac
3024 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3025 $as_echo "$ac_try_echo") >&5
3026 (eval "$ac_link") 2>&5
3027 ac_status=$?
3028 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3029 (exit $ac_status); }; then
3030 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3031 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3032 # work properly (i.e., refer to `conftest.exe'), while it won't with
3033 # `rm'.
3034 for ac_file in conftest.exe conftest conftest.*; do
3035 test -f "$ac_file" || continue
3036 case $ac_file in
3037 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3038 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3039 break;;
3040 * ) break;;
3041 esac
3042 done
3043 else
3044 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3045 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3046 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3047 See \`config.log' for more details." >&5
3048 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3049 See \`config.log' for more details." >&2;}
3050 { (exit 1); exit 1; }; }; }
3051 fi
3052
3053 rm -f conftest$ac_cv_exeext
3054 { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3055 $as_echo "$ac_cv_exeext" >&6; }
3056
3057 rm -f conftest.$ac_ext
3058 EXEEXT=$ac_cv_exeext
3059 ac_exeext=$EXEEXT
3060 { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
3061 $as_echo_n "checking for suffix of object files... " >&6; }
3062 if test "${ac_cv_objext+set}" = set; then
3063 $as_echo_n "(cached) " >&6
3064 else
3065 cat >conftest.$ac_ext <<_ACEOF
3066 /* confdefs.h. */
3067 _ACEOF
3068 cat confdefs.h >>conftest.$ac_ext
3069 cat >>conftest.$ac_ext <<_ACEOF
3070 /* end confdefs.h. */
3071
3072 int
3073 main ()
3074 {
3075
3076 ;
3077 return 0;
3078 }
3079 _ACEOF
3080 rm -f conftest.o conftest.obj
3081 if { (ac_try="$ac_compile"
3082 case "(($ac_try" in
3083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3084 *) ac_try_echo=$ac_try;;
3085 esac
3086 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3087 $as_echo "$ac_try_echo") >&5
3088 (eval "$ac_compile") 2>&5
3089 ac_status=$?
3090 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3091 (exit $ac_status); }; then
3092 for ac_file in conftest.o conftest.obj conftest.*; do
3093 test -f "$ac_file" || continue;
3094 case $ac_file in
3095 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3096 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3097 break;;
3098 esac
3099 done
3100 else
3101 $as_echo "$as_me: failed program was:" >&5
3102 sed 's/^/| /' conftest.$ac_ext >&5
3103
3104 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3105 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3106 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3107 See \`config.log' for more details." >&5
3108 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
3109 See \`config.log' for more details." >&2;}
3110 { (exit 1); exit 1; }; }; }
3111 fi
3112
3113 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3114 fi
3115 { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3116 $as_echo "$ac_cv_objext" >&6; }
3117 OBJEXT=$ac_cv_objext
3118 ac_objext=$OBJEXT
3119 { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3120 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3121 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3122 $as_echo_n "(cached) " >&6
3123 else
3124 cat >conftest.$ac_ext <<_ACEOF
3125 /* confdefs.h. */
3126 _ACEOF
3127 cat confdefs.h >>conftest.$ac_ext
3128 cat >>conftest.$ac_ext <<_ACEOF
3129 /* end confdefs.h. */
3130
3131 int
3132 main ()
3133 {
3134 #ifndef __GNUC__
3135 choke me
3136 #endif
3137
3138 ;
3139 return 0;
3140 }
3141 _ACEOF
3142 rm -f conftest.$ac_objext
3143 if { (ac_try="$ac_compile"
3144 case "(($ac_try" in
3145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3146 *) ac_try_echo=$ac_try;;
3147 esac
3148 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3149 $as_echo "$ac_try_echo") >&5
3150 (eval "$ac_compile") 2>conftest.er1
3151 ac_status=$?
3152 grep -v '^ *+' conftest.er1 >conftest.err
3153 rm -f conftest.er1
3154 cat conftest.err >&5
3155 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3156 (exit $ac_status); } && {
3157 test -z "$ac_c_werror_flag" ||
3158 test ! -s conftest.err
3159 } && test -s conftest.$ac_objext; then
3160 ac_compiler_gnu=yes
3161 else
3162 $as_echo "$as_me: failed program was:" >&5
3163 sed 's/^/| /' conftest.$ac_ext >&5
3164
3165 ac_compiler_gnu=no
3166 fi
3167
3168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3169 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3170
3171 fi
3172 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3173 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3174 if test $ac_compiler_gnu = yes; then
3175 GCC=yes
3176 else
3177 GCC=
3178 fi
3179 ac_test_CFLAGS=${CFLAGS+set}
3180 ac_save_CFLAGS=$CFLAGS
3181 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3182 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3183 if test "${ac_cv_prog_cc_g+set}" = set; then
3184 $as_echo_n "(cached) " >&6
3185 else
3186 ac_save_c_werror_flag=$ac_c_werror_flag
3187 ac_c_werror_flag=yes
3188 ac_cv_prog_cc_g=no
3189 CFLAGS="-g"
3190 cat >conftest.$ac_ext <<_ACEOF
3191 /* confdefs.h. */
3192 _ACEOF
3193 cat confdefs.h >>conftest.$ac_ext
3194 cat >>conftest.$ac_ext <<_ACEOF
3195 /* end confdefs.h. */
3196
3197 int
3198 main ()
3199 {
3200
3201 ;
3202 return 0;
3203 }
3204 _ACEOF
3205 rm -f conftest.$ac_objext
3206 if { (ac_try="$ac_compile"
3207 case "(($ac_try" in
3208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3209 *) ac_try_echo=$ac_try;;
3210 esac
3211 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3212 $as_echo "$ac_try_echo") >&5
3213 (eval "$ac_compile") 2>conftest.er1
3214 ac_status=$?
3215 grep -v '^ *+' conftest.er1 >conftest.err
3216 rm -f conftest.er1
3217 cat conftest.err >&5
3218 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3219 (exit $ac_status); } && {
3220 test -z "$ac_c_werror_flag" ||
3221 test ! -s conftest.err
3222 } && test -s conftest.$ac_objext; then
3223 ac_cv_prog_cc_g=yes
3224 else
3225 $as_echo "$as_me: failed program was:" >&5
3226 sed 's/^/| /' conftest.$ac_ext >&5
3227
3228 CFLAGS=""
3229 cat >conftest.$ac_ext <<_ACEOF
3230 /* confdefs.h. */
3231 _ACEOF
3232 cat confdefs.h >>conftest.$ac_ext
3233 cat >>conftest.$ac_ext <<_ACEOF
3234 /* end confdefs.h. */
3235
3236 int
3237 main ()
3238 {
3239
3240 ;
3241 return 0;
3242 }
3243 _ACEOF
3244 rm -f conftest.$ac_objext
3245 if { (ac_try="$ac_compile"
3246 case "(($ac_try" in
3247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3248 *) ac_try_echo=$ac_try;;
3249 esac
3250 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3251 $as_echo "$ac_try_echo") >&5
3252 (eval "$ac_compile") 2>conftest.er1
3253 ac_status=$?
3254 grep -v '^ *+' conftest.er1 >conftest.err
3255 rm -f conftest.er1
3256 cat conftest.err >&5
3257 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3258 (exit $ac_status); } && {
3259 test -z "$ac_c_werror_flag" ||
3260 test ! -s conftest.err
3261 } && test -s conftest.$ac_objext; then
3262 :
3263 else
3264 $as_echo "$as_me: failed program was:" >&5
3265 sed 's/^/| /' conftest.$ac_ext >&5
3266
3267 ac_c_werror_flag=$ac_save_c_werror_flag
3268 CFLAGS="-g"
3269 cat >conftest.$ac_ext <<_ACEOF
3270 /* confdefs.h. */
3271 _ACEOF
3272 cat confdefs.h >>conftest.$ac_ext
3273 cat >>conftest.$ac_ext <<_ACEOF
3274 /* end confdefs.h. */
3275
3276 int
3277 main ()
3278 {
3279
3280 ;
3281 return 0;
3282 }
3283 _ACEOF
3284 rm -f conftest.$ac_objext
3285 if { (ac_try="$ac_compile"
3286 case "(($ac_try" in
3287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3288 *) ac_try_echo=$ac_try;;
3289 esac
3290 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3291 $as_echo "$ac_try_echo") >&5
3292 (eval "$ac_compile") 2>conftest.er1
3293 ac_status=$?
3294 grep -v '^ *+' conftest.er1 >conftest.err
3295 rm -f conftest.er1
3296 cat conftest.err >&5
3297 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3298 (exit $ac_status); } && {
3299 test -z "$ac_c_werror_flag" ||
3300 test ! -s conftest.err
3301 } && test -s conftest.$ac_objext; then
3302 ac_cv_prog_cc_g=yes
3303 else
3304 $as_echo "$as_me: failed program was:" >&5
3305 sed 's/^/| /' conftest.$ac_ext >&5
3306
3307
3308 fi
3309
3310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3311 fi
3312
3313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3314 fi
3315
3316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3317 ac_c_werror_flag=$ac_save_c_werror_flag
3318 fi
3319 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3320 $as_echo "$ac_cv_prog_cc_g" >&6; }
3321 if test "$ac_test_CFLAGS" = set; then
3322 CFLAGS=$ac_save_CFLAGS
3323 elif test $ac_cv_prog_cc_g = yes; then
3324 if test "$GCC" = yes; then
3325 CFLAGS="-g -O2"
3326 else
3327 CFLAGS="-g"
3328 fi
3329 else
3330 if test "$GCC" = yes; then
3331 CFLAGS="-O2"
3332 else
3333 CFLAGS=
3334 fi
3335 fi
3336 { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3337 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3338 if test "${ac_cv_prog_cc_c89+set}" = set; then
3339 $as_echo_n "(cached) " >&6
3340 else
3341 ac_cv_prog_cc_c89=no
3342 ac_save_CC=$CC
3343 cat >conftest.$ac_ext <<_ACEOF
3344 /* confdefs.h. */
3345 _ACEOF
3346 cat confdefs.h >>conftest.$ac_ext
3347 cat >>conftest.$ac_ext <<_ACEOF
3348 /* end confdefs.h. */
3349 #include <stdarg.h>
3350 #include <stdio.h>
3351 #include <sys/types.h>
3352 #include <sys/stat.h>
3353 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3354 struct buf { int x; };
3355 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3356 static char *e (p, i)
3357 char **p;
3358 int i;
3359 {
3360 return p[i];
3361 }
3362 static char *f (char * (*g) (char **, int), char **p, ...)
3363 {
3364 char *s;
3365 va_list v;
3366 va_start (v,p);
3367 s = g (p, va_arg (v,int));
3368 va_end (v);
3369 return s;
3370 }
3371
3372 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3373 function prototypes and stuff, but not '\xHH' hex character constants.
3374 These don't provoke an error unfortunately, instead are silently treated
3375 as 'x'. The following induces an error, until -std is added to get
3376 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3377 array size at least. It's necessary to write '\x00'==0 to get something
3378 that's true only with -std. */
3379 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3380
3381 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3382 inside strings and character constants. */
3383 #define FOO(x) 'x'
3384 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3385
3386 int test (int i, double x);
3387 struct s1 {int (*f) (int a);};
3388 struct s2 {int (*f) (double a);};
3389 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3390 int argc;
3391 char **argv;
3392 int
3393 main ()
3394 {
3395 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3396 ;
3397 return 0;
3398 }
3399 _ACEOF
3400 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3401 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3402 do
3403 CC="$ac_save_CC $ac_arg"
3404 rm -f conftest.$ac_objext
3405 if { (ac_try="$ac_compile"
3406 case "(($ac_try" in
3407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3408 *) ac_try_echo=$ac_try;;
3409 esac
3410 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3411 $as_echo "$ac_try_echo") >&5
3412 (eval "$ac_compile") 2>conftest.er1
3413 ac_status=$?
3414 grep -v '^ *+' conftest.er1 >conftest.err
3415 rm -f conftest.er1
3416 cat conftest.err >&5
3417 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3418 (exit $ac_status); } && {
3419 test -z "$ac_c_werror_flag" ||
3420 test ! -s conftest.err
3421 } && test -s conftest.$ac_objext; then
3422 ac_cv_prog_cc_c89=$ac_arg
3423 else
3424 $as_echo "$as_me: failed program was:" >&5
3425 sed 's/^/| /' conftest.$ac_ext >&5
3426
3427
3428 fi
3429
3430 rm -f core conftest.err conftest.$ac_objext
3431 test "x$ac_cv_prog_cc_c89" != "xno" && break
3432 done
3433 rm -f conftest.$ac_ext
3434 CC=$ac_save_CC
3435
3436 fi
3437 # AC_CACHE_VAL
3438 case "x$ac_cv_prog_cc_c89" in
3439 x)
3440 { $as_echo "$as_me:$LINENO: result: none needed" >&5
3441 $as_echo "none needed" >&6; } ;;
3442 xno)
3443 { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3444 $as_echo "unsupported" >&6; } ;;
3445 *)
3446 CC="$CC $ac_cv_prog_cc_c89"
3447 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3448 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3449 esac
3450
3451
3452 ac_ext=c
3453 ac_cpp='$CPP $CPPFLAGS'
3454 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3455 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3456 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3457 DEPDIR="${am__leading_dot}deps"
3458
3459 ac_config_commands="$ac_config_commands depfiles"
3460
3461
3462 am_make=${MAKE-make}
3463 cat > confinc << 'END'
3464 am__doit:
3465 @echo this is the am__doit target
3466 .PHONY: am__doit
3467 END
3468 # If we don't find an include directive, just comment out the code.
3469 { $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
3470 $as_echo_n "checking for style of include used by $am_make... " >&6; }
3471 am__include="#"
3472 am__quote=
3473 _am_result=none
3474 # First try GNU make style include.
3475 echo "include confinc" > confmf
3476 # Ignore all kinds of additional output from `make'.
3477 case `$am_make -s -f confmf 2> /dev/null` in #(
3478 *the\ am__doit\ target*)
3479 am__include=include
3480 am__quote=
3481 _am_result=GNU
3482 ;;
3483 esac
3484 # Now try BSD make style include.
3485 if test "$am__include" = "#"; then
3486 echo '.include "confinc"' > confmf
3487 case `$am_make -s -f confmf 2> /dev/null` in #(
3488 *the\ am__doit\ target*)
3489 am__include=.include
3490 am__quote="\""
3491 _am_result=BSD
3492 ;;
3493 esac
3494 fi
3495
3496
3497 { $as_echo "$as_me:$LINENO: result: $_am_result" >&5
3498 $as_echo "$_am_result" >&6; }
3499 rm -f confinc confmf
3500
3501 # Check whether --enable-dependency-tracking was given.
3502 if test "${enable_dependency_tracking+set}" = set; then
3503 enableval=$enable_dependency_tracking;
3504 fi
3505
3506 if test "x$enable_dependency_tracking" != xno; then
3507 am_depcomp="$ac_aux_dir/depcomp"
3508 AMDEPBACKSLASH='\'
3509 fi
3510 if test "x$enable_dependency_tracking" != xno; then
3511 AMDEP_TRUE=
3512 AMDEP_FALSE='#'
3513 else
3514 AMDEP_TRUE='#'
3515 AMDEP_FALSE=
3516 fi
3517
3518
3519
3520 depcc="$CC" am_compiler_list=
3521
3522 { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
3523 $as_echo_n "checking dependency style of $depcc... " >&6; }
3524 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
3525 $as_echo_n "(cached) " >&6
3526 else
3527 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3528 # We make a subdir and do the tests there. Otherwise we can end up
3529 # making bogus files that we don't know about and never remove. For
3530 # instance it was reported that on HP-UX the gcc test will end up
3531 # making a dummy file named `D' -- because `-MD' means `put the output
3532 # in D'.
3533 mkdir conftest.dir
3534 # Copy depcomp to subdir because otherwise we won't find it if we're
3535 # using a relative directory.
3536 cp "$am_depcomp" conftest.dir
3537 cd conftest.dir
3538 # We will build objects and dependencies in a subdirectory because
3539 # it helps to detect inapplicable dependency modes. For instance
3540 # both Tru64's cc and ICC support -MD to output dependencies as a
3541 # side effect of compilation, but ICC will put the dependencies in
3542 # the current directory while Tru64 will put them in the object
3543 # directory.
3544 mkdir sub
3545
3546 am_cv_CC_dependencies_compiler_type=none
3547 if test "$am_compiler_list" = ""; then
3548 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3549 fi
3550 am__universal=false
3551 case " $depcc " in #(
3552 *\ -arch\ *\ -arch\ *) am__universal=true ;;
3553 esac
3554
3555 for depmode in $am_compiler_list; do
3556 # Setup a source with many dependencies, because some compilers
3557 # like to wrap large dependency lists on column 80 (with \), and
3558 # we should not choose a depcomp mode which is confused by this.
3559 #
3560 # We need to recreate these files for each test, as the compiler may
3561 # overwrite some of them when testing with obscure command lines.
3562 # This happens at least with the AIX C compiler.
3563 : > sub/conftest.c
3564 for i in 1 2 3 4 5 6; do
3565 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3566 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3567 # Solaris 8's {/usr,}/bin/sh.
3568 touch sub/conftst$i.h
3569 done
3570 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3571
3572 # We check with `-c' and `-o' for the sake of the "dashmstdout"
3573 # mode. It turns out that the SunPro C++ compiler does not properly
3574 # handle `-M -o', and we need to detect this. Also, some Intel
3575 # versions had trouble with output in subdirs
3576 am__obj=sub/conftest.${OBJEXT-o}
3577 am__minus_obj="-o $am__obj"
3578 case $depmode in
3579 gcc)
3580 # This depmode causes a compiler race in universal mode.
3581 test "$am__universal" = false || continue
3582 ;;
3583 nosideeffect)
3584 # after this tag, mechanisms are not by side-effect, so they'll
3585 # only be used when explicitly requested
3586 if test "x$enable_dependency_tracking" = xyes; then
3587 continue
3588 else
3589 break
3590 fi
3591 ;;
3592 msvisualcpp | msvcmsys)
3593 # This compiler won't grok `-c -o', but also, the minuso test has
3594 # not run yet. These depmodes are late enough in the game, and
3595 # so weak that their functioning should not be impacted.
3596 am__obj=conftest.${OBJEXT-o}
3597 am__minus_obj=
3598 ;;
3599 none) break ;;
3600 esac
3601 if depmode=$depmode \
3602 source=sub/conftest.c object=$am__obj \
3603 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3604 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3605 >/dev/null 2>conftest.err &&
3606 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3607 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3608 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3609 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3610 # icc doesn't choke on unknown options, it will just issue warnings
3611 # or remarks (even with -Werror). So we grep stderr for any message
3612 # that says an option was ignored or not supported.
3613 # When given -MP, icc 7.0 and 7.1 complain thusly:
3614 # icc: Command line warning: ignoring option '-M'; no argument required
3615 # The diagnosis changed in icc 8.0:
3616 # icc: Command line remark: option '-MP' not supported
3617 if (grep 'ignoring option' conftest.err ||
3618 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3619 am_cv_CC_dependencies_compiler_type=$depmode
3620 break
3621 fi
3622 fi
3623 done
3624
3625 cd ..
3626 rm -rf conftest.dir
3627 else
3628 am_cv_CC_dependencies_compiler_type=none
3629 fi
3630
3631 fi
3632 { $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
3633 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
3634 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
3635
3636 if
3637 test "x$enable_dependency_tracking" != xno \
3638 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
3639 am__fastdepCC_TRUE=
3640 am__fastdepCC_FALSE='#'
3641 else
3642 am__fastdepCC_TRUE='#'
3643 am__fastdepCC_FALSE=
3644 fi
3645
3646
3647 ac_ext=c
3648 ac_cpp='$CPP $CPPFLAGS'
3649 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3650 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3651 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3652 { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3653 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3654 # On Suns, sometimes $CPP names a directory.
3655 if test -n "$CPP" && test -d "$CPP"; then
3656 CPP=
3657 fi
3658 if test -z "$CPP"; then
3659 if test "${ac_cv_prog_CPP+set}" = set; then
3660 $as_echo_n "(cached) " >&6
3661 else
3662 # Double quotes because CPP needs to be expanded
3663 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3664 do
3665 ac_preproc_ok=false
3666 for ac_c_preproc_warn_flag in '' yes
3667 do
3668 # Use a header file that comes with gcc, so configuring glibc
3669 # with a fresh cross-compiler works.
3670 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3671 # <limits.h> exists even on freestanding compilers.
3672 # On the NeXT, cc -E runs the code through the compiler's parser,
3673 # not just through cpp. "Syntax error" is here to catch this case.
3674 cat >conftest.$ac_ext <<_ACEOF
3675 /* confdefs.h. */
3676 _ACEOF
3677 cat confdefs.h >>conftest.$ac_ext
3678 cat >>conftest.$ac_ext <<_ACEOF
3679 /* end confdefs.h. */
3680 #ifdef __STDC__
3681 # include <limits.h>
3682 #else
3683 # include <assert.h>
3684 #endif
3685 Syntax error
3686 _ACEOF
3687 if { (ac_try="$ac_cpp conftest.$ac_ext"
3688 case "(($ac_try" in
3689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3690 *) ac_try_echo=$ac_try;;
3691 esac
3692 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3693 $as_echo "$ac_try_echo") >&5
3694 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3695 ac_status=$?
3696 grep -v '^ *+' conftest.er1 >conftest.err
3697 rm -f conftest.er1
3698 cat conftest.err >&5
3699 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3700 (exit $ac_status); } >/dev/null && {
3701 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3702 test ! -s conftest.err
3703 }; then
3704 :
3705 else
3706 $as_echo "$as_me: failed program was:" >&5
3707 sed 's/^/| /' conftest.$ac_ext >&5
3708
3709 # Broken: fails on valid input.
3710 continue
3711 fi
3712
3713 rm -f conftest.err conftest.$ac_ext
3714
3715 # OK, works on sane cases. Now check whether nonexistent headers
3716 # can be detected and how.
3717 cat >conftest.$ac_ext <<_ACEOF
3718 /* confdefs.h. */
3719 _ACEOF
3720 cat confdefs.h >>conftest.$ac_ext
3721 cat >>conftest.$ac_ext <<_ACEOF
3722 /* end confdefs.h. */
3723 #include <ac_nonexistent.h>
3724 _ACEOF
3725 if { (ac_try="$ac_cpp conftest.$ac_ext"
3726 case "(($ac_try" in
3727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3728 *) ac_try_echo=$ac_try;;
3729 esac
3730 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3731 $as_echo "$ac_try_echo") >&5
3732 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3733 ac_status=$?
3734 grep -v '^ *+' conftest.er1 >conftest.err
3735 rm -f conftest.er1
3736 cat conftest.err >&5
3737 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3738 (exit $ac_status); } >/dev/null && {
3739 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3740 test ! -s conftest.err
3741 }; then
3742 # Broken: success on invalid input.
3743 continue
3744 else
3745 $as_echo "$as_me: failed program was:" >&5
3746 sed 's/^/| /' conftest.$ac_ext >&5
3747
3748 # Passes both tests.
3749 ac_preproc_ok=:
3750 break
3751 fi
3752
3753 rm -f conftest.err conftest.$ac_ext
3754
3755 done
3756 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3757 rm -f conftest.err conftest.$ac_ext
3758 if $ac_preproc_ok; then
3759 break
3760 fi
3761
3762 done
3763 ac_cv_prog_CPP=$CPP
3764
3765 fi
3766 CPP=$ac_cv_prog_CPP
3767 else
3768 ac_cv_prog_CPP=$CPP
3769 fi
3770 { $as_echo "$as_me:$LINENO: result: $CPP" >&5
3771 $as_echo "$CPP" >&6; }
3772 ac_preproc_ok=false
3773 for ac_c_preproc_warn_flag in '' yes
3774 do
3775 # Use a header file that comes with gcc, so configuring glibc
3776 # with a fresh cross-compiler works.
3777 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3778 # <limits.h> exists even on freestanding compilers.
3779 # On the NeXT, cc -E runs the code through the compiler's parser,
3780 # not just through cpp. "Syntax error" is here to catch this case.
3781 cat >conftest.$ac_ext <<_ACEOF
3782 /* confdefs.h. */
3783 _ACEOF
3784 cat confdefs.h >>conftest.$ac_ext
3785 cat >>conftest.$ac_ext <<_ACEOF
3786 /* end confdefs.h. */
3787 #ifdef __STDC__
3788 # include <limits.h>
3789 #else
3790 # include <assert.h>
3791 #endif
3792 Syntax error
3793 _ACEOF
3794 if { (ac_try="$ac_cpp conftest.$ac_ext"
3795 case "(($ac_try" in
3796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3797 *) ac_try_echo=$ac_try;;
3798 esac
3799 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3800 $as_echo "$ac_try_echo") >&5
3801 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3802 ac_status=$?
3803 grep -v '^ *+' conftest.er1 >conftest.err
3804 rm -f conftest.er1
3805 cat conftest.err >&5
3806 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3807 (exit $ac_status); } >/dev/null && {
3808 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3809 test ! -s conftest.err
3810 }; then
3811 :
3812 else
3813 $as_echo "$as_me: failed program was:" >&5
3814 sed 's/^/| /' conftest.$ac_ext >&5
3815
3816 # Broken: fails on valid input.
3817 continue
3818 fi
3819
3820 rm -f conftest.err conftest.$ac_ext
3821
3822 # OK, works on sane cases. Now check whether nonexistent headers
3823 # can be detected and how.
3824 cat >conftest.$ac_ext <<_ACEOF
3825 /* confdefs.h. */
3826 _ACEOF
3827 cat confdefs.h >>conftest.$ac_ext
3828 cat >>conftest.$ac_ext <<_ACEOF
3829 /* end confdefs.h. */
3830 #include <ac_nonexistent.h>
3831 _ACEOF
3832 if { (ac_try="$ac_cpp conftest.$ac_ext"
3833 case "(($ac_try" in
3834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3835 *) ac_try_echo=$ac_try;;
3836 esac
3837 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3838 $as_echo "$ac_try_echo") >&5
3839 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3840 ac_status=$?
3841 grep -v '^ *+' conftest.er1 >conftest.err
3842 rm -f conftest.er1
3843 cat conftest.err >&5
3844 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3845 (exit $ac_status); } >/dev/null && {
3846 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3847 test ! -s conftest.err
3848 }; then
3849 # Broken: success on invalid input.
3850 continue
3851 else
3852 $as_echo "$as_me: failed program was:" >&5
3853 sed 's/^/| /' conftest.$ac_ext >&5
3854
3855 # Passes both tests.
3856 ac_preproc_ok=:
3857 break
3858 fi
3859
3860 rm -f conftest.err conftest.$ac_ext
3861
3862 done
3863 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3864 rm -f conftest.err conftest.$ac_ext
3865 if $ac_preproc_ok; then
3866 :
3867 else
3868 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3869 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3870 { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3871 See \`config.log' for more details." >&5
3872 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3873 See \`config.log' for more details." >&2;}
3874 { (exit 1); exit 1; }; }; }
3875 fi
3876
3877 ac_ext=c
3878 ac_cpp='$CPP $CPPFLAGS'
3879 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3880 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3881 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3882
3883 for ac_prog in gawk mawk nawk awk
3884 do
3885 # Extract the first word of "$ac_prog", so it can be a program name with args.
3886 set dummy $ac_prog; ac_word=$2
3887 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3888 $as_echo_n "checking for $ac_word... " >&6; }
3889 if test "${ac_cv_prog_AWK+set}" = set; then
3890 $as_echo_n "(cached) " >&6
3891 else
3892 if test -n "$AWK"; then
3893 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3894 else
3895 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3896 for as_dir in $PATH
3897 do
3898 IFS=$as_save_IFS
3899 test -z "$as_dir" && as_dir=.
3900 for ac_exec_ext in '' $ac_executable_extensions; do
3901 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3902 ac_cv_prog_AWK="$ac_prog"
3903 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3904 break 2
3905 fi
3906 done
3907 done
3908 IFS=$as_save_IFS
3909
3910 fi
3911 fi
3912 AWK=$ac_cv_prog_AWK
3913 if test -n "$AWK"; then
3914 { $as_echo "$as_me:$LINENO: result: $AWK" >&5
3915 $as_echo "$AWK" >&6; }
3916 else
3917 { $as_echo "$as_me:$LINENO: result: no" >&5
3918 $as_echo "no" >&6; }
3919 fi
3920
3921
3922 test -n "$AWK" && break
3923 done
3924
3925 { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3926 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3927 set x ${MAKE-make}
3928 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3929 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
3930 $as_echo_n "(cached) " >&6
3931 else
3932 cat >conftest.make <<\_ACEOF
3933 SHELL = /bin/sh
3934 all:
3935 @echo '@@@%%%=$(MAKE)=@@@%%%'
3936 _ACEOF
3937 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3938 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3939 *@@@%%%=?*=@@@%%%*)
3940 eval ac_cv_prog_make_${ac_make}_set=yes;;
3941 *)
3942 eval ac_cv_prog_make_${ac_make}_set=no;;
3943 esac
3944 rm -f conftest.make
3945 fi
3946 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3947 { $as_echo "$as_me:$LINENO: result: yes" >&5
3948 $as_echo "yes" >&6; }
3949 SET_MAKE=
3950 else
3951 { $as_echo "$as_me:$LINENO: result: no" >&5
3952 $as_echo "no" >&6; }
3953 SET_MAKE="MAKE=${MAKE-make}"
3954 fi
3955
3956 { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
3957 $as_echo_n "checking whether ln -s works... " >&6; }
3958 LN_S=$as_ln_s
3959 if test "$LN_S" = "ln -s"; then
3960 { $as_echo "$as_me:$LINENO: result: yes" >&5
3961 $as_echo "yes" >&6; }
3962 else
3963 { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
3964 $as_echo "no, using $LN_S" >&6; }
3965 fi
3966
3967 # Find a good install program. We prefer a C program (faster),
3968 # so one script is as good as another. But avoid the broken or
3969 # incompatible versions:
3970 # SysV /etc/install, /usr/sbin/install
3971 # SunOS /usr/etc/install
3972 # IRIX /sbin/install
3973 # AIX /bin/install
3974 # AmigaOS /C/install, which installs bootblocks on floppy discs
3975 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3976 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3977 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3978 # OS/2's system install, which has a completely different semantic
3979 # ./install, which can be erroneously created by make from ./install.sh.
3980 # Reject install programs that cannot install multiple files.
3981 { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3982 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3983 if test -z "$INSTALL"; then
3984 if test "${ac_cv_path_install+set}" = set; then
3985 $as_echo_n "(cached) " >&6
3986 else
3987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3988 for as_dir in $PATH
3989 do
3990 IFS=$as_save_IFS
3991 test -z "$as_dir" && as_dir=.
3992 # Account for people who put trailing slashes in PATH elements.
3993 case $as_dir/ in
3994 ./ | .// | /cC/* | \
3995 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3996 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3997 /usr/ucb/* ) ;;
3998 *)
3999 # OSF1 and SCO ODT 3.0 have their own names for install.
4000 # Don't use installbsd from OSF since it installs stuff as root
4001 # by default.
4002 for ac_prog in ginstall scoinst install; do
4003 for ac_exec_ext in '' $ac_executable_extensions; do
4004 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4005 if test $ac_prog = install &&
4006 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4007 # AIX install. It has an incompatible calling convention.
4008 :
4009 elif test $ac_prog = install &&
4010 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4011 # program-specific install script used by HP pwplus--don't use.
4012 :
4013 else
4014 rm -rf conftest.one conftest.two conftest.dir
4015 echo one > conftest.one
4016 echo two > conftest.two
4017 mkdir conftest.dir
4018 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4019 test -s conftest.one && test -s conftest.two &&
4020 test -s conftest.dir/conftest.one &&
4021 test -s conftest.dir/conftest.two
4022 then
4023 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4024 break 3
4025 fi
4026 fi
4027 fi
4028 done
4029 done
4030 ;;
4031 esac
4032
4033 done
4034 IFS=$as_save_IFS
4035
4036 rm -rf conftest.one conftest.two conftest.dir
4037
4038 fi
4039 if test "${ac_cv_path_install+set}" = set; then
4040 INSTALL=$ac_cv_path_install
4041 else
4042 # As a last resort, use the slow shell script. Don't cache a
4043 # value for INSTALL within a source directory, because that will
4044 # break other packages using the cache if that directory is
4045 # removed, or if the value is a relative name.
4046 INSTALL=$ac_install_sh
4047 fi
4048 fi
4049 { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
4050 $as_echo "$INSTALL" >&6; }
4051
4052 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4053 # It thinks the first close brace ends the variable substitution.
4054 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4055
4056 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4057
4058 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4059
4060
4061
4062
4063 { $as_echo "$as_me:$LINENO: checking for __attribute__" >&5
4064 $as_echo_n "checking for __attribute__... " >&6; }
4065 if test "${ac_cv___attribute__+set}" = set; then
4066 $as_echo_n "(cached) " >&6
4067 else
4068
4069 cat >conftest.$ac_ext <<_ACEOF
4070 /* confdefs.h. */
4071 _ACEOF
4072 cat confdefs.h >>conftest.$ac_ext
4073 cat >>conftest.$ac_ext <<_ACEOF
4074 /* end confdefs.h. */
4075
4076 #include <stdlib.h>
4077 static void foo(void) __attribute__ ((noreturn));
4078
4079 static void
4080 foo(void)
4081 {
4082 exit(1);
4083 }
4084
4085 int
4086 main ()
4087 {
4088
4089
4090 ;
4091 return 0;
4092 }
4093 _ACEOF
4094 rm -f conftest.$ac_objext
4095 if { (ac_try="$ac_compile"
4096 case "(($ac_try" in
4097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4098 *) ac_try_echo=$ac_try;;
4099 esac
4100 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4101 $as_echo "$ac_try_echo") >&5
4102 (eval "$ac_compile") 2>conftest.er1
4103 ac_status=$?
4104 grep -v '^ *+' conftest.er1 >conftest.err
4105 rm -f conftest.er1
4106 cat conftest.err >&5
4107 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4108 (exit $ac_status); } && {
4109 test -z "$ac_c_werror_flag" ||
4110 test ! -s conftest.err
4111 } && test -s conftest.$ac_objext; then
4112 ac_cv___attribute__=yes
4113 else
4114 $as_echo "$as_me: failed program was:" >&5
4115 sed 's/^/| /' conftest.$ac_ext >&5
4116
4117 ac_cv___attribute__=no
4118 fi
4119
4120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4121 fi
4122
4123 if test "$ac_cv___attribute__" = "yes"; then
4124
4125 cat >>confdefs.h <<\_ACEOF
4126 #define HAVE___ATTRIBUTE__ 1
4127 _ACEOF
4128
4129 fi
4130 { $as_echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5
4131 $as_echo "$ac_cv___attribute__" >&6; }
4132
4133
4134 # CMU GUESS RUNPATH SWITCH
4135 { $as_echo "$as_me:$LINENO: checking for runpath switch" >&5
4136 $as_echo_n "checking for runpath switch... " >&6; }
4137 if test "${andrew_cv_runpath_switch+set}" = set; then
4138 $as_echo_n "(cached) " >&6
4139 else
4140
4141 # first, try -R
4142 SAVE_LDFLAGS="${LDFLAGS}"
4143 LDFLAGS="-R /usr/lib"
4144 cat >conftest.$ac_ext <<_ACEOF
4145 /* confdefs.h. */
4146 _ACEOF
4147 cat confdefs.h >>conftest.$ac_ext
4148 cat >>conftest.$ac_ext <<_ACEOF
4149 /* end confdefs.h. */
4150
4151 int
4152 main ()
4153 {
4154
4155 ;
4156 return 0;
4157 }
4158 _ACEOF
4159 rm -f conftest.$ac_objext conftest$ac_exeext
4160 if { (ac_try="$ac_link"
4161 case "(($ac_try" in
4162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4163 *) ac_try_echo=$ac_try;;
4164 esac
4165 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4166 $as_echo "$ac_try_echo") >&5
4167 (eval "$ac_link") 2>conftest.er1
4168 ac_status=$?
4169 grep -v '^ *+' conftest.er1 >conftest.err
4170 rm -f conftest.er1
4171 cat conftest.err >&5
4172 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4173 (exit $ac_status); } && {
4174 test -z "$ac_c_werror_flag" ||
4175 test ! -s conftest.err
4176 } && test -s conftest$ac_exeext && {
4177 test "$cross_compiling" = yes ||
4178 $as_test_x conftest$ac_exeext
4179 }; then
4180 andrew_cv_runpath_switch="-R"
4181 else
4182 $as_echo "$as_me: failed program was:" >&5
4183 sed 's/^/| /' conftest.$ac_ext >&5
4184
4185
4186 LDFLAGS="-Wl,-rpath,/usr/lib"
4187 cat >conftest.$ac_ext <<_ACEOF
4188 /* confdefs.h. */
4189 _ACEOF
4190 cat confdefs.h >>conftest.$ac_ext
4191 cat >>conftest.$ac_ext <<_ACEOF
4192 /* end confdefs.h. */
4193
4194 int
4195 main ()
4196 {
4197
4198 ;
4199 return 0;
4200 }
4201 _ACEOF
4202 rm -f conftest.$ac_objext conftest$ac_exeext
4203 if { (ac_try="$ac_link"
4204 case "(($ac_try" in
4205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4206 *) ac_try_echo=$ac_try;;
4207 esac
4208 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4209 $as_echo "$ac_try_echo") >&5
4210 (eval "$ac_link") 2>conftest.er1
4211 ac_status=$?
4212 grep -v '^ *+' conftest.er1 >conftest.err
4213 rm -f conftest.er1
4214 cat conftest.err >&5
4215 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4216 (exit $ac_status); } && {
4217 test -z "$ac_c_werror_flag" ||
4218 test ! -s conftest.err
4219 } && test -s conftest$ac_exeext && {
4220 test "$cross_compiling" = yes ||
4221 $as_test_x conftest$ac_exeext
4222 }; then
4223 andrew_cv_runpath_switch="-Wl,-rpath,"
4224 else
4225 $as_echo "$as_me: failed program was:" >&5
4226 sed 's/^/| /' conftest.$ac_ext >&5
4227
4228 andrew_cv_runpath_switch="none"
4229 fi
4230
4231 rm -rf conftest.dSYM
4232 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4233 conftest$ac_exeext conftest.$ac_ext
4234
4235 fi
4236
4237 rm -rf conftest.dSYM
4238 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4239 conftest$ac_exeext conftest.$ac_ext
4240 LDFLAGS="${SAVE_LDFLAGS}"
4241
4242 fi
4243 { $as_echo "$as_me:$LINENO: result: $andrew_cv_runpath_switch" >&5
4244 $as_echo "$andrew_cv_runpath_switch" >&6; }
4245
4246
4247 save_LIBS="$LIBS"
4248 LIB_SOCKET=""
4249 { $as_echo "$as_me:$LINENO: checking for connect" >&5
4250 $as_echo_n "checking for connect... " >&6; }
4251 if test "${ac_cv_func_connect+set}" = set; then
4252 $as_echo_n "(cached) " >&6
4253 else
4254 cat >conftest.$ac_ext <<_ACEOF
4255 /* confdefs.h. */
4256 _ACEOF
4257 cat confdefs.h >>conftest.$ac_ext
4258 cat >>conftest.$ac_ext <<_ACEOF
4259 /* end confdefs.h. */
4260 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
4261 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4262 #define connect innocuous_connect
4263
4264 /* System header to define __stub macros and hopefully few prototypes,
4265 which can conflict with char connect (); below.
4266 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4267 <limits.h> exists even on freestanding compilers. */
4268
4269 #ifdef __STDC__
4270 # include <limits.h>
4271 #else
4272 # include <assert.h>
4273 #endif
4274
4275 #undef connect
4276
4277 /* Override any GCC internal prototype to avoid an error.
4278 Use char because int might match the return type of a GCC
4279 builtin and then its argument prototype would still apply. */
4280 #ifdef __cplusplus
4281 extern "C"
4282 #endif
4283 char connect ();
4284 /* The GNU C library defines this for functions which it implements
4285 to always fail with ENOSYS. Some functions are actually named
4286 something starting with __ and the normal name is an alias. */
4287 #if defined __stub_connect || defined __stub___connect
4288 choke me
4289 #endif
4290
4291 int
4292 main ()
4293 {
4294 return connect ();
4295 ;
4296 return 0;
4297 }
4298 _ACEOF
4299 rm -f conftest.$ac_objext conftest$ac_exeext
4300 if { (ac_try="$ac_link"
4301 case "(($ac_try" in
4302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4303 *) ac_try_echo=$ac_try;;
4304 esac
4305 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4306 $as_echo "$ac_try_echo") >&5
4307 (eval "$ac_link") 2>conftest.er1
4308 ac_status=$?
4309 grep -v '^ *+' conftest.er1 >conftest.err
4310 rm -f conftest.er1
4311 cat conftest.err >&5
4312 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4313 (exit $ac_status); } && {
4314 test -z "$ac_c_werror_flag" ||
4315 test ! -s conftest.err
4316 } && test -s conftest$ac_exeext && {
4317 test "$cross_compiling" = yes ||
4318 $as_test_x conftest$ac_exeext
4319 }; then
4320 ac_cv_func_connect=yes
4321 else
4322 $as_echo "$as_me: failed program was:" >&5
4323 sed 's/^/| /' conftest.$ac_ext >&5
4324
4325 ac_cv_func_connect=no
4326 fi
4327
4328 rm -rf conftest.dSYM
4329 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4330 conftest$ac_exeext conftest.$ac_ext
4331 fi
4332 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
4333 $as_echo "$ac_cv_func_connect" >&6; }
4334 if test "x$ac_cv_func_connect" = x""yes; then
4335 :
4336 else
4337 { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
4338 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
4339 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
4340 $as_echo_n "(cached) " >&6
4341 else
4342 ac_check_lib_save_LIBS=$LIBS
4343 LIBS="-lnsl $LIBS"
4344 cat >conftest.$ac_ext <<_ACEOF
4345 /* confdefs.h. */
4346 _ACEOF
4347 cat confdefs.h >>conftest.$ac_ext
4348 cat >>conftest.$ac_ext <<_ACEOF
4349 /* end confdefs.h. */
4350
4351 /* Override any GCC internal prototype to avoid an error.
4352 Use char because int might match the return type of a GCC
4353 builtin and then its argument prototype would still apply. */
4354 #ifdef __cplusplus
4355 extern "C"
4356 #endif
4357 char gethostbyname ();
4358 int
4359 main ()
4360 {
4361 return gethostbyname ();
4362 ;
4363 return 0;
4364 }
4365 _ACEOF
4366 rm -f conftest.$ac_objext conftest$ac_exeext
4367 if { (ac_try="$ac_link"
4368 case "(($ac_try" in
4369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4370 *) ac_try_echo=$ac_try;;
4371 esac
4372 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4373 $as_echo "$ac_try_echo") >&5
4374 (eval "$ac_link") 2>conftest.er1
4375 ac_status=$?
4376 grep -v '^ *+' conftest.er1 >conftest.err
4377 rm -f conftest.er1
4378 cat conftest.err >&5
4379 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4380 (exit $ac_status); } && {
4381 test -z "$ac_c_werror_flag" ||
4382 test ! -s conftest.err
4383 } && test -s conftest$ac_exeext && {
4384 test "$cross_compiling" = yes ||
4385 $as_test_x conftest$ac_exeext
4386 }; then
4387 ac_cv_lib_nsl_gethostbyname=yes
4388 else
4389 $as_echo "$as_me: failed program was:" >&5
4390 sed 's/^/| /' conftest.$ac_ext >&5
4391
4392 ac_cv_lib_nsl_gethostbyname=no
4393 fi
4394
4395 rm -rf conftest.dSYM
4396 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4397 conftest$ac_exeext conftest.$ac_ext
4398 LIBS=$ac_check_lib_save_LIBS
4399 fi
4400 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
4401 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
4402 if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
4403 LIB_SOCKET="-lnsl $LIB_SOCKET"
4404 fi
4405
4406 { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
4407 $as_echo_n "checking for connect in -lsocket... " >&6; }
4408 if test "${ac_cv_lib_socket_connect+set}" = set; then
4409 $as_echo_n "(cached) " >&6
4410 else
4411 ac_check_lib_save_LIBS=$LIBS
4412 LIBS="-lsocket $LIBS"
4413 cat >conftest.$ac_ext <<_ACEOF
4414 /* confdefs.h. */
4415 _ACEOF
4416 cat confdefs.h >>conftest.$ac_ext
4417 cat >>conftest.$ac_ext <<_ACEOF
4418 /* end confdefs.h. */
4419
4420 /* Override any GCC internal prototype to avoid an error.
4421 Use char because int might match the return type of a GCC
4422 builtin and then its argument prototype would still apply. */
4423 #ifdef __cplusplus
4424 extern "C"
4425 #endif
4426 char connect ();
4427 int
4428 main ()
4429 {
4430 return connect ();
4431 ;
4432 return 0;
4433 }
4434 _ACEOF
4435 rm -f conftest.$ac_objext conftest$ac_exeext
4436 if { (ac_try="$ac_link"
4437 case "(($ac_try" in
4438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4439 *) ac_try_echo=$ac_try;;
4440 esac
4441 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4442 $as_echo "$ac_try_echo") >&5
4443 (eval "$ac_link") 2>conftest.er1
4444 ac_status=$?
4445 grep -v '^ *+' conftest.er1 >conftest.err
4446 rm -f conftest.er1
4447 cat conftest.err >&5
4448 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4449 (exit $ac_status); } && {
4450 test -z "$ac_c_werror_flag" ||
4451 test ! -s conftest.err
4452 } && test -s conftest$ac_exeext && {
4453 test "$cross_compiling" = yes ||
4454 $as_test_x conftest$ac_exeext
4455 }; then
4456 ac_cv_lib_socket_connect=yes
4457 else
4458 $as_echo "$as_me: failed program was:" >&5
4459 sed 's/^/| /' conftest.$ac_ext >&5
4460
4461 ac_cv_lib_socket_connect=no
4462 fi
4463
4464 rm -rf conftest.dSYM
4465 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4466 conftest$ac_exeext conftest.$ac_ext
4467 LIBS=$ac_check_lib_save_LIBS
4468 fi
4469 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
4470 $as_echo "$ac_cv_lib_socket_connect" >&6; }
4471 if test "x$ac_cv_lib_socket_connect" = x""yes; then
4472 LIB_SOCKET="-lsocket $LIB_SOCKET"
4473 fi
4474
4475
4476 fi
4477
4478 LIBS="$LIB_SOCKET $save_LIBS"
4479 { $as_echo "$as_me:$LINENO: checking for res_search" >&5
4480 $as_echo_n "checking for res_search... " >&6; }
4481 if test "${ac_cv_func_res_search+set}" = set; then
4482 $as_echo_n "(cached) " >&6
4483 else
4484 cat >conftest.$ac_ext <<_ACEOF
4485 /* confdefs.h. */
4486 _ACEOF
4487 cat confdefs.h >>conftest.$ac_ext
4488 cat >>conftest.$ac_ext <<_ACEOF
4489 /* end confdefs.h. */
4490 /* Define res_search to an innocuous variant, in case <limits.h> declares res_search.
4491 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4492 #define res_search innocuous_res_search
4493
4494 /* System header to define __stub macros and hopefully few prototypes,
4495 which can conflict with char res_search (); below.
4496 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4497 <limits.h> exists even on freestanding compilers. */
4498
4499 #ifdef __STDC__
4500 # include <limits.h>
4501 #else
4502 # include <assert.h>
4503 #endif
4504
4505 #undef res_search
4506
4507 /* Override any GCC internal prototype to avoid an error.
4508 Use char because int might match the return type of a GCC
4509 builtin and then its argument prototype would still apply. */
4510 #ifdef __cplusplus
4511 extern "C"
4512 #endif
4513 char res_search ();
4514 /* The GNU C library defines this for functions which it implements
4515 to always fail with ENOSYS. Some functions are actually named
4516 something starting with __ and the normal name is an alias. */
4517 #if defined __stub_res_search || defined __stub___res_search
4518 choke me
4519 #endif
4520
4521 int
4522 main ()
4523 {
4524 return res_search ();
4525 ;
4526 return 0;
4527 }
4528 _ACEOF
4529 rm -f conftest.$ac_objext conftest$ac_exeext
4530 if { (ac_try="$ac_link"
4531 case "(($ac_try" in
4532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4533 *) ac_try_echo=$ac_try;;
4534 esac
4535 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4536 $as_echo "$ac_try_echo") >&5
4537 (eval "$ac_link") 2>conftest.er1
4538 ac_status=$?
4539 grep -v '^ *+' conftest.er1 >conftest.err
4540 rm -f conftest.er1
4541 cat conftest.err >&5
4542 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4543 (exit $ac_status); } && {
4544 test -z "$ac_c_werror_flag" ||
4545 test ! -s conftest.err
4546 } && test -s conftest$ac_exeext && {
4547 test "$cross_compiling" = yes ||
4548 $as_test_x conftest$ac_exeext
4549 }; then
4550 ac_cv_func_res_search=yes
4551 else
4552 $as_echo "$as_me: failed program was:" >&5
4553 sed 's/^/| /' conftest.$ac_ext >&5
4554
4555 ac_cv_func_res_search=no
4556 fi
4557
4558 rm -rf conftest.dSYM
4559 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4560 conftest$ac_exeext conftest.$ac_ext
4561 fi
4562 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
4563 $as_echo "$ac_cv_func_res_search" >&6; }
4564 if test "x$ac_cv_func_res_search" = x""yes; then
4565 :
4566 else
4567 LIBS="-lresolv $LIB_SOCKET $save_LIBS"
4568 cat >conftest.$ac_ext <<_ACEOF
4569 /* confdefs.h. */
4570 _ACEOF
4571 cat confdefs.h >>conftest.$ac_ext
4572 cat >>conftest.$ac_ext <<_ACEOF
4573 /* end confdefs.h. */
4574 [
4575 #include <sys/types.h>
4576 #include <netinet/in.h>
4577 #include <arpa/nameser.h>
4578 #ifdef HAVE_ARPA_NAMESER_COMPAT_H
4579 #include <arpa/nameser_compat.h>
4580 #endif
4581 #include <resolv.h>]
4582 int
4583 main ()
4584 {
4585 [
4586 const char host[12]="openafs.org";
4587 u_char ans[1024];
4588 res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans));
4589 return 0;
4590 ]
4591 ;
4592 return 0;
4593 }
4594 _ACEOF
4595 rm -f conftest.$ac_objext conftest$ac_exeext
4596 if { (ac_try="$ac_link"
4597 case "(($ac_try" in
4598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4599 *) ac_try_echo=$ac_try;;
4600 esac
4601 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4602 $as_echo "$ac_try_echo") >&5
4603 (eval "$ac_link") 2>conftest.er1
4604 ac_status=$?
4605 grep -v '^ *+' conftest.er1 >conftest.err
4606 rm -f conftest.er1
4607 cat conftest.err >&5
4608 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4609 (exit $ac_status); } && {
4610 test -z "$ac_c_werror_flag" ||
4611 test ! -s conftest.err
4612 } && test -s conftest$ac_exeext && {
4613 test "$cross_compiling" = yes ||
4614 $as_test_x conftest$ac_exeext
4615 }; then
4616 LIB_SOCKET="-lresolv $LIB_SOCKET"
4617 else
4618 $as_echo "$as_me: failed program was:" >&5
4619 sed 's/^/| /' conftest.$ac_ext >&5
4620
4621
4622 fi
4623
4624 rm -rf conftest.dSYM
4625 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4626 conftest$ac_exeext conftest.$ac_ext
4627
4628 fi
4629
4630 LIBS="$LIB_SOCKET $save_LIBS"
4631
4632
4633 for ac_func in dn_expand dns_lookup
4634 do
4635 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
4636 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
4637 $as_echo_n "checking for $ac_func... " >&6; }
4638 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
4639 $as_echo_n "(cached) " >&6
4640 else
4641 cat >conftest.$ac_ext <<_ACEOF
4642 /* confdefs.h. */
4643 _ACEOF
4644 cat confdefs.h >>conftest.$ac_ext
4645 cat >>conftest.$ac_ext <<_ACEOF
4646 /* end confdefs.h. */
4647 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4648 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4649 #define $ac_func innocuous_$ac_func
4650
4651 /* System header to define __stub macros and hopefully few prototypes,
4652 which can conflict with char $ac_func (); below.
4653 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4654 <limits.h> exists even on freestanding compilers. */
4655
4656 #ifdef __STDC__
4657 # include <limits.h>
4658 #else
4659 # include <assert.h>
4660 #endif
4661
4662 #undef $ac_func
4663
4664 /* Override any GCC internal prototype to avoid an error.
4665 Use char because int might match the return type of a GCC
4666 builtin and then its argument prototype would still apply. */
4667 #ifdef __cplusplus
4668 extern "C"
4669 #endif
4670 char $ac_func ();
4671 /* The GNU C library defines this for functions which it implements
4672 to always fail with ENOSYS. Some functions are actually named
4673 something starting with __ and the normal name is an alias. */
4674 #if defined __stub_$ac_func || defined __stub___$ac_func
4675 choke me
4676 #endif
4677
4678 int
4679 main ()
4680 {
4681 return $ac_func ();
4682 ;
4683 return 0;
4684 }
4685 _ACEOF
4686 rm -f conftest.$ac_objext conftest$ac_exeext
4687 if { (ac_try="$ac_link"
4688 case "(($ac_try" in
4689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4690 *) ac_try_echo=$ac_try;;
4691 esac
4692 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4693 $as_echo "$ac_try_echo") >&5
4694 (eval "$ac_link") 2>conftest.er1
4695 ac_status=$?
4696 grep -v '^ *+' conftest.er1 >conftest.err
4697 rm -f conftest.er1
4698 cat conftest.err >&5
4699 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4700 (exit $ac_status); } && {
4701 test -z "$ac_c_werror_flag" ||
4702 test ! -s conftest.err
4703 } && test -s conftest$ac_exeext && {
4704 test "$cross_compiling" = yes ||
4705 $as_test_x conftest$ac_exeext
4706 }; then
4707 eval "$as_ac_var=yes"
4708 else
4709 $as_echo "$as_me: failed program was:" >&5
4710 sed 's/^/| /' conftest.$ac_ext >&5
4711
4712 eval "$as_ac_var=no"
4713 fi
4714
4715 rm -rf conftest.dSYM
4716 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4717 conftest$ac_exeext conftest.$ac_ext
4718 fi
4719 ac_res=`eval 'as_val=${'$as_ac_var'}
4720 $as_echo "$as_val"'`
4721 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4722 $as_echo "$ac_res" >&6; }
4723 as_val=`eval 'as_val=${'$as_ac_var'}
4724 $as_echo "$as_val"'`
4725 if test "x$as_val" = x""yes; then
4726 cat >>confdefs.h <<_ACEOF
4727 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
4728 _ACEOF
4729
4730 fi
4731 done
4732
4733 LIBS="$save_LIBS"
4734
4735
4736
4737
4738 { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4739 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4740 if test "${ac_cv_path_GREP+set}" = set; then
4741 $as_echo_n "(cached) " >&6
4742 else
4743 if test -z "$GREP"; then
4744 ac_path_GREP_found=false
4745 # Loop through the user's path and test for each of PROGNAME-LIST
4746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4747 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4748 do
4749 IFS=$as_save_IFS
4750 test -z "$as_dir" && as_dir=.
4751 for ac_prog in grep ggrep; do
4752 for ac_exec_ext in '' $ac_executable_extensions; do
4753 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4754 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4755 # Check for GNU ac_path_GREP and select it if it is found.
4756 # Check for GNU $ac_path_GREP
4757 case `"$ac_path_GREP" --version 2>&1` in
4758 *GNU*)
4759 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4760 *)
4761 ac_count=0
4762 $as_echo_n 0123456789 >"conftest.in"
4763 while :
4764 do
4765 cat "conftest.in" "conftest.in" >"conftest.tmp"
4766 mv "conftest.tmp" "conftest.in"
4767 cp "conftest.in" "conftest.nl"
4768 $as_echo 'GREP' >> "conftest.nl"
4769 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4770 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4771 ac_count=`expr $ac_count + 1`
4772 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4773 # Best one so far, save it but keep looking for a better one
4774 ac_cv_path_GREP="$ac_path_GREP"
4775 ac_path_GREP_max=$ac_count
4776 fi
4777 # 10*(2^10) chars as input seems more than enough
4778 test $ac_count -gt 10 && break
4779 done
4780 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4781 esac
4782
4783 $ac_path_GREP_found && break 3
4784 done
4785 done
4786 done
4787 IFS=$as_save_IFS
4788 if test -z "$ac_cv_path_GREP"; then
4789 { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4790 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4791 { (exit 1); exit 1; }; }
4792 fi
4793 else
4794 ac_cv_path_GREP=$GREP
4795 fi
4796
4797 fi
4798 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4799 $as_echo "$ac_cv_path_GREP" >&6; }
4800 GREP="$ac_cv_path_GREP"
4801
4802
4803 { $as_echo "$as_me:$LINENO: checking for egrep" >&5
4804 $as_echo_n "checking for egrep... " >&6; }
4805 if test "${ac_cv_path_EGREP+set}" = set; then
4806 $as_echo_n "(cached) " >&6
4807 else
4808 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4809 then ac_cv_path_EGREP="$GREP -E"
4810 else
4811 if test -z "$EGREP"; then
4812 ac_path_EGREP_found=false
4813 # Loop through the user's path and test for each of PROGNAME-LIST
4814 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4815 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4816 do
4817 IFS=$as_save_IFS
4818 test -z "$as_dir" && as_dir=.
4819 for ac_prog in egrep; do
4820 for ac_exec_ext in '' $ac_executable_extensions; do
4821 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4822 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4823 # Check for GNU ac_path_EGREP and select it if it is found.
4824 # Check for GNU $ac_path_EGREP
4825 case `"$ac_path_EGREP" --version 2>&1` in
4826 *GNU*)
4827 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4828 *)
4829 ac_count=0
4830 $as_echo_n 0123456789 >"conftest.in"
4831 while :
4832 do
4833 cat "conftest.in" "conftest.in" >"conftest.tmp"
4834 mv "conftest.tmp" "conftest.in"
4835 cp "conftest.in" "conftest.nl"
4836 $as_echo 'EGREP' >> "conftest.nl"
4837 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4838 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4839 ac_count=`expr $ac_count + 1`
4840 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4841 # Best one so far, save it but keep looking for a better one
4842 ac_cv_path_EGREP="$ac_path_EGREP"
4843 ac_path_EGREP_max=$ac_count
4844 fi
4845 # 10*(2^10) chars as input seems more than enough
4846 test $ac_count -gt 10 && break
4847 done
4848 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4849 esac
4850
4851 $ac_path_EGREP_found && break 3
4852 done
4853 done
4854 done
4855 IFS=$as_save_IFS
4856 if test -z "$ac_cv_path_EGREP"; then
4857 { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4858 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4859 { (exit 1); exit 1; }; }
4860 fi
4861 else
4862 ac_cv_path_EGREP=$EGREP
4863 fi
4864
4865 fi
4866 fi
4867 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4868 $as_echo "$ac_cv_path_EGREP" >&6; }
4869 EGREP="$ac_cv_path_EGREP"
4870
4871
4872 { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4873 $as_echo_n "checking for ANSI C header files... " >&6; }
4874 if test "${ac_cv_header_stdc+set}" = set; then
4875 $as_echo_n "(cached) " >&6
4876 else
4877 cat >conftest.$ac_ext <<_ACEOF
4878 /* confdefs.h. */
4879 _ACEOF
4880 cat confdefs.h >>conftest.$ac_ext
4881 cat >>conftest.$ac_ext <<_ACEOF
4882 /* end confdefs.h. */
4883 #include <stdlib.h>
4884 #include <stdarg.h>
4885 #include <string.h>
4886 #include <float.h>
4887
4888 int
4889 main ()
4890 {
4891
4892 ;
4893 return 0;
4894 }
4895 _ACEOF
4896 rm -f conftest.$ac_objext
4897 if { (ac_try="$ac_compile"
4898 case "(($ac_try" in
4899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4900 *) ac_try_echo=$ac_try;;
4901 esac
4902 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4903 $as_echo "$ac_try_echo") >&5
4904 (eval "$ac_compile") 2>conftest.er1
4905 ac_status=$?
4906 grep -v '^ *+' conftest.er1 >conftest.err
4907 rm -f conftest.er1
4908 cat conftest.err >&5
4909 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4910 (exit $ac_status); } && {
4911 test -z "$ac_c_werror_flag" ||
4912 test ! -s conftest.err
4913 } && test -s conftest.$ac_objext; then
4914 ac_cv_header_stdc=yes
4915 else
4916 $as_echo "$as_me: failed program was:" >&5
4917 sed 's/^/| /' conftest.$ac_ext >&5
4918
4919 ac_cv_header_stdc=no
4920 fi
4921
4922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4923
4924 if test $ac_cv_header_stdc = yes; then
4925 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4926 cat >conftest.$ac_ext <<_ACEOF
4927 /* confdefs.h. */
4928 _ACEOF
4929 cat confdefs.h >>conftest.$ac_ext
4930 cat >>conftest.$ac_ext <<_ACEOF
4931 /* end confdefs.h. */
4932 #include <string.h>
4933
4934 _ACEOF
4935 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4936 $EGREP "memchr" >/dev/null 2>&1; then
4937 :
4938 else
4939 ac_cv_header_stdc=no
4940 fi
4941 rm -f conftest*
4942
4943 fi
4944
4945 if test $ac_cv_header_stdc = yes; then
4946 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4947 cat >conftest.$ac_ext <<_ACEOF
4948 /* confdefs.h. */
4949 _ACEOF
4950 cat confdefs.h >>conftest.$ac_ext
4951 cat >>conftest.$ac_ext <<_ACEOF
4952 /* end confdefs.h. */
4953 #include <stdlib.h>
4954
4955 _ACEOF
4956 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4957 $EGREP "free" >/dev/null 2>&1; then
4958 :
4959 else
4960 ac_cv_header_stdc=no
4961 fi
4962 rm -f conftest*
4963
4964 fi
4965
4966 if test $ac_cv_header_stdc = yes; then
4967 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4968 if test "$cross_compiling" = yes; then
4969 :
4970 else
4971 cat >conftest.$ac_ext <<_ACEOF
4972 /* confdefs.h. */
4973 _ACEOF
4974 cat confdefs.h >>conftest.$ac_ext
4975 cat >>conftest.$ac_ext <<_ACEOF
4976 /* end confdefs.h. */
4977 #include <ctype.h>
4978 #include <stdlib.h>
4979 #if ((' ' & 0x0FF) == 0x020)
4980 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4981 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4982 #else
4983 # define ISLOWER(c) \
4984 (('a' <= (c) && (c) <= 'i') \
4985 || ('j' <= (c) && (c) <= 'r') \
4986 || ('s' <= (c) && (c) <= 'z'))
4987 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4988 #endif
4989
4990 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4991 int
4992 main ()
4993 {
4994 int i;
4995 for (i = 0; i < 256; i++)
4996 if (XOR (islower (i), ISLOWER (i))
4997 || toupper (i) != TOUPPER (i))
4998 return 2;
4999 return 0;
5000 }
5001 _ACEOF
5002 rm -f conftest$ac_exeext
5003 if { (ac_try="$ac_link"
5004 case "(($ac_try" in
5005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5006 *) ac_try_echo=$ac_try;;
5007 esac
5008 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5009 $as_echo "$ac_try_echo") >&5
5010 (eval "$ac_link") 2>&5
5011 ac_status=$?
5012 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5013 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5014 { (case "(($ac_try" in
5015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5016 *) ac_try_echo=$ac_try;;
5017 esac
5018 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5019 $as_echo "$ac_try_echo") >&5
5020 (eval "$ac_try") 2>&5
5021 ac_status=$?
5022 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5023 (exit $ac_status); }; }; then
5024 :
5025 else
5026 $as_echo "$as_me: program exited with status $ac_status" >&5
5027 $as_echo "$as_me: failed program was:" >&5
5028 sed 's/^/| /' conftest.$ac_ext >&5
5029
5030 ( exit $ac_status )
5031 ac_cv_header_stdc=no
5032 fi
5033 rm -rf conftest.dSYM
5034 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5035 fi
5036
5037
5038 fi
5039 fi
5040 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5041 $as_echo "$ac_cv_header_stdc" >&6; }
5042 if test $ac_cv_header_stdc = yes; then
5043
5044 cat >>confdefs.h <<\_ACEOF
5045 #define STDC_HEADERS 1
5046 _ACEOF
5047
5048 fi
5049
5050 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5061 inttypes.h stdint.h unistd.h
5062 do
5063 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5064 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
5065 $as_echo_n "checking for $ac_header... " >&6; }
5066 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5067 $as_echo_n "(cached) " >&6
5068 else
5069 cat >conftest.$ac_ext <<_ACEOF
5070 /* confdefs.h. */
5071 _ACEOF
5072 cat confdefs.h >>conftest.$ac_ext
5073 cat >>conftest.$ac_ext <<_ACEOF
5074 /* end confdefs.h. */
5075 $ac_includes_default
5076
5077 #include <$ac_header>
5078 _ACEOF
5079 rm -f conftest.$ac_objext
5080 if { (ac_try="$ac_compile"
5081 case "(($ac_try" in
5082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5083 *) ac_try_echo=$ac_try;;
5084 esac
5085 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5086 $as_echo "$ac_try_echo") >&5
5087 (eval "$ac_compile") 2>conftest.er1
5088 ac_status=$?
5089 grep -v '^ *+' conftest.er1 >conftest.err
5090 rm -f conftest.er1
5091 cat conftest.err >&5
5092 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5093 (exit $ac_status); } && {
5094 test -z "$ac_c_werror_flag" ||
5095 test ! -s conftest.err
5096 } && test -s conftest.$ac_objext; then
5097 eval "$as_ac_Header=yes"
5098 else
5099 $as_echo "$as_me: failed program was:" >&5
5100 sed 's/^/| /' conftest.$ac_ext >&5
5101
5102 eval "$as_ac_Header=no"
5103 fi
5104
5105 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5106 fi
5107 ac_res=`eval 'as_val=${'$as_ac_Header'}
5108 $as_echo "$as_val"'`
5109 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
5110 $as_echo "$ac_res" >&6; }
5111 as_val=`eval 'as_val=${'$as_ac_Header'}
5112 $as_echo "$as_val"'`
5113 if test "x$as_val" = x""yes; then
5114 cat >>confdefs.h <<_ACEOF
5115 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5116 _ACEOF
5117
5118 fi
5119
5120 done
5121
5122
5123
5124 # Check whether --with-lib-subdir was given.
5125 if test "${with_lib_subdir+set}" = set; then
5126 withval=$with_lib_subdir;
5127 fi
5128
5129 # The cast to long int works around a bug in the HP C Compiler
5130 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5131 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5132 # This bug is HP SR number 8606223364.
5133 { $as_echo "$as_me:$LINENO: checking size of long" >&5
5134 $as_echo_n "checking size of long... " >&6; }
5135 if test "${ac_cv_sizeof_long+set}" = set; then
5136 $as_echo_n "(cached) " >&6
5137 else
5138 if test "$cross_compiling" = yes; then
5139 # Depending upon the size, compute the lo and hi bounds.
5140 cat >conftest.$ac_ext <<_ACEOF
5141 /* confdefs.h. */
5142 _ACEOF
5143 cat confdefs.h >>conftest.$ac_ext
5144 cat >>conftest.$ac_ext <<_ACEOF
5145 /* end confdefs.h. */
5146 $ac_includes_default
5147 int
5148 main ()
5149 {
5150 static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
5151 test_array [0] = 0
5152
5153 ;
5154 return 0;
5155 }
5156 _ACEOF
5157 rm -f conftest.$ac_objext
5158 if { (ac_try="$ac_compile"
5159 case "(($ac_try" in
5160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5161 *) ac_try_echo=$ac_try;;
5162 esac
5163 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5164 $as_echo "$ac_try_echo") >&5
5165 (eval "$ac_compile") 2>conftest.er1
5166 ac_status=$?
5167 grep -v '^ *+' conftest.er1 >conftest.err
5168 rm -f conftest.er1
5169 cat conftest.err >&5
5170 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5171 (exit $ac_status); } && {
5172 test -z "$ac_c_werror_flag" ||
5173 test ! -s conftest.err
5174 } && test -s conftest.$ac_objext; then
5175 ac_lo=0 ac_mid=0
5176 while :; do
5177 cat >conftest.$ac_ext <<_ACEOF
5178 /* confdefs.h. */
5179 _ACEOF
5180 cat confdefs.h >>conftest.$ac_ext
5181 cat >>conftest.$ac_ext <<_ACEOF
5182 /* end confdefs.h. */
5183 $ac_includes_default
5184 int
5185 main ()
5186 {
5187 static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
5188 test_array [0] = 0
5189
5190 ;
5191 return 0;
5192 }
5193 _ACEOF
5194 rm -f conftest.$ac_objext
5195 if { (ac_try="$ac_compile"
5196 case "(($ac_try" in
5197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5198 *) ac_try_echo=$ac_try;;
5199 esac
5200 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5201 $as_echo "$ac_try_echo") >&5
5202 (eval "$ac_compile") 2>conftest.er1
5203 ac_status=$?
5204 grep -v '^ *+' conftest.er1 >conftest.err
5205 rm -f conftest.er1
5206 cat conftest.err >&5
5207 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5208 (exit $ac_status); } && {
5209 test -z "$ac_c_werror_flag" ||
5210 test ! -s conftest.err
5211 } && test -s conftest.$ac_objext; then
5212 ac_hi=$ac_mid; break
5213 else
5214 $as_echo "$as_me: failed program was:" >&5
5215 sed 's/^/| /' conftest.$ac_ext >&5
5216
5217 ac_lo=`expr $ac_mid + 1`
5218 if test $ac_lo -le $ac_mid; then
5219 ac_lo= ac_hi=
5220 break
5221 fi
5222 ac_mid=`expr 2 '*' $ac_mid + 1`
5223 fi
5224
5225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5226 done
5227 else
5228 $as_echo "$as_me: failed program was:" >&5
5229 sed 's/^/| /' conftest.$ac_ext >&5
5230
5231 cat >conftest.$ac_ext <<_ACEOF
5232 /* confdefs.h. */
5233 _ACEOF
5234 cat confdefs.h >>conftest.$ac_ext
5235 cat >>conftest.$ac_ext <<_ACEOF
5236 /* end confdefs.h. */
5237 $ac_includes_default
5238 int
5239 main ()
5240 {
5241 static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
5242 test_array [0] = 0
5243
5244 ;
5245 return 0;
5246 }
5247 _ACEOF
5248 rm -f conftest.$ac_objext
5249 if { (ac_try="$ac_compile"
5250 case "(($ac_try" in
5251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5252 *) ac_try_echo=$ac_try;;
5253 esac
5254 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5255 $as_echo "$ac_try_echo") >&5
5256 (eval "$ac_compile") 2>conftest.er1
5257 ac_status=$?
5258 grep -v '^ *+' conftest.er1 >conftest.err
5259 rm -f conftest.er1
5260 cat conftest.err >&5
5261 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5262 (exit $ac_status); } && {
5263 test -z "$ac_c_werror_flag" ||
5264 test ! -s conftest.err
5265 } && test -s conftest.$ac_objext; then
5266 ac_hi=-1 ac_mid=-1
5267 while :; do
5268 cat >conftest.$ac_ext <<_ACEOF
5269 /* confdefs.h. */
5270 _ACEOF
5271 cat confdefs.h >>conftest.$ac_ext
5272 cat >>conftest.$ac_ext <<_ACEOF
5273 /* end confdefs.h. */
5274 $ac_includes_default
5275 int
5276 main ()
5277 {
5278 static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
5279 test_array [0] = 0
5280
5281 ;
5282 return 0;
5283 }
5284 _ACEOF
5285 rm -f conftest.$ac_objext
5286 if { (ac_try="$ac_compile"
5287 case "(($ac_try" in
5288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5289 *) ac_try_echo=$ac_try;;
5290 esac
5291 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5292 $as_echo "$ac_try_echo") >&5
5293 (eval "$ac_compile") 2>conftest.er1
5294 ac_status=$?
5295 grep -v '^ *+' conftest.er1 >conftest.err
5296 rm -f conftest.er1
5297 cat conftest.err >&5
5298 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5299 (exit $ac_status); } && {
5300 test -z "$ac_c_werror_flag" ||
5301 test ! -s conftest.err
5302 } && test -s conftest.$ac_objext; then
5303 ac_lo=$ac_mid; break
5304 else
5305 $as_echo "$as_me: failed program was:" >&5
5306 sed 's/^/| /' conftest.$ac_ext >&5
5307
5308 ac_hi=`expr '(' $ac_mid ')' - 1`
5309 if test $ac_mid -le $ac_hi; then
5310 ac_lo= ac_hi=
5311 break
5312 fi
5313 ac_mid=`expr 2 '*' $ac_mid`
5314 fi
5315
5316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5317 done
5318 else
5319 $as_echo "$as_me: failed program was:" >&5
5320 sed 's/^/| /' conftest.$ac_ext >&5
5321
5322 ac_lo= ac_hi=
5323 fi
5324
5325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5326 fi
5327
5328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5329 # Binary search between lo and hi bounds.
5330 while test "x$ac_lo" != "x$ac_hi"; do
5331 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5332 cat >conftest.$ac_ext <<_ACEOF
5333 /* confdefs.h. */
5334 _ACEOF
5335 cat confdefs.h >>conftest.$ac_ext
5336 cat >>conftest.$ac_ext <<_ACEOF
5337 /* end confdefs.h. */
5338 $ac_includes_default
5339 int
5340 main ()
5341 {
5342 static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
5343 test_array [0] = 0
5344
5345 ;
5346 return 0;
5347 }
5348 _ACEOF
5349 rm -f conftest.$ac_objext
5350 if { (ac_try="$ac_compile"
5351 case "(($ac_try" in
5352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5353 *) ac_try_echo=$ac_try;;
5354 esac
5355 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5356 $as_echo "$ac_try_echo") >&5
5357 (eval "$ac_compile") 2>conftest.er1
5358 ac_status=$?
5359 grep -v '^ *+' conftest.er1 >conftest.err
5360 rm -f conftest.er1
5361 cat conftest.err >&5
5362 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5363 (exit $ac_status); } && {
5364 test -z "$ac_c_werror_flag" ||
5365 test ! -s conftest.err
5366 } && test -s conftest.$ac_objext; then
5367 ac_hi=$ac_mid
5368 else
5369 $as_echo "$as_me: failed program was:" >&5
5370 sed 's/^/| /' conftest.$ac_ext >&5
5371
5372 ac_lo=`expr '(' $ac_mid ')' + 1`
5373 fi
5374
5375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5376 done
5377 case $ac_lo in
5378 ?*) ac_cv_sizeof_long=$ac_lo;;
5379 '') if test "$ac_cv_type_long" = yes; then
5380 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5381 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5382 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
5383 See \`config.log' for more details." >&5
5384 $as_echo "$as_me: error: cannot compute sizeof (long)
5385 See \`config.log' for more details." >&2;}
5386 { (exit 77); exit 77; }; }; }
5387 else
5388 ac_cv_sizeof_long=0
5389 fi ;;
5390 esac
5391 else
5392 cat >conftest.$ac_ext <<_ACEOF
5393 /* confdefs.h. */
5394 _ACEOF
5395 cat confdefs.h >>conftest.$ac_ext
5396 cat >>conftest.$ac_ext <<_ACEOF
5397 /* end confdefs.h. */
5398 $ac_includes_default
5399 static long int longval () { return (long int) (sizeof (long)); }
5400 static unsigned long int ulongval () { return (long int) (sizeof (long)); }
5401 #include <stdio.h>
5402 #include <stdlib.h>
5403 int
5404 main ()
5405 {
5406
5407 FILE *f = fopen ("conftest.val", "w");
5408 if (! f)
5409 return 1;
5410 if (((long int) (sizeof (long))) < 0)
5411 {
5412 long int i = longval ();
5413 if (i != ((long int) (sizeof (long))))
5414 return 1;
5415 fprintf (f, "%ld", i);
5416 }
5417 else
5418 {
5419 unsigned long int i = ulongval ();
5420 if (i != ((long int) (sizeof (long))))
5421 return 1;
5422 fprintf (f, "%lu", i);
5423 }
5424 /* Do not output a trailing newline, as this causes \r\n confusion
5425 on some platforms. */
5426 return ferror (f) || fclose (f) != 0;
5427
5428 ;
5429 return 0;
5430 }
5431 _ACEOF
5432 rm -f conftest$ac_exeext
5433 if { (ac_try="$ac_link"
5434 case "(($ac_try" in
5435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5436 *) ac_try_echo=$ac_try;;
5437 esac
5438 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5439 $as_echo "$ac_try_echo") >&5
5440 (eval "$ac_link") 2>&5
5441 ac_status=$?
5442 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5443 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5444 { (case "(($ac_try" in
5445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5446 *) ac_try_echo=$ac_try;;
5447 esac
5448 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5449 $as_echo "$ac_try_echo") >&5
5450 (eval "$ac_try") 2>&5
5451 ac_status=$?
5452 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5453 (exit $ac_status); }; }; then
5454 ac_cv_sizeof_long=`cat conftest.val`
5455 else
5456 $as_echo "$as_me: program exited with status $ac_status" >&5
5457 $as_echo "$as_me: failed program was:" >&5
5458 sed 's/^/| /' conftest.$ac_ext >&5
5459
5460 ( exit $ac_status )
5461 if test "$ac_cv_type_long" = yes; then
5462 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5463 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5464 { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
5465 See \`config.log' for more details." >&5
5466 $as_echo "$as_me: error: cannot compute sizeof (long)
5467 See \`config.log' for more details." >&2;}
5468 { (exit 77); exit 77; }; }; }
5469 else
5470 ac_cv_sizeof_long=0
5471 fi
5472 fi
5473 rm -rf conftest.dSYM
5474 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5475 fi
5476 rm -f conftest.val
5477 fi
5478 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
5479 $as_echo "$ac_cv_sizeof_long" >&6; }
5480
5481
5482
5483 cat >>confdefs.h <<_ACEOF
5484 #define SIZEOF_LONG $ac_cv_sizeof_long
5485 _ACEOF
5486
5487
5488 { $as_echo "$as_me:$LINENO: checking what directory libraries are found in" >&5
5489 $as_echo_n "checking what directory libraries are found in... " >&6; }
5490 if test "${ac_cv_cmu_lib_subdir+set}" = set; then
5491 $as_echo_n "(cached) " >&6
5492 else
5493 test "X$with_lib_subdir" = "Xyes" && with_lib_subdir=
5494 test "X$with_lib_subdir" = "Xno" && with_lib_subdir=
5495 if test "X$with_lib_subdir" = "X" ; then
5496 ac_cv_cmu_lib_subdir=lib
5497 if test $ac_cv_sizeof_long -eq 4 ; then
5498 test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32
5499 fi
5500 if test $ac_cv_sizeof_long -eq 8 ; then
5501 test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64
5502 fi
5503 else
5504 ac_cv_cmu_lib_subdir=$with_lib_subdir
5505 fi
5506 fi
5507 { $as_echo "$as_me:$LINENO: result: $ac_cv_cmu_lib_subdir" >&5
5508 $as_echo "$ac_cv_cmu_lib_subdir" >&6; }
5509 CMU_LIB_SUBDIR=$ac_cv_cmu_lib_subdir
5510
5511
5512
5513
5514
5515 # Check whether --with-openssl was given.
5516 if test "${with_openssl+set}" = set; then
5517 withval=$with_openssl; with_openssl=$withval
5518 else
5519 with_openssl="yes"
5520 fi
5521
5522
5523 save_CPPFLAGS=$CPPFLAGS
5524 save_LDFLAGS=$LDFLAGS
5525
5526 if test -d $with_openssl; then
5527 CPPFLAGS="${CPPFLAGS} -I${with_openssl}/include"
5528
5529 # this is CMU ADD LIBPATH
5530 if test "$andrew_cv_runpath_switch" = "none" ; then
5531 LDFLAGS="-L${with_openssl}/$CMU_LIB_SUBDIR ${LDFLAGS}"
5532 else
5533 LDFLAGS="-L${with_openssl}/$CMU_LIB_SUBDIR $andrew_cv_runpath_switch${with_openssl}/$CMU_LIB_SUBDIR ${LDFLAGS}"
5534 fi
5535
5536 fi
5537
5538 case "$with_openssl" in
5539 no)
5540 with_openssl="no";;
5541 *)
5542 LIB_RSAREF=""
5543 { $as_echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lrsaref" >&5
5544 $as_echo_n "checking for RSAPublicEncrypt in -lrsaref... " >&6; }
5545 if test "${ac_cv_lib_rsaref_RSAPublicEncrypt+set}" = set; then
5546 $as_echo_n "(cached) " >&6
5547 else
5548 ac_check_lib_save_LIBS=$LIBS
5549 LIBS="-lrsaref $LIBS"
5550 cat >conftest.$ac_ext <<_ACEOF
5551 /* confdefs.h. */
5552 _ACEOF
5553 cat confdefs.h >>conftest.$ac_ext
5554 cat >>conftest.$ac_ext <<_ACEOF
5555 /* end confdefs.h. */
5556
5557 /* Override any GCC internal prototype to avoid an error.
5558 Use char because int might match the return type of a GCC
5559 builtin and then its argument prototype would still apply. */
5560 #ifdef __cplusplus
5561 extern "C"
5562 #endif
5563 char RSAPublicEncrypt ();
5564 int
5565 main ()
5566 {
5567 return RSAPublicEncrypt ();
5568 ;
5569 return 0;
5570 }
5571 _ACEOF
5572 rm -f conftest.$ac_objext conftest$ac_exeext
5573 if { (ac_try="$ac_link"
5574 case "(($ac_try" in
5575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5576 *) ac_try_echo=$ac_try;;
5577 esac
5578 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5579 $as_echo "$ac_try_echo") >&5
5580 (eval "$ac_link") 2>conftest.er1
5581 ac_status=$?
5582 grep -v '^ *+' conftest.er1 >conftest.err
5583 rm -f conftest.er1
5584 cat conftest.err >&5
5585 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5586 (exit $ac_status); } && {
5587 test -z "$ac_c_werror_flag" ||
5588 test ! -s conftest.err
5589 } && test -s conftest$ac_exeext && {
5590 test "$cross_compiling" = yes ||
5591 $as_test_x conftest$ac_exeext
5592 }; then
5593 ac_cv_lib_rsaref_RSAPublicEncrypt=yes
5594 else
5595 $as_echo "$as_me: failed program was:" >&5
5596 sed 's/^/| /' conftest.$ac_ext >&5
5597
5598 ac_cv_lib_rsaref_RSAPublicEncrypt=no
5599 fi
5600
5601 rm -rf conftest.dSYM
5602 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5603 conftest$ac_exeext conftest.$ac_ext
5604 LIBS=$ac_check_lib_save_LIBS
5605 fi
5606 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rsaref_RSAPublicEncrypt" >&5
5607 $as_echo "$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6; }
5608 if test "x$ac_cv_lib_rsaref_RSAPublicEncrypt" = x""yes; then
5609 cmu_have_rsaref=yes;
5610 { $as_echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lRSAglue" >&5
5611 $as_echo_n "checking for RSAPublicEncrypt in -lRSAglue... " >&6; }
5612 if test "${ac_cv_lib_RSAglue_RSAPublicEncrypt+set}" = set; then
5613 $as_echo_n "(cached) " >&6
5614 else
5615 ac_check_lib_save_LIBS=$LIBS
5616 LIBS="-lRSAglue $LIBS"
5617 cat >conftest.$ac_ext <<_ACEOF
5618 /* confdefs.h. */
5619 _ACEOF
5620 cat confdefs.h >>conftest.$ac_ext
5621 cat >>conftest.$ac_ext <<_ACEOF
5622 /* end confdefs.h. */
5623
5624 /* Override any GCC internal prototype to avoid an error.
5625 Use char because int might match the return type of a GCC
5626 builtin and then its argument prototype would still apply. */
5627 #ifdef __cplusplus
5628 extern "C"
5629 #endif
5630 char RSAPublicEncrypt ();
5631 int
5632 main ()
5633 {
5634 return RSAPublicEncrypt ();
5635 ;
5636 return 0;
5637 }
5638 _ACEOF
5639 rm -f conftest.$ac_objext conftest$ac_exeext
5640 if { (ac_try="$ac_link"
5641 case "(($ac_try" in
5642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5643 *) ac_try_echo=$ac_try;;
5644 esac
5645 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5646 $as_echo "$ac_try_echo") >&5
5647 (eval "$ac_link") 2>conftest.er1
5648 ac_status=$?
5649 grep -v '^ *+' conftest.er1 >conftest.err
5650 rm -f conftest.er1
5651 cat conftest.err >&5
5652 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5653 (exit $ac_status); } && {
5654 test -z "$ac_c_werror_flag" ||
5655 test ! -s conftest.err
5656 } && test -s conftest$ac_exeext && {
5657 test "$cross_compiling" = yes ||
5658 $as_test_x conftest$ac_exeext
5659 }; then
5660 ac_cv_lib_RSAglue_RSAPublicEncrypt=yes
5661 else
5662 $as_echo "$as_me: failed program was:" >&5
5663 sed 's/^/| /' conftest.$ac_ext >&5
5664
5665 ac_cv_lib_RSAglue_RSAPublicEncrypt=no
5666 fi
5667
5668 rm -rf conftest.dSYM
5669 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5670 conftest$ac_exeext conftest.$ac_ext
5671 LIBS=$ac_check_lib_save_LIBS
5672 fi
5673 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_RSAglue_RSAPublicEncrypt" >&5
5674 $as_echo "$ac_cv_lib_RSAglue_RSAPublicEncrypt" >&6; }
5675 if test "x$ac_cv_lib_RSAglue_RSAPublicEncrypt" = x""yes; then
5676 LIB_RSAREF="-lRSAglue -lrsaref"
5677 else
5678 LIB_RSAREF="-lrsaref"
5679 fi
5680
5681 else
5682 cmu_have_rsaref=no
5683 fi
5684
5685
5686 if test "${ac_cv_header_openssl_evp_h+set}" = set; then
5687 { $as_echo "$as_me:$LINENO: checking for openssl/evp.h" >&5
5688 $as_echo_n "checking for openssl/evp.h... " >&6; }
5689 if test "${ac_cv_header_openssl_evp_h+set}" = set; then
5690 $as_echo_n "(cached) " >&6
5691 fi
5692 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_evp_h" >&5
5693 $as_echo "$ac_cv_header_openssl_evp_h" >&6; }
5694 else
5695 # Is the header compilable?
5696 { $as_echo "$as_me:$LINENO: checking openssl/evp.h usability" >&5
5697 $as_echo_n "checking openssl/evp.h usability... " >&6; }
5698 cat >conftest.$ac_ext <<_ACEOF
5699 /* confdefs.h. */
5700 _ACEOF
5701 cat confdefs.h >>conftest.$ac_ext
5702 cat >>conftest.$ac_ext <<_ACEOF
5703 /* end confdefs.h. */
5704 $ac_includes_default
5705 #include <openssl/evp.h>
5706 _ACEOF
5707 rm -f conftest.$ac_objext
5708 if { (ac_try="$ac_compile"
5709 case "(($ac_try" in
5710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5711 *) ac_try_echo=$ac_try;;
5712 esac
5713 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5714 $as_echo "$ac_try_echo") >&5
5715 (eval "$ac_compile") 2>conftest.er1
5716 ac_status=$?
5717 grep -v '^ *+' conftest.er1 >conftest.err
5718 rm -f conftest.er1
5719 cat conftest.err >&5
5720 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5721 (exit $ac_status); } && {
5722 test -z "$ac_c_werror_flag" ||
5723 test ! -s conftest.err
5724 } && test -s conftest.$ac_objext; then
5725 ac_header_compiler=yes
5726 else
5727 $as_echo "$as_me: failed program was:" >&5
5728 sed 's/^/| /' conftest.$ac_ext >&5
5729
5730 ac_header_compiler=no
5731 fi
5732
5733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5734 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5735 $as_echo "$ac_header_compiler" >&6; }
5736
5737 # Is the header present?
5738 { $as_echo "$as_me:$LINENO: checking openssl/evp.h presence" >&5
5739 $as_echo_n "checking openssl/evp.h presence... " >&6; }
5740 cat >conftest.$ac_ext <<_ACEOF
5741 /* confdefs.h. */
5742 _ACEOF
5743 cat confdefs.h >>conftest.$ac_ext
5744 cat >>conftest.$ac_ext <<_ACEOF
5745 /* end confdefs.h. */
5746 #include <openssl/evp.h>
5747 _ACEOF
5748 if { (ac_try="$ac_cpp conftest.$ac_ext"
5749 case "(($ac_try" in
5750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5751 *) ac_try_echo=$ac_try;;
5752 esac
5753 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5754 $as_echo "$ac_try_echo") >&5
5755 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5756 ac_status=$?
5757 grep -v '^ *+' conftest.er1 >conftest.err
5758 rm -f conftest.er1
5759 cat conftest.err >&5
5760 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5761 (exit $ac_status); } >/dev/null && {
5762 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5763 test ! -s conftest.err
5764 }; then
5765 ac_header_preproc=yes
5766 else
5767 $as_echo "$as_me: failed program was:" >&5
5768 sed 's/^/| /' conftest.$ac_ext >&5
5769
5770 ac_header_preproc=no
5771 fi
5772
5773 rm -f conftest.err conftest.$ac_ext
5774 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5775 $as_echo "$ac_header_preproc" >&6; }
5776
5777 # So? What about this header?
5778 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5779 yes:no: )
5780 { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: accepted by the compiler, rejected by the preprocessor!" >&5
5781 $as_echo "$as_me: WARNING: openssl/evp.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5782 { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: proceeding with the compiler's result" >&5
5783 $as_echo "$as_me: WARNING: openssl/evp.h: proceeding with the compiler's result" >&2;}
5784 ac_header_preproc=yes
5785 ;;
5786 no:yes:* )
5787 { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: present but cannot be compiled" >&5
5788 $as_echo "$as_me: WARNING: openssl/evp.h: present but cannot be compiled" >&2;}
5789 { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: check for missing prerequisite headers?" >&5
5790 $as_echo "$as_me: WARNING: openssl/evp.h: check for missing prerequisite headers?" >&2;}
5791 { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: see the Autoconf documentation" >&5
5792 $as_echo "$as_me: WARNING: openssl/evp.h: see the Autoconf documentation" >&2;}
5793 { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: section \"Present But Cannot Be Compiled\"" >&5
5794 $as_echo "$as_me: WARNING: openssl/evp.h: section \"Present But Cannot Be Compiled\"" >&2;}
5795 { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: proceeding with the preprocessor's result" >&5
5796 $as_echo "$as_me: WARNING: openssl/evp.h: proceeding with the preprocessor's result" >&2;}
5797 { $as_echo "$as_me:$LINENO: WARNING: openssl/evp.h: in the future, the compiler will take precedence" >&5
5798 $as_echo "$as_me: WARNING: openssl/evp.h: in the future, the compiler will take precedence" >&2;}
5799
5800 ;;
5801 esac
5802 { $as_echo "$as_me:$LINENO: checking for openssl/evp.h" >&5
5803 $as_echo_n "checking for openssl/evp.h... " >&6; }
5804 if test "${ac_cv_header_openssl_evp_h+set}" = set; then
5805 $as_echo_n "(cached) " >&6
5806 else
5807 ac_cv_header_openssl_evp_h=$ac_header_preproc
5808 fi
5809 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_evp_h" >&5
5810 $as_echo "$ac_cv_header_openssl_evp_h" >&6; }
5811
5812 fi
5813 if test "x$ac_cv_header_openssl_evp_h" = x""yes; then
5814
5815 { $as_echo "$as_me:$LINENO: checking for EVP_DigestInit in -lcrypto" >&5
5816 $as_echo_n "checking for EVP_DigestInit in -lcrypto... " >&6; }
5817 if test "${ac_cv_lib_crypto_EVP_DigestInit+set}" = set; then
5818 $as_echo_n "(cached) " >&6
5819 else
5820 ac_check_lib_save_LIBS=$LIBS
5821 LIBS="-lcrypto $LIB_RSAREF $LIBS"
5822 cat >conftest.$ac_ext <<_ACEOF
5823 /* confdefs.h. */
5824 _ACEOF
5825 cat confdefs.h >>conftest.$ac_ext
5826 cat >>conftest.$ac_ext <<_ACEOF
5827 /* end confdefs.h. */
5828
5829 /* Override any GCC internal prototype to avoid an error.
5830 Use char because int might match the return type of a GCC
5831 builtin and then its argument prototype would still apply. */
5832 #ifdef __cplusplus
5833 extern "C"
5834 #endif
5835 char EVP_DigestInit ();
5836 int
5837 main ()
5838 {
5839 return EVP_DigestInit ();
5840 ;
5841 return 0;
5842 }
5843 _ACEOF
5844 rm -f conftest.$ac_objext conftest$ac_exeext
5845 if { (ac_try="$ac_link"
5846 case "(($ac_try" in
5847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5848 *) ac_try_echo=$ac_try;;
5849 esac
5850 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5851 $as_echo "$ac_try_echo") >&5
5852 (eval "$ac_link") 2>conftest.er1
5853 ac_status=$?
5854 grep -v '^ *+' conftest.er1 >conftest.err
5855 rm -f conftest.er1
5856 cat conftest.err >&5
5857 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5858 (exit $ac_status); } && {
5859 test -z "$ac_c_werror_flag" ||
5860 test ! -s conftest.err
5861 } && test -s conftest$ac_exeext && {
5862 test "$cross_compiling" = yes ||
5863 $as_test_x conftest$ac_exeext
5864 }; then
5865 ac_cv_lib_crypto_EVP_DigestInit=yes
5866 else
5867 $as_echo "$as_me: failed program was:" >&5
5868 sed 's/^/| /' conftest.$ac_ext >&5
5869
5870 ac_cv_lib_crypto_EVP_DigestInit=no
5871 fi
5872
5873 rm -rf conftest.dSYM
5874 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5875 conftest$ac_exeext conftest.$ac_ext
5876 LIBS=$ac_check_lib_save_LIBS
5877 fi
5878 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_EVP_DigestInit" >&5
5879 $as_echo "$ac_cv_lib_crypto_EVP_DigestInit" >&6; }
5880 if test "x$ac_cv_lib_crypto_EVP_DigestInit" = x""yes; then
5881 with_openssl="yes"
5882 else
5883 with_openssl="no"
5884 fi
5885
5886 else
5887 with_openssl=no
5888 fi
5889
5890
5891 ;;
5892 esac
5893
5894 if test "$with_openssl" != "no"; then
5895
5896 cat >>confdefs.h <<\_ACEOF
5897 #define HAVE_OPENSSL /**/
5898 _ACEOF
5899
5900 else
5901 CPPFLAGS=$save_CPPFLAGS
5902 LDFLAGS=$save_LDFLAGS
5903 fi
5904
5905 { $as_echo "$as_me:$LINENO: checking for OpenSSL" >&5
5906 $as_echo_n "checking for OpenSSL... " >&6; }
5907 { $as_echo "$as_me:$LINENO: result: $with_openssl" >&5
5908 $as_echo "$with_openssl" >&6; }
5909
5910
5911
5912 # Check whether --with-des was given.
5913 if test "${with_des+set}" = set; then
5914 withval=$with_des; with_des=$withval
5915 else
5916 with_des=yes
5917 fi
5918
5919
5920 LIB_DES=""
5921 if test "$with_des" != no; then
5922 if test -d $with_des; then
5923 CPPFLAGS="$CPPFLAGS -I${with_des}/include"
5924 LDFLAGS="$LDFLAGS -L${with_des}/lib"
5925 fi
5926
5927 if test "$with_openssl" != no; then
5928 { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -lcrypto" >&5
5929 $as_echo_n "checking for des_cbc_encrypt in -lcrypto... " >&6; }
5930 if test "${ac_cv_lib_crypto_des_cbc_encrypt+set}" = set; then
5931 $as_echo_n "(cached) " >&6
5932 else
5933 ac_check_lib_save_LIBS=$LIBS
5934 LIBS="-lcrypto $LIB_RSAREF $LIBS"
5935 cat >conftest.$ac_ext <<_ACEOF
5936 /* confdefs.h. */
5937 _ACEOF
5938 cat confdefs.h >>conftest.$ac_ext
5939 cat >>conftest.$ac_ext <<_ACEOF
5940 /* end confdefs.h. */
5941
5942 /* Override any GCC internal prototype to avoid an error.
5943 Use char because int might match the return type of a GCC
5944 builtin and then its argument prototype would still apply. */
5945 #ifdef __cplusplus
5946 extern "C"
5947 #endif
5948 char des_cbc_encrypt ();
5949 int
5950 main ()
5951 {
5952 return des_cbc_encrypt ();
5953 ;
5954 return 0;
5955 }
5956 _ACEOF
5957 rm -f conftest.$ac_objext conftest$ac_exeext
5958 if { (ac_try="$ac_link"
5959 case "(($ac_try" in
5960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5961 *) ac_try_echo=$ac_try;;
5962 esac
5963 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5964 $as_echo "$ac_try_echo") >&5
5965 (eval "$ac_link") 2>conftest.er1
5966 ac_status=$?
5967 grep -v '^ *+' conftest.er1 >conftest.err
5968 rm -f conftest.er1
5969 cat conftest.err >&5
5970 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5971 (exit $ac_status); } && {
5972 test -z "$ac_c_werror_flag" ||
5973 test ! -s conftest.err
5974 } && test -s conftest$ac_exeext && {
5975 test "$cross_compiling" = yes ||
5976 $as_test_x conftest$ac_exeext
5977 }; then
5978 ac_cv_lib_crypto_des_cbc_encrypt=yes
5979 else
5980 $as_echo "$as_me: failed program was:" >&5
5981 sed 's/^/| /' conftest.$ac_ext >&5
5982
5983 ac_cv_lib_crypto_des_cbc_encrypt=no
5984 fi
5985
5986 rm -rf conftest.dSYM
5987 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5988 conftest$ac_exeext conftest.$ac_ext
5989 LIBS=$ac_check_lib_save_LIBS
5990 fi
5991 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_des_cbc_encrypt" >&5
5992 $as_echo "$ac_cv_lib_crypto_des_cbc_encrypt" >&6; }
5993 if test "x$ac_cv_lib_crypto_des_cbc_encrypt" = x""yes; then
5994
5995 if test "${ac_cv_header_openssl_des_h+set}" = set; then
5996 { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
5997 $as_echo_n "checking for openssl/des.h... " >&6; }
5998 if test "${ac_cv_header_openssl_des_h+set}" = set; then
5999 $as_echo_n "(cached) " >&6
6000 fi
6001 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
6002 $as_echo "$ac_cv_header_openssl_des_h" >&6; }
6003 else
6004 # Is the header compilable?
6005 { $as_echo "$as_me:$LINENO: checking openssl/des.h usability" >&5
6006 $as_echo_n "checking openssl/des.h usability... " >&6; }
6007 cat >conftest.$ac_ext <<_ACEOF
6008 /* confdefs.h. */
6009 _ACEOF
6010 cat confdefs.h >>conftest.$ac_ext
6011 cat >>conftest.$ac_ext <<_ACEOF
6012 /* end confdefs.h. */
6013 $ac_includes_default
6014 #include <openssl/des.h>
6015 _ACEOF
6016 rm -f conftest.$ac_objext
6017 if { (ac_try="$ac_compile"
6018 case "(($ac_try" in
6019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6020 *) ac_try_echo=$ac_try;;
6021 esac
6022 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6023 $as_echo "$ac_try_echo") >&5
6024 (eval "$ac_compile") 2>conftest.er1
6025 ac_status=$?
6026 grep -v '^ *+' conftest.er1 >conftest.err
6027 rm -f conftest.er1
6028 cat conftest.err >&5
6029 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6030 (exit $ac_status); } && {
6031 test -z "$ac_c_werror_flag" ||
6032 test ! -s conftest.err
6033 } && test -s conftest.$ac_objext; then
6034 ac_header_compiler=yes
6035 else
6036 $as_echo "$as_me: failed program was:" >&5
6037 sed 's/^/| /' conftest.$ac_ext >&5
6038
6039 ac_header_compiler=no
6040 fi
6041
6042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6043 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6044 $as_echo "$ac_header_compiler" >&6; }
6045
6046 # Is the header present?
6047 { $as_echo "$as_me:$LINENO: checking openssl/des.h presence" >&5
6048 $as_echo_n "checking openssl/des.h presence... " >&6; }
6049 cat >conftest.$ac_ext <<_ACEOF
6050 /* confdefs.h. */
6051 _ACEOF
6052 cat confdefs.h >>conftest.$ac_ext
6053 cat >>conftest.$ac_ext <<_ACEOF
6054 /* end confdefs.h. */
6055 #include <openssl/des.h>
6056 _ACEOF
6057 if { (ac_try="$ac_cpp conftest.$ac_ext"
6058 case "(($ac_try" in
6059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6060 *) ac_try_echo=$ac_try;;
6061 esac
6062 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6063 $as_echo "$ac_try_echo") >&5
6064 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6065 ac_status=$?
6066 grep -v '^ *+' conftest.er1 >conftest.err
6067 rm -f conftest.er1
6068 cat conftest.err >&5
6069 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6070 (exit $ac_status); } >/dev/null && {
6071 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6072 test ! -s conftest.err
6073 }; then
6074 ac_header_preproc=yes
6075 else
6076 $as_echo "$as_me: failed program was:" >&5
6077 sed 's/^/| /' conftest.$ac_ext >&5
6078
6079 ac_header_preproc=no
6080 fi
6081
6082 rm -f conftest.err conftest.$ac_ext
6083 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6084 $as_echo "$ac_header_preproc" >&6; }
6085
6086 # So? What about this header?
6087 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6088 yes:no: )
6089 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&5
6090 $as_echo "$as_me: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6091 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the compiler's result" >&5
6092 $as_echo "$as_me: WARNING: openssl/des.h: proceeding with the compiler's result" >&2;}
6093 ac_header_preproc=yes
6094 ;;
6095 no:yes:* )
6096 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: present but cannot be compiled" >&5
6097 $as_echo "$as_me: WARNING: openssl/des.h: present but cannot be compiled" >&2;}
6098 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: check for missing prerequisite headers?" >&5
6099 $as_echo "$as_me: WARNING: openssl/des.h: check for missing prerequisite headers?" >&2;}
6100 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: see the Autoconf documentation" >&5
6101 $as_echo "$as_me: WARNING: openssl/des.h: see the Autoconf documentation" >&2;}
6102 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: section \"Present But Cannot Be Compiled\"" >&5
6103 $as_echo "$as_me: WARNING: openssl/des.h: section \"Present But Cannot Be Compiled\"" >&2;}
6104 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&5
6105 $as_echo "$as_me: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&2;}
6106 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&5
6107 $as_echo "$as_me: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&2;}
6108
6109 ;;
6110 esac
6111 { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
6112 $as_echo_n "checking for openssl/des.h... " >&6; }
6113 if test "${ac_cv_header_openssl_des_h+set}" = set; then
6114 $as_echo_n "(cached) " >&6
6115 else
6116 ac_cv_header_openssl_des_h=$ac_header_preproc
6117 fi
6118 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
6119 $as_echo "$ac_cv_header_openssl_des_h" >&6; }
6120
6121 fi
6122 if test "x$ac_cv_header_openssl_des_h" = x""yes; then
6123
6124 cat >>confdefs.h <<\_ACEOF
6125 #define WITH_SSL_DES /**/
6126 _ACEOF
6127
6128 LIB_DES="-lcrypto";
6129 with_des=yes
6130 else
6131 with_des=no
6132 fi
6133
6134
6135 else
6136 with_des=no
6137 fi
6138
6139
6140 if test "$with_des" = no; then
6141 { $as_echo "$as_me:$LINENO: checking for DES_cbc_encrypt in -lcrypto" >&5
6142 $as_echo_n "checking for DES_cbc_encrypt in -lcrypto... " >&6; }
6143 if test "${ac_cv_lib_crypto_DES_cbc_encrypt+set}" = set; then
6144 $as_echo_n "(cached) " >&6
6145 else
6146 ac_check_lib_save_LIBS=$LIBS
6147 LIBS="-lcrypto $LIB_RSAREF $LIBS"
6148 cat >conftest.$ac_ext <<_ACEOF
6149 /* confdefs.h. */
6150 _ACEOF
6151 cat confdefs.h >>conftest.$ac_ext
6152 cat >>conftest.$ac_ext <<_ACEOF
6153 /* end confdefs.h. */
6154
6155 /* Override any GCC internal prototype to avoid an error.
6156 Use char because int might match the return type of a GCC
6157 builtin and then its argument prototype would still apply. */
6158 #ifdef __cplusplus
6159 extern "C"
6160 #endif
6161 char DES_cbc_encrypt ();
6162 int
6163 main ()
6164 {
6165 return DES_cbc_encrypt ();
6166 ;
6167 return 0;
6168 }
6169 _ACEOF
6170 rm -f conftest.$ac_objext conftest$ac_exeext
6171 if { (ac_try="$ac_link"
6172 case "(($ac_try" in
6173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6174 *) ac_try_echo=$ac_try;;
6175 esac
6176 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6177 $as_echo "$ac_try_echo") >&5
6178 (eval "$ac_link") 2>conftest.er1
6179 ac_status=$?
6180 grep -v '^ *+' conftest.er1 >conftest.err
6181 rm -f conftest.er1
6182 cat conftest.err >&5
6183 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6184 (exit $ac_status); } && {
6185 test -z "$ac_c_werror_flag" ||
6186 test ! -s conftest.err
6187 } && test -s conftest$ac_exeext && {
6188 test "$cross_compiling" = yes ||
6189 $as_test_x conftest$ac_exeext
6190 }; then
6191 ac_cv_lib_crypto_DES_cbc_encrypt=yes
6192 else
6193 $as_echo "$as_me: failed program was:" >&5
6194 sed 's/^/| /' conftest.$ac_ext >&5
6195
6196 ac_cv_lib_crypto_DES_cbc_encrypt=no
6197 fi
6198
6199 rm -rf conftest.dSYM
6200 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6201 conftest$ac_exeext conftest.$ac_ext
6202 LIBS=$ac_check_lib_save_LIBS
6203 fi
6204 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_DES_cbc_encrypt" >&5
6205 $as_echo "$ac_cv_lib_crypto_DES_cbc_encrypt" >&6; }
6206 if test "x$ac_cv_lib_crypto_DES_cbc_encrypt" = x""yes; then
6207
6208 if test "${ac_cv_header_openssl_des_h+set}" = set; then
6209 { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
6210 $as_echo_n "checking for openssl/des.h... " >&6; }
6211 if test "${ac_cv_header_openssl_des_h+set}" = set; then
6212 $as_echo_n "(cached) " >&6
6213 fi
6214 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
6215 $as_echo "$ac_cv_header_openssl_des_h" >&6; }
6216 else
6217 # Is the header compilable?
6218 { $as_echo "$as_me:$LINENO: checking openssl/des.h usability" >&5
6219 $as_echo_n "checking openssl/des.h usability... " >&6; }
6220 cat >conftest.$ac_ext <<_ACEOF
6221 /* confdefs.h. */
6222 _ACEOF
6223 cat confdefs.h >>conftest.$ac_ext
6224 cat >>conftest.$ac_ext <<_ACEOF
6225 /* end confdefs.h. */
6226 $ac_includes_default
6227 #include <openssl/des.h>
6228 _ACEOF
6229 rm -f conftest.$ac_objext
6230 if { (ac_try="$ac_compile"
6231 case "(($ac_try" in
6232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6233 *) ac_try_echo=$ac_try;;
6234 esac
6235 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6236 $as_echo "$ac_try_echo") >&5
6237 (eval "$ac_compile") 2>conftest.er1
6238 ac_status=$?
6239 grep -v '^ *+' conftest.er1 >conftest.err
6240 rm -f conftest.er1
6241 cat conftest.err >&5
6242 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6243 (exit $ac_status); } && {
6244 test -z "$ac_c_werror_flag" ||
6245 test ! -s conftest.err
6246 } && test -s conftest.$ac_objext; then
6247 ac_header_compiler=yes
6248 else
6249 $as_echo "$as_me: failed program was:" >&5
6250 sed 's/^/| /' conftest.$ac_ext >&5
6251
6252 ac_header_compiler=no
6253 fi
6254
6255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6256 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6257 $as_echo "$ac_header_compiler" >&6; }
6258
6259 # Is the header present?
6260 { $as_echo "$as_me:$LINENO: checking openssl/des.h presence" >&5
6261 $as_echo_n "checking openssl/des.h presence... " >&6; }
6262 cat >conftest.$ac_ext <<_ACEOF
6263 /* confdefs.h. */
6264 _ACEOF
6265 cat confdefs.h >>conftest.$ac_ext
6266 cat >>conftest.$ac_ext <<_ACEOF
6267 /* end confdefs.h. */
6268 #include <openssl/des.h>
6269 _ACEOF
6270 if { (ac_try="$ac_cpp conftest.$ac_ext"
6271 case "(($ac_try" in
6272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6273 *) ac_try_echo=$ac_try;;
6274 esac
6275 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6276 $as_echo "$ac_try_echo") >&5
6277 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6278 ac_status=$?
6279 grep -v '^ *+' conftest.er1 >conftest.err
6280 rm -f conftest.er1
6281 cat conftest.err >&5
6282 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6283 (exit $ac_status); } >/dev/null && {
6284 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6285 test ! -s conftest.err
6286 }; then
6287 ac_header_preproc=yes
6288 else
6289 $as_echo "$as_me: failed program was:" >&5
6290 sed 's/^/| /' conftest.$ac_ext >&5
6291
6292 ac_header_preproc=no
6293 fi
6294
6295 rm -f conftest.err conftest.$ac_ext
6296 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6297 $as_echo "$ac_header_preproc" >&6; }
6298
6299 # So? What about this header?
6300 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6301 yes:no: )
6302 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&5
6303 $as_echo "$as_me: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6304 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the compiler's result" >&5
6305 $as_echo "$as_me: WARNING: openssl/des.h: proceeding with the compiler's result" >&2;}
6306 ac_header_preproc=yes
6307 ;;
6308 no:yes:* )
6309 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: present but cannot be compiled" >&5
6310 $as_echo "$as_me: WARNING: openssl/des.h: present but cannot be compiled" >&2;}
6311 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: check for missing prerequisite headers?" >&5
6312 $as_echo "$as_me: WARNING: openssl/des.h: check for missing prerequisite headers?" >&2;}
6313 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: see the Autoconf documentation" >&5
6314 $as_echo "$as_me: WARNING: openssl/des.h: see the Autoconf documentation" >&2;}
6315 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: section \"Present But Cannot Be Compiled\"" >&5
6316 $as_echo "$as_me: WARNING: openssl/des.h: section \"Present But Cannot Be Compiled\"" >&2;}
6317 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&5
6318 $as_echo "$as_me: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&2;}
6319 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&5
6320 $as_echo "$as_me: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&2;}
6321
6322 ;;
6323 esac
6324 { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
6325 $as_echo_n "checking for openssl/des.h... " >&6; }
6326 if test "${ac_cv_header_openssl_des_h+set}" = set; then
6327 $as_echo_n "(cached) " >&6
6328 else
6329 ac_cv_header_openssl_des_h=$ac_header_preproc
6330 fi
6331 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
6332 $as_echo "$ac_cv_header_openssl_des_h" >&6; }
6333
6334 fi
6335 if test "x$ac_cv_header_openssl_des_h" = x""yes; then
6336
6337 cat >>confdefs.h <<\_ACEOF
6338 #define WITH_SSL_DES /**/
6339 _ACEOF
6340
6341 LIB_DES="-lcrypto";
6342 with_des=yes
6343 else
6344 with_des=no
6345 fi
6346
6347
6348 else
6349 with_des=no
6350 fi
6351
6352 fi
6353 fi
6354
6355 if test "$with_des" = no; then
6356 { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
6357 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
6358 if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
6359 $as_echo_n "(cached) " >&6
6360 else
6361 ac_check_lib_save_LIBS=$LIBS
6362 LIBS="-ldes $LIBS"
6363 cat >conftest.$ac_ext <<_ACEOF
6364 /* confdefs.h. */
6365 _ACEOF
6366 cat confdefs.h >>conftest.$ac_ext
6367 cat >>conftest.$ac_ext <<_ACEOF
6368 /* end confdefs.h. */
6369
6370 /* Override any GCC internal prototype to avoid an error.
6371 Use char because int might match the return type of a GCC
6372 builtin and then its argument prototype would still apply. */
6373 #ifdef __cplusplus
6374 extern "C"
6375 #endif
6376 char des_cbc_encrypt ();
6377 int
6378 main ()
6379 {
6380 return des_cbc_encrypt ();
6381 ;
6382 return 0;
6383 }
6384 _ACEOF
6385 rm -f conftest.$ac_objext conftest$ac_exeext
6386 if { (ac_try="$ac_link"
6387 case "(($ac_try" in
6388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6389 *) ac_try_echo=$ac_try;;
6390 esac
6391 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6392 $as_echo "$ac_try_echo") >&5
6393 (eval "$ac_link") 2>conftest.er1
6394 ac_status=$?
6395 grep -v '^ *+' conftest.er1 >conftest.err
6396 rm -f conftest.er1
6397 cat conftest.err >&5
6398 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6399 (exit $ac_status); } && {
6400 test -z "$ac_c_werror_flag" ||
6401 test ! -s conftest.err
6402 } && test -s conftest$ac_exeext && {
6403 test "$cross_compiling" = yes ||
6404 $as_test_x conftest$ac_exeext
6405 }; then
6406 ac_cv_lib_des_des_cbc_encrypt=yes
6407 else
6408 $as_echo "$as_me: failed program was:" >&5
6409 sed 's/^/| /' conftest.$ac_ext >&5
6410
6411 ac_cv_lib_des_des_cbc_encrypt=no
6412 fi
6413
6414 rm -rf conftest.dSYM
6415 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6416 conftest$ac_exeext conftest.$ac_ext
6417 LIBS=$ac_check_lib_save_LIBS
6418 fi
6419 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
6420 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
6421 if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then
6422 LIB_DES="-ldes";
6423 with_des=yes
6424 else
6425 with_des=no
6426 fi
6427
6428 fi
6429
6430 if test "$with_des" = no; then
6431 { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
6432 $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
6433 if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
6434 $as_echo_n "(cached) " >&6
6435 else
6436 ac_check_lib_save_LIBS=$LIBS
6437 LIBS="-ldes425 $LIBS"
6438 cat >conftest.$ac_ext <<_ACEOF
6439 /* confdefs.h. */
6440 _ACEOF
6441 cat confdefs.h >>conftest.$ac_ext
6442 cat >>conftest.$ac_ext <<_ACEOF
6443 /* end confdefs.h. */
6444
6445 /* Override any GCC internal prototype to avoid an error.
6446 Use char because int might match the return type of a GCC
6447 builtin and then its argument prototype would still apply. */
6448 #ifdef __cplusplus
6449 extern "C"
6450 #endif
6451 char des_cbc_encrypt ();
6452 int
6453 main ()
6454 {
6455 return des_cbc_encrypt ();
6456 ;
6457 return 0;
6458 }
6459 _ACEOF
6460 rm -f conftest.$ac_objext conftest$ac_exeext
6461 if { (ac_try="$ac_link"
6462 case "(($ac_try" in
6463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6464 *) ac_try_echo=$ac_try;;
6465 esac
6466 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6467 $as_echo "$ac_try_echo") >&5
6468 (eval "$ac_link") 2>conftest.er1
6469 ac_status=$?
6470 grep -v '^ *+' conftest.er1 >conftest.err
6471 rm -f conftest.er1
6472 cat conftest.err >&5
6473 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6474 (exit $ac_status); } && {
6475 test -z "$ac_c_werror_flag" ||
6476 test ! -s conftest.err
6477 } && test -s conftest$ac_exeext && {
6478 test "$cross_compiling" = yes ||
6479 $as_test_x conftest$ac_exeext
6480 }; then
6481 ac_cv_lib_des425_des_cbc_encrypt=yes
6482 else
6483 $as_echo "$as_me: failed program was:" >&5
6484 sed 's/^/| /' conftest.$ac_ext >&5
6485
6486 ac_cv_lib_des425_des_cbc_encrypt=no
6487 fi
6488
6489 rm -rf conftest.dSYM
6490 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6491 conftest$ac_exeext conftest.$ac_ext
6492 LIBS=$ac_check_lib_save_LIBS
6493 fi
6494 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
6495 $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
6496 if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then
6497 LIB_DES="-ldes425";
6498 with_des=yes
6499 else
6500 with_des=no
6501 fi
6502
6503 fi
6504
6505 if test "$with_des" = no; then
6506 { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes524" >&5
6507 $as_echo_n "checking for des_cbc_encrypt in -ldes524... " >&6; }
6508 if test "${ac_cv_lib_des524_des_cbc_encrypt+set}" = set; then
6509 $as_echo_n "(cached) " >&6
6510 else
6511 ac_check_lib_save_LIBS=$LIBS
6512 LIBS="-ldes524 $LIBS"
6513 cat >conftest.$ac_ext <<_ACEOF
6514 /* confdefs.h. */
6515 _ACEOF
6516 cat confdefs.h >>conftest.$ac_ext
6517 cat >>conftest.$ac_ext <<_ACEOF
6518 /* end confdefs.h. */
6519
6520 /* Override any GCC internal prototype to avoid an error.
6521 Use char because int might match the return type of a GCC
6522 builtin and then its argument prototype would still apply. */
6523 #ifdef __cplusplus
6524 extern "C"
6525 #endif
6526 char des_cbc_encrypt ();
6527 int
6528 main ()
6529 {
6530 return des_cbc_encrypt ();
6531 ;
6532 return 0;
6533 }
6534 _ACEOF
6535 rm -f conftest.$ac_objext conftest$ac_exeext
6536 if { (ac_try="$ac_link"
6537 case "(($ac_try" in
6538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6539 *) ac_try_echo=$ac_try;;
6540 esac
6541 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6542 $as_echo "$ac_try_echo") >&5
6543 (eval "$ac_link") 2>conftest.er1
6544 ac_status=$?
6545 grep -v '^ *+' conftest.er1 >conftest.err
6546 rm -f conftest.er1
6547 cat conftest.err >&5
6548 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6549 (exit $ac_status); } && {
6550 test -z "$ac_c_werror_flag" ||
6551 test ! -s conftest.err
6552 } && test -s conftest$ac_exeext && {
6553 test "$cross_compiling" = yes ||
6554 $as_test_x conftest$ac_exeext
6555 }; then
6556 ac_cv_lib_des524_des_cbc_encrypt=yes
6557 else
6558 $as_echo "$as_me: failed program was:" >&5
6559 sed 's/^/| /' conftest.$ac_ext >&5
6560
6561 ac_cv_lib_des524_des_cbc_encrypt=no
6562 fi
6563
6564 rm -rf conftest.dSYM
6565 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6566 conftest$ac_exeext conftest.$ac_ext
6567 LIBS=$ac_check_lib_save_LIBS
6568 fi
6569 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_des524_des_cbc_encrypt" >&5
6570 $as_echo "$ac_cv_lib_des524_des_cbc_encrypt" >&6; }
6571 if test "x$ac_cv_lib_des524_des_cbc_encrypt" = x""yes; then
6572 LIB_DES="-ldes524";
6573 with_des=yes
6574 else
6575 with_des=no
6576 fi
6577
6578 fi
6579
6580 if test "$with_des" = no; then
6581
6582 LIB_RSAREF=""
6583 { $as_echo "$as_me:$LINENO: checking for RSAPublicEncrypt in -lrsaref" >&5
6584 $as_echo_n "checking for RSAPublicEncrypt in -lrsaref... " >&6; }
6585 if test "${ac_cv_lib_rsaref_RSAPublicEncrypt+set}" = set; then
6586 $as_echo_n "(cached) " >&6
6587 else
6588 ac_check_lib_save_LIBS=$LIBS
6589 LIBS="-lrsaref $LIBS"
6590 cat >conftest.$ac_ext <<_ACEOF
6591 /* confdefs.h. */
6592 _ACEOF
6593 cat confdefs.h >>conftest.$ac_ext
6594 cat >>conftest.$ac_ext <<_ACEOF
6595 /* end confdefs.h. */
6596
6597 /* Override any GCC internal prototype to avoid an error.
6598 Use char because int might match the return type of a GCC
6599 builtin and then its argument prototype would still apply. */
6600 #ifdef __cplusplus
6601 extern "C"
6602 #endif
6603 char RSAPublicEncrypt ();
6604 int
6605 main ()
6606 {
6607 return RSAPublicEncrypt ();
6608 ;
6609 return 0;
6610 }
6611 _ACEOF
6612 rm -f conftest.$ac_objext conftest$ac_exeext
6613 if { (ac_try="$ac_link"
6614 case "(($ac_try" in
6615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6616 *) ac_try_echo=$ac_try;;
6617 esac
6618 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6619 $as_echo "$ac_try_echo") >&5
6620 (eval "$ac_link") 2>conftest.er1
6621 ac_status=$?
6622 grep -v '^ *+' conftest.er1 >conftest.err
6623 rm -f conftest.er1
6624 cat conftest.err >&5
6625 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6626 (exit $ac_status); } && {
6627 test -z "$ac_c_werror_flag" ||
6628 test ! -s conftest.err
6629 } && test -s conftest$ac_exeext && {
6630 test "$cross_compiling" = yes ||
6631 $as_test_x conftest$ac_exeext
6632 }; then
6633 ac_cv_lib_rsaref_RSAPublicEncrypt=yes
6634 else
6635 $as_echo "$as_me: failed program was:" >&5
6636 sed 's/^/| /' conftest.$ac_ext >&5
6637
6638 ac_cv_lib_rsaref_RSAPublicEncrypt=no
6639 fi
6640
6641 rm -rf conftest.dSYM
6642 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6643 conftest$ac_exeext conftest.$ac_ext
6644 LIBS=$ac_check_lib_save_LIBS
6645 fi
6646 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rsaref_RSAPublicEncrypt" >&5
6647 $as_echo "$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6; }
6648 if test "x$ac_cv_lib_rsaref_RSAPublicEncrypt" = x""yes; then
6649 LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes
6650 else
6651 cmu_have_rsaref=no
6652 fi
6653
6654
6655 { $as_echo "$as_me:$LINENO: checking for des_cbc_encrypt in -lcrypto" >&5
6656 $as_echo_n "checking for des_cbc_encrypt in -lcrypto... " >&6; }
6657 if test "${ac_cv_lib_crypto_des_cbc_encrypt+set}" = set; then
6658 $as_echo_n "(cached) " >&6
6659 else
6660 ac_check_lib_save_LIBS=$LIBS
6661 LIBS="-lcrypto $LIB_RSAREF $LIBS"
6662 cat >conftest.$ac_ext <<_ACEOF
6663 /* confdefs.h. */
6664 _ACEOF
6665 cat confdefs.h >>conftest.$ac_ext
6666 cat >>conftest.$ac_ext <<_ACEOF
6667 /* end confdefs.h. */
6668
6669 /* Override any GCC internal prototype to avoid an error.
6670 Use char because int might match the return type of a GCC
6671 builtin and then its argument prototype would still apply. */
6672 #ifdef __cplusplus
6673 extern "C"
6674 #endif
6675 char des_cbc_encrypt ();
6676 int
6677 main ()
6678 {
6679 return des_cbc_encrypt ();
6680 ;
6681 return 0;
6682 }
6683 _ACEOF
6684 rm -f conftest.$ac_objext conftest$ac_exeext
6685 if { (ac_try="$ac_link"
6686 case "(($ac_try" in
6687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6688 *) ac_try_echo=$ac_try;;
6689 esac
6690 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6691 $as_echo "$ac_try_echo") >&5
6692 (eval "$ac_link") 2>conftest.er1
6693 ac_status=$?
6694 grep -v '^ *+' conftest.er1 >conftest.err
6695 rm -f conftest.er1
6696 cat conftest.err >&5
6697 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6698 (exit $ac_status); } && {
6699 test -z "$ac_c_werror_flag" ||
6700 test ! -s conftest.err
6701 } && test -s conftest$ac_exeext && {
6702 test "$cross_compiling" = yes ||
6703 $as_test_x conftest$ac_exeext
6704 }; then
6705 ac_cv_lib_crypto_des_cbc_encrypt=yes
6706 else
6707 $as_echo "$as_me: failed program was:" >&5
6708 sed 's/^/| /' conftest.$ac_ext >&5
6709
6710 ac_cv_lib_crypto_des_cbc_encrypt=no
6711 fi
6712
6713 rm -rf conftest.dSYM
6714 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6715 conftest$ac_exeext conftest.$ac_ext
6716 LIBS=$ac_check_lib_save_LIBS
6717 fi
6718 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_des_cbc_encrypt" >&5
6719 $as_echo "$ac_cv_lib_crypto_des_cbc_encrypt" >&6; }
6720 if test "x$ac_cv_lib_crypto_des_cbc_encrypt" = x""yes; then
6721
6722 if test "${ac_cv_header_openssl_des_h+set}" = set; then
6723 { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
6724 $as_echo_n "checking for openssl/des.h... " >&6; }
6725 if test "${ac_cv_header_openssl_des_h+set}" = set; then
6726 $as_echo_n "(cached) " >&6
6727 fi
6728 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
6729 $as_echo "$ac_cv_header_openssl_des_h" >&6; }
6730 else
6731 # Is the header compilable?
6732 { $as_echo "$as_me:$LINENO: checking openssl/des.h usability" >&5
6733 $as_echo_n "checking openssl/des.h usability... " >&6; }
6734 cat >conftest.$ac_ext <<_ACEOF
6735 /* confdefs.h. */
6736 _ACEOF
6737 cat confdefs.h >>conftest.$ac_ext
6738 cat >>conftest.$ac_ext <<_ACEOF
6739 /* end confdefs.h. */
6740 $ac_includes_default
6741 #include <openssl/des.h>
6742 _ACEOF
6743 rm -f conftest.$ac_objext
6744 if { (ac_try="$ac_compile"
6745 case "(($ac_try" in
6746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6747 *) ac_try_echo=$ac_try;;
6748 esac
6749 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6750 $as_echo "$ac_try_echo") >&5
6751 (eval "$ac_compile") 2>conftest.er1
6752 ac_status=$?
6753 grep -v '^ *+' conftest.er1 >conftest.err
6754 rm -f conftest.er1
6755 cat conftest.err >&5
6756 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6757 (exit $ac_status); } && {
6758 test -z "$ac_c_werror_flag" ||
6759 test ! -s conftest.err
6760 } && test -s conftest.$ac_objext; then
6761 ac_header_compiler=yes
6762 else
6763 $as_echo "$as_me: failed program was:" >&5
6764 sed 's/^/| /' conftest.$ac_ext >&5
6765
6766 ac_header_compiler=no
6767 fi
6768
6769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6770 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6771 $as_echo "$ac_header_compiler" >&6; }
6772
6773 # Is the header present?
6774 { $as_echo "$as_me:$LINENO: checking openssl/des.h presence" >&5
6775 $as_echo_n "checking openssl/des.h presence... " >&6; }
6776 cat >conftest.$ac_ext <<_ACEOF
6777 /* confdefs.h. */
6778 _ACEOF
6779 cat confdefs.h >>conftest.$ac_ext
6780 cat >>conftest.$ac_ext <<_ACEOF
6781 /* end confdefs.h. */
6782 #include <openssl/des.h>
6783 _ACEOF
6784 if { (ac_try="$ac_cpp conftest.$ac_ext"
6785 case "(($ac_try" in
6786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6787 *) ac_try_echo=$ac_try;;
6788 esac
6789 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6790 $as_echo "$ac_try_echo") >&5
6791 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6792 ac_status=$?
6793 grep -v '^ *+' conftest.er1 >conftest.err
6794 rm -f conftest.er1
6795 cat conftest.err >&5
6796 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6797 (exit $ac_status); } >/dev/null && {
6798 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6799 test ! -s conftest.err
6800 }; then
6801 ac_header_preproc=yes
6802 else
6803 $as_echo "$as_me: failed program was:" >&5
6804 sed 's/^/| /' conftest.$ac_ext >&5
6805
6806 ac_header_preproc=no
6807 fi
6808
6809 rm -f conftest.err conftest.$ac_ext
6810 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6811 $as_echo "$ac_header_preproc" >&6; }
6812
6813 # So? What about this header?
6814 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6815 yes:no: )
6816 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&5
6817 $as_echo "$as_me: WARNING: openssl/des.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6818 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the compiler's result" >&5
6819 $as_echo "$as_me: WARNING: openssl/des.h: proceeding with the compiler's result" >&2;}
6820 ac_header_preproc=yes
6821 ;;
6822 no:yes:* )
6823 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: present but cannot be compiled" >&5
6824 $as_echo "$as_me: WARNING: openssl/des.h: present but cannot be compiled" >&2;}
6825 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: check for missing prerequisite headers?" >&5
6826 $as_echo "$as_me: WARNING: openssl/des.h: check for missing prerequisite headers?" >&2;}
6827 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: see the Autoconf documentation" >&5
6828 $as_echo "$as_me: WARNING: openssl/des.h: see the Autoconf documentation" >&2;}
6829 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: section \"Present But Cannot Be Compiled\"" >&5
6830 $as_echo "$as_me: WARNING: openssl/des.h: section \"Present But Cannot Be Compiled\"" >&2;}
6831 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&5
6832 $as_echo "$as_me: WARNING: openssl/des.h: proceeding with the preprocessor's result" >&2;}
6833 { $as_echo "$as_me:$LINENO: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&5
6834 $as_echo "$as_me: WARNING: openssl/des.h: in the future, the compiler will take precedence" >&2;}
6835
6836 ;;
6837 esac
6838 { $as_echo "$as_me:$LINENO: checking for openssl/des.h" >&5
6839 $as_echo_n "checking for openssl/des.h... " >&6; }
6840 if test "${ac_cv_header_openssl_des_h+set}" = set; then
6841 $as_echo_n "(cached) " >&6
6842 else
6843 ac_cv_header_openssl_des_h=$ac_header_preproc
6844 fi
6845 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_openssl_des_h" >&5
6846 $as_echo "$ac_cv_header_openssl_des_h" >&6; }
6847
6848 fi
6849 if test "x$ac_cv_header_openssl_des_h" = x""yes; then
6850
6851 cat >>confdefs.h <<\_ACEOF
6852 #define WITH_SSL_DES /**/
6853 _ACEOF
6854
6855 LIB_DES="-lcrypto";
6856 with_des=yes
6857 else
6858 with_des=no
6859 fi
6860
6861
6862 else
6863 with_des=no
6864 fi
6865
6866 fi
6867 fi
6868
6869 if test "$with_des" != no; then
6870
6871 cat >>confdefs.h <<\_ACEOF
6872 #define WITH_DES /**/
6873 _ACEOF
6874
6875 fi
6876
6877
6878
6879
6880
6881
6882
6883 # Check whether --enable-krb4 was given.
6884 if test "${enable_krb4+set}" = set; then
6885 enableval=$enable_krb4; krb4=$enableval
6886 else
6887 krb4=no
6888 fi
6889
6890
6891 if test "$krb4" != no; then
6892
6893 { $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
6894 $as_echo_n "checking for res_search in -lresolv... " >&6; }
6895 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
6896 $as_echo_n "(cached) " >&6
6897 else
6898 ac_check_lib_save_LIBS=$LIBS
6899 LIBS="-lresolv $LIBS"
6900 cat >conftest.$ac_ext <<_ACEOF
6901 /* confdefs.h. */
6902 _ACEOF
6903 cat confdefs.h >>conftest.$ac_ext
6904 cat >>conftest.$ac_ext <<_ACEOF
6905 /* end confdefs.h. */
6906
6907 /* Override any GCC internal prototype to avoid an error.
6908 Use char because int might match the return type of a GCC
6909 builtin and then its argument prototype would still apply. */
6910 #ifdef __cplusplus
6911 extern "C"
6912 #endif
6913 char res_search ();
6914 int
6915 main ()
6916 {
6917 return res_search ();
6918 ;
6919 return 0;
6920 }
6921 _ACEOF
6922 rm -f conftest.$ac_objext conftest$ac_exeext
6923 if { (ac_try="$ac_link"
6924 case "(($ac_try" in
6925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6926 *) ac_try_echo=$ac_try;;
6927 esac
6928 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6929 $as_echo "$ac_try_echo") >&5
6930 (eval "$ac_link") 2>conftest.er1
6931 ac_status=$?
6932 grep -v '^ *+' conftest.er1 >conftest.err
6933 rm -f conftest.er1
6934 cat conftest.err >&5
6935 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6936 (exit $ac_status); } && {
6937 test -z "$ac_c_werror_flag" ||
6938 test ! -s conftest.err
6939 } && test -s conftest$ac_exeext && {
6940 test "$cross_compiling" = yes ||
6941 $as_test_x conftest$ac_exeext
6942 }; then
6943 ac_cv_lib_resolv_res_search=yes
6944 else
6945 $as_echo "$as_me: failed program was:" >&5
6946 sed 's/^/| /' conftest.$ac_ext >&5
6947
6948 ac_cv_lib_resolv_res_search=no
6949 fi
6950
6951 rm -rf conftest.dSYM
6952 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6953 conftest$ac_exeext conftest.$ac_ext
6954 LIBS=$ac_check_lib_save_LIBS
6955 fi
6956 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
6957 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
6958 if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
6959 cat >>confdefs.h <<_ACEOF
6960 #define HAVE_LIBRESOLV 1
6961 _ACEOF
6962
6963 LIBS="-lresolv $LIBS"
6964
6965 fi
6966
6967
6968 if test -d ${krb4}; then
6969 { $as_echo "$as_me:$LINENO: checking for Kerberos includes" >&5
6970 $as_echo_n "checking for Kerberos includes... " >&6; }
6971 if test "${cyrus_krbinclude+set}" = set; then
6972 $as_echo_n "(cached) " >&6
6973 else
6974
6975 for krbhloc in include/kerberosIV include/kerberos include
6976 do
6977 if test -f ${krb4}/${krbhloc}/krb.h ; then
6978 cyrus_krbinclude=${krb4}/${krbhloc}
6979 break
6980 fi
6981 done
6982
6983 fi
6984 { $as_echo "$as_me:$LINENO: result: $cyrus_krbinclude" >&5
6985 $as_echo "$cyrus_krbinclude" >&6; }
6986
6987 if test -n "${cyrus_krbinclude}"; then
6988 CPPFLAGS="$CPPFLAGS -I${cyrus_krbinclude}"
6989 fi
6990 LDFLAGS="$LDFLAGS -L$krb4/lib"
6991 fi
6992
6993 if test "$with_des" != no; then
6994 if test "${ac_cv_header_krb_h+set}" = set; then
6995 { $as_echo "$as_me:$LINENO: checking for krb.h" >&5
6996 $as_echo_n "checking for krb.h... " >&6; }
6997 if test "${ac_cv_header_krb_h+set}" = set; then
6998 $as_echo_n "(cached) " >&6
6999 fi
7000 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
7001 $as_echo "$ac_cv_header_krb_h" >&6; }
7002 else
7003 # Is the header compilable?
7004 { $as_echo "$as_me:$LINENO: checking krb.h usability" >&5
7005 $as_echo_n "checking krb.h usability... " >&6; }
7006 cat >conftest.$ac_ext <<_ACEOF
7007 /* confdefs.h. */
7008 _ACEOF
7009 cat confdefs.h >>conftest.$ac_ext
7010 cat >>conftest.$ac_ext <<_ACEOF
7011 /* end confdefs.h. */
7012 $ac_includes_default
7013 #include <krb.h>
7014 _ACEOF
7015 rm -f conftest.$ac_objext
7016 if { (ac_try="$ac_compile"
7017 case "(($ac_try" in
7018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7019 *) ac_try_echo=$ac_try;;
7020 esac
7021 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7022 $as_echo "$ac_try_echo") >&5
7023 (eval "$ac_compile") 2>conftest.er1
7024 ac_status=$?
7025 grep -v '^ *+' conftest.er1 >conftest.err
7026 rm -f conftest.er1
7027 cat conftest.err >&5
7028 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7029 (exit $ac_status); } && {
7030 test -z "$ac_c_werror_flag" ||
7031 test ! -s conftest.err
7032 } && test -s conftest.$ac_objext; then
7033 ac_header_compiler=yes
7034 else
7035 $as_echo "$as_me: failed program was:" >&5
7036 sed 's/^/| /' conftest.$ac_ext >&5
7037
7038 ac_header_compiler=no
7039 fi
7040
7041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7042 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7043 $as_echo "$ac_header_compiler" >&6; }
7044
7045 # Is the header present?
7046 { $as_echo "$as_me:$LINENO: checking krb.h presence" >&5
7047 $as_echo_n "checking krb.h presence... " >&6; }
7048 cat >conftest.$ac_ext <<_ACEOF
7049 /* confdefs.h. */
7050 _ACEOF
7051 cat confdefs.h >>conftest.$ac_ext
7052 cat >>conftest.$ac_ext <<_ACEOF
7053 /* end confdefs.h. */
7054 #include <krb.h>
7055 _ACEOF
7056 if { (ac_try="$ac_cpp conftest.$ac_ext"
7057 case "(($ac_try" in
7058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7059 *) ac_try_echo=$ac_try;;
7060 esac
7061 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7062 $as_echo "$ac_try_echo") >&5
7063 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7064 ac_status=$?
7065 grep -v '^ *+' conftest.er1 >conftest.err
7066 rm -f conftest.er1
7067 cat conftest.err >&5
7068 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7069 (exit $ac_status); } >/dev/null && {
7070 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7071 test ! -s conftest.err
7072 }; then
7073 ac_header_preproc=yes
7074 else
7075 $as_echo "$as_me: failed program was:" >&5
7076 sed 's/^/| /' conftest.$ac_ext >&5
7077
7078 ac_header_preproc=no
7079 fi
7080
7081 rm -f conftest.err conftest.$ac_ext
7082 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7083 $as_echo "$ac_header_preproc" >&6; }
7084
7085 # So? What about this header?
7086 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7087 yes:no: )
7088 { $as_echo "$as_me:$LINENO: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&5
7089 $as_echo "$as_me: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7090 { $as_echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the compiler's result" >&5
7091 $as_echo "$as_me: WARNING: krb.h: proceeding with the compiler's result" >&2;}
7092 ac_header_preproc=yes
7093 ;;
7094 no:yes:* )
7095 { $as_echo "$as_me:$LINENO: WARNING: krb.h: present but cannot be compiled" >&5
7096 $as_echo "$as_me: WARNING: krb.h: present but cannot be compiled" >&2;}
7097 { $as_echo "$as_me:$LINENO: WARNING: krb.h: check for missing prerequisite headers?" >&5
7098 $as_echo "$as_me: WARNING: krb.h: check for missing prerequisite headers?" >&2;}
7099 { $as_echo "$as_me:$LINENO: WARNING: krb.h: see the Autoconf documentation" >&5
7100 $as_echo "$as_me: WARNING: krb.h: see the Autoconf documentation" >&2;}
7101 { $as_echo "$as_me:$LINENO: WARNING: krb.h: section \"Present But Cannot Be Compiled\"" >&5
7102 $as_echo "$as_me: WARNING: krb.h: section \"Present But Cannot Be Compiled\"" >&2;}
7103 { $as_echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
7104 $as_echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;}
7105 { $as_echo "$as_me:$LINENO: WARNING: krb.h: in the future, the compiler will take precedence" >&5
7106 $as_echo "$as_me: WARNING: krb.h: in the future, the compiler will take precedence" >&2;}
7107
7108 ;;
7109 esac
7110 { $as_echo "$as_me:$LINENO: checking for krb.h" >&5
7111 $as_echo_n "checking for krb.h... " >&6; }
7112 if test "${ac_cv_header_krb_h+set}" = set; then
7113 $as_echo_n "(cached) " >&6
7114 else
7115 ac_cv_header_krb_h=$ac_header_preproc
7116 fi
7117 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
7118 $as_echo "$ac_cv_header_krb_h" >&6; }
7119
7120 fi
7121 if test "x$ac_cv_header_krb_h" = x""yes; then
7122
7123 { $as_echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
7124 $as_echo_n "checking for com_err in -lcom_err... " >&6; }
7125 if test "${ac_cv_lib_com_err_com_err+set}" = set; then
7126 $as_echo_n "(cached) " >&6
7127 else
7128 ac_check_lib_save_LIBS=$LIBS
7129 LIBS="-lcom_err $LIBS"
7130 cat >conftest.$ac_ext <<_ACEOF
7131 /* confdefs.h. */
7132 _ACEOF
7133 cat confdefs.h >>conftest.$ac_ext
7134 cat >>conftest.$ac_ext <<_ACEOF
7135 /* end confdefs.h. */
7136
7137 /* Override any GCC internal prototype to avoid an error.
7138 Use char because int might match the return type of a GCC
7139 builtin and then its argument prototype would still apply. */
7140 #ifdef __cplusplus
7141 extern "C"
7142 #endif
7143 char com_err ();
7144 int
7145 main ()
7146 {
7147 return com_err ();
7148 ;
7149 return 0;
7150 }
7151 _ACEOF
7152 rm -f conftest.$ac_objext conftest$ac_exeext
7153 if { (ac_try="$ac_link"
7154 case "(($ac_try" in
7155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7156 *) ac_try_echo=$ac_try;;
7157 esac
7158 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7159 $as_echo "$ac_try_echo") >&5
7160 (eval "$ac_link") 2>conftest.er1
7161 ac_status=$?
7162 grep -v '^ *+' conftest.er1 >conftest.err
7163 rm -f conftest.er1
7164 cat conftest.err >&5
7165 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7166 (exit $ac_status); } && {
7167 test -z "$ac_c_werror_flag" ||
7168 test ! -s conftest.err
7169 } && test -s conftest$ac_exeext && {
7170 test "$cross_compiling" = yes ||
7171 $as_test_x conftest$ac_exeext
7172 }; then
7173 ac_cv_lib_com_err_com_err=yes
7174 else
7175 $as_echo "$as_me: failed program was:" >&5
7176 sed 's/^/| /' conftest.$ac_ext >&5
7177
7178 ac_cv_lib_com_err_com_err=no
7179 fi
7180
7181 rm -rf conftest.dSYM
7182 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7183 conftest$ac_exeext conftest.$ac_ext
7184 LIBS=$ac_check_lib_save_LIBS
7185 fi
7186 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
7187 $as_echo "$ac_cv_lib_com_err_com_err" >&6; }
7188 if test "x$ac_cv_lib_com_err_com_err" = x""yes; then
7189
7190 { $as_echo "$as_me:$LINENO: checking for krb_mk_priv in -lkrb" >&5
7191 $as_echo_n "checking for krb_mk_priv in -lkrb... " >&6; }
7192 if test "${ac_cv_lib_krb_krb_mk_priv+set}" = set; then
7193 $as_echo_n "(cached) " >&6
7194 else
7195 ac_check_lib_save_LIBS=$LIBS
7196 LIBS="-lkrb $LIB_DES -lcom_err $LIBS"
7197 cat >conftest.$ac_ext <<_ACEOF
7198 /* confdefs.h. */
7199 _ACEOF
7200 cat confdefs.h >>conftest.$ac_ext
7201 cat >>conftest.$ac_ext <<_ACEOF
7202 /* end confdefs.h. */
7203
7204 /* Override any GCC internal prototype to avoid an error.
7205 Use char because int might match the return type of a GCC
7206 builtin and then its argument prototype would still apply. */
7207 #ifdef __cplusplus
7208 extern "C"
7209 #endif
7210 char krb_mk_priv ();
7211 int
7212 main ()
7213 {
7214 return krb_mk_priv ();
7215 ;
7216 return 0;
7217 }
7218 _ACEOF
7219 rm -f conftest.$ac_objext conftest$ac_exeext
7220 if { (ac_try="$ac_link"
7221 case "(($ac_try" in
7222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7223 *) ac_try_echo=$ac_try;;
7224 esac
7225 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7226 $as_echo "$ac_try_echo") >&5
7227 (eval "$ac_link") 2>conftest.er1
7228 ac_status=$?
7229 grep -v '^ *+' conftest.er1 >conftest.err
7230 rm -f conftest.er1
7231 cat conftest.err >&5
7232 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7233 (exit $ac_status); } && {
7234 test -z "$ac_c_werror_flag" ||
7235 test ! -s conftest.err
7236 } && test -s conftest$ac_exeext && {
7237 test "$cross_compiling" = yes ||
7238 $as_test_x conftest$ac_exeext
7239 }; then
7240 ac_cv_lib_krb_krb_mk_priv=yes
7241 else
7242 $as_echo "$as_me: failed program was:" >&5
7243 sed 's/^/| /' conftest.$ac_ext >&5
7244
7245 ac_cv_lib_krb_krb_mk_priv=no
7246 fi
7247
7248 rm -rf conftest.dSYM
7249 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7250 conftest$ac_exeext conftest.$ac_ext
7251 LIBS=$ac_check_lib_save_LIBS
7252 fi
7253 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_mk_priv" >&5
7254 $as_echo "$ac_cv_lib_krb_krb_mk_priv" >&6; }
7255 if test "x$ac_cv_lib_krb_krb_mk_priv" = x""yes; then
7256 COM_ERR="-lcom_err"; SASL_KRB_LIB="-lkrb"; krb4lib="yes"
7257 else
7258 krb4lib=no
7259 fi
7260
7261 else
7262
7263 { $as_echo "$as_me:$LINENO: checking for krb_mk_priv in -lkrb" >&5
7264 $as_echo_n "checking for krb_mk_priv in -lkrb... " >&6; }
7265 if test "${ac_cv_lib_krb_krb_mk_priv+set}" = set; then
7266 $as_echo_n "(cached) " >&6
7267 else
7268 ac_check_lib_save_LIBS=$LIBS
7269 LIBS="-lkrb $LIB_DES $LIBS"
7270 cat >conftest.$ac_ext <<_ACEOF
7271 /* confdefs.h. */
7272 _ACEOF
7273 cat confdefs.h >>conftest.$ac_ext
7274 cat >>conftest.$ac_ext <<_ACEOF
7275 /* end confdefs.h. */
7276
7277 /* Override any GCC internal prototype to avoid an error.
7278 Use char because int might match the return type of a GCC
7279 builtin and then its argument prototype would still apply. */
7280 #ifdef __cplusplus
7281 extern "C"
7282 #endif
7283 char krb_mk_priv ();
7284 int
7285 main ()
7286 {
7287 return krb_mk_priv ();
7288 ;
7289 return 0;
7290 }
7291 _ACEOF
7292 rm -f conftest.$ac_objext conftest$ac_exeext
7293 if { (ac_try="$ac_link"
7294 case "(($ac_try" in
7295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7296 *) ac_try_echo=$ac_try;;
7297 esac
7298 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7299 $as_echo "$ac_try_echo") >&5
7300 (eval "$ac_link") 2>conftest.er1
7301 ac_status=$?
7302 grep -v '^ *+' conftest.er1 >conftest.err
7303 rm -f conftest.er1
7304 cat conftest.err >&5
7305 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7306 (exit $ac_status); } && {
7307 test -z "$ac_c_werror_flag" ||
7308 test ! -s conftest.err
7309 } && test -s conftest$ac_exeext && {
7310 test "$cross_compiling" = yes ||
7311 $as_test_x conftest$ac_exeext
7312 }; then
7313 ac_cv_lib_krb_krb_mk_priv=yes
7314 else
7315 $as_echo "$as_me: failed program was:" >&5
7316 sed 's/^/| /' conftest.$ac_ext >&5
7317
7318 ac_cv_lib_krb_krb_mk_priv=no
7319 fi
7320
7321 rm -rf conftest.dSYM
7322 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7323 conftest$ac_exeext conftest.$ac_ext
7324 LIBS=$ac_check_lib_save_LIBS
7325 fi
7326 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_mk_priv" >&5
7327 $as_echo "$ac_cv_lib_krb_krb_mk_priv" >&6; }
7328 if test "x$ac_cv_lib_krb_krb_mk_priv" = x""yes; then
7329 COM_ERR=""; SASL_KRB_LIB="-lkrb"; krb4lib="yes"
7330 else
7331 krb4lib=no
7332 fi
7333
7334 fi
7335
7336 else
7337 krb4="no"
7338 fi
7339
7340
7341
7342 if test "$krb4" != "no" -a "$krb4lib" = "no"; then
7343 { $as_echo "$as_me:$LINENO: checking for krb_mk_priv in -lkrb4" >&5
7344 $as_echo_n "checking for krb_mk_priv in -lkrb4... " >&6; }
7345 if test "${ac_cv_lib_krb4_krb_mk_priv+set}" = set; then
7346 $as_echo_n "(cached) " >&6
7347 else
7348 ac_check_lib_save_LIBS=$LIBS
7349 LIBS="-lkrb4 $LIB_DES $LIBS"
7350 cat >conftest.$ac_ext <<_ACEOF
7351 /* confdefs.h. */
7352 _ACEOF
7353 cat confdefs.h >>conftest.$ac_ext
7354 cat >>conftest.$ac_ext <<_ACEOF
7355 /* end confdefs.h. */
7356
7357 /* Override any GCC internal prototype to avoid an error.
7358 Use char because int might match the return type of a GCC
7359 builtin and then its argument prototype would still apply. */
7360 #ifdef __cplusplus
7361 extern "C"
7362 #endif
7363 char krb_mk_priv ();
7364 int
7365 main ()
7366 {
7367 return krb_mk_priv ();
7368 ;
7369 return 0;
7370 }
7371 _ACEOF
7372 rm -f conftest.$ac_objext conftest$ac_exeext
7373 if { (ac_try="$ac_link"
7374 case "(($ac_try" in
7375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7376 *) ac_try_echo=$ac_try;;
7377 esac
7378 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7379 $as_echo "$ac_try_echo") >&5
7380 (eval "$ac_link") 2>conftest.er1
7381 ac_status=$?
7382 grep -v '^ *+' conftest.er1 >conftest.err
7383 rm -f conftest.er1
7384 cat conftest.err >&5
7385 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7386 (exit $ac_status); } && {
7387 test -z "$ac_c_werror_flag" ||
7388 test ! -s conftest.err
7389 } && test -s conftest$ac_exeext && {
7390 test "$cross_compiling" = yes ||
7391 $as_test_x conftest$ac_exeext
7392 }; then
7393 ac_cv_lib_krb4_krb_mk_priv=yes
7394 else
7395 $as_echo "$as_me: failed program was:" >&5
7396 sed 's/^/| /' conftest.$ac_ext >&5
7397
7398 ac_cv_lib_krb4_krb_mk_priv=no
7399 fi
7400
7401 rm -rf conftest.dSYM
7402 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7403 conftest$ac_exeext conftest.$ac_ext
7404 LIBS=$ac_check_lib_save_LIBS
7405 fi
7406 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_mk_priv" >&5
7407 $as_echo "$ac_cv_lib_krb4_krb_mk_priv" >&6; }
7408 if test "x$ac_cv_lib_krb4_krb_mk_priv" = x""yes; then
7409 COM_ERR=""; SASL_KRB_LIB="-lkrb4"; krb4=yes
7410 else
7411 krb4=no
7412 fi
7413
7414 fi
7415 if test "$krb4" = no; then
7416 { $as_echo "$as_me:$LINENO: WARNING: No Kerberos V4 found" >&5
7417 $as_echo "$as_me: WARNING: No Kerberos V4 found" >&2;}
7418 fi
7419 else
7420 { $as_echo "$as_me:$LINENO: WARNING: No DES library found for Kerberos V4 support" >&5
7421 $as_echo "$as_me: WARNING: No DES library found for Kerberos V4 support" >&2;}
7422 krb4=no
7423 fi
7424 fi
7425
7426 if test "$krb4" != no; then
7427 cmu_save_LIBS="$LIBS"
7428 LIBS="$LIBS $SASL_KRB_LIB"
7429
7430 for ac_func in krb_get_err_text
7431 do
7432 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7433 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
7434 $as_echo_n "checking for $ac_func... " >&6; }
7435 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7436 $as_echo_n "(cached) " >&6
7437 else
7438 cat >conftest.$ac_ext <<_ACEOF
7439 /* confdefs.h. */
7440 _ACEOF
7441 cat confdefs.h >>conftest.$ac_ext
7442 cat >>conftest.$ac_ext <<_ACEOF
7443 /* end confdefs.h. */
7444 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7445 For example, HP-UX 11i <limits.h> declares gettimeofday. */
7446 #define $ac_func innocuous_$ac_func
7447
7448 /* System header to define __stub macros and hopefully few prototypes,
7449 which can conflict with char $ac_func (); below.
7450 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7451 <limits.h> exists even on freestanding compilers. */
7452
7453 #ifdef __STDC__
7454 # include <limits.h>
7455 #else
7456 # include <assert.h>
7457 #endif
7458
7459 #undef $ac_func
7460
7461 /* Override any GCC internal prototype to avoid an error.
7462 Use char because int might match the return type of a GCC
7463 builtin and then its argument prototype would still apply. */
7464 #ifdef __cplusplus
7465 extern "C"
7466 #endif
7467 char $ac_func ();
7468 /* The GNU C library defines this for functions which it implements
7469 to always fail with ENOSYS. Some functions are actually named
7470 something starting with __ and the normal name is an alias. */
7471 #if defined __stub_$ac_func || defined __stub___$ac_func
7472 choke me
7473 #endif
7474
7475 int
7476 main ()
7477 {
7478 return $ac_func ();
7479 ;
7480 return 0;
7481 }
7482 _ACEOF
7483 rm -f conftest.$ac_objext conftest$ac_exeext
7484 if { (ac_try="$ac_link"
7485 case "(($ac_try" in
7486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7487 *) ac_try_echo=$ac_try;;
7488 esac
7489 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7490 $as_echo "$ac_try_echo") >&5
7491 (eval "$ac_link") 2>conftest.er1
7492 ac_status=$?
7493 grep -v '^ *+' conftest.er1 >conftest.err
7494 rm -f conftest.er1
7495 cat conftest.err >&5
7496 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7497 (exit $ac_status); } && {
7498 test -z "$ac_c_werror_flag" ||
7499 test ! -s conftest.err
7500 } && test -s conftest$ac_exeext && {
7501 test "$cross_compiling" = yes ||
7502 $as_test_x conftest$ac_exeext
7503 }; then
7504 eval "$as_ac_var=yes"
7505 else
7506 $as_echo "$as_me: failed program was:" >&5
7507 sed 's/^/| /' conftest.$ac_ext >&5
7508
7509 eval "$as_ac_var=no"
7510 fi
7511
7512 rm -rf conftest.dSYM
7513 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7514 conftest$ac_exeext conftest.$ac_ext
7515 fi
7516 ac_res=`eval 'as_val=${'$as_ac_var'}
7517 $as_echo "$as_val"'`
7518 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
7519 $as_echo "$ac_res" >&6; }
7520 as_val=`eval 'as_val=${'$as_ac_var'}
7521 $as_echo "$as_val"'`
7522 if test "x$as_val" = x""yes; then
7523 cat >>confdefs.h <<_ACEOF
7524 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7525 _ACEOF
7526
7527 fi
7528 done
7529
7530 LIBS="$cmu_save_LIBS"
7531 fi
7532
7533 { $as_echo "$as_me:$LINENO: checking KERBEROS_V4" >&5
7534 $as_echo_n "checking KERBEROS_V4... " >&6; }
7535 if test "$krb4" != no; then
7536 { $as_echo "$as_me:$LINENO: result: enabled" >&5
7537 $as_echo "enabled" >&6; }
7538 SASL_MECHS="$SASL_MECHS libkerberos4.la"
7539 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/kerberos4.c"
7540 SASL_STATIC_OBJS="$SASL_STATIC_OBJS kerberos4.o"
7541
7542 cat >>confdefs.h <<\_ACEOF
7543 #define STATIC_KERBEROS4 /**/
7544 _ACEOF
7545
7546
7547 cat >>confdefs.h <<\_ACEOF
7548 #define HAVE_KRB /**/
7549 _ACEOF
7550
7551 SASL_KRB_LIB="$SASL_KRB_LIB $LIB_DES $COM_ERR"
7552 else
7553 { $as_echo "$as_me:$LINENO: result: disabled" >&5
7554 $as_echo "disabled" >&6; }
7555 fi
7556
7557
7558 { $as_echo "$as_me:$LINENO: checking for crypt" >&5
7559 $as_echo_n "checking for crypt... " >&6; }
7560 if test "${ac_cv_func_crypt+set}" = set; then
7561 $as_echo_n "(cached) " >&6
7562 else
7563 cat >conftest.$ac_ext <<_ACEOF
7564 /* confdefs.h. */
7565 _ACEOF
7566 cat confdefs.h >>conftest.$ac_ext
7567 cat >>conftest.$ac_ext <<_ACEOF
7568 /* end confdefs.h. */
7569 /* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
7570 For example, HP-UX 11i <limits.h> declares gettimeofday. */
7571 #define crypt innocuous_crypt
7572
7573 /* System header to define __stub macros and hopefully few prototypes,
7574 which can conflict with char crypt (); below.
7575 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7576 <limits.h> exists even on freestanding compilers. */
7577
7578 #ifdef __STDC__
7579 # include <limits.h>
7580 #else
7581 # include <assert.h>
7582 #endif
7583
7584 #undef crypt
7585
7586 /* Override any GCC internal prototype to avoid an error.
7587 Use char because int might match the return type of a GCC
7588 builtin and then its argument prototype would still apply. */
7589 #ifdef __cplusplus
7590 extern "C"
7591 #endif
7592 char crypt ();
7593 /* The GNU C library defines this for functions which it implements
7594 to always fail with ENOSYS. Some functions are actually named
7595 something starting with __ and the normal name is an alias. */
7596 #if defined __stub_crypt || defined __stub___crypt
7597 choke me
7598 #endif
7599
7600 int
7601 main ()
7602 {
7603 return crypt ();
7604 ;
7605 return 0;
7606 }
7607 _ACEOF
7608 rm -f conftest.$ac_objext conftest$ac_exeext
7609 if { (ac_try="$ac_link"
7610 case "(($ac_try" in
7611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7612 *) ac_try_echo=$ac_try;;
7613 esac
7614 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7615 $as_echo "$ac_try_echo") >&5
7616 (eval "$ac_link") 2>conftest.er1
7617 ac_status=$?
7618 grep -v '^ *+' conftest.er1 >conftest.err
7619 rm -f conftest.er1
7620 cat conftest.err >&5
7621 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7622 (exit $ac_status); } && {
7623 test -z "$ac_c_werror_flag" ||
7624 test ! -s conftest.err
7625 } && test -s conftest$ac_exeext && {
7626 test "$cross_compiling" = yes ||
7627 $as_test_x conftest$ac_exeext
7628 }; then
7629 ac_cv_func_crypt=yes
7630 else
7631 $as_echo "$as_me: failed program was:" >&5
7632 sed 's/^/| /' conftest.$ac_ext >&5
7633
7634 ac_cv_func_crypt=no
7635 fi
7636
7637 rm -rf conftest.dSYM
7638 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7639 conftest$ac_exeext conftest.$ac_ext
7640 fi
7641 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
7642 $as_echo "$ac_cv_func_crypt" >&6; }
7643 if test "x$ac_cv_func_crypt" = x""yes; then
7644 cmu_have_crypt=yes
7645 else
7646 { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
7647 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
7648 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
7649 $as_echo_n "(cached) " >&6
7650 else
7651 ac_check_lib_save_LIBS=$LIBS
7652 LIBS="-lcrypt $LIBS"
7653 cat >conftest.$ac_ext <<_ACEOF
7654 /* confdefs.h. */
7655 _ACEOF
7656 cat confdefs.h >>conftest.$ac_ext
7657 cat >>conftest.$ac_ext <<_ACEOF
7658 /* end confdefs.h. */
7659
7660 /* Override any GCC internal prototype to avoid an error.
7661 Use char because int might match the return type of a GCC
7662 builtin and then its argument prototype would still apply. */
7663 #ifdef __cplusplus
7664 extern "C"
7665 #endif
7666 char crypt ();
7667 int
7668 main ()
7669 {
7670 return crypt ();
7671 ;
7672 return 0;
7673 }
7674 _ACEOF
7675 rm -f conftest.$ac_objext conftest$ac_exeext
7676 if { (ac_try="$ac_link"
7677 case "(($ac_try" in
7678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7679 *) ac_try_echo=$ac_try;;
7680 esac
7681 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7682 $as_echo "$ac_try_echo") >&5
7683 (eval "$ac_link") 2>conftest.er1
7684 ac_status=$?
7685 grep -v '^ *+' conftest.er1 >conftest.err
7686 rm -f conftest.er1
7687 cat conftest.err >&5
7688 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7689 (exit $ac_status); } && {
7690 test -z "$ac_c_werror_flag" ||
7691 test ! -s conftest.err
7692 } && test -s conftest$ac_exeext && {
7693 test "$cross_compiling" = yes ||
7694 $as_test_x conftest$ac_exeext
7695 }; then
7696 ac_cv_lib_crypt_crypt=yes
7697 else
7698 $as_echo "$as_me: failed program was:" >&5
7699 sed 's/^/| /' conftest.$ac_ext >&5
7700
7701 ac_cv_lib_crypt_crypt=no
7702 fi
7703
7704 rm -rf conftest.dSYM
7705 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7706 conftest$ac_exeext conftest.$ac_ext
7707 LIBS=$ac_check_lib_save_LIBS
7708 fi
7709 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
7710 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
7711 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then
7712 LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes
7713 else
7714 cmu_have_crypt=no
7715 fi
7716
7717 fi
7718
7719
7720
7721
7722
7723 # Check whether --enable-gssapi was given.
7724 if test "${enable_gssapi+set}" = set; then
7725 enableval=$enable_gssapi; gssapi=$enableval
7726 else
7727 gssapi=yes
7728 fi
7729
7730
7731 # Check whether --with-gss_impl was given.
7732 if test "${with_gss_impl+set}" = set; then
7733 withval=$with_gss_impl; gss_impl=$withval
7734 else
7735 gss_impl=auto
7736 fi
7737
7738
7739 if test "$gssapi" != no; then
7740 platform=
7741 case "${host}" in
7742 *-*-linux*)
7743 platform=__linux
7744 ;;
7745 *-*-hpux*)
7746 platform=__hpux
7747 ;;
7748 *-*-irix*)
7749 platform=__irix
7750 ;;
7751 *-*-solaris2*)
7752 # When should we use __sunos?
7753 platform=__solaris
7754 ;;
7755 *-*-aix*)
7756 ###_AIX
7757 platform=__aix
7758 ;;
7759 *)
7760 { $as_echo "$as_me:$LINENO: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&5
7761 $as_echo "$as_me: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&2;}
7762 if test "$gss_impl" = "cybersafe"; then
7763 { { $as_echo "$as_me:$LINENO: error: CyberSafe was forced, cannot continue as platform is not supported" >&5
7764 $as_echo "$as_me: error: CyberSafe was forced, cannot continue as platform is not supported" >&2;}
7765 { (exit 1); exit 1; }; }
7766 fi
7767 ;;
7768 esac
7769
7770 cmu_saved_CPPFLAGS=$CPPFLAGS
7771
7772 if test -d ${gssapi}; then
7773 CPPFLAGS="$CPPFLAGS -I$gssapi/include"
7774 # We want to keep -I in our CPPFLAGS, but only if we succeed
7775 cmu_saved_CPPFLAGS=$CPPFLAGS
7776 ### I am not sure how useful is this (and whether this is required at all
7777 ### especially when we have to provide two -L flags for new CyberSafe
7778 LDFLAGS="$LDFLAGS -L$gssapi/lib"
7779
7780 if test -n "$platform"; then
7781 if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
7782 CPPFLAGS="$CPPFLAGS -D$platform"
7783 if test -d "${gssapi}/appsec-sdk/include"; then
7784 CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
7785 fi
7786 fi
7787 fi
7788 fi
7789 if test "${ac_cv_header_gssapi_h+set}" = set; then
7790 { $as_echo "$as_me:$LINENO: checking for gssapi.h" >&5
7791 $as_echo_n "checking for gssapi.h... " >&6; }
7792 if test "${ac_cv_header_gssapi_h+set}" = set; then
7793 $as_echo_n "(cached) " >&6
7794 fi
7795 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
7796 $as_echo "$ac_cv_header_gssapi_h" >&6; }
7797 else
7798 # Is the header compilable?
7799 { $as_echo "$as_me:$LINENO: checking gssapi.h usability" >&5
7800 $as_echo_n "checking gssapi.h usability... " >&6; }
7801 cat >conftest.$ac_ext <<_ACEOF
7802 /* confdefs.h. */
7803 _ACEOF
7804 cat confdefs.h >>conftest.$ac_ext
7805 cat >>conftest.$ac_ext <<_ACEOF
7806 /* end confdefs.h. */
7807 $ac_includes_default
7808 #include <gssapi.h>
7809 _ACEOF
7810 rm -f conftest.$ac_objext
7811 if { (ac_try="$ac_compile"
7812 case "(($ac_try" in
7813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7814 *) ac_try_echo=$ac_try;;
7815 esac
7816 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7817 $as_echo "$ac_try_echo") >&5
7818 (eval "$ac_compile") 2>conftest.er1
7819 ac_status=$?
7820 grep -v '^ *+' conftest.er1 >conftest.err
7821 rm -f conftest.er1
7822 cat conftest.err >&5
7823 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7824 (exit $ac_status); } && {
7825 test -z "$ac_c_werror_flag" ||
7826 test ! -s conftest.err
7827 } && test -s conftest.$ac_objext; then
7828 ac_header_compiler=yes
7829 else
7830 $as_echo "$as_me: failed program was:" >&5
7831 sed 's/^/| /' conftest.$ac_ext >&5
7832
7833 ac_header_compiler=no
7834 fi
7835
7836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7837 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7838 $as_echo "$ac_header_compiler" >&6; }
7839
7840 # Is the header present?
7841 { $as_echo "$as_me:$LINENO: checking gssapi.h presence" >&5
7842 $as_echo_n "checking gssapi.h presence... " >&6; }
7843 cat >conftest.$ac_ext <<_ACEOF
7844 /* confdefs.h. */
7845 _ACEOF
7846 cat confdefs.h >>conftest.$ac_ext
7847 cat >>conftest.$ac_ext <<_ACEOF
7848 /* end confdefs.h. */
7849 #include <gssapi.h>
7850 _ACEOF
7851 if { (ac_try="$ac_cpp conftest.$ac_ext"
7852 case "(($ac_try" in
7853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7854 *) ac_try_echo=$ac_try;;
7855 esac
7856 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7857 $as_echo "$ac_try_echo") >&5
7858 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7859 ac_status=$?
7860 grep -v '^ *+' conftest.er1 >conftest.err
7861 rm -f conftest.er1
7862 cat conftest.err >&5
7863 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7864 (exit $ac_status); } >/dev/null && {
7865 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7866 test ! -s conftest.err
7867 }; then
7868 ac_header_preproc=yes
7869 else
7870 $as_echo "$as_me: failed program was:" >&5
7871 sed 's/^/| /' conftest.$ac_ext >&5
7872
7873 ac_header_preproc=no
7874 fi
7875
7876 rm -f conftest.err conftest.$ac_ext
7877 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7878 $as_echo "$ac_header_preproc" >&6; }
7879
7880 # So? What about this header?
7881 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7882 yes:no: )
7883 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
7884 $as_echo "$as_me: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
7885 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the compiler's result" >&5
7886 $as_echo "$as_me: WARNING: gssapi.h: proceeding with the compiler's result" >&2;}
7887 ac_header_preproc=yes
7888 ;;
7889 no:yes:* )
7890 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: present but cannot be compiled" >&5
7891 $as_echo "$as_me: WARNING: gssapi.h: present but cannot be compiled" >&2;}
7892 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: check for missing prerequisite headers?" >&5
7893 $as_echo "$as_me: WARNING: gssapi.h: check for missing prerequisite headers?" >&2;}
7894 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: see the Autoconf documentation" >&5
7895 $as_echo "$as_me: WARNING: gssapi.h: see the Autoconf documentation" >&2;}
7896 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
7897 $as_echo "$as_me: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
7898 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the preprocessor's result" >&5
7899 $as_echo "$as_me: WARNING: gssapi.h: proceeding with the preprocessor's result" >&2;}
7900 { $as_echo "$as_me:$LINENO: WARNING: gssapi.h: in the future, the compiler will take precedence" >&5
7901 $as_echo "$as_me: WARNING: gssapi.h: in the future, the compiler will take precedence" >&2;}
7902
7903 ;;
7904 esac
7905 { $as_echo "$as_me:$LINENO: checking for gssapi.h" >&5
7906 $as_echo_n "checking for gssapi.h... " >&6; }
7907 if test "${ac_cv_header_gssapi_h+set}" = set; then
7908 $as_echo_n "(cached) " >&6
7909 else
7910 ac_cv_header_gssapi_h=$ac_header_preproc
7911 fi
7912 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
7913 $as_echo "$ac_cv_header_gssapi_h" >&6; }
7914
7915 fi
7916 if test "x$ac_cv_header_gssapi_h" = x""yes; then
7917 :
7918 else
7919 if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
7920 { $as_echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
7921 $as_echo_n "checking for gssapi/gssapi.h... " >&6; }
7922 if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
7923 $as_echo_n "(cached) " >&6
7924 fi
7925 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
7926 $as_echo "$ac_cv_header_gssapi_gssapi_h" >&6; }
7927 else
7928 # Is the header compilable?
7929 { $as_echo "$as_me:$LINENO: checking gssapi/gssapi.h usability" >&5
7930 $as_echo_n "checking gssapi/gssapi.h usability... " >&6; }
7931 cat >conftest.$ac_ext <<_ACEOF
7932 /* confdefs.h. */
7933 _ACEOF
7934 cat confdefs.h >>conftest.$ac_ext
7935 cat >>conftest.$ac_ext <<_ACEOF
7936 /* end confdefs.h. */
7937 $ac_includes_default
7938 #include <gssapi/gssapi.h>
7939 _ACEOF
7940 rm -f conftest.$ac_objext
7941 if { (ac_try="$ac_compile"
7942 case "(($ac_try" in
7943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7944 *) ac_try_echo=$ac_try;;
7945 esac
7946 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7947 $as_echo "$ac_try_echo") >&5
7948 (eval "$ac_compile") 2>conftest.er1
7949 ac_status=$?
7950 grep -v '^ *+' conftest.er1 >conftest.err
7951 rm -f conftest.er1
7952 cat conftest.err >&5
7953 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7954 (exit $ac_status); } && {
7955 test -z "$ac_c_werror_flag" ||
7956 test ! -s conftest.err
7957 } && test -s conftest.$ac_objext; then
7958 ac_header_compiler=yes
7959 else
7960 $as_echo "$as_me: failed program was:" >&5
7961 sed 's/^/| /' conftest.$ac_ext >&5
7962
7963 ac_header_compiler=no
7964 fi
7965
7966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7967 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7968 $as_echo "$ac_header_compiler" >&6; }
7969
7970 # Is the header present?
7971 { $as_echo "$as_me:$LINENO: checking gssapi/gssapi.h presence" >&5
7972 $as_echo_n "checking gssapi/gssapi.h presence... " >&6; }
7973 cat >conftest.$ac_ext <<_ACEOF
7974 /* confdefs.h. */
7975 _ACEOF
7976 cat confdefs.h >>conftest.$ac_ext
7977 cat >>conftest.$ac_ext <<_ACEOF
7978 /* end confdefs.h. */
7979 #include <gssapi/gssapi.h>
7980 _ACEOF
7981 if { (ac_try="$ac_cpp conftest.$ac_ext"
7982 case "(($ac_try" in
7983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7984 *) ac_try_echo=$ac_try;;
7985 esac
7986 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7987 $as_echo "$ac_try_echo") >&5
7988 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7989 ac_status=$?
7990 grep -v '^ *+' conftest.er1 >conftest.err
7991 rm -f conftest.er1
7992 cat conftest.err >&5
7993 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7994 (exit $ac_status); } >/dev/null && {
7995 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7996 test ! -s conftest.err
7997 }; then
7998 ac_header_preproc=yes
7999 else
8000 $as_echo "$as_me: failed program was:" >&5
8001 sed 's/^/| /' conftest.$ac_ext >&5
8002
8003 ac_header_preproc=no
8004 fi
8005
8006 rm -f conftest.err conftest.$ac_ext
8007 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8008 $as_echo "$ac_header_preproc" >&6; }
8009
8010 # So? What about this header?
8011 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8012 yes:no: )
8013 { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
8014 $as_echo "$as_me: WARNING: gssapi/gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8015 { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&5
8016 $as_echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the compiler's result" >&2;}
8017 ac_header_preproc=yes
8018 ;;
8019 no:yes:* )
8020 { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&5
8021 $as_echo "$as_me: WARNING: gssapi/gssapi.h: present but cannot be compiled" >&2;}
8022 { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&5
8023 $as_echo "$as_me: WARNING: gssapi/gssapi.h: check for missing prerequisite headers?" >&2;}
8024 { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&5
8025 $as_echo "$as_me: WARNING: gssapi/gssapi.h: see the Autoconf documentation" >&2;}
8026 { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
8027 $as_echo "$as_me: WARNING: gssapi/gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
8028 { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&5
8029 $as_echo "$as_me: WARNING: gssapi/gssapi.h: proceeding with the preprocessor's result" >&2;}
8030 { $as_echo "$as_me:$LINENO: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&5
8031 $as_echo "$as_me: WARNING: gssapi/gssapi.h: in the future, the compiler will take precedence" >&2;}
8032
8033 ;;
8034 esac
8035 { $as_echo "$as_me:$LINENO: checking for gssapi/gssapi.h" >&5
8036 $as_echo_n "checking for gssapi/gssapi.h... " >&6; }
8037 if test "${ac_cv_header_gssapi_gssapi_h+set}" = set; then
8038 $as_echo_n "(cached) " >&6
8039 else
8040 ac_cv_header_gssapi_gssapi_h=$ac_header_preproc
8041 fi
8042 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_gssapi_h" >&5
8043 $as_echo "$ac_cv_header_gssapi_gssapi_h" >&6; }
8044
8045 fi
8046 if test "x$ac_cv_header_gssapi_gssapi_h" = x""yes; then
8047 :
8048 else
8049 { $as_echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no include files found" >&5
8050 $as_echo "$as_me: WARNING: Disabling GSSAPI - no include files found" >&2;}; gssapi=no
8051 fi
8052
8053
8054 fi
8055
8056
8057
8058 for ac_header in gssapi/gssapi_ext.h
8059 do
8060 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8061 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8062 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
8063 $as_echo_n "checking for $ac_header... " >&6; }
8064 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8065 $as_echo_n "(cached) " >&6
8066 fi
8067 ac_res=`eval 'as_val=${'$as_ac_Header'}
8068 $as_echo "$as_val"'`
8069 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
8070 $as_echo "$ac_res" >&6; }
8071 else
8072 # Is the header compilable?
8073 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
8074 $as_echo_n "checking $ac_header usability... " >&6; }
8075 cat >conftest.$ac_ext <<_ACEOF
8076 /* confdefs.h. */
8077 _ACEOF
8078 cat confdefs.h >>conftest.$ac_ext
8079 cat >>conftest.$ac_ext <<_ACEOF
8080 /* end confdefs.h. */
8081 $ac_includes_default
8082 #include <$ac_header>
8083 _ACEOF
8084 rm -f conftest.$ac_objext
8085 if { (ac_try="$ac_compile"
8086 case "(($ac_try" in
8087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8088 *) ac_try_echo=$ac_try;;
8089 esac
8090 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8091 $as_echo "$ac_try_echo") >&5
8092 (eval "$ac_compile") 2>conftest.er1
8093 ac_status=$?
8094 grep -v '^ *+' conftest.er1 >conftest.err
8095 rm -f conftest.er1
8096 cat conftest.err >&5
8097 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8098 (exit $ac_status); } && {
8099 test -z "$ac_c_werror_flag" ||
8100 test ! -s conftest.err
8101 } && test -s conftest.$ac_objext; then
8102 ac_header_compiler=yes
8103 else
8104 $as_echo "$as_me: failed program was:" >&5
8105 sed 's/^/| /' conftest.$ac_ext >&5
8106
8107 ac_header_compiler=no
8108 fi
8109
8110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8111 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8112 $as_echo "$ac_header_compiler" >&6; }
8113
8114 # Is the header present?
8115 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
8116 $as_echo_n "checking $ac_header presence... " >&6; }
8117 cat >conftest.$ac_ext <<_ACEOF
8118 /* confdefs.h. */
8119 _ACEOF
8120 cat confdefs.h >>conftest.$ac_ext
8121 cat >>conftest.$ac_ext <<_ACEOF
8122 /* end confdefs.h. */
8123 #include <$ac_header>
8124 _ACEOF
8125 if { (ac_try="$ac_cpp conftest.$ac_ext"
8126 case "(($ac_try" in
8127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8128 *) ac_try_echo=$ac_try;;
8129 esac
8130 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8131 $as_echo "$ac_try_echo") >&5
8132 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8133 ac_status=$?
8134 grep -v '^ *+' conftest.er1 >conftest.err
8135 rm -f conftest.er1
8136 cat conftest.err >&5
8137 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8138 (exit $ac_status); } >/dev/null && {
8139 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8140 test ! -s conftest.err
8141 }; then
8142 ac_header_preproc=yes
8143 else
8144 $as_echo "$as_me: failed program was:" >&5
8145 sed 's/^/| /' conftest.$ac_ext >&5
8146
8147 ac_header_preproc=no
8148 fi
8149
8150 rm -f conftest.err conftest.$ac_ext
8151 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8152 $as_echo "$ac_header_preproc" >&6; }
8153
8154 # So? What about this header?
8155 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8156 yes:no: )
8157 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8158 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8159 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8160 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8161 ac_header_preproc=yes
8162 ;;
8163 no:yes:* )
8164 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8165 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8166 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8167 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8168 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8169 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8170 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8171 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8172 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8173 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8174 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8175 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8176
8177 ;;
8178 esac
8179 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
8180 $as_echo_n "checking for $ac_header... " >&6; }
8181 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8182 $as_echo_n "(cached) " >&6
8183 else
8184 eval "$as_ac_Header=\$ac_header_preproc"
8185 fi
8186 ac_res=`eval 'as_val=${'$as_ac_Header'}
8187 $as_echo "$as_val"'`
8188 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
8189 $as_echo "$ac_res" >&6; }
8190
8191 fi
8192 as_val=`eval 'as_val=${'$as_ac_Header'}
8193 $as_echo "$as_val"'`
8194 if test "x$as_val" = x""yes; then
8195 cat >>confdefs.h <<_ACEOF
8196 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8197 _ACEOF
8198
8199 fi
8200
8201 done
8202
8203 CPPFLAGS=$cmu_saved_CPPFLAGS
8204
8205 fi
8206
8207 if test "$gssapi" != no; then
8208 if test "$ac_cv_header_gssapi_h" = "yes" -o "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
8209
8210 cat >>confdefs.h <<\_ACEOF
8211 #define HAVE_GSSAPI_H /**/
8212 _ACEOF
8213
8214 fi
8215
8216 # We need to find out which gssapi implementation we are
8217 # using. Supported alternatives are: MIT Kerberos 5,
8218 # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal),
8219 # CyberSafe Kerberos 5 (http://www.cybersafe.com/)
8220 # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/)
8221 #
8222 # The choice is reflected in GSSAPIBASE_LIBS
8223
8224
8225 { $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
8226 $as_echo_n "checking for res_search in -lresolv... " >&6; }
8227 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
8228 $as_echo_n "(cached) " >&6
8229 else
8230 ac_check_lib_save_LIBS=$LIBS
8231 LIBS="-lresolv $LIBS"
8232 cat >conftest.$ac_ext <<_ACEOF
8233 /* confdefs.h. */
8234 _ACEOF
8235 cat confdefs.h >>conftest.$ac_ext
8236 cat >>conftest.$ac_ext <<_ACEOF
8237 /* end confdefs.h. */
8238
8239 /* Override any GCC internal prototype to avoid an error.
8240 Use char because int might match the return type of a GCC
8241 builtin and then its argument prototype would still apply. */
8242 #ifdef __cplusplus
8243 extern "C"
8244 #endif
8245 char res_search ();
8246 int
8247 main ()
8248 {
8249 return res_search ();
8250 ;
8251 return 0;
8252 }
8253 _ACEOF
8254 rm -f conftest.$ac_objext conftest$ac_exeext
8255 if { (ac_try="$ac_link"
8256 case "(($ac_try" in
8257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8258 *) ac_try_echo=$ac_try;;
8259 esac
8260 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8261 $as_echo "$ac_try_echo") >&5
8262 (eval "$ac_link") 2>conftest.er1
8263 ac_status=$?
8264 grep -v '^ *+' conftest.er1 >conftest.err
8265 rm -f conftest.er1
8266 cat conftest.err >&5
8267 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8268 (exit $ac_status); } && {
8269 test -z "$ac_c_werror_flag" ||
8270 test ! -s conftest.err
8271 } && test -s conftest$ac_exeext && {
8272 test "$cross_compiling" = yes ||
8273 $as_test_x conftest$ac_exeext
8274 }; then
8275 ac_cv_lib_resolv_res_search=yes
8276 else
8277 $as_echo "$as_me: failed program was:" >&5
8278 sed 's/^/| /' conftest.$ac_ext >&5
8279
8280 ac_cv_lib_resolv_res_search=no
8281 fi
8282
8283 rm -rf conftest.dSYM
8284 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8285 conftest$ac_exeext conftest.$ac_ext
8286 LIBS=$ac_check_lib_save_LIBS
8287 fi
8288 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
8289 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
8290 if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
8291 cat >>confdefs.h <<_ACEOF
8292 #define HAVE_LIBRESOLV 1
8293 _ACEOF
8294
8295 LIBS="-lresolv $LIBS"
8296
8297 fi
8298
8299 if test -d ${gssapi}; then
8300 gssapi_dir="${gssapi}/lib"
8301 GSSAPIBASE_LIBS="-L$gssapi_dir"
8302 GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir"
8303 else
8304 # FIXME: This is only used for building cyrus, and then only as
8305 # a real hack. it needs to be fixed.
8306 gssapi_dir="/usr/local/lib"
8307 fi
8308
8309 # Check a full link against the Heimdal libraries.
8310 # If this fails, check a full link against the MIT libraries.
8311 # If this fails, check a full link against the CyberSafe libraries.
8312 # If this fails, check a full link against the Solaris 8 and up libgss.
8313
8314 if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then
8315 gss_failed=0
8316 { $as_echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi" >&5
8317 $as_echo_n "checking for gss_unwrap in -lgssapi... " >&6; }
8318 if test "${ac_cv_lib_gssapi_gss_unwrap+set}" = set; then
8319 $as_echo_n "(cached) " >&6
8320 else
8321 ac_check_lib_save_LIBS=$LIBS
8322 LIBS="-lgssapi ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET} $LIBS"
8323 cat >conftest.$ac_ext <<_ACEOF
8324 /* confdefs.h. */
8325 _ACEOF
8326 cat confdefs.h >>conftest.$ac_ext
8327 cat >>conftest.$ac_ext <<_ACEOF
8328 /* end confdefs.h. */
8329
8330 /* Override any GCC internal prototype to avoid an error.
8331 Use char because int might match the return type of a GCC
8332 builtin and then its argument prototype would still apply. */
8333 #ifdef __cplusplus
8334 extern "C"
8335 #endif
8336 char gss_unwrap ();
8337 int
8338 main ()
8339 {
8340 return gss_unwrap ();
8341 ;
8342 return 0;
8343 }
8344 _ACEOF
8345 rm -f conftest.$ac_objext conftest$ac_exeext
8346 if { (ac_try="$ac_link"
8347 case "(($ac_try" in
8348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8349 *) ac_try_echo=$ac_try;;
8350 esac
8351 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8352 $as_echo "$ac_try_echo") >&5
8353 (eval "$ac_link") 2>conftest.er1
8354 ac_status=$?
8355 grep -v '^ *+' conftest.er1 >conftest.err
8356 rm -f conftest.er1
8357 cat conftest.err >&5
8358 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8359 (exit $ac_status); } && {
8360 test -z "$ac_c_werror_flag" ||
8361 test ! -s conftest.err
8362 } && test -s conftest$ac_exeext && {
8363 test "$cross_compiling" = yes ||
8364 $as_test_x conftest$ac_exeext
8365 }; then
8366 ac_cv_lib_gssapi_gss_unwrap=yes
8367 else
8368 $as_echo "$as_me: failed program was:" >&5
8369 sed 's/^/| /' conftest.$ac_ext >&5
8370
8371 ac_cv_lib_gssapi_gss_unwrap=no
8372 fi
8373
8374 rm -rf conftest.dSYM
8375 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8376 conftest$ac_exeext conftest.$ac_ext
8377 LIBS=$ac_check_lib_save_LIBS
8378 fi
8379 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_unwrap" >&5
8380 $as_echo "$ac_cv_lib_gssapi_gss_unwrap" >&6; }
8381 if test "x$ac_cv_lib_gssapi_gss_unwrap" = x""yes; then
8382 gss_impl="heimdal"
8383 else
8384 gss_failed=1
8385 fi
8386
8387 if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
8388 gss_impl="failed"
8389 fi
8390 fi
8391
8392 if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then
8393 # check for libkrb5support first
8394 { $as_echo "$as_me:$LINENO: checking for krb5int_getspecific in -lkrb5support" >&5
8395 $as_echo_n "checking for krb5int_getspecific in -lkrb5support... " >&6; }
8396 if test "${ac_cv_lib_krb5support_krb5int_getspecific+set}" = set; then
8397 $as_echo_n "(cached) " >&6
8398 else
8399 ac_check_lib_save_LIBS=$LIBS
8400 LIBS="-lkrb5support ${LIB_SOCKET} $LIBS"
8401 cat >conftest.$ac_ext <<_ACEOF
8402 /* confdefs.h. */
8403 _ACEOF
8404 cat confdefs.h >>conftest.$ac_ext
8405 cat >>conftest.$ac_ext <<_ACEOF
8406 /* end confdefs.h. */
8407
8408 /* Override any GCC internal prototype to avoid an error.
8409 Use char because int might match the return type of a GCC
8410 builtin and then its argument prototype would still apply. */
8411 #ifdef __cplusplus
8412 extern "C"
8413 #endif
8414 char krb5int_getspecific ();
8415 int
8416 main ()
8417 {
8418 return krb5int_getspecific ();
8419 ;
8420 return 0;
8421 }
8422 _ACEOF
8423 rm -f conftest.$ac_objext conftest$ac_exeext
8424 if { (ac_try="$ac_link"
8425 case "(($ac_try" in
8426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8427 *) ac_try_echo=$ac_try;;
8428 esac
8429 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8430 $as_echo "$ac_try_echo") >&5
8431 (eval "$ac_link") 2>conftest.er1
8432 ac_status=$?
8433 grep -v '^ *+' conftest.er1 >conftest.err
8434 rm -f conftest.er1
8435 cat conftest.err >&5
8436 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8437 (exit $ac_status); } && {
8438 test -z "$ac_c_werror_flag" ||
8439 test ! -s conftest.err
8440 } && test -s conftest$ac_exeext && {
8441 test "$cross_compiling" = yes ||
8442 $as_test_x conftest$ac_exeext
8443 }; then
8444 ac_cv_lib_krb5support_krb5int_getspecific=yes
8445 else
8446 $as_echo "$as_me: failed program was:" >&5
8447 sed 's/^/| /' conftest.$ac_ext >&5
8448
8449 ac_cv_lib_krb5support_krb5int_getspecific=no
8450 fi
8451
8452 rm -rf conftest.dSYM
8453 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8454 conftest$ac_exeext conftest.$ac_ext
8455 LIBS=$ac_check_lib_save_LIBS
8456 fi
8457 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_krb5support_krb5int_getspecific" >&5
8458 $as_echo "$ac_cv_lib_krb5support_krb5int_getspecific" >&6; }
8459 if test "x$ac_cv_lib_krb5support_krb5int_getspecific" = x""yes; then
8460 K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a
8461 fi
8462
8463
8464 gss_failed=0
8465 { $as_echo "$as_me:$LINENO: checking for gss_unwrap in -lgssapi_krb5" >&5
8466 $as_echo_n "checking for gss_unwrap in -lgssapi_krb5... " >&6; }
8467 if test "${ac_cv_lib_gssapi_krb5_gss_unwrap+set}" = set; then
8468 $as_echo_n "(cached) " >&6
8469 else
8470 ac_check_lib_save_LIBS=$LIBS
8471 LIBS="-lgssapi_krb5 ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET} $LIBS"
8472 cat >conftest.$ac_ext <<_ACEOF
8473 /* confdefs.h. */
8474 _ACEOF
8475 cat confdefs.h >>conftest.$ac_ext
8476 cat >>conftest.$ac_ext <<_ACEOF
8477 /* end confdefs.h. */
8478
8479 /* Override any GCC internal prototype to avoid an error.
8480 Use char because int might match the return type of a GCC
8481 builtin and then its argument prototype would still apply. */
8482 #ifdef __cplusplus
8483 extern "C"
8484 #endif
8485 char gss_unwrap ();
8486 int
8487 main ()
8488 {
8489 return gss_unwrap ();
8490 ;
8491 return 0;
8492 }
8493 _ACEOF
8494 rm -f conftest.$ac_objext conftest$ac_exeext
8495 if { (ac_try="$ac_link"
8496 case "(($ac_try" in
8497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8498 *) ac_try_echo=$ac_try;;
8499 esac
8500 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8501 $as_echo "$ac_try_echo") >&5
8502 (eval "$ac_link") 2>conftest.er1
8503 ac_status=$?
8504 grep -v '^ *+' conftest.er1 >conftest.err
8505 rm -f conftest.er1
8506 cat conftest.err >&5
8507 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8508 (exit $ac_status); } && {
8509 test -z "$ac_c_werror_flag" ||
8510 test ! -s conftest.err
8511 } && test -s conftest$ac_exeext && {
8512 test "$cross_compiling" = yes ||
8513 $as_test_x conftest$ac_exeext
8514 }; then
8515 ac_cv_lib_gssapi_krb5_gss_unwrap=yes
8516 else
8517 $as_echo "$as_me: failed program was:" >&5
8518 sed 's/^/| /' conftest.$ac_ext >&5
8519
8520 ac_cv_lib_gssapi_krb5_gss_unwrap=no
8521 fi
8522
8523 rm -rf conftest.dSYM
8524 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8525 conftest$ac_exeext conftest.$ac_ext
8526 LIBS=$ac_check_lib_save_LIBS
8527 fi
8528 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_unwrap" >&5
8529 $as_echo "$ac_cv_lib_gssapi_krb5_gss_unwrap" >&6; }
8530 if test "x$ac_cv_lib_gssapi_krb5_gss_unwrap" = x""yes; then
8531 gss_impl="mit"
8532 else
8533 gss_failed=1
8534 fi
8535
8536 if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
8537 gss_impl="failed"
8538 fi
8539 fi
8540
8541 # For Cybersafe one has to set a platform define in order to make compilation work
8542 if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then
8543
8544 cmu_saved_CPPFLAGS=$CPPFLAGS
8545 cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS
8546 # FIXME - Note that the libraries are in .../lib64 for 64bit kernels
8547 if test -d "${gssapi}/appsec-rt/lib"; then
8548 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib"
8549 fi
8550 CPPFLAGS="$CPPFLAGS -D$platform"
8551 if test -d "${gssapi}/appsec-sdk/include"; then
8552 CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include"
8553 fi
8554
8555 gss_failed=0
8556
8557 # Check for CyberSafe with two libraries first, than fall back to a single
8558 # library (older CyberSafe)
8559
8560 unset ac_cv_lib_gss_csf_gss_acq_user
8561 { $as_echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
8562 $as_echo_n "checking for csf_gss_acq_user in -lgss... " >&6; }
8563 if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
8564 $as_echo_n "(cached) " >&6
8565 else
8566 ac_check_lib_save_LIBS=$LIBS
8567 LIBS="-lgss ${GSSAPIBASE_LIBS} -lgss -lcstbk5 $LIBS"
8568 cat >conftest.$ac_ext <<_ACEOF
8569 /* confdefs.h. */
8570 _ACEOF
8571 cat confdefs.h >>conftest.$ac_ext
8572 cat >>conftest.$ac_ext <<_ACEOF
8573 /* end confdefs.h. */
8574
8575 /* Override any GCC internal prototype to avoid an error.
8576 Use char because int might match the return type of a GCC
8577 builtin and then its argument prototype would still apply. */
8578 #ifdef __cplusplus
8579 extern "C"
8580 #endif
8581 char csf_gss_acq_user ();
8582 int
8583 main ()
8584 {
8585 return csf_gss_acq_user ();
8586 ;
8587 return 0;
8588 }
8589 _ACEOF
8590 rm -f conftest.$ac_objext conftest$ac_exeext
8591 if { (ac_try="$ac_link"
8592 case "(($ac_try" in
8593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8594 *) ac_try_echo=$ac_try;;
8595 esac
8596 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8597 $as_echo "$ac_try_echo") >&5
8598 (eval "$ac_link") 2>conftest.er1
8599 ac_status=$?
8600 grep -v '^ *+' conftest.er1 >conftest.err
8601 rm -f conftest.er1
8602 cat conftest.err >&5
8603 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8604 (exit $ac_status); } && {
8605 test -z "$ac_c_werror_flag" ||
8606 test ! -s conftest.err
8607 } && test -s conftest$ac_exeext && {
8608 test "$cross_compiling" = yes ||
8609 $as_test_x conftest$ac_exeext
8610 }; then
8611 ac_cv_lib_gss_csf_gss_acq_user=yes
8612 else
8613 $as_echo "$as_me: failed program was:" >&5
8614 sed 's/^/| /' conftest.$ac_ext >&5
8615
8616 ac_cv_lib_gss_csf_gss_acq_user=no
8617 fi
8618
8619 rm -rf conftest.dSYM
8620 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8621 conftest$ac_exeext conftest.$ac_ext
8622 LIBS=$ac_check_lib_save_LIBS
8623 fi
8624 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
8625 $as_echo "$ac_cv_lib_gss_csf_gss_acq_user" >&6; }
8626 if test "x$ac_cv_lib_gss_csf_gss_acq_user" = x""yes; then
8627 gss_impl="cybersafe03"
8628 else
8629 unset ac_cv_lib_gss_csf_gss_acq_user;
8630 { $as_echo "$as_me:$LINENO: checking for csf_gss_acq_user in -lgss" >&5
8631 $as_echo_n "checking for csf_gss_acq_user in -lgss... " >&6; }
8632 if test "${ac_cv_lib_gss_csf_gss_acq_user+set}" = set; then
8633 $as_echo_n "(cached) " >&6
8634 else
8635 ac_check_lib_save_LIBS=$LIBS
8636 LIBS="-lgss $GSSAPIBASE_LIBS -lgss $LIBS"
8637 cat >conftest.$ac_ext <<_ACEOF
8638 /* confdefs.h. */
8639 _ACEOF
8640 cat confdefs.h >>conftest.$ac_ext
8641 cat >>conftest.$ac_ext <<_ACEOF
8642 /* end confdefs.h. */
8643
8644 /* Override any GCC internal prototype to avoid an error.
8645 Use char because int might match the return type of a GCC
8646 builtin and then its argument prototype would still apply. */
8647 #ifdef __cplusplus
8648 extern "C"
8649 #endif
8650 char csf_gss_acq_user ();
8651 int
8652 main ()
8653 {
8654 return csf_gss_acq_user ();
8655 ;
8656 return 0;
8657 }
8658 _ACEOF
8659 rm -f conftest.$ac_objext conftest$ac_exeext
8660 if { (ac_try="$ac_link"
8661 case "(($ac_try" in
8662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8663 *) ac_try_echo=$ac_try;;
8664 esac
8665 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8666 $as_echo "$ac_try_echo") >&5
8667 (eval "$ac_link") 2>conftest.er1
8668 ac_status=$?
8669 grep -v '^ *+' conftest.er1 >conftest.err
8670 rm -f conftest.er1
8671 cat conftest.err >&5
8672 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8673 (exit $ac_status); } && {
8674 test -z "$ac_c_werror_flag" ||
8675 test ! -s conftest.err
8676 } && test -s conftest$ac_exeext && {
8677 test "$cross_compiling" = yes ||
8678 $as_test_x conftest$ac_exeext
8679 }; then
8680 ac_cv_lib_gss_csf_gss_acq_user=yes
8681 else
8682 $as_echo "$as_me: failed program was:" >&5
8683 sed 's/^/| /' conftest.$ac_ext >&5
8684
8685 ac_cv_lib_gss_csf_gss_acq_user=no
8686 fi
8687
8688 rm -rf conftest.dSYM
8689 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8690 conftest$ac_exeext conftest.$ac_ext
8691 LIBS=$ac_check_lib_save_LIBS
8692 fi
8693 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gss_csf_gss_acq_user" >&5
8694 $as_echo "$ac_cv_lib_gss_csf_gss_acq_user" >&6; }
8695 if test "x$ac_cv_lib_gss_csf_gss_acq_user" = x""yes; then
8696 gss_impl="cybersafe"
8697 else
8698 gss_failed=1
8699 fi
8700
8701 fi
8702
8703
8704 if test "$gss_failed" = "1"; then
8705 # Restore variables
8706 GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS
8707 CPPFLAGS=$cmu_saved_CPPFLAGS
8708
8709 if test "$gss_impl" != "auto"; then
8710 gss_impl="failed"
8711 fi
8712 fi
8713 fi
8714
8715 if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then
8716 gss_failed=0
8717 { $as_echo "$as_me:$LINENO: checking for gss_unwrap in -lgss" >&5
8718 $as_echo_n "checking for gss_unwrap in -lgss... " >&6; }
8719 if test "${ac_cv_lib_gss_gss_unwrap+set}" = set; then
8720 $as_echo_n "(cached) " >&6
8721 else
8722 ac_check_lib_save_LIBS=$LIBS
8723 LIBS="-lgss -lgss $LIBS"
8724 cat >conftest.$ac_ext <<_ACEOF
8725 /* confdefs.h. */
8726 _ACEOF
8727 cat confdefs.h >>conftest.$ac_ext
8728 cat >>conftest.$ac_ext <<_ACEOF
8729 /* end confdefs.h. */
8730
8731 /* Override any GCC internal prototype to avoid an error.
8732 Use char because int might match the return type of a GCC
8733 builtin and then its argument prototype would still apply. */
8734 #ifdef __cplusplus
8735 extern "C"
8736 #endif
8737 char gss_unwrap ();
8738 int
8739 main ()
8740 {
8741 return gss_unwrap ();
8742 ;
8743 return 0;
8744 }
8745 _ACEOF
8746 rm -f conftest.$ac_objext conftest$ac_exeext
8747 if { (ac_try="$ac_link"
8748 case "(($ac_try" in
8749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8750 *) ac_try_echo=$ac_try;;
8751 esac
8752 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8753 $as_echo "$ac_try_echo") >&5
8754 (eval "$ac_link") 2>conftest.er1
8755 ac_status=$?
8756 grep -v '^ *+' conftest.er1 >conftest.err
8757 rm -f conftest.er1
8758 cat conftest.err >&5
8759 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8760 (exit $ac_status); } && {
8761 test -z "$ac_c_werror_flag" ||
8762 test ! -s conftest.err
8763 } && test -s conftest$ac_exeext && {
8764 test "$cross_compiling" = yes ||
8765 $as_test_x conftest$ac_exeext
8766 }; then
8767 ac_cv_lib_gss_gss_unwrap=yes
8768 else
8769 $as_echo "$as_me: failed program was:" >&5
8770 sed 's/^/| /' conftest.$ac_ext >&5
8771
8772 ac_cv_lib_gss_gss_unwrap=no
8773 fi
8774
8775 rm -rf conftest.dSYM
8776 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8777 conftest$ac_exeext conftest.$ac_ext
8778 LIBS=$ac_check_lib_save_LIBS
8779 fi
8780 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gss_gss_unwrap" >&5
8781 $as_echo "$ac_cv_lib_gss_gss_unwrap" >&6; }
8782 if test "x$ac_cv_lib_gss_gss_unwrap" = x""yes; then
8783 gss_impl="seam"
8784 else
8785 gss_failed=1
8786 fi
8787
8788 if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
8789 gss_impl="failed"
8790 fi
8791 fi
8792
8793 if test "$gss_impl" = "mit"; then
8794 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}"
8795 GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
8796 elif test "$gss_impl" = "heimdal"; then
8797 CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
8798 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
8799 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}"
8800 elif test "$gss_impl" = "cybersafe03"; then
8801 # Version of CyberSafe with two libraries
8802 CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
8803 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5"
8804 # there is no static libgss for CyberSafe
8805 GSSAPIBASE_STATIC_LIBS=none
8806 elif test "$gss_impl" = "cybersafe"; then
8807 CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include"
8808 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss"
8809 # there is no static libgss for CyberSafe
8810 GSSAPIBASE_STATIC_LIBS=none
8811 elif test "$gss_impl" = "seam"; then
8812 GSSAPIBASE_LIBS=-lgss
8813 # there is no static libgss on Solaris 8 and up
8814 GSSAPIBASE_STATIC_LIBS=none
8815 elif test "$gss_impl" = "failed"; then
8816 gssapi="no"
8817 GSSAPIBASE_LIBS=
8818 GSSAPIBASE_STATIC_LIBS=
8819 { $as_echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - specified library not found" >&5
8820 $as_echo "$as_me: WARNING: Disabling GSSAPI - specified library not found" >&2;}
8821 else
8822 gssapi="no"
8823 GSSAPIBASE_LIBS=
8824 GSSAPIBASE_STATIC_LIBS=
8825 { $as_echo "$as_me:$LINENO: WARNING: Disabling GSSAPI - no library" >&5
8826 $as_echo "$as_me: WARNING: Disabling GSSAPI - no library" >&2;}
8827 fi
8828 fi
8829
8830 #
8831 # Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME
8832 # in gssapi\rfckrb5.h
8833 #
8834 if test "$gssapi" != "no"; then
8835 if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
8836 cat >conftest.$ac_ext <<_ACEOF
8837 /* confdefs.h. */
8838 _ACEOF
8839 cat confdefs.h >>conftest.$ac_ext
8840 cat >>conftest.$ac_ext <<_ACEOF
8841 /* end confdefs.h. */
8842 #include <gssapi/gssapi.h>
8843 #ifdef GSS_C_NT_HOSTBASED_SERVICE
8844 hostbased_service_gss_nt_yes
8845 #endif
8846 _ACEOF
8847 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8848 $EGREP "hostbased_service_gss_nt_yes" >/dev/null 2>&1; then
8849
8850 cat >>confdefs.h <<\_ACEOF
8851 #define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/
8852 _ACEOF
8853
8854 else
8855 { $as_echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
8856 $as_echo "$as_me: WARNING: Cybersafe define not found" >&2;}
8857 fi
8858 rm -f conftest*
8859
8860
8861 elif test "$ac_cv_header_gssapi_h" = "yes"; then
8862 cat >conftest.$ac_ext <<_ACEOF
8863 /* confdefs.h. */
8864 _ACEOF
8865 cat confdefs.h >>conftest.$ac_ext
8866 cat >>conftest.$ac_ext <<_ACEOF
8867 /* end confdefs.h. */
8868 #include <gssapi.h>
8869
8870 _ACEOF
8871 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8872 $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
8873
8874 cat >>confdefs.h <<\_ACEOF
8875 #define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/
8876 _ACEOF
8877
8878 fi
8879 rm -f conftest*
8880
8881 elif test "$ac_cv_header_gssapi_gssapi_h"; then
8882 cat >conftest.$ac_ext <<_ACEOF
8883 /* confdefs.h. */
8884 _ACEOF
8885 cat confdefs.h >>conftest.$ac_ext
8886 cat >>conftest.$ac_ext <<_ACEOF
8887 /* end confdefs.h. */
8888 #include <gssapi/gssapi.h>
8889
8890 _ACEOF
8891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8892 $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
8893
8894 cat >>confdefs.h <<\_ACEOF
8895 #define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/
8896 _ACEOF
8897
8898 fi
8899 rm -f conftest*
8900
8901 fi
8902
8903 if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then
8904 cat >conftest.$ac_ext <<_ACEOF
8905 /* confdefs.h. */
8906 _ACEOF
8907 cat confdefs.h >>conftest.$ac_ext
8908 cat >>conftest.$ac_ext <<_ACEOF
8909 /* end confdefs.h. */
8910 #include <gssapi/gssapi.h>
8911 #ifdef GSS_C_NT_USER_NAME
8912 user_name_yes_gss_nt
8913 #endif
8914 _ACEOF
8915 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8916 $EGREP "user_name_yes_gss_nt" >/dev/null 2>&1; then
8917
8918 cat >>confdefs.h <<\_ACEOF
8919 #define HAVE_GSS_C_NT_USER_NAME /**/
8920 _ACEOF
8921
8922 else
8923 { $as_echo "$as_me:$LINENO: WARNING: Cybersafe define not found" >&5
8924 $as_echo "$as_me: WARNING: Cybersafe define not found" >&2;}
8925 fi
8926 rm -f conftest*
8927
8928 elif test "$ac_cv_header_gssapi_h" = "yes"; then
8929 cat >conftest.$ac_ext <<_ACEOF
8930 /* confdefs.h. */
8931 _ACEOF
8932 cat confdefs.h >>conftest.$ac_ext
8933 cat >>conftest.$ac_ext <<_ACEOF
8934 /* end confdefs.h. */
8935 #include <gssapi.h>
8936
8937 _ACEOF
8938 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8939 $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
8940
8941 cat >>confdefs.h <<\_ACEOF
8942 #define HAVE_GSS_C_NT_USER_NAME /**/
8943 _ACEOF
8944
8945 fi
8946 rm -f conftest*
8947
8948 cat >conftest.$ac_ext <<_ACEOF
8949 /* confdefs.h. */
8950 _ACEOF
8951 cat confdefs.h >>conftest.$ac_ext
8952 cat >>conftest.$ac_ext <<_ACEOF
8953 /* end confdefs.h. */
8954 #include <gssapi.h>
8955
8956 _ACEOF
8957 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8958 $EGREP "gss_inquire_attrs_for_mech" >/dev/null 2>&1; then
8959 rfc5587=yes
8960 fi
8961 rm -f conftest*
8962
8963 cat >conftest.$ac_ext <<_ACEOF
8964 /* confdefs.h. */
8965 _ACEOF
8966 cat confdefs.h >>conftest.$ac_ext
8967 cat >>conftest.$ac_ext <<_ACEOF
8968 /* end confdefs.h. */
8969 #include <gssapi.h>
8970
8971 _ACEOF
8972 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8973 $EGREP "gss_inquire_mech_for_saslname" >/dev/null 2>&1; then
8974 rfc5801=yes
8975 fi
8976 rm -f conftest*
8977
8978 elif test "$ac_cv_header_gssapi_gssapi_h"; then
8979 cat >conftest.$ac_ext <<_ACEOF
8980 /* confdefs.h. */
8981 _ACEOF
8982 cat confdefs.h >>conftest.$ac_ext
8983 cat >>conftest.$ac_ext <<_ACEOF
8984 /* end confdefs.h. */
8985 #include <gssapi/gssapi.h>
8986
8987 _ACEOF
8988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8989 $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then
8990
8991 cat >>confdefs.h <<\_ACEOF
8992 #define HAVE_GSS_C_NT_USER_NAME /**/
8993 _ACEOF
8994
8995 fi
8996 rm -f conftest*
8997
8998 cat >conftest.$ac_ext <<_ACEOF
8999 /* confdefs.h. */
9000 _ACEOF
9001 cat confdefs.h >>conftest.$ac_ext
9002 cat >>conftest.$ac_ext <<_ACEOF
9003 /* end confdefs.h. */
9004 #include <gssapi/gssapi.h>
9005
9006 _ACEOF
9007 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9008 $EGREP "gss_inquire_attrs_for_mech" >/dev/null 2>&1; then
9009 rfc5587=yes
9010 fi
9011 rm -f conftest*
9012
9013 cat >conftest.$ac_ext <<_ACEOF
9014 /* confdefs.h. */
9015 _ACEOF
9016 cat confdefs.h >>conftest.$ac_ext
9017 cat >>conftest.$ac_ext <<_ACEOF
9018 /* end confdefs.h. */
9019 #include <gssapi.h>
9020
9021 _ACEOF
9022 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9023 $EGREP "gss_inquire_mech_for_saslname" >/dev/null 2>&1; then
9024 rfc5801=yes
9025 fi
9026 rm -f conftest*
9027
9028 fi
9029 fi
9030
9031 GSSAPI_LIBS=""
9032 { $as_echo "$as_me:$LINENO: checking GSSAPI" >&5
9033 $as_echo_n "checking GSSAPI... " >&6; }
9034 if test "$gssapi" != no; then
9035 { $as_echo "$as_me:$LINENO: result: with implementation ${gss_impl}" >&5
9036 $as_echo "with implementation ${gss_impl}" >&6; }
9037 { $as_echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
9038 $as_echo_n "checking for res_search in -lresolv... " >&6; }
9039 if test "${ac_cv_lib_resolv_res_search+set}" = set; then
9040 $as_echo_n "(cached) " >&6
9041 else
9042 ac_check_lib_save_LIBS=$LIBS
9043 LIBS="-lresolv $LIBS"
9044 cat >conftest.$ac_ext <<_ACEOF
9045 /* confdefs.h. */
9046 _ACEOF
9047 cat confdefs.h >>conftest.$ac_ext
9048 cat >>conftest.$ac_ext <<_ACEOF
9049 /* end confdefs.h. */
9050
9051 /* Override any GCC internal prototype to avoid an error.
9052 Use char because int might match the return type of a GCC
9053 builtin and then its argument prototype would still apply. */
9054 #ifdef __cplusplus
9055 extern "C"
9056 #endif
9057 char res_search ();
9058 int
9059 main ()
9060 {
9061 return res_search ();
9062 ;
9063 return 0;
9064 }
9065 _ACEOF
9066 rm -f conftest.$ac_objext conftest$ac_exeext
9067 if { (ac_try="$ac_link"
9068 case "(($ac_try" in
9069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9070 *) ac_try_echo=$ac_try;;
9071 esac
9072 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9073 $as_echo "$ac_try_echo") >&5
9074 (eval "$ac_link") 2>conftest.er1
9075 ac_status=$?
9076 grep -v '^ *+' conftest.er1 >conftest.err
9077 rm -f conftest.er1
9078 cat conftest.err >&5
9079 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9080 (exit $ac_status); } && {
9081 test -z "$ac_c_werror_flag" ||
9082 test ! -s conftest.err
9083 } && test -s conftest$ac_exeext && {
9084 test "$cross_compiling" = yes ||
9085 $as_test_x conftest$ac_exeext
9086 }; then
9087 ac_cv_lib_resolv_res_search=yes
9088 else
9089 $as_echo "$as_me: failed program was:" >&5
9090 sed 's/^/| /' conftest.$ac_ext >&5
9091
9092 ac_cv_lib_resolv_res_search=no
9093 fi
9094
9095 rm -rf conftest.dSYM
9096 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9097 conftest$ac_exeext conftest.$ac_ext
9098 LIBS=$ac_check_lib_save_LIBS
9099 fi
9100 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
9101 $as_echo "$ac_cv_lib_resolv_res_search" >&6; }
9102 if test "x$ac_cv_lib_resolv_res_search" = x""yes; then
9103 GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv"
9104 fi
9105
9106 SASL_MECHS="$SASL_MECHS libgssapiv2.la"
9107 SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o"
9108 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/gssapi.c"
9109 if test "$rfc5587" = "yes" -a "$rfc5801" = "yes"; then
9110 SASL_MECHS="$SASL_MECHS libgs2.la"
9111 SASL_STATIC_OBJS="$SASL_STATIC_OBJS gs2.o"
9112 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/gs2.c"
9113 fi
9114
9115 cmu_save_LIBS="$LIBS"
9116 LIBS="$LIBS $GSSAPIBASE_LIBS"
9117
9118 for ac_func in gsskrb5_register_acceptor_identity
9119 do
9120 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9121 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
9122 $as_echo_n "checking for $ac_func... " >&6; }
9123 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9124 $as_echo_n "(cached) " >&6
9125 else
9126 cat >conftest.$ac_ext <<_ACEOF
9127 /* confdefs.h. */
9128 _ACEOF
9129 cat confdefs.h >>conftest.$ac_ext
9130 cat >>conftest.$ac_ext <<_ACEOF
9131 /* end confdefs.h. */
9132 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9133 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9134 #define $ac_func innocuous_$ac_func
9135
9136 /* System header to define __stub macros and hopefully few prototypes,
9137 which can conflict with char $ac_func (); below.
9138 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9139 <limits.h> exists even on freestanding compilers. */
9140
9141 #ifdef __STDC__
9142 # include <limits.h>
9143 #else
9144 # include <assert.h>
9145 #endif
9146
9147 #undef $ac_func
9148
9149 /* Override any GCC internal prototype to avoid an error.
9150 Use char because int might match the return type of a GCC
9151 builtin and then its argument prototype would still apply. */
9152 #ifdef __cplusplus
9153 extern "C"
9154 #endif
9155 char $ac_func ();
9156 /* The GNU C library defines this for functions which it implements
9157 to always fail with ENOSYS. Some functions are actually named
9158 something starting with __ and the normal name is an alias. */
9159 #if defined __stub_$ac_func || defined __stub___$ac_func
9160 choke me
9161 #endif
9162
9163 int
9164 main ()
9165 {
9166 return $ac_func ();
9167 ;
9168 return 0;
9169 }
9170 _ACEOF
9171 rm -f conftest.$ac_objext conftest$ac_exeext
9172 if { (ac_try="$ac_link"
9173 case "(($ac_try" in
9174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9175 *) ac_try_echo=$ac_try;;
9176 esac
9177 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9178 $as_echo "$ac_try_echo") >&5
9179 (eval "$ac_link") 2>conftest.er1
9180 ac_status=$?
9181 grep -v '^ *+' conftest.er1 >conftest.err
9182 rm -f conftest.er1
9183 cat conftest.err >&5
9184 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9185 (exit $ac_status); } && {
9186 test -z "$ac_c_werror_flag" ||
9187 test ! -s conftest.err
9188 } && test -s conftest$ac_exeext && {
9189 test "$cross_compiling" = yes ||
9190 $as_test_x conftest$ac_exeext
9191 }; then
9192 eval "$as_ac_var=yes"
9193 else
9194 $as_echo "$as_me: failed program was:" >&5
9195 sed 's/^/| /' conftest.$ac_ext >&5
9196
9197 eval "$as_ac_var=no"
9198 fi
9199
9200 rm -rf conftest.dSYM
9201 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9202 conftest$ac_exeext conftest.$ac_ext
9203 fi
9204 ac_res=`eval 'as_val=${'$as_ac_var'}
9205 $as_echo "$as_val"'`
9206 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9207 $as_echo "$ac_res" >&6; }
9208 as_val=`eval 'as_val=${'$as_ac_var'}
9209 $as_echo "$as_val"'`
9210 if test "x$as_val" = x""yes; then
9211 cat >>confdefs.h <<_ACEOF
9212 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9213 _ACEOF
9214
9215 fi
9216 done
9217
9218
9219 for ac_func in gss_decapsulate_token
9220 do
9221 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9222 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
9223 $as_echo_n "checking for $ac_func... " >&6; }
9224 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9225 $as_echo_n "(cached) " >&6
9226 else
9227 cat >conftest.$ac_ext <<_ACEOF
9228 /* confdefs.h. */
9229 _ACEOF
9230 cat confdefs.h >>conftest.$ac_ext
9231 cat >>conftest.$ac_ext <<_ACEOF
9232 /* end confdefs.h. */
9233 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9234 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9235 #define $ac_func innocuous_$ac_func
9236
9237 /* System header to define __stub macros and hopefully few prototypes,
9238 which can conflict with char $ac_func (); below.
9239 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9240 <limits.h> exists even on freestanding compilers. */
9241
9242 #ifdef __STDC__
9243 # include <limits.h>
9244 #else
9245 # include <assert.h>
9246 #endif
9247
9248 #undef $ac_func
9249
9250 /* Override any GCC internal prototype to avoid an error.
9251 Use char because int might match the return type of a GCC
9252 builtin and then its argument prototype would still apply. */
9253 #ifdef __cplusplus
9254 extern "C"
9255 #endif
9256 char $ac_func ();
9257 /* The GNU C library defines this for functions which it implements
9258 to always fail with ENOSYS. Some functions are actually named
9259 something starting with __ and the normal name is an alias. */
9260 #if defined __stub_$ac_func || defined __stub___$ac_func
9261 choke me
9262 #endif
9263
9264 int
9265 main ()
9266 {
9267 return $ac_func ();
9268 ;
9269 return 0;
9270 }
9271 _ACEOF
9272 rm -f conftest.$ac_objext conftest$ac_exeext
9273 if { (ac_try="$ac_link"
9274 case "(($ac_try" in
9275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9276 *) ac_try_echo=$ac_try;;
9277 esac
9278 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9279 $as_echo "$ac_try_echo") >&5
9280 (eval "$ac_link") 2>conftest.er1
9281 ac_status=$?
9282 grep -v '^ *+' conftest.er1 >conftest.err
9283 rm -f conftest.er1
9284 cat conftest.err >&5
9285 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9286 (exit $ac_status); } && {
9287 test -z "$ac_c_werror_flag" ||
9288 test ! -s conftest.err
9289 } && test -s conftest$ac_exeext && {
9290 test "$cross_compiling" = yes ||
9291 $as_test_x conftest$ac_exeext
9292 }; then
9293 eval "$as_ac_var=yes"
9294 else
9295 $as_echo "$as_me: failed program was:" >&5
9296 sed 's/^/| /' conftest.$ac_ext >&5
9297
9298 eval "$as_ac_var=no"
9299 fi
9300
9301 rm -rf conftest.dSYM
9302 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9303 conftest$ac_exeext conftest.$ac_ext
9304 fi
9305 ac_res=`eval 'as_val=${'$as_ac_var'}
9306 $as_echo "$as_val"'`
9307 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9308 $as_echo "$ac_res" >&6; }
9309 as_val=`eval 'as_val=${'$as_ac_var'}
9310 $as_echo "$as_val"'`
9311 if test "x$as_val" = x""yes; then
9312 cat >>confdefs.h <<_ACEOF
9313 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9314 _ACEOF
9315
9316 fi
9317 done
9318
9319
9320 for ac_func in gss_encapsulate_token
9321 do
9322 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9323 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
9324 $as_echo_n "checking for $ac_func... " >&6; }
9325 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9326 $as_echo_n "(cached) " >&6
9327 else
9328 cat >conftest.$ac_ext <<_ACEOF
9329 /* confdefs.h. */
9330 _ACEOF
9331 cat confdefs.h >>conftest.$ac_ext
9332 cat >>conftest.$ac_ext <<_ACEOF
9333 /* end confdefs.h. */
9334 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9335 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9336 #define $ac_func innocuous_$ac_func
9337
9338 /* System header to define __stub macros and hopefully few prototypes,
9339 which can conflict with char $ac_func (); below.
9340 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9341 <limits.h> exists even on freestanding compilers. */
9342
9343 #ifdef __STDC__
9344 # include <limits.h>
9345 #else
9346 # include <assert.h>
9347 #endif
9348
9349 #undef $ac_func
9350
9351 /* Override any GCC internal prototype to avoid an error.
9352 Use char because int might match the return type of a GCC
9353 builtin and then its argument prototype would still apply. */
9354 #ifdef __cplusplus
9355 extern "C"
9356 #endif
9357 char $ac_func ();
9358 /* The GNU C library defines this for functions which it implements
9359 to always fail with ENOSYS. Some functions are actually named
9360 something starting with __ and the normal name is an alias. */
9361 #if defined __stub_$ac_func || defined __stub___$ac_func
9362 choke me
9363 #endif
9364
9365 int
9366 main ()
9367 {
9368 return $ac_func ();
9369 ;
9370 return 0;
9371 }
9372 _ACEOF
9373 rm -f conftest.$ac_objext conftest$ac_exeext
9374 if { (ac_try="$ac_link"
9375 case "(($ac_try" in
9376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9377 *) ac_try_echo=$ac_try;;
9378 esac
9379 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9380 $as_echo "$ac_try_echo") >&5
9381 (eval "$ac_link") 2>conftest.er1
9382 ac_status=$?
9383 grep -v '^ *+' conftest.er1 >conftest.err
9384 rm -f conftest.er1
9385 cat conftest.err >&5
9386 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9387 (exit $ac_status); } && {
9388 test -z "$ac_c_werror_flag" ||
9389 test ! -s conftest.err
9390 } && test -s conftest$ac_exeext && {
9391 test "$cross_compiling" = yes ||
9392 $as_test_x conftest$ac_exeext
9393 }; then
9394 eval "$as_ac_var=yes"
9395 else
9396 $as_echo "$as_me: failed program was:" >&5
9397 sed 's/^/| /' conftest.$ac_ext >&5
9398
9399 eval "$as_ac_var=no"
9400 fi
9401
9402 rm -rf conftest.dSYM
9403 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9404 conftest$ac_exeext conftest.$ac_ext
9405 fi
9406 ac_res=`eval 'as_val=${'$as_ac_var'}
9407 $as_echo "$as_val"'`
9408 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9409 $as_echo "$ac_res" >&6; }
9410 as_val=`eval 'as_val=${'$as_ac_var'}
9411 $as_echo "$as_val"'`
9412 if test "x$as_val" = x""yes; then
9413 cat >>confdefs.h <<_ACEOF
9414 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9415 _ACEOF
9416
9417 fi
9418 done
9419
9420
9421 for ac_func in gss_oid_equal
9422 do
9423 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9424 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
9425 $as_echo_n "checking for $ac_func... " >&6; }
9426 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9427 $as_echo_n "(cached) " >&6
9428 else
9429 cat >conftest.$ac_ext <<_ACEOF
9430 /* confdefs.h. */
9431 _ACEOF
9432 cat confdefs.h >>conftest.$ac_ext
9433 cat >>conftest.$ac_ext <<_ACEOF
9434 /* end confdefs.h. */
9435 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9436 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9437 #define $ac_func innocuous_$ac_func
9438
9439 /* System header to define __stub macros and hopefully few prototypes,
9440 which can conflict with char $ac_func (); below.
9441 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9442 <limits.h> exists even on freestanding compilers. */
9443
9444 #ifdef __STDC__
9445 # include <limits.h>
9446 #else
9447 # include <assert.h>
9448 #endif
9449
9450 #undef $ac_func
9451
9452 /* Override any GCC internal prototype to avoid an error.
9453 Use char because int might match the return type of a GCC
9454 builtin and then its argument prototype would still apply. */
9455 #ifdef __cplusplus
9456 extern "C"
9457 #endif
9458 char $ac_func ();
9459 /* The GNU C library defines this for functions which it implements
9460 to always fail with ENOSYS. Some functions are actually named
9461 something starting with __ and the normal name is an alias. */
9462 #if defined __stub_$ac_func || defined __stub___$ac_func
9463 choke me
9464 #endif
9465
9466 int
9467 main ()
9468 {
9469 return $ac_func ();
9470 ;
9471 return 0;
9472 }
9473 _ACEOF
9474 rm -f conftest.$ac_objext conftest$ac_exeext
9475 if { (ac_try="$ac_link"
9476 case "(($ac_try" in
9477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9478 *) ac_try_echo=$ac_try;;
9479 esac
9480 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9481 $as_echo "$ac_try_echo") >&5
9482 (eval "$ac_link") 2>conftest.er1
9483 ac_status=$?
9484 grep -v '^ *+' conftest.er1 >conftest.err
9485 rm -f conftest.er1
9486 cat conftest.err >&5
9487 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9488 (exit $ac_status); } && {
9489 test -z "$ac_c_werror_flag" ||
9490 test ! -s conftest.err
9491 } && test -s conftest$ac_exeext && {
9492 test "$cross_compiling" = yes ||
9493 $as_test_x conftest$ac_exeext
9494 }; then
9495 eval "$as_ac_var=yes"
9496 else
9497 $as_echo "$as_me: failed program was:" >&5
9498 sed 's/^/| /' conftest.$ac_ext >&5
9499
9500 eval "$as_ac_var=no"
9501 fi
9502
9503 rm -rf conftest.dSYM
9504 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9505 conftest$ac_exeext conftest.$ac_ext
9506 fi
9507 ac_res=`eval 'as_val=${'$as_ac_var'}
9508 $as_echo "$as_val"'`
9509 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9510 $as_echo "$ac_res" >&6; }
9511 as_val=`eval 'as_val=${'$as_ac_var'}
9512 $as_echo "$as_val"'`
9513 if test "x$as_val" = x""yes; then
9514 cat >>confdefs.h <<_ACEOF
9515 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9516 _ACEOF
9517
9518 fi
9519 done
9520
9521 LIBS="$cmu_save_LIBS"
9522
9523 cmu_save_LIBS="$LIBS"
9524 LIBS="$LIBS $GSSAPIBASE_LIBS"
9525
9526 for ac_func in gss_get_name_attribute
9527 do
9528 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9529 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
9530 $as_echo_n "checking for $ac_func... " >&6; }
9531 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9532 $as_echo_n "(cached) " >&6
9533 else
9534 cat >conftest.$ac_ext <<_ACEOF
9535 /* confdefs.h. */
9536 _ACEOF
9537 cat confdefs.h >>conftest.$ac_ext
9538 cat >>conftest.$ac_ext <<_ACEOF
9539 /* end confdefs.h. */
9540 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9541 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9542 #define $ac_func innocuous_$ac_func
9543
9544 /* System header to define __stub macros and hopefully few prototypes,
9545 which can conflict with char $ac_func (); below.
9546 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9547 <limits.h> exists even on freestanding compilers. */
9548
9549 #ifdef __STDC__
9550 # include <limits.h>
9551 #else
9552 # include <assert.h>
9553 #endif
9554
9555 #undef $ac_func
9556
9557 /* Override any GCC internal prototype to avoid an error.
9558 Use char because int might match the return type of a GCC
9559 builtin and then its argument prototype would still apply. */
9560 #ifdef __cplusplus
9561 extern "C"
9562 #endif
9563 char $ac_func ();
9564 /* The GNU C library defines this for functions which it implements
9565 to always fail with ENOSYS. Some functions are actually named
9566 something starting with __ and the normal name is an alias. */
9567 #if defined __stub_$ac_func || defined __stub___$ac_func
9568 choke me
9569 #endif
9570
9571 int
9572 main ()
9573 {
9574 return $ac_func ();
9575 ;
9576 return 0;
9577 }
9578 _ACEOF
9579 rm -f conftest.$ac_objext conftest$ac_exeext
9580 if { (ac_try="$ac_link"
9581 case "(($ac_try" in
9582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9583 *) ac_try_echo=$ac_try;;
9584 esac
9585 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9586 $as_echo "$ac_try_echo") >&5
9587 (eval "$ac_link") 2>conftest.er1
9588 ac_status=$?
9589 grep -v '^ *+' conftest.er1 >conftest.err
9590 rm -f conftest.er1
9591 cat conftest.err >&5
9592 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9593 (exit $ac_status); } && {
9594 test -z "$ac_c_werror_flag" ||
9595 test ! -s conftest.err
9596 } && test -s conftest$ac_exeext && {
9597 test "$cross_compiling" = yes ||
9598 $as_test_x conftest$ac_exeext
9599 }; then
9600 eval "$as_ac_var=yes"
9601 else
9602 $as_echo "$as_me: failed program was:" >&5
9603 sed 's/^/| /' conftest.$ac_ext >&5
9604
9605 eval "$as_ac_var=no"
9606 fi
9607
9608 rm -rf conftest.dSYM
9609 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9610 conftest$ac_exeext conftest.$ac_ext
9611 fi
9612 ac_res=`eval 'as_val=${'$as_ac_var'}
9613 $as_echo "$as_val"'`
9614 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
9615 $as_echo "$ac_res" >&6; }
9616 as_val=`eval 'as_val=${'$as_ac_var'}
9617 $as_echo "$as_val"'`
9618 if test "x$as_val" = x""yes; then
9619 cat >>confdefs.h <<_ACEOF
9620 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9621 _ACEOF
9622
9623 fi
9624 done
9625
9626 LIBS="$cmu_save_LIBS"
9627
9628 cmu_save_LIBS="$LIBS"
9629 LIBS="$LIBS $GSSAPIBASE_LIBS"
9630 { $as_echo "$as_me:$LINENO: checking for SPNEGO support in GSSAPI libraries" >&5
9631 $as_echo_n "checking for SPNEGO support in GSSAPI libraries... " >&6; }
9632 if test "$cross_compiling" = yes; then
9633 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9634 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9635 { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9636 See \`config.log' for more details." >&5
9637 $as_echo "$as_me: error: cannot run test program while cross compiling
9638 See \`config.log' for more details." >&2;}
9639 { (exit 1); exit 1; }; }; }
9640 else
9641 cat >conftest.$ac_ext <<_ACEOF
9642 /* confdefs.h. */
9643 _ACEOF
9644 cat confdefs.h >>conftest.$ac_ext
9645 cat >>conftest.$ac_ext <<_ACEOF
9646 /* end confdefs.h. */
9647
9648 #ifdef HAVE_GSSAPI_H
9649 #include <gssapi.h>
9650 #else
9651 #include <gssapi/gssapi.h>
9652 #endif
9653
9654 int main(void)
9655 {
9656 gss_OID_desc spnego_oid = { 6, (void *) "\x2b\x06\x01\x05\x05\x02" };
9657 gss_OID_set mech_set;
9658 OM_uint32 min_stat;
9659 int have_spnego = 0;
9660
9661 if (gss_indicate_mechs(&min_stat, &mech_set) == GSS_S_COMPLETE) {
9662 gss_test_oid_set_member(&min_stat, &spnego_oid, mech_set, &have_spnego);
9663 gss_release_oid_set(&min_stat, &mech_set);
9664 }
9665
9666 return (!have_spnego); // 0 = success, 1 = failure
9667 }
9668
9669 _ACEOF
9670 rm -f conftest$ac_exeext
9671 if { (ac_try="$ac_link"
9672 case "(($ac_try" in
9673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9674 *) ac_try_echo=$ac_try;;
9675 esac
9676 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9677 $as_echo "$ac_try_echo") >&5
9678 (eval "$ac_link") 2>&5
9679 ac_status=$?
9680 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9681 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9682 { (case "(($ac_try" in
9683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9684 *) ac_try_echo=$ac_try;;
9685 esac
9686 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9687 $as_echo "$ac_try_echo") >&5
9688 (eval "$ac_try") 2>&5
9689 ac_status=$?
9690 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9691 (exit $ac_status); }; }; then
9692
9693 cat >>confdefs.h <<\_ACEOF
9694 #define HAVE_GSS_SPNEGO /**/
9695 _ACEOF
9696
9697 { $as_echo "$as_me:$LINENO: result: yes" >&5
9698 $as_echo "yes" >&6; }
9699 else
9700 $as_echo "$as_me: program exited with status $ac_status" >&5
9701 $as_echo "$as_me: failed program was:" >&5
9702 sed 's/^/| /' conftest.$ac_ext >&5
9703
9704 ( exit $ac_status )
9705 { $as_echo "$as_me:$LINENO: result: no" >&5
9706 $as_echo "no" >&6; }
9707 fi
9708 rm -rf conftest.dSYM
9709 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9710 fi
9711
9712
9713 LIBS="$cmu_save_LIBS"
9714
9715 else
9716 { $as_echo "$as_me:$LINENO: result: disabled" >&5
9717 $as_echo "disabled" >&6; }
9718 fi
9719
9720
9721
9722
9723 if test "$gssapi" != no; then
9724 if test "$gss_impl" = "heimdal"; then
9725
9726 cat >>confdefs.h <<\_ACEOF
9727 #define KRB5_HEIMDAL /**/
9728 _ACEOF
9729
9730 fi
9731
9732 cat >>confdefs.h <<\_ACEOF
9733 #define HAVE_GSSAPI /**/
9734 _ACEOF
9735
9736 fi
9737
9738 { $as_echo "$as_me:$LINENO: checking for crypt" >&5
9739 $as_echo_n "checking for crypt... " >&6; }
9740 if test "${ac_cv_func_crypt+set}" = set; then
9741 $as_echo_n "(cached) " >&6
9742 else
9743 cat >conftest.$ac_ext <<_ACEOF
9744 /* confdefs.h. */
9745 _ACEOF
9746 cat confdefs.h >>conftest.$ac_ext
9747 cat >>conftest.$ac_ext <<_ACEOF
9748 /* end confdefs.h. */
9749 /* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
9750 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9751 #define crypt innocuous_crypt
9752
9753 /* System header to define __stub macros and hopefully few prototypes,
9754 which can conflict with char crypt (); below.
9755 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9756 <limits.h> exists even on freestanding compilers. */
9757
9758 #ifdef __STDC__
9759 # include <limits.h>
9760 #else
9761 # include <assert.h>
9762 #endif
9763
9764 #undef crypt
9765
9766 /* Override any GCC internal prototype to avoid an error.
9767 Use char because int might match the return type of a GCC
9768 builtin and then its argument prototype would still apply. */
9769 #ifdef __cplusplus
9770 extern "C"
9771 #endif
9772 char crypt ();
9773 /* The GNU C library defines this for functions which it implements
9774 to always fail with ENOSYS. Some functions are actually named
9775 something starting with __ and the normal name is an alias. */
9776 #if defined __stub_crypt || defined __stub___crypt
9777 choke me
9778 #endif
9779
9780 int
9781 main ()
9782 {
9783 return crypt ();
9784 ;
9785 return 0;
9786 }
9787 _ACEOF
9788 rm -f conftest.$ac_objext conftest$ac_exeext
9789 if { (ac_try="$ac_link"
9790 case "(($ac_try" in
9791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9792 *) ac_try_echo=$ac_try;;
9793 esac
9794 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9795 $as_echo "$ac_try_echo") >&5
9796 (eval "$ac_link") 2>conftest.er1
9797 ac_status=$?
9798 grep -v '^ *+' conftest.er1 >conftest.err
9799 rm -f conftest.er1
9800 cat conftest.err >&5
9801 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9802 (exit $ac_status); } && {
9803 test -z "$ac_c_werror_flag" ||
9804 test ! -s conftest.err
9805 } && test -s conftest$ac_exeext && {
9806 test "$cross_compiling" = yes ||
9807 $as_test_x conftest$ac_exeext
9808 }; then
9809 ac_cv_func_crypt=yes
9810 else
9811 $as_echo "$as_me: failed program was:" >&5
9812 sed 's/^/| /' conftest.$ac_ext >&5
9813
9814 ac_cv_func_crypt=no
9815 fi
9816
9817 rm -rf conftest.dSYM
9818 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9819 conftest$ac_exeext conftest.$ac_ext
9820 fi
9821 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
9822 $as_echo "$ac_cv_func_crypt" >&6; }
9823 if test "x$ac_cv_func_crypt" = x""yes; then
9824 cmu_have_crypt=yes
9825 else
9826 { $as_echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
9827 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
9828 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
9829 $as_echo_n "(cached) " >&6
9830 else
9831 ac_check_lib_save_LIBS=$LIBS
9832 LIBS="-lcrypt $LIBS"
9833 cat >conftest.$ac_ext <<_ACEOF
9834 /* confdefs.h. */
9835 _ACEOF
9836 cat confdefs.h >>conftest.$ac_ext
9837 cat >>conftest.$ac_ext <<_ACEOF
9838 /* end confdefs.h. */
9839
9840 /* Override any GCC internal prototype to avoid an error.
9841 Use char because int might match the return type of a GCC
9842 builtin and then its argument prototype would still apply. */
9843 #ifdef __cplusplus
9844 extern "C"
9845 #endif
9846 char crypt ();
9847 int
9848 main ()
9849 {
9850 return crypt ();
9851 ;
9852 return 0;
9853 }
9854 _ACEOF
9855 rm -f conftest.$ac_objext conftest$ac_exeext
9856 if { (ac_try="$ac_link"
9857 case "(($ac_try" in
9858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9859 *) ac_try_echo=$ac_try;;
9860 esac
9861 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9862 $as_echo "$ac_try_echo") >&5
9863 (eval "$ac_link") 2>conftest.er1
9864 ac_status=$?
9865 grep -v '^ *+' conftest.er1 >conftest.err
9866 rm -f conftest.er1
9867 cat conftest.err >&5
9868 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9869 (exit $ac_status); } && {
9870 test -z "$ac_c_werror_flag" ||
9871 test ! -s conftest.err
9872 } && test -s conftest$ac_exeext && {
9873 test "$cross_compiling" = yes ||
9874 $as_test_x conftest$ac_exeext
9875 }; then
9876 ac_cv_lib_crypt_crypt=yes
9877 else
9878 $as_echo "$as_me: failed program was:" >&5
9879 sed 's/^/| /' conftest.$ac_ext >&5
9880
9881 ac_cv_lib_crypt_crypt=no
9882 fi
9883
9884 rm -rf conftest.dSYM
9885 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9886 conftest$ac_exeext conftest.$ac_ext
9887 LIBS=$ac_check_lib_save_LIBS
9888 fi
9889 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
9890 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
9891 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then
9892 LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes
9893 else
9894 cmu_have_crypt=no
9895 fi
9896
9897 fi
9898
9899
9900
9901
9902 # Check whether --enable-sia was given.
9903 if test "${enable_sia+set}" = set; then
9904 enableval=$enable_sia; sia=$enableval
9905 else
9906 sia=no
9907 fi
9908
9909 LIB_SIA=""
9910 if test "$sia" != no; then
9911 if test -f /etc/sia/matrix.conf; then
9912
9913 cat >>confdefs.h <<\_ACEOF
9914 #define HAVE_SIA /**/
9915 _ACEOF
9916
9917 LIB_SIA="-lsecurity -ldb -lm -laud"
9918 else
9919 { { $as_echo "$as_me:$LINENO: error: No support for SIA found" >&5
9920 $as_echo "$as_me: error: No support for SIA found" >&2;}
9921 { (exit 1); exit 1; }; }
9922 fi
9923 fi
9924
9925
9926 # Check whether --enable-auth-sasldb was given.
9927 if test "${enable_auth_sasldb+set}" = set; then
9928 enableval=$enable_auth_sasldb; authsasldb=$enableval
9929 else
9930 authsasldb=no
9931 fi
9932
9933 if test "$authsasldb" != no; then
9934 if test ! -d "../sasldb"; then
9935 echo "ERROR: Cannot build sasldb module outside of the full SASL source tree."
9936 exit 0;
9937 fi
9938
9939 cat >>confdefs.h <<\_ACEOF
9940 #define AUTH_SASLDB /**/
9941 _ACEOF
9942
9943
9944
9945 # Check whether --with-dbpath was given.
9946 if test "${with_dbpath+set}" = set; then
9947 withval=$with_dbpath; dbpath=$withval
9948 else
9949 dbpath=/etc/sasldb2
9950 fi
9951
9952 { $as_echo "$as_me:$LINENO: checking DB path to use" >&5
9953 $as_echo_n "checking DB path to use... " >&6; }
9954 { $as_echo "$as_me:$LINENO: result: $dbpath" >&5
9955 $as_echo "$dbpath" >&6; }
9956
9957 cat >>confdefs.h <<_ACEOF
9958 #define SASL_DB_PATH "$dbpath"
9959 _ACEOF
9960
9961
9962 cmu_save_LIBS="$LIBS"
9963
9964 # Check whether --with-dblib was given.
9965 if test "${with_dblib+set}" = set; then
9966 withval=$with_dblib; dblib=$withval
9967 else
9968 dblib=auto_detect
9969 fi
9970
9971
9972
9973
9974 # Check whether --with-bdb-libdir was given.
9975 if test "${with_bdb_libdir+set}" = set; then
9976 withval=$with_bdb_libdir; with_bdb_lib=$withval
9977 else
9978 test "${with_bdb_lib+set}" = set || with_bdb_lib=none
9979 fi
9980
9981
9982 # Check whether --with-bdb-incdir was given.
9983 if test "${with_bdb_incdir+set}" = set; then
9984 withval=$with_bdb_incdir; with_bdb_inc=$withval
9985 else
9986 test "${with_bdb_inc+set}" = set || with_bdb_inc=none
9987 fi
9988
9989
9990
9991 SASL_DB_LIB=""
9992
9993 case "$dblib" in
9994 berkeley)
9995
9996
9997
9998 cmu_save_CPPFLAGS=$CPPFLAGS
9999
10000 if test -d $with_bdb_inc; then
10001 CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
10002 BDB_INCADD="-I$with_bdb_inc"
10003 else
10004 BDB_INCADD=""
10005 fi
10006
10007 if test "${ac_cv_header_db_h+set}" = set; then
10008 { $as_echo "$as_me:$LINENO: checking for db.h" >&5
10009 $as_echo_n "checking for db.h... " >&6; }
10010 if test "${ac_cv_header_db_h+set}" = set; then
10011 $as_echo_n "(cached) " >&6
10012 fi
10013 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
10014 $as_echo "$ac_cv_header_db_h" >&6; }
10015 else
10016 # Is the header compilable?
10017 { $as_echo "$as_me:$LINENO: checking db.h usability" >&5
10018 $as_echo_n "checking db.h usability... " >&6; }
10019 cat >conftest.$ac_ext <<_ACEOF
10020 /* confdefs.h. */
10021 _ACEOF
10022 cat confdefs.h >>conftest.$ac_ext
10023 cat >>conftest.$ac_ext <<_ACEOF
10024 /* end confdefs.h. */
10025 $ac_includes_default
10026 #include <db.h>
10027 _ACEOF
10028 rm -f conftest.$ac_objext
10029 if { (ac_try="$ac_compile"
10030 case "(($ac_try" in
10031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10032 *) ac_try_echo=$ac_try;;
10033 esac
10034 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10035 $as_echo "$ac_try_echo") >&5
10036 (eval "$ac_compile") 2>conftest.er1
10037 ac_status=$?
10038 grep -v '^ *+' conftest.er1 >conftest.err
10039 rm -f conftest.er1
10040 cat conftest.err >&5
10041 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10042 (exit $ac_status); } && {
10043 test -z "$ac_c_werror_flag" ||
10044 test ! -s conftest.err
10045 } && test -s conftest.$ac_objext; then
10046 ac_header_compiler=yes
10047 else
10048 $as_echo "$as_me: failed program was:" >&5
10049 sed 's/^/| /' conftest.$ac_ext >&5
10050
10051 ac_header_compiler=no
10052 fi
10053
10054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10055 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10056 $as_echo "$ac_header_compiler" >&6; }
10057
10058 # Is the header present?
10059 { $as_echo "$as_me:$LINENO: checking db.h presence" >&5
10060 $as_echo_n "checking db.h presence... " >&6; }
10061 cat >conftest.$ac_ext <<_ACEOF
10062 /* confdefs.h. */
10063 _ACEOF
10064 cat confdefs.h >>conftest.$ac_ext
10065 cat >>conftest.$ac_ext <<_ACEOF
10066 /* end confdefs.h. */
10067 #include <db.h>
10068 _ACEOF
10069 if { (ac_try="$ac_cpp conftest.$ac_ext"
10070 case "(($ac_try" in
10071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10072 *) ac_try_echo=$ac_try;;
10073 esac
10074 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10075 $as_echo "$ac_try_echo") >&5
10076 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10077 ac_status=$?
10078 grep -v '^ *+' conftest.er1 >conftest.err
10079 rm -f conftest.er1
10080 cat conftest.err >&5
10081 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10082 (exit $ac_status); } >/dev/null && {
10083 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10084 test ! -s conftest.err
10085 }; then
10086 ac_header_preproc=yes
10087 else
10088 $as_echo "$as_me: failed program was:" >&5
10089 sed 's/^/| /' conftest.$ac_ext >&5
10090
10091 ac_header_preproc=no
10092 fi
10093
10094 rm -f conftest.err conftest.$ac_ext
10095 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10096 $as_echo "$ac_header_preproc" >&6; }
10097
10098 # So? What about this header?
10099 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10100 yes:no: )
10101 { $as_echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5
10102 $as_echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10103 { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5
10104 $as_echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;}
10105 ac_header_preproc=yes
10106 ;;
10107 no:yes:* )
10108 { $as_echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5
10109 $as_echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;}
10110 { $as_echo "$as_me:$LINENO: WARNING: db.h: check for missing prerequisite headers?" >&5
10111 $as_echo "$as_me: WARNING: db.h: check for missing prerequisite headers?" >&2;}
10112 { $as_echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5
10113 $as_echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;}
10114 { $as_echo "$as_me:$LINENO: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&5
10115 $as_echo "$as_me: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&2;}
10116 { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5
10117 $as_echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;}
10118 { $as_echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5
10119 $as_echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;}
10120
10121 ;;
10122 esac
10123 { $as_echo "$as_me:$LINENO: checking for db.h" >&5
10124 $as_echo_n "checking for db.h... " >&6; }
10125 if test "${ac_cv_header_db_h+set}" = set; then
10126 $as_echo_n "(cached) " >&6
10127 else
10128 ac_cv_header_db_h=$ac_header_preproc
10129 fi
10130 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
10131 $as_echo "$ac_cv_header_db_h" >&6; }
10132
10133 fi
10134 if test "x$ac_cv_header_db_h" = x""yes; then
10135
10136 BDB_SAVE_LDFLAGS=$LDFLAGS
10137
10138 if test -d $with_bdb_lib; then
10139
10140 # this is CMU ADD LIBPATH TO
10141 if test "$andrew_cv_runpath_switch" = "none" ; then
10142 LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
10143 else
10144 LDFLAGS="-L$with_bdb_lib ${LDFLAGS} $andrew_cv_runpath_switch$with_bdb_lib"
10145 fi
10146
10147
10148 # this is CMU ADD LIBPATH TO
10149 if test "$andrew_cv_runpath_switch" = "none" ; then
10150 BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD}"
10151 else
10152 BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD} $andrew_cv_runpath_switch$with_bdb_lib"
10153 fi
10154
10155 else
10156 BDB_LIBADD=""
10157 fi
10158
10159 saved_LIBS=$LIBS
10160 for dbname in ${with_bdb} \
10161 db-5.2 db5.2 db52 \
10162 db-5.1 db5.2 db51 \
10163 db-5.0 db5.2 db50 \
10164 db-4.8 db4.8 db48 \
10165 db-4.7 db4.7 db47 \
10166 db-4.6 db4.6 db46 \
10167 db-4.5 db4.5 db45 \
10168 db-4.4 db4.4 db44 \
10169 db-4.3 db4.3 db43 \
10170 db-4.2 db4.2 db42 \
10171 db-4.1 db4.1 db41 \
10172 db-4.0 db4.0 db40 db-4 db4 \
10173 db-3.3 db3.3 db33 \
10174 db-3.2 db3.2 db32 \
10175 db-3.1 db3.1 db31 \
10176 db-3.0 db3.0 db30 db-3 db3 \
10177 db
10178 do
10179 LIBS="$saved_LIBS -l$dbname"
10180 cat >conftest.$ac_ext <<_ACEOF
10181 /* confdefs.h. */
10182 _ACEOF
10183 cat confdefs.h >>conftest.$ac_ext
10184 cat >>conftest.$ac_ext <<_ACEOF
10185 /* end confdefs.h. */
10186 #include <stdio.h>
10187 #include <db.h>
10188 int
10189 main ()
10190 {
10191 db_create(NULL, NULL, 0);
10192 ;
10193 return 0;
10194 }
10195 _ACEOF
10196 rm -f conftest.$ac_objext conftest$ac_exeext
10197 if { (ac_try="$ac_link"
10198 case "(($ac_try" in
10199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10200 *) ac_try_echo=$ac_try;;
10201 esac
10202 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10203 $as_echo "$ac_try_echo") >&5
10204 (eval "$ac_link") 2>conftest.er1
10205 ac_status=$?
10206 grep -v '^ *+' conftest.er1 >conftest.err
10207 rm -f conftest.er1
10208 cat conftest.err >&5
10209 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10210 (exit $ac_status); } && {
10211 test -z "$ac_c_werror_flag" ||
10212 test ! -s conftest.err
10213 } && test -s conftest$ac_exeext && {
10214 test "$cross_compiling" = yes ||
10215 $as_test_x conftest$ac_exeext
10216 }; then
10217 BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db
10218 else
10219 $as_echo "$as_me: failed program was:" >&5
10220 sed 's/^/| /' conftest.$ac_ext >&5
10221
10222 dblib="no"
10223 fi
10224
10225 rm -rf conftest.dSYM
10226 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10227 conftest$ac_exeext conftest.$ac_ext
10228 if test "$dblib" = "berkeley"; then break; fi
10229 done
10230 if test "$dblib" = "no"; then
10231 LIBS="$saved_LIBS -ldb"
10232 cat >conftest.$ac_ext <<_ACEOF
10233 /* confdefs.h. */
10234 _ACEOF
10235 cat confdefs.h >>conftest.$ac_ext
10236 cat >>conftest.$ac_ext <<_ACEOF
10237 /* end confdefs.h. */
10238 #include <stdio.h>
10239 #include <db.h>
10240 int
10241 main ()
10242 {
10243 db_open(NULL, 0, 0, 0, NULL, NULL, NULL);
10244 ;
10245 return 0;
10246 }
10247 _ACEOF
10248 rm -f conftest.$ac_objext conftest$ac_exeext
10249 if { (ac_try="$ac_link"
10250 case "(($ac_try" in
10251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10252 *) ac_try_echo=$ac_try;;
10253 esac
10254 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10255 $as_echo "$ac_try_echo") >&5
10256 (eval "$ac_link") 2>conftest.er1
10257 ac_status=$?
10258 grep -v '^ *+' conftest.er1 >conftest.err
10259 rm -f conftest.er1
10260 cat conftest.err >&5
10261 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10262 (exit $ac_status); } && {
10263 test -z "$ac_c_werror_flag" ||
10264 test ! -s conftest.err
10265 } && test -s conftest$ac_exeext && {
10266 test "$cross_compiling" = yes ||
10267 $as_test_x conftest$ac_exeext
10268 }; then
10269 BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
10270 else
10271 $as_echo "$as_me: failed program was:" >&5
10272 sed 's/^/| /' conftest.$ac_ext >&5
10273
10274 dblib="no"
10275 fi
10276
10277 rm -rf conftest.dSYM
10278 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10279 conftest$ac_exeext conftest.$ac_ext
10280 fi
10281 LIBS=$saved_LIBS
10282
10283 LDFLAGS=$BDB_SAVE_LDFLAGS
10284
10285 else
10286 dblib="no"
10287 fi
10288
10289
10290
10291 CPPFLAGS=$cmu_save_CPPFLAGS
10292
10293 CPPFLAGS="${CPPFLAGS} ${BDB_INCADD}"
10294 SASL_DB_INC=$BDB_INCADD
10295 SASL_DB_LIB="${BDB_LIBADD}"
10296 ;;
10297 gdbm)
10298
10299 # Check whether --with-gdbm was given.
10300 if test "${with_gdbm+set}" = set; then
10301 withval=$with_gdbm; with_gdbm="${withval}"
10302 fi
10303
10304
10305 case "$with_gdbm" in
10306 ""|yes)
10307 if test "${ac_cv_header_gdbm_h+set}" = set; then
10308 { $as_echo "$as_me:$LINENO: checking for gdbm.h" >&5
10309 $as_echo_n "checking for gdbm.h... " >&6; }
10310 if test "${ac_cv_header_gdbm_h+set}" = set; then
10311 $as_echo_n "(cached) " >&6
10312 fi
10313 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
10314 $as_echo "$ac_cv_header_gdbm_h" >&6; }
10315 else
10316 # Is the header compilable?
10317 { $as_echo "$as_me:$LINENO: checking gdbm.h usability" >&5
10318 $as_echo_n "checking gdbm.h usability... " >&6; }
10319 cat >conftest.$ac_ext <<_ACEOF
10320 /* confdefs.h. */
10321 _ACEOF
10322 cat confdefs.h >>conftest.$ac_ext
10323 cat >>conftest.$ac_ext <<_ACEOF
10324 /* end confdefs.h. */
10325 $ac_includes_default
10326 #include <gdbm.h>
10327 _ACEOF
10328 rm -f conftest.$ac_objext
10329 if { (ac_try="$ac_compile"
10330 case "(($ac_try" in
10331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10332 *) ac_try_echo=$ac_try;;
10333 esac
10334 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10335 $as_echo "$ac_try_echo") >&5
10336 (eval "$ac_compile") 2>conftest.er1
10337 ac_status=$?
10338 grep -v '^ *+' conftest.er1 >conftest.err
10339 rm -f conftest.er1
10340 cat conftest.err >&5
10341 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10342 (exit $ac_status); } && {
10343 test -z "$ac_c_werror_flag" ||
10344 test ! -s conftest.err
10345 } && test -s conftest.$ac_objext; then
10346 ac_header_compiler=yes
10347 else
10348 $as_echo "$as_me: failed program was:" >&5
10349 sed 's/^/| /' conftest.$ac_ext >&5
10350
10351 ac_header_compiler=no
10352 fi
10353
10354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10355 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10356 $as_echo "$ac_header_compiler" >&6; }
10357
10358 # Is the header present?
10359 { $as_echo "$as_me:$LINENO: checking gdbm.h presence" >&5
10360 $as_echo_n "checking gdbm.h presence... " >&6; }
10361 cat >conftest.$ac_ext <<_ACEOF
10362 /* confdefs.h. */
10363 _ACEOF
10364 cat confdefs.h >>conftest.$ac_ext
10365 cat >>conftest.$ac_ext <<_ACEOF
10366 /* end confdefs.h. */
10367 #include <gdbm.h>
10368 _ACEOF
10369 if { (ac_try="$ac_cpp conftest.$ac_ext"
10370 case "(($ac_try" in
10371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10372 *) ac_try_echo=$ac_try;;
10373 esac
10374 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10375 $as_echo "$ac_try_echo") >&5
10376 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10377 ac_status=$?
10378 grep -v '^ *+' conftest.er1 >conftest.err
10379 rm -f conftest.er1
10380 cat conftest.err >&5
10381 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10382 (exit $ac_status); } >/dev/null && {
10383 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10384 test ! -s conftest.err
10385 }; then
10386 ac_header_preproc=yes
10387 else
10388 $as_echo "$as_me: failed program was:" >&5
10389 sed 's/^/| /' conftest.$ac_ext >&5
10390
10391 ac_header_preproc=no
10392 fi
10393
10394 rm -f conftest.err conftest.$ac_ext
10395 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10396 $as_echo "$ac_header_preproc" >&6; }
10397
10398 # So? What about this header?
10399 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10400 yes:no: )
10401 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
10402 $as_echo "$as_me: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10403 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the compiler's result" >&5
10404 $as_echo "$as_me: WARNING: gdbm.h: proceeding with the compiler's result" >&2;}
10405 ac_header_preproc=yes
10406 ;;
10407 no:yes:* )
10408 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: present but cannot be compiled" >&5
10409 $as_echo "$as_me: WARNING: gdbm.h: present but cannot be compiled" >&2;}
10410 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: check for missing prerequisite headers?" >&5
10411 $as_echo "$as_me: WARNING: gdbm.h: check for missing prerequisite headers?" >&2;}
10412 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: see the Autoconf documentation" >&5
10413 $as_echo "$as_me: WARNING: gdbm.h: see the Autoconf documentation" >&2;}
10414 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: section \"Present But Cannot Be Compiled\"" >&5
10415 $as_echo "$as_me: WARNING: gdbm.h: section \"Present But Cannot Be Compiled\"" >&2;}
10416 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the preprocessor's result" >&5
10417 $as_echo "$as_me: WARNING: gdbm.h: proceeding with the preprocessor's result" >&2;}
10418 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: in the future, the compiler will take precedence" >&5
10419 $as_echo "$as_me: WARNING: gdbm.h: in the future, the compiler will take precedence" >&2;}
10420
10421 ;;
10422 esac
10423 { $as_echo "$as_me:$LINENO: checking for gdbm.h" >&5
10424 $as_echo_n "checking for gdbm.h... " >&6; }
10425 if test "${ac_cv_header_gdbm_h+set}" = set; then
10426 $as_echo_n "(cached) " >&6
10427 else
10428 ac_cv_header_gdbm_h=$ac_header_preproc
10429 fi
10430 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
10431 $as_echo "$ac_cv_header_gdbm_h" >&6; }
10432
10433 fi
10434 if test "x$ac_cv_header_gdbm_h" = x""yes; then
10435
10436 { $as_echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
10437 $as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
10438 if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
10439 $as_echo_n "(cached) " >&6
10440 else
10441 ac_check_lib_save_LIBS=$LIBS
10442 LIBS="-lgdbm $LIBS"
10443 cat >conftest.$ac_ext <<_ACEOF
10444 /* confdefs.h. */
10445 _ACEOF
10446 cat confdefs.h >>conftest.$ac_ext
10447 cat >>conftest.$ac_ext <<_ACEOF
10448 /* end confdefs.h. */
10449
10450 /* Override any GCC internal prototype to avoid an error.
10451 Use char because int might match the return type of a GCC
10452 builtin and then its argument prototype would still apply. */
10453 #ifdef __cplusplus
10454 extern "C"
10455 #endif
10456 char gdbm_open ();
10457 int
10458 main ()
10459 {
10460 return gdbm_open ();
10461 ;
10462 return 0;
10463 }
10464 _ACEOF
10465 rm -f conftest.$ac_objext conftest$ac_exeext
10466 if { (ac_try="$ac_link"
10467 case "(($ac_try" in
10468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10469 *) ac_try_echo=$ac_try;;
10470 esac
10471 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10472 $as_echo "$ac_try_echo") >&5
10473 (eval "$ac_link") 2>conftest.er1
10474 ac_status=$?
10475 grep -v '^ *+' conftest.er1 >conftest.err
10476 rm -f conftest.er1
10477 cat conftest.err >&5
10478 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10479 (exit $ac_status); } && {
10480 test -z "$ac_c_werror_flag" ||
10481 test ! -s conftest.err
10482 } && test -s conftest$ac_exeext && {
10483 test "$cross_compiling" = yes ||
10484 $as_test_x conftest$ac_exeext
10485 }; then
10486 ac_cv_lib_gdbm_gdbm_open=yes
10487 else
10488 $as_echo "$as_me: failed program was:" >&5
10489 sed 's/^/| /' conftest.$ac_ext >&5
10490
10491 ac_cv_lib_gdbm_gdbm_open=no
10492 fi
10493
10494 rm -rf conftest.dSYM
10495 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10496 conftest$ac_exeext conftest.$ac_ext
10497 LIBS=$ac_check_lib_save_LIBS
10498 fi
10499 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
10500 $as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
10501 if test "x$ac_cv_lib_gdbm_gdbm_open" = x""yes; then
10502 SASL_DB_LIB="-lgdbm"
10503 else
10504 dblib="no"
10505 fi
10506
10507 else
10508 dblib="no"
10509 fi
10510
10511
10512 ;;
10513 *)
10514 if test -d $with_gdbm; then
10515 CPPFLAGS="${CPPFLAGS} -I${with_gdbm}/include"
10516 LDFLAGS="${LDFLAGS} -L${with_gdbm}/lib"
10517 SASL_DB_LIB="-lgdbm"
10518 else
10519 with_gdbm="no"
10520 fi
10521 esac
10522 ;;
10523 ndbm)
10524 if test "${ac_cv_header_ndbm_h+set}" = set; then
10525 { $as_echo "$as_me:$LINENO: checking for ndbm.h" >&5
10526 $as_echo_n "checking for ndbm.h... " >&6; }
10527 if test "${ac_cv_header_ndbm_h+set}" = set; then
10528 $as_echo_n "(cached) " >&6
10529 fi
10530 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
10531 $as_echo "$ac_cv_header_ndbm_h" >&6; }
10532 else
10533 # Is the header compilable?
10534 { $as_echo "$as_me:$LINENO: checking ndbm.h usability" >&5
10535 $as_echo_n "checking ndbm.h usability... " >&6; }
10536 cat >conftest.$ac_ext <<_ACEOF
10537 /* confdefs.h. */
10538 _ACEOF
10539 cat confdefs.h >>conftest.$ac_ext
10540 cat >>conftest.$ac_ext <<_ACEOF
10541 /* end confdefs.h. */
10542 $ac_includes_default
10543 #include <ndbm.h>
10544 _ACEOF
10545 rm -f conftest.$ac_objext
10546 if { (ac_try="$ac_compile"
10547 case "(($ac_try" in
10548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10549 *) ac_try_echo=$ac_try;;
10550 esac
10551 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10552 $as_echo "$ac_try_echo") >&5
10553 (eval "$ac_compile") 2>conftest.er1
10554 ac_status=$?
10555 grep -v '^ *+' conftest.er1 >conftest.err
10556 rm -f conftest.er1
10557 cat conftest.err >&5
10558 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10559 (exit $ac_status); } && {
10560 test -z "$ac_c_werror_flag" ||
10561 test ! -s conftest.err
10562 } && test -s conftest.$ac_objext; then
10563 ac_header_compiler=yes
10564 else
10565 $as_echo "$as_me: failed program was:" >&5
10566 sed 's/^/| /' conftest.$ac_ext >&5
10567
10568 ac_header_compiler=no
10569 fi
10570
10571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10572 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10573 $as_echo "$ac_header_compiler" >&6; }
10574
10575 # Is the header present?
10576 { $as_echo "$as_me:$LINENO: checking ndbm.h presence" >&5
10577 $as_echo_n "checking ndbm.h presence... " >&6; }
10578 cat >conftest.$ac_ext <<_ACEOF
10579 /* confdefs.h. */
10580 _ACEOF
10581 cat confdefs.h >>conftest.$ac_ext
10582 cat >>conftest.$ac_ext <<_ACEOF
10583 /* end confdefs.h. */
10584 #include <ndbm.h>
10585 _ACEOF
10586 if { (ac_try="$ac_cpp conftest.$ac_ext"
10587 case "(($ac_try" in
10588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10589 *) ac_try_echo=$ac_try;;
10590 esac
10591 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10592 $as_echo "$ac_try_echo") >&5
10593 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10594 ac_status=$?
10595 grep -v '^ *+' conftest.er1 >conftest.err
10596 rm -f conftest.er1
10597 cat conftest.err >&5
10598 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10599 (exit $ac_status); } >/dev/null && {
10600 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10601 test ! -s conftest.err
10602 }; then
10603 ac_header_preproc=yes
10604 else
10605 $as_echo "$as_me: failed program was:" >&5
10606 sed 's/^/| /' conftest.$ac_ext >&5
10607
10608 ac_header_preproc=no
10609 fi
10610
10611 rm -f conftest.err conftest.$ac_ext
10612 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10613 $as_echo "$ac_header_preproc" >&6; }
10614
10615 # So? What about this header?
10616 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10617 yes:no: )
10618 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
10619 $as_echo "$as_me: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10620 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the compiler's result" >&5
10621 $as_echo "$as_me: WARNING: ndbm.h: proceeding with the compiler's result" >&2;}
10622 ac_header_preproc=yes
10623 ;;
10624 no:yes:* )
10625 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: present but cannot be compiled" >&5
10626 $as_echo "$as_me: WARNING: ndbm.h: present but cannot be compiled" >&2;}
10627 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: check for missing prerequisite headers?" >&5
10628 $as_echo "$as_me: WARNING: ndbm.h: check for missing prerequisite headers?" >&2;}
10629 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: see the Autoconf documentation" >&5
10630 $as_echo "$as_me: WARNING: ndbm.h: see the Autoconf documentation" >&2;}
10631 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: section \"Present But Cannot Be Compiled\"" >&5
10632 $as_echo "$as_me: WARNING: ndbm.h: section \"Present But Cannot Be Compiled\"" >&2;}
10633 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the preprocessor's result" >&5
10634 $as_echo "$as_me: WARNING: ndbm.h: proceeding with the preprocessor's result" >&2;}
10635 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: in the future, the compiler will take precedence" >&5
10636 $as_echo "$as_me: WARNING: ndbm.h: in the future, the compiler will take precedence" >&2;}
10637
10638 ;;
10639 esac
10640 { $as_echo "$as_me:$LINENO: checking for ndbm.h" >&5
10641 $as_echo_n "checking for ndbm.h... " >&6; }
10642 if test "${ac_cv_header_ndbm_h+set}" = set; then
10643 $as_echo_n "(cached) " >&6
10644 else
10645 ac_cv_header_ndbm_h=$ac_header_preproc
10646 fi
10647 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
10648 $as_echo "$ac_cv_header_ndbm_h" >&6; }
10649
10650 fi
10651 if test "x$ac_cv_header_ndbm_h" = x""yes; then
10652
10653 { $as_echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5
10654 $as_echo_n "checking for dbm_open in -lndbm... " >&6; }
10655 if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then
10656 $as_echo_n "(cached) " >&6
10657 else
10658 ac_check_lib_save_LIBS=$LIBS
10659 LIBS="-lndbm $LIBS"
10660 cat >conftest.$ac_ext <<_ACEOF
10661 /* confdefs.h. */
10662 _ACEOF
10663 cat confdefs.h >>conftest.$ac_ext
10664 cat >>conftest.$ac_ext <<_ACEOF
10665 /* end confdefs.h. */
10666
10667 /* Override any GCC internal prototype to avoid an error.
10668 Use char because int might match the return type of a GCC
10669 builtin and then its argument prototype would still apply. */
10670 #ifdef __cplusplus
10671 extern "C"
10672 #endif
10673 char dbm_open ();
10674 int
10675 main ()
10676 {
10677 return dbm_open ();
10678 ;
10679 return 0;
10680 }
10681 _ACEOF
10682 rm -f conftest.$ac_objext conftest$ac_exeext
10683 if { (ac_try="$ac_link"
10684 case "(($ac_try" in
10685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10686 *) ac_try_echo=$ac_try;;
10687 esac
10688 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10689 $as_echo "$ac_try_echo") >&5
10690 (eval "$ac_link") 2>conftest.er1
10691 ac_status=$?
10692 grep -v '^ *+' conftest.er1 >conftest.err
10693 rm -f conftest.er1
10694 cat conftest.err >&5
10695 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10696 (exit $ac_status); } && {
10697 test -z "$ac_c_werror_flag" ||
10698 test ! -s conftest.err
10699 } && test -s conftest$ac_exeext && {
10700 test "$cross_compiling" = yes ||
10701 $as_test_x conftest$ac_exeext
10702 }; then
10703 ac_cv_lib_ndbm_dbm_open=yes
10704 else
10705 $as_echo "$as_me: failed program was:" >&5
10706 sed 's/^/| /' conftest.$ac_ext >&5
10707
10708 ac_cv_lib_ndbm_dbm_open=no
10709 fi
10710
10711 rm -rf conftest.dSYM
10712 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10713 conftest$ac_exeext conftest.$ac_ext
10714 LIBS=$ac_check_lib_save_LIBS
10715 fi
10716 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_dbm_open" >&5
10717 $as_echo "$ac_cv_lib_ndbm_dbm_open" >&6; }
10718 if test "x$ac_cv_lib_ndbm_dbm_open" = x""yes; then
10719 SASL_DB_LIB="-lndbm"
10720 else
10721
10722 { $as_echo "$as_me:$LINENO: checking for dbm_open" >&5
10723 $as_echo_n "checking for dbm_open... " >&6; }
10724 if test "${ac_cv_func_dbm_open+set}" = set; then
10725 $as_echo_n "(cached) " >&6
10726 else
10727 cat >conftest.$ac_ext <<_ACEOF
10728 /* confdefs.h. */
10729 _ACEOF
10730 cat confdefs.h >>conftest.$ac_ext
10731 cat >>conftest.$ac_ext <<_ACEOF
10732 /* end confdefs.h. */
10733 /* Define dbm_open to an innocuous variant, in case <limits.h> declares dbm_open.
10734 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10735 #define dbm_open innocuous_dbm_open
10736
10737 /* System header to define __stub macros and hopefully few prototypes,
10738 which can conflict with char dbm_open (); below.
10739 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10740 <limits.h> exists even on freestanding compilers. */
10741
10742 #ifdef __STDC__
10743 # include <limits.h>
10744 #else
10745 # include <assert.h>
10746 #endif
10747
10748 #undef dbm_open
10749
10750 /* Override any GCC internal prototype to avoid an error.
10751 Use char because int might match the return type of a GCC
10752 builtin and then its argument prototype would still apply. */
10753 #ifdef __cplusplus
10754 extern "C"
10755 #endif
10756 char dbm_open ();
10757 /* The GNU C library defines this for functions which it implements
10758 to always fail with ENOSYS. Some functions are actually named
10759 something starting with __ and the normal name is an alias. */
10760 #if defined __stub_dbm_open || defined __stub___dbm_open
10761 choke me
10762 #endif
10763
10764 int
10765 main ()
10766 {
10767 return dbm_open ();
10768 ;
10769 return 0;
10770 }
10771 _ACEOF
10772 rm -f conftest.$ac_objext conftest$ac_exeext
10773 if { (ac_try="$ac_link"
10774 case "(($ac_try" in
10775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10776 *) ac_try_echo=$ac_try;;
10777 esac
10778 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10779 $as_echo "$ac_try_echo") >&5
10780 (eval "$ac_link") 2>conftest.er1
10781 ac_status=$?
10782 grep -v '^ *+' conftest.er1 >conftest.err
10783 rm -f conftest.er1
10784 cat conftest.err >&5
10785 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10786 (exit $ac_status); } && {
10787 test -z "$ac_c_werror_flag" ||
10788 test ! -s conftest.err
10789 } && test -s conftest$ac_exeext && {
10790 test "$cross_compiling" = yes ||
10791 $as_test_x conftest$ac_exeext
10792 }; then
10793 ac_cv_func_dbm_open=yes
10794 else
10795 $as_echo "$as_me: failed program was:" >&5
10796 sed 's/^/| /' conftest.$ac_ext >&5
10797
10798 ac_cv_func_dbm_open=no
10799 fi
10800
10801 rm -rf conftest.dSYM
10802 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10803 conftest$ac_exeext conftest.$ac_ext
10804 fi
10805 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_dbm_open" >&5
10806 $as_echo "$ac_cv_func_dbm_open" >&6; }
10807 if test "x$ac_cv_func_dbm_open" = x""yes; then
10808 :
10809 else
10810 dblib="no"
10811 fi
10812
10813 fi
10814
10815 else
10816 dblib="no"
10817 fi
10818
10819
10820 ;;
10821 auto_detect)
10822
10823
10824
10825 cmu_save_CPPFLAGS=$CPPFLAGS
10826
10827 if test -d $with_bdb_inc; then
10828 CPPFLAGS="$CPPFLAGS -I$with_bdb_inc"
10829 BDB_INCADD="-I$with_bdb_inc"
10830 else
10831 BDB_INCADD=""
10832 fi
10833
10834 if test "${ac_cv_header_db_h+set}" = set; then
10835 { $as_echo "$as_me:$LINENO: checking for db.h" >&5
10836 $as_echo_n "checking for db.h... " >&6; }
10837 if test "${ac_cv_header_db_h+set}" = set; then
10838 $as_echo_n "(cached) " >&6
10839 fi
10840 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
10841 $as_echo "$ac_cv_header_db_h" >&6; }
10842 else
10843 # Is the header compilable?
10844 { $as_echo "$as_me:$LINENO: checking db.h usability" >&5
10845 $as_echo_n "checking db.h usability... " >&6; }
10846 cat >conftest.$ac_ext <<_ACEOF
10847 /* confdefs.h. */
10848 _ACEOF
10849 cat confdefs.h >>conftest.$ac_ext
10850 cat >>conftest.$ac_ext <<_ACEOF
10851 /* end confdefs.h. */
10852 $ac_includes_default
10853 #include <db.h>
10854 _ACEOF
10855 rm -f conftest.$ac_objext
10856 if { (ac_try="$ac_compile"
10857 case "(($ac_try" in
10858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10859 *) ac_try_echo=$ac_try;;
10860 esac
10861 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10862 $as_echo "$ac_try_echo") >&5
10863 (eval "$ac_compile") 2>conftest.er1
10864 ac_status=$?
10865 grep -v '^ *+' conftest.er1 >conftest.err
10866 rm -f conftest.er1
10867 cat conftest.err >&5
10868 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10869 (exit $ac_status); } && {
10870 test -z "$ac_c_werror_flag" ||
10871 test ! -s conftest.err
10872 } && test -s conftest.$ac_objext; then
10873 ac_header_compiler=yes
10874 else
10875 $as_echo "$as_me: failed program was:" >&5
10876 sed 's/^/| /' conftest.$ac_ext >&5
10877
10878 ac_header_compiler=no
10879 fi
10880
10881 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10882 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10883 $as_echo "$ac_header_compiler" >&6; }
10884
10885 # Is the header present?
10886 { $as_echo "$as_me:$LINENO: checking db.h presence" >&5
10887 $as_echo_n "checking db.h presence... " >&6; }
10888 cat >conftest.$ac_ext <<_ACEOF
10889 /* confdefs.h. */
10890 _ACEOF
10891 cat confdefs.h >>conftest.$ac_ext
10892 cat >>conftest.$ac_ext <<_ACEOF
10893 /* end confdefs.h. */
10894 #include <db.h>
10895 _ACEOF
10896 if { (ac_try="$ac_cpp conftest.$ac_ext"
10897 case "(($ac_try" in
10898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10899 *) ac_try_echo=$ac_try;;
10900 esac
10901 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10902 $as_echo "$ac_try_echo") >&5
10903 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10904 ac_status=$?
10905 grep -v '^ *+' conftest.er1 >conftest.err
10906 rm -f conftest.er1
10907 cat conftest.err >&5
10908 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10909 (exit $ac_status); } >/dev/null && {
10910 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10911 test ! -s conftest.err
10912 }; then
10913 ac_header_preproc=yes
10914 else
10915 $as_echo "$as_me: failed program was:" >&5
10916 sed 's/^/| /' conftest.$ac_ext >&5
10917
10918 ac_header_preproc=no
10919 fi
10920
10921 rm -f conftest.err conftest.$ac_ext
10922 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10923 $as_echo "$ac_header_preproc" >&6; }
10924
10925 # So? What about this header?
10926 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10927 yes:no: )
10928 { $as_echo "$as_me:$LINENO: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&5
10929 $as_echo "$as_me: WARNING: db.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10930 { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the compiler's result" >&5
10931 $as_echo "$as_me: WARNING: db.h: proceeding with the compiler's result" >&2;}
10932 ac_header_preproc=yes
10933 ;;
10934 no:yes:* )
10935 { $as_echo "$as_me:$LINENO: WARNING: db.h: present but cannot be compiled" >&5
10936 $as_echo "$as_me: WARNING: db.h: present but cannot be compiled" >&2;}
10937 { $as_echo "$as_me:$LINENO: WARNING: db.h: check for missing prerequisite headers?" >&5
10938 $as_echo "$as_me: WARNING: db.h: check for missing prerequisite headers?" >&2;}
10939 { $as_echo "$as_me:$LINENO: WARNING: db.h: see the Autoconf documentation" >&5
10940 $as_echo "$as_me: WARNING: db.h: see the Autoconf documentation" >&2;}
10941 { $as_echo "$as_me:$LINENO: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&5
10942 $as_echo "$as_me: WARNING: db.h: section \"Present But Cannot Be Compiled\"" >&2;}
10943 { $as_echo "$as_me:$LINENO: WARNING: db.h: proceeding with the preprocessor's result" >&5
10944 $as_echo "$as_me: WARNING: db.h: proceeding with the preprocessor's result" >&2;}
10945 { $as_echo "$as_me:$LINENO: WARNING: db.h: in the future, the compiler will take precedence" >&5
10946 $as_echo "$as_me: WARNING: db.h: in the future, the compiler will take precedence" >&2;}
10947
10948 ;;
10949 esac
10950 { $as_echo "$as_me:$LINENO: checking for db.h" >&5
10951 $as_echo_n "checking for db.h... " >&6; }
10952 if test "${ac_cv_header_db_h+set}" = set; then
10953 $as_echo_n "(cached) " >&6
10954 else
10955 ac_cv_header_db_h=$ac_header_preproc
10956 fi
10957 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_db_h" >&5
10958 $as_echo "$ac_cv_header_db_h" >&6; }
10959
10960 fi
10961 if test "x$ac_cv_header_db_h" = x""yes; then
10962
10963 BDB_SAVE_LDFLAGS=$LDFLAGS
10964
10965 if test -d $with_bdb_lib; then
10966
10967 # this is CMU ADD LIBPATH TO
10968 if test "$andrew_cv_runpath_switch" = "none" ; then
10969 LDFLAGS="-L$with_bdb_lib ${LDFLAGS}"
10970 else
10971 LDFLAGS="-L$with_bdb_lib ${LDFLAGS} $andrew_cv_runpath_switch$with_bdb_lib"
10972 fi
10973
10974
10975 # this is CMU ADD LIBPATH TO
10976 if test "$andrew_cv_runpath_switch" = "none" ; then
10977 BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD}"
10978 else
10979 BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD} $andrew_cv_runpath_switch$with_bdb_lib"
10980 fi
10981
10982 else
10983 BDB_LIBADD=""
10984 fi
10985
10986 saved_LIBS=$LIBS
10987 for dbname in ${with_bdb} \
10988 db-5.2 db5.2 db52 \
10989 db-5.1 db5.2 db51 \
10990 db-5.0 db5.2 db50 \
10991 db-4.8 db4.8 db48 \
10992 db-4.7 db4.7 db47 \
10993 db-4.6 db4.6 db46 \
10994 db-4.5 db4.5 db45 \
10995 db-4.4 db4.4 db44 \
10996 db-4.3 db4.3 db43 \
10997 db-4.2 db4.2 db42 \
10998 db-4.1 db4.1 db41 \
10999 db-4.0 db4.0 db40 db-4 db4 \
11000 db-3.3 db3.3 db33 \
11001 db-3.2 db3.2 db32 \
11002 db-3.1 db3.1 db31 \
11003 db-3.0 db3.0 db30 db-3 db3 \
11004 db
11005 do
11006 LIBS="$saved_LIBS -l$dbname"
11007 cat >conftest.$ac_ext <<_ACEOF
11008 /* confdefs.h. */
11009 _ACEOF
11010 cat confdefs.h >>conftest.$ac_ext
11011 cat >>conftest.$ac_ext <<_ACEOF
11012 /* end confdefs.h. */
11013 #include <stdio.h>
11014 #include <db.h>
11015 int
11016 main ()
11017 {
11018 db_create(NULL, NULL, 0);
11019 ;
11020 return 0;
11021 }
11022 _ACEOF
11023 rm -f conftest.$ac_objext conftest$ac_exeext
11024 if { (ac_try="$ac_link"
11025 case "(($ac_try" in
11026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11027 *) ac_try_echo=$ac_try;;
11028 esac
11029 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11030 $as_echo "$ac_try_echo") >&5
11031 (eval "$ac_link") 2>conftest.er1
11032 ac_status=$?
11033 grep -v '^ *+' conftest.er1 >conftest.err
11034 rm -f conftest.er1
11035 cat conftest.err >&5
11036 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11037 (exit $ac_status); } && {
11038 test -z "$ac_c_werror_flag" ||
11039 test ! -s conftest.err
11040 } && test -s conftest$ac_exeext && {
11041 test "$cross_compiling" = yes ||
11042 $as_test_x conftest$ac_exeext
11043 }; then
11044 BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db
11045 else
11046 $as_echo "$as_me: failed program was:" >&5
11047 sed 's/^/| /' conftest.$ac_ext >&5
11048
11049 dblib="no"
11050 fi
11051
11052 rm -rf conftest.dSYM
11053 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11054 conftest$ac_exeext conftest.$ac_ext
11055 if test "$dblib" = "berkeley"; then break; fi
11056 done
11057 if test "$dblib" = "no"; then
11058 LIBS="$saved_LIBS -ldb"
11059 cat >conftest.$ac_ext <<_ACEOF
11060 /* confdefs.h. */
11061 _ACEOF
11062 cat confdefs.h >>conftest.$ac_ext
11063 cat >>conftest.$ac_ext <<_ACEOF
11064 /* end confdefs.h. */
11065 #include <stdio.h>
11066 #include <db.h>
11067 int
11068 main ()
11069 {
11070 db_open(NULL, 0, 0, 0, NULL, NULL, NULL);
11071 ;
11072 return 0;
11073 }
11074 _ACEOF
11075 rm -f conftest.$ac_objext conftest$ac_exeext
11076 if { (ac_try="$ac_link"
11077 case "(($ac_try" in
11078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11079 *) ac_try_echo=$ac_try;;
11080 esac
11081 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11082 $as_echo "$ac_try_echo") >&5
11083 (eval "$ac_link") 2>conftest.er1
11084 ac_status=$?
11085 grep -v '^ *+' conftest.er1 >conftest.err
11086 rm -f conftest.er1
11087 cat conftest.err >&5
11088 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11089 (exit $ac_status); } && {
11090 test -z "$ac_c_werror_flag" ||
11091 test ! -s conftest.err
11092 } && test -s conftest$ac_exeext && {
11093 test "$cross_compiling" = yes ||
11094 $as_test_x conftest$ac_exeext
11095 }; then
11096 BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
11097 else
11098 $as_echo "$as_me: failed program was:" >&5
11099 sed 's/^/| /' conftest.$ac_ext >&5
11100
11101 dblib="no"
11102 fi
11103
11104 rm -rf conftest.dSYM
11105 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11106 conftest$ac_exeext conftest.$ac_ext
11107 fi
11108 LIBS=$saved_LIBS
11109
11110 LDFLAGS=$BDB_SAVE_LDFLAGS
11111
11112 else
11113 dblib="no"
11114 fi
11115
11116
11117
11118 CPPFLAGS=$cmu_save_CPPFLAGS
11119
11120 if test "$dblib" = no; then
11121 if test "${ac_cv_header_ndbm_h+set}" = set; then
11122 { $as_echo "$as_me:$LINENO: checking for ndbm.h" >&5
11123 $as_echo_n "checking for ndbm.h... " >&6; }
11124 if test "${ac_cv_header_ndbm_h+set}" = set; then
11125 $as_echo_n "(cached) " >&6
11126 fi
11127 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
11128 $as_echo "$ac_cv_header_ndbm_h" >&6; }
11129 else
11130 # Is the header compilable?
11131 { $as_echo "$as_me:$LINENO: checking ndbm.h usability" >&5
11132 $as_echo_n "checking ndbm.h usability... " >&6; }
11133 cat >conftest.$ac_ext <<_ACEOF
11134 /* confdefs.h. */
11135 _ACEOF
11136 cat confdefs.h >>conftest.$ac_ext
11137 cat >>conftest.$ac_ext <<_ACEOF
11138 /* end confdefs.h. */
11139 $ac_includes_default
11140 #include <ndbm.h>
11141 _ACEOF
11142 rm -f conftest.$ac_objext
11143 if { (ac_try="$ac_compile"
11144 case "(($ac_try" in
11145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11146 *) ac_try_echo=$ac_try;;
11147 esac
11148 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11149 $as_echo "$ac_try_echo") >&5
11150 (eval "$ac_compile") 2>conftest.er1
11151 ac_status=$?
11152 grep -v '^ *+' conftest.er1 >conftest.err
11153 rm -f conftest.er1
11154 cat conftest.err >&5
11155 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11156 (exit $ac_status); } && {
11157 test -z "$ac_c_werror_flag" ||
11158 test ! -s conftest.err
11159 } && test -s conftest.$ac_objext; then
11160 ac_header_compiler=yes
11161 else
11162 $as_echo "$as_me: failed program was:" >&5
11163 sed 's/^/| /' conftest.$ac_ext >&5
11164
11165 ac_header_compiler=no
11166 fi
11167
11168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11169 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11170 $as_echo "$ac_header_compiler" >&6; }
11171
11172 # Is the header present?
11173 { $as_echo "$as_me:$LINENO: checking ndbm.h presence" >&5
11174 $as_echo_n "checking ndbm.h presence... " >&6; }
11175 cat >conftest.$ac_ext <<_ACEOF
11176 /* confdefs.h. */
11177 _ACEOF
11178 cat confdefs.h >>conftest.$ac_ext
11179 cat >>conftest.$ac_ext <<_ACEOF
11180 /* end confdefs.h. */
11181 #include <ndbm.h>
11182 _ACEOF
11183 if { (ac_try="$ac_cpp conftest.$ac_ext"
11184 case "(($ac_try" in
11185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11186 *) ac_try_echo=$ac_try;;
11187 esac
11188 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11189 $as_echo "$ac_try_echo") >&5
11190 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11191 ac_status=$?
11192 grep -v '^ *+' conftest.er1 >conftest.err
11193 rm -f conftest.er1
11194 cat conftest.err >&5
11195 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11196 (exit $ac_status); } >/dev/null && {
11197 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11198 test ! -s conftest.err
11199 }; then
11200 ac_header_preproc=yes
11201 else
11202 $as_echo "$as_me: failed program was:" >&5
11203 sed 's/^/| /' conftest.$ac_ext >&5
11204
11205 ac_header_preproc=no
11206 fi
11207
11208 rm -f conftest.err conftest.$ac_ext
11209 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11210 $as_echo "$ac_header_preproc" >&6; }
11211
11212 # So? What about this header?
11213 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11214 yes:no: )
11215 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
11216 $as_echo "$as_me: WARNING: ndbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11217 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the compiler's result" >&5
11218 $as_echo "$as_me: WARNING: ndbm.h: proceeding with the compiler's result" >&2;}
11219 ac_header_preproc=yes
11220 ;;
11221 no:yes:* )
11222 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: present but cannot be compiled" >&5
11223 $as_echo "$as_me: WARNING: ndbm.h: present but cannot be compiled" >&2;}
11224 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: check for missing prerequisite headers?" >&5
11225 $as_echo "$as_me: WARNING: ndbm.h: check for missing prerequisite headers?" >&2;}
11226 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: see the Autoconf documentation" >&5
11227 $as_echo "$as_me: WARNING: ndbm.h: see the Autoconf documentation" >&2;}
11228 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: section \"Present But Cannot Be Compiled\"" >&5
11229 $as_echo "$as_me: WARNING: ndbm.h: section \"Present But Cannot Be Compiled\"" >&2;}
11230 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: proceeding with the preprocessor's result" >&5
11231 $as_echo "$as_me: WARNING: ndbm.h: proceeding with the preprocessor's result" >&2;}
11232 { $as_echo "$as_me:$LINENO: WARNING: ndbm.h: in the future, the compiler will take precedence" >&5
11233 $as_echo "$as_me: WARNING: ndbm.h: in the future, the compiler will take precedence" >&2;}
11234
11235 ;;
11236 esac
11237 { $as_echo "$as_me:$LINENO: checking for ndbm.h" >&5
11238 $as_echo_n "checking for ndbm.h... " >&6; }
11239 if test "${ac_cv_header_ndbm_h+set}" = set; then
11240 $as_echo_n "(cached) " >&6
11241 else
11242 ac_cv_header_ndbm_h=$ac_header_preproc
11243 fi
11244 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_ndbm_h" >&5
11245 $as_echo "$ac_cv_header_ndbm_h" >&6; }
11246
11247 fi
11248 if test "x$ac_cv_header_ndbm_h" = x""yes; then
11249
11250 { $as_echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5
11251 $as_echo_n "checking for dbm_open in -lndbm... " >&6; }
11252 if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then
11253 $as_echo_n "(cached) " >&6
11254 else
11255 ac_check_lib_save_LIBS=$LIBS
11256 LIBS="-lndbm $LIBS"
11257 cat >conftest.$ac_ext <<_ACEOF
11258 /* confdefs.h. */
11259 _ACEOF
11260 cat confdefs.h >>conftest.$ac_ext
11261 cat >>conftest.$ac_ext <<_ACEOF
11262 /* end confdefs.h. */
11263
11264 /* Override any GCC internal prototype to avoid an error.
11265 Use char because int might match the return type of a GCC
11266 builtin and then its argument prototype would still apply. */
11267 #ifdef __cplusplus
11268 extern "C"
11269 #endif
11270 char dbm_open ();
11271 int
11272 main ()
11273 {
11274 return dbm_open ();
11275 ;
11276 return 0;
11277 }
11278 _ACEOF
11279 rm -f conftest.$ac_objext conftest$ac_exeext
11280 if { (ac_try="$ac_link"
11281 case "(($ac_try" in
11282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11283 *) ac_try_echo=$ac_try;;
11284 esac
11285 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11286 $as_echo "$ac_try_echo") >&5
11287 (eval "$ac_link") 2>conftest.er1
11288 ac_status=$?
11289 grep -v '^ *+' conftest.er1 >conftest.err
11290 rm -f conftest.er1
11291 cat conftest.err >&5
11292 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11293 (exit $ac_status); } && {
11294 test -z "$ac_c_werror_flag" ||
11295 test ! -s conftest.err
11296 } && test -s conftest$ac_exeext && {
11297 test "$cross_compiling" = yes ||
11298 $as_test_x conftest$ac_exeext
11299 }; then
11300 ac_cv_lib_ndbm_dbm_open=yes
11301 else
11302 $as_echo "$as_me: failed program was:" >&5
11303 sed 's/^/| /' conftest.$ac_ext >&5
11304
11305 ac_cv_lib_ndbm_dbm_open=no
11306 fi
11307
11308 rm -rf conftest.dSYM
11309 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11310 conftest$ac_exeext conftest.$ac_ext
11311 LIBS=$ac_check_lib_save_LIBS
11312 fi
11313 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_dbm_open" >&5
11314 $as_echo "$ac_cv_lib_ndbm_dbm_open" >&6; }
11315 if test "x$ac_cv_lib_ndbm_dbm_open" = x""yes; then
11316 dblib="ndbm"; SASL_DB_LIB="-lndbm"
11317 else
11318 dblib="weird"
11319 fi
11320
11321 else
11322 dblib="no"
11323 fi
11324
11325
11326 if test "$dblib" = "weird"; then
11327 { $as_echo "$as_me:$LINENO: checking for dbm_open" >&5
11328 $as_echo_n "checking for dbm_open... " >&6; }
11329 if test "${ac_cv_func_dbm_open+set}" = set; then
11330 $as_echo_n "(cached) " >&6
11331 else
11332 cat >conftest.$ac_ext <<_ACEOF
11333 /* confdefs.h. */
11334 _ACEOF
11335 cat confdefs.h >>conftest.$ac_ext
11336 cat >>conftest.$ac_ext <<_ACEOF
11337 /* end confdefs.h. */
11338 /* Define dbm_open to an innocuous variant, in case <limits.h> declares dbm_open.
11339 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11340 #define dbm_open innocuous_dbm_open
11341
11342 /* System header to define __stub macros and hopefully few prototypes,
11343 which can conflict with char dbm_open (); below.
11344 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11345 <limits.h> exists even on freestanding compilers. */
11346
11347 #ifdef __STDC__
11348 # include <limits.h>
11349 #else
11350 # include <assert.h>
11351 #endif
11352
11353 #undef dbm_open
11354
11355 /* Override any GCC internal prototype to avoid an error.
11356 Use char because int might match the return type of a GCC
11357 builtin and then its argument prototype would still apply. */
11358 #ifdef __cplusplus
11359 extern "C"
11360 #endif
11361 char dbm_open ();
11362 /* The GNU C library defines this for functions which it implements
11363 to always fail with ENOSYS. Some functions are actually named
11364 something starting with __ and the normal name is an alias. */
11365 #if defined __stub_dbm_open || defined __stub___dbm_open
11366 choke me
11367 #endif
11368
11369 int
11370 main ()
11371 {
11372 return dbm_open ();
11373 ;
11374 return 0;
11375 }
11376 _ACEOF
11377 rm -f conftest.$ac_objext conftest$ac_exeext
11378 if { (ac_try="$ac_link"
11379 case "(($ac_try" in
11380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11381 *) ac_try_echo=$ac_try;;
11382 esac
11383 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11384 $as_echo "$ac_try_echo") >&5
11385 (eval "$ac_link") 2>conftest.er1
11386 ac_status=$?
11387 grep -v '^ *+' conftest.er1 >conftest.err
11388 rm -f conftest.er1
11389 cat conftest.err >&5
11390 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11391 (exit $ac_status); } && {
11392 test -z "$ac_c_werror_flag" ||
11393 test ! -s conftest.err
11394 } && test -s conftest$ac_exeext && {
11395 test "$cross_compiling" = yes ||
11396 $as_test_x conftest$ac_exeext
11397 }; then
11398 ac_cv_func_dbm_open=yes
11399 else
11400 $as_echo "$as_me: failed program was:" >&5
11401 sed 's/^/| /' conftest.$ac_ext >&5
11402
11403 ac_cv_func_dbm_open=no
11404 fi
11405
11406 rm -rf conftest.dSYM
11407 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11408 conftest$ac_exeext conftest.$ac_ext
11409 fi
11410 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_dbm_open" >&5
11411 $as_echo "$ac_cv_func_dbm_open" >&6; }
11412 if test "x$ac_cv_func_dbm_open" = x""yes; then
11413 dblib="ndbm"
11414 else
11415 dblib="no"
11416 fi
11417
11418 fi
11419
11420 if test "$dblib" = no; then
11421 if test "${ac_cv_header_gdbm_h+set}" = set; then
11422 { $as_echo "$as_me:$LINENO: checking for gdbm.h" >&5
11423 $as_echo_n "checking for gdbm.h... " >&6; }
11424 if test "${ac_cv_header_gdbm_h+set}" = set; then
11425 $as_echo_n "(cached) " >&6
11426 fi
11427 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
11428 $as_echo "$ac_cv_header_gdbm_h" >&6; }
11429 else
11430 # Is the header compilable?
11431 { $as_echo "$as_me:$LINENO: checking gdbm.h usability" >&5
11432 $as_echo_n "checking gdbm.h usability... " >&6; }
11433 cat >conftest.$ac_ext <<_ACEOF
11434 /* confdefs.h. */
11435 _ACEOF
11436 cat confdefs.h >>conftest.$ac_ext
11437 cat >>conftest.$ac_ext <<_ACEOF
11438 /* end confdefs.h. */
11439 $ac_includes_default
11440 #include <gdbm.h>
11441 _ACEOF
11442 rm -f conftest.$ac_objext
11443 if { (ac_try="$ac_compile"
11444 case "(($ac_try" in
11445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11446 *) ac_try_echo=$ac_try;;
11447 esac
11448 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11449 $as_echo "$ac_try_echo") >&5
11450 (eval "$ac_compile") 2>conftest.er1
11451 ac_status=$?
11452 grep -v '^ *+' conftest.er1 >conftest.err
11453 rm -f conftest.er1
11454 cat conftest.err >&5
11455 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11456 (exit $ac_status); } && {
11457 test -z "$ac_c_werror_flag" ||
11458 test ! -s conftest.err
11459 } && test -s conftest.$ac_objext; then
11460 ac_header_compiler=yes
11461 else
11462 $as_echo "$as_me: failed program was:" >&5
11463 sed 's/^/| /' conftest.$ac_ext >&5
11464
11465 ac_header_compiler=no
11466 fi
11467
11468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11469 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11470 $as_echo "$ac_header_compiler" >&6; }
11471
11472 # Is the header present?
11473 { $as_echo "$as_me:$LINENO: checking gdbm.h presence" >&5
11474 $as_echo_n "checking gdbm.h presence... " >&6; }
11475 cat >conftest.$ac_ext <<_ACEOF
11476 /* confdefs.h. */
11477 _ACEOF
11478 cat confdefs.h >>conftest.$ac_ext
11479 cat >>conftest.$ac_ext <<_ACEOF
11480 /* end confdefs.h. */
11481 #include <gdbm.h>
11482 _ACEOF
11483 if { (ac_try="$ac_cpp conftest.$ac_ext"
11484 case "(($ac_try" in
11485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11486 *) ac_try_echo=$ac_try;;
11487 esac
11488 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11489 $as_echo "$ac_try_echo") >&5
11490 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11491 ac_status=$?
11492 grep -v '^ *+' conftest.er1 >conftest.err
11493 rm -f conftest.er1
11494 cat conftest.err >&5
11495 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11496 (exit $ac_status); } >/dev/null && {
11497 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11498 test ! -s conftest.err
11499 }; then
11500 ac_header_preproc=yes
11501 else
11502 $as_echo "$as_me: failed program was:" >&5
11503 sed 's/^/| /' conftest.$ac_ext >&5
11504
11505 ac_header_preproc=no
11506 fi
11507
11508 rm -f conftest.err conftest.$ac_ext
11509 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11510 $as_echo "$ac_header_preproc" >&6; }
11511
11512 # So? What about this header?
11513 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11514 yes:no: )
11515 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&5
11516 $as_echo "$as_me: WARNING: gdbm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11517 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the compiler's result" >&5
11518 $as_echo "$as_me: WARNING: gdbm.h: proceeding with the compiler's result" >&2;}
11519 ac_header_preproc=yes
11520 ;;
11521 no:yes:* )
11522 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: present but cannot be compiled" >&5
11523 $as_echo "$as_me: WARNING: gdbm.h: present but cannot be compiled" >&2;}
11524 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: check for missing prerequisite headers?" >&5
11525 $as_echo "$as_me: WARNING: gdbm.h: check for missing prerequisite headers?" >&2;}
11526 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: see the Autoconf documentation" >&5
11527 $as_echo "$as_me: WARNING: gdbm.h: see the Autoconf documentation" >&2;}
11528 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: section \"Present But Cannot Be Compiled\"" >&5
11529 $as_echo "$as_me: WARNING: gdbm.h: section \"Present But Cannot Be Compiled\"" >&2;}
11530 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: proceeding with the preprocessor's result" >&5
11531 $as_echo "$as_me: WARNING: gdbm.h: proceeding with the preprocessor's result" >&2;}
11532 { $as_echo "$as_me:$LINENO: WARNING: gdbm.h: in the future, the compiler will take precedence" >&5
11533 $as_echo "$as_me: WARNING: gdbm.h: in the future, the compiler will take precedence" >&2;}
11534
11535 ;;
11536 esac
11537 { $as_echo "$as_me:$LINENO: checking for gdbm.h" >&5
11538 $as_echo_n "checking for gdbm.h... " >&6; }
11539 if test "${ac_cv_header_gdbm_h+set}" = set; then
11540 $as_echo_n "(cached) " >&6
11541 else
11542 ac_cv_header_gdbm_h=$ac_header_preproc
11543 fi
11544 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_gdbm_h" >&5
11545 $as_echo "$ac_cv_header_gdbm_h" >&6; }
11546
11547 fi
11548 if test "x$ac_cv_header_gdbm_h" = x""yes; then
11549
11550 { $as_echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
11551 $as_echo_n "checking for gdbm_open in -lgdbm... " >&6; }
11552 if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
11553 $as_echo_n "(cached) " >&6
11554 else
11555 ac_check_lib_save_LIBS=$LIBS
11556 LIBS="-lgdbm $LIBS"
11557 cat >conftest.$ac_ext <<_ACEOF
11558 /* confdefs.h. */
11559 _ACEOF
11560 cat confdefs.h >>conftest.$ac_ext
11561 cat >>conftest.$ac_ext <<_ACEOF
11562 /* end confdefs.h. */
11563
11564 /* Override any GCC internal prototype to avoid an error.
11565 Use char because int might match the return type of a GCC
11566 builtin and then its argument prototype would still apply. */
11567 #ifdef __cplusplus
11568 extern "C"
11569 #endif
11570 char gdbm_open ();
11571 int
11572 main ()
11573 {
11574 return gdbm_open ();
11575 ;
11576 return 0;
11577 }
11578 _ACEOF
11579 rm -f conftest.$ac_objext conftest$ac_exeext
11580 if { (ac_try="$ac_link"
11581 case "(($ac_try" in
11582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11583 *) ac_try_echo=$ac_try;;
11584 esac
11585 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11586 $as_echo "$ac_try_echo") >&5
11587 (eval "$ac_link") 2>conftest.er1
11588 ac_status=$?
11589 grep -v '^ *+' conftest.er1 >conftest.err
11590 rm -f conftest.er1
11591 cat conftest.err >&5
11592 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11593 (exit $ac_status); } && {
11594 test -z "$ac_c_werror_flag" ||
11595 test ! -s conftest.err
11596 } && test -s conftest$ac_exeext && {
11597 test "$cross_compiling" = yes ||
11598 $as_test_x conftest$ac_exeext
11599 }; then
11600 ac_cv_lib_gdbm_gdbm_open=yes
11601 else
11602 $as_echo "$as_me: failed program was:" >&5
11603 sed 's/^/| /' conftest.$ac_ext >&5
11604
11605 ac_cv_lib_gdbm_gdbm_open=no
11606 fi
11607
11608 rm -rf conftest.dSYM
11609 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11610 conftest$ac_exeext conftest.$ac_ext
11611 LIBS=$ac_check_lib_save_LIBS
11612 fi
11613 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_gdbm_open" >&5
11614 $as_echo "$ac_cv_lib_gdbm_gdbm_open" >&6; }
11615 if test "x$ac_cv_lib_gdbm_gdbm_open" = x""yes; then
11616 dblib="gdbm";
11617 SASL_DB_LIB="-lgdbm"
11618 else
11619 dblib="no"
11620 fi
11621
11622 else
11623 dblib="no"
11624 fi
11625
11626
11627 fi
11628 else
11629 CPPFLAGS="${CPPFLAGS} ${BDB_INCADD}"
11630 SASL_DB_INC=$BDB_INCADD
11631 SASL_DB_LIB="${BDB_LIBADD}"
11632 fi
11633 ;;
11634 none)
11635 ;;
11636 no)
11637 ;;
11638 *)
11639 { $as_echo "$as_me:$LINENO: WARNING: Bad DB library implementation specified;" >&5
11640 $as_echo "$as_me: WARNING: Bad DB library implementation specified;" >&2;}
11641 { { $as_echo "$as_me:$LINENO: error: Use either \"berkeley\", \"gdbm\", \"ndbm\" or \"none\"" >&5
11642 $as_echo "$as_me: error: Use either \"berkeley\", \"gdbm\", \"ndbm\" or \"none\"" >&2;}
11643 { (exit 1); exit 1; }; }
11644 dblib=no
11645 ;;
11646 esac
11647 LIBS="$cmu_save_LIBS"
11648
11649 { $as_echo "$as_me:$LINENO: checking DB library to use" >&5
11650 $as_echo_n "checking DB library to use... " >&6; }
11651 { $as_echo "$as_me:$LINENO: result: $dblib" >&5
11652 $as_echo "$dblib" >&6; }
11653
11654 SASL_DB_BACKEND="db_${dblib}.lo"
11655 SASL_DB_BACKEND_STATIC="db_${dblib}.o allockey.o"
11656 SASL_DB_BACKEND_STATIC_SRCS="\$(top_srcdir)/sasldb/db_${dblib}.c \$(top_srcdir)/sasldb/allockey.c"
11657 SASL_DB_UTILS="saslpasswd2 sasldblistusers2"
11658 SASL_DB_MANS="saslpasswd2.8 sasldblistusers2.8"
11659
11660 case "$dblib" in
11661 gdbm)
11662 SASL_MECHS="$SASL_MECHS libsasldb.la"
11663
11664 cat >>confdefs.h <<\_ACEOF
11665 #define SASL_GDBM /**/
11666 _ACEOF
11667
11668 ;;
11669 ndbm)
11670 SASL_MECHS="$SASL_MECHS libsasldb.la"
11671
11672 cat >>confdefs.h <<\_ACEOF
11673 #define SASL_NDBM /**/
11674 _ACEOF
11675
11676 ;;
11677 berkeley)
11678 SASL_MECHS="$SASL_MECHS libsasldb.la"
11679
11680 cat >>confdefs.h <<\_ACEOF
11681 #define SASL_BERKELEYDB /**/
11682 _ACEOF
11683
11684 ;;
11685 *)
11686 { $as_echo "$as_me:$LINENO: WARNING: Disabling SASL authentication database support" >&5
11687 $as_echo "$as_me: WARNING: Disabling SASL authentication database support" >&2;}
11688 SASL_DB_BACKEND="db_none.lo"
11689 SASL_DB_BACKEND_STATIC="db_none.o"
11690 SASL_DB_BACKEND_STATIC_SRCS="\$(top_srcdir)/sasldb/db_none.c"
11691 SASL_DB_UTILS=""
11692 SASL_DB_MANS=""
11693 SASL_DB_LIB=""
11694 ;;
11695 esac
11696
11697 if test "$enable_static" = yes; then
11698 if test "$dblib" != "none"; then
11699 SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/sasldb.c $SASL_DB_BACKEND_STATIC_SRCS"
11700 SASL_STATIC_OBJS="$SASL_STATIC_OBJS sasldb.o $SASL_DB_BACKEND_STATIC"
11701
11702 cat >>confdefs.h <<\_ACEOF
11703 #define STATIC_SASLDB /**/
11704 _ACEOF
11705
11706 else
11707 SASL_STATIC_OBJS="$SASL_STATIC_OBJS $SASL_DB_BACKEND_STATIC"
11708 SASL_STATIC_SRCS="$SASL_STATIC_SRCS $SASL_DB_BACKEND_STATIC_SRCS"
11709 fi
11710 fi
11711
11712
11713
11714
11715
11716
11717
11718
11719 SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al"
11720 fi
11721
11722 # Check whether --enable-httpform was given.
11723 if test "${enable_httpform+set}" = set; then
11724 enableval=$enable_httpform; httpform=$enableval
11725 else
11726 httpform=no
11727 fi
11728
11729 if test "$httpform" != no; then
11730
11731 cat >>confdefs.h <<\_ACEOF
11732 #define HAVE_HTTPFORM /**/
11733 _ACEOF
11734
11735 fi
11736
11737
11738 # Check whether --with-pam was given.
11739 if test "${with_pam+set}" = set; then
11740 withval=$with_pam; with_pam=$withval
11741 else
11742 with_pam=yes
11743 fi
11744
11745 if test "$with_pam" != no; then
11746 if test -d $with_pam; then
11747 CPPFLAGS="$CPPFLAGS -I${with_pam}/include"
11748 LDFLAGS="$LDFLAGS -L${with_pam}/lib"
11749 fi
11750 cmu_save_LIBS="$LIBS"
11751 { $as_echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
11752 $as_echo_n "checking for pam_start in -lpam... " >&6; }
11753 if test "${ac_cv_lib_pam_pam_start+set}" = set; then
11754 $as_echo_n "(cached) " >&6
11755 else
11756 ac_check_lib_save_LIBS=$LIBS
11757 LIBS="-lpam $SASL_DL_LIB $LIBS"
11758 cat >conftest.$ac_ext <<_ACEOF
11759 /* confdefs.h. */
11760 _ACEOF
11761 cat confdefs.h >>conftest.$ac_ext
11762 cat >>conftest.$ac_ext <<_ACEOF
11763 /* end confdefs.h. */
11764
11765 /* Override any GCC internal prototype to avoid an error.
11766 Use char because int might match the return type of a GCC
11767 builtin and then its argument prototype would still apply. */
11768 #ifdef __cplusplus
11769 extern "C"
11770 #endif
11771 char pam_start ();
11772 int
11773 main ()
11774 {
11775 return pam_start ();
11776 ;
11777 return 0;
11778 }
11779 _ACEOF
11780 rm -f conftest.$ac_objext conftest$ac_exeext
11781 if { (ac_try="$ac_link"
11782 case "(($ac_try" in
11783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11784 *) ac_try_echo=$ac_try;;
11785 esac
11786 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11787 $as_echo "$ac_try_echo") >&5
11788 (eval "$ac_link") 2>conftest.er1
11789 ac_status=$?
11790 grep -v '^ *+' conftest.er1 >conftest.err
11791 rm -f conftest.er1
11792 cat conftest.err >&5
11793 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11794 (exit $ac_status); } && {
11795 test -z "$ac_c_werror_flag" ||
11796 test ! -s conftest.err
11797 } && test -s conftest$ac_exeext && {
11798 test "$cross_compiling" = yes ||
11799 $as_test_x conftest$ac_exeext
11800 }; then
11801 ac_cv_lib_pam_pam_start=yes
11802 else
11803 $as_echo "$as_me: failed program was:" >&5
11804 sed 's/^/| /' conftest.$ac_ext >&5
11805
11806 ac_cv_lib_pam_pam_start=no
11807 fi
11808
11809 rm -rf conftest.dSYM
11810 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11811 conftest$ac_exeext conftest.$ac_ext
11812 LIBS=$ac_check_lib_save_LIBS
11813 fi
11814 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
11815 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
11816 if test "x$ac_cv_lib_pam_pam_start" = x""yes; then
11817
11818 if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
11819 { $as_echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5
11820 $as_echo_n "checking for security/pam_appl.h... " >&6; }
11821 if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
11822 $as_echo_n "(cached) " >&6
11823 fi
11824 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5
11825 $as_echo "$ac_cv_header_security_pam_appl_h" >&6; }
11826 else
11827 # Is the header compilable?
11828 { $as_echo "$as_me:$LINENO: checking security/pam_appl.h usability" >&5
11829 $as_echo_n "checking security/pam_appl.h usability... " >&6; }
11830 cat >conftest.$ac_ext <<_ACEOF
11831 /* confdefs.h. */
11832 _ACEOF
11833 cat confdefs.h >>conftest.$ac_ext
11834 cat >>conftest.$ac_ext <<_ACEOF
11835 /* end confdefs.h. */
11836 $ac_includes_default
11837 #include <security/pam_appl.h>
11838 _ACEOF
11839 rm -f conftest.$ac_objext
11840 if { (ac_try="$ac_compile"
11841 case "(($ac_try" in
11842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11843 *) ac_try_echo=$ac_try;;
11844 esac
11845 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11846 $as_echo "$ac_try_echo") >&5
11847 (eval "$ac_compile") 2>conftest.er1
11848 ac_status=$?
11849 grep -v '^ *+' conftest.er1 >conftest.err
11850 rm -f conftest.er1
11851 cat conftest.err >&5
11852 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11853 (exit $ac_status); } && {
11854 test -z "$ac_c_werror_flag" ||
11855 test ! -s conftest.err
11856 } && test -s conftest.$ac_objext; then
11857 ac_header_compiler=yes
11858 else
11859 $as_echo "$as_me: failed program was:" >&5
11860 sed 's/^/| /' conftest.$ac_ext >&5
11861
11862 ac_header_compiler=no
11863 fi
11864
11865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11866 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11867 $as_echo "$ac_header_compiler" >&6; }
11868
11869 # Is the header present?
11870 { $as_echo "$as_me:$LINENO: checking security/pam_appl.h presence" >&5
11871 $as_echo_n "checking security/pam_appl.h presence... " >&6; }
11872 cat >conftest.$ac_ext <<_ACEOF
11873 /* confdefs.h. */
11874 _ACEOF
11875 cat confdefs.h >>conftest.$ac_ext
11876 cat >>conftest.$ac_ext <<_ACEOF
11877 /* end confdefs.h. */
11878 #include <security/pam_appl.h>
11879 _ACEOF
11880 if { (ac_try="$ac_cpp conftest.$ac_ext"
11881 case "(($ac_try" in
11882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11883 *) ac_try_echo=$ac_try;;
11884 esac
11885 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11886 $as_echo "$ac_try_echo") >&5
11887 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11888 ac_status=$?
11889 grep -v '^ *+' conftest.er1 >conftest.err
11890 rm -f conftest.er1
11891 cat conftest.err >&5
11892 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11893 (exit $ac_status); } >/dev/null && {
11894 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11895 test ! -s conftest.err
11896 }; then
11897 ac_header_preproc=yes
11898 else
11899 $as_echo "$as_me: failed program was:" >&5
11900 sed 's/^/| /' conftest.$ac_ext >&5
11901
11902 ac_header_preproc=no
11903 fi
11904
11905 rm -f conftest.err conftest.$ac_ext
11906 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11907 $as_echo "$ac_header_preproc" >&6; }
11908
11909 # So? What about this header?
11910 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11911 yes:no: )
11912 { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&5
11913 $as_echo "$as_me: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11914 { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&5
11915 $as_echo "$as_me: WARNING: security/pam_appl.h: proceeding with the compiler's result" >&2;}
11916 ac_header_preproc=yes
11917 ;;
11918 no:yes:* )
11919 { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: present but cannot be compiled" >&5
11920 $as_echo "$as_me: WARNING: security/pam_appl.h: present but cannot be compiled" >&2;}
11921 { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&5
11922 $as_echo "$as_me: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&2;}
11923 { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: see the Autoconf documentation" >&5
11924 $as_echo "$as_me: WARNING: security/pam_appl.h: see the Autoconf documentation" >&2;}
11925 { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&5
11926 $as_echo "$as_me: WARNING: security/pam_appl.h: section \"Present But Cannot Be Compiled\"" >&2;}
11927 { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5
11928 $as_echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;}
11929 { $as_echo "$as_me:$LINENO: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&5
11930 $as_echo "$as_me: WARNING: security/pam_appl.h: in the future, the compiler will take precedence" >&2;}
11931
11932 ;;
11933 esac
11934 { $as_echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5
11935 $as_echo_n "checking for security/pam_appl.h... " >&6; }
11936 if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
11937 $as_echo_n "(cached) " >&6
11938 else
11939 ac_cv_header_security_pam_appl_h=$ac_header_preproc
11940 fi
11941 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5
11942 $as_echo "$ac_cv_header_security_pam_appl_h" >&6; }
11943
11944 fi
11945 if test "x$ac_cv_header_security_pam_appl_h" = x""yes; then
11946 :
11947 else
11948 with_pam=no
11949 fi
11950
11951
11952 else
11953 with_pam=no
11954 fi
11955
11956 LIBS="$cmu_save_LIBS"
11957 fi
11958
11959
11960 # Check whether --with-ipctype was given.
11961 if test "${with_ipctype+set}" = set; then
11962 withval=$with_ipctype; with_ipctype=$withval
11963 else
11964 with_ipctype="unix"
11965 fi
11966
11967 MAIN_COMPAT_OBJ="saslauthd-${with_ipctype}.o"
11968
11969 if test "$with_ipctype" = "doors"; then
11970
11971 cat >>confdefs.h <<\_ACEOF
11972 #define USE_DOORS /**/
11973 _ACEOF
11974
11975
11976 cat >>confdefs.h <<\_ACEOF
11977 #define SASLAUTHD_THREADED /**/
11978 _ACEOF
11979
11980 LIBS="$LIBS -ldoor -lpthread"
11981 fi
11982
11983 { $as_echo "$as_me:$LINENO: checking for PAM support" >&5
11984 $as_echo_n "checking for PAM support... " >&6; }
11985 { $as_echo "$as_me:$LINENO: result: $with_pam" >&5
11986 $as_echo "$with_pam" >&6; }
11987 LIB_PAM=""
11988 if test "$with_pam" != no; then
11989
11990 cat >>confdefs.h <<\_ACEOF
11991 #define HAVE_PAM /**/
11992 _ACEOF
11993
11994 LIB_PAM="-lpam"
11995 fi
11996
11997
11998
11999 { $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12000 $as_echo_n "checking for inet_aton in -lresolv... " >&6; }
12001 if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12002 $as_echo_n "(cached) " >&6
12003 else
12004 ac_check_lib_save_LIBS=$LIBS
12005 LIBS="-lresolv $LIBS"
12006 cat >conftest.$ac_ext <<_ACEOF
12007 /* confdefs.h. */
12008 _ACEOF
12009 cat confdefs.h >>conftest.$ac_ext
12010 cat >>conftest.$ac_ext <<_ACEOF
12011 /* end confdefs.h. */
12012
12013 /* Override any GCC internal prototype to avoid an error.
12014 Use char because int might match the return type of a GCC
12015 builtin and then its argument prototype would still apply. */
12016 #ifdef __cplusplus
12017 extern "C"
12018 #endif
12019 char inet_aton ();
12020 int
12021 main ()
12022 {
12023 return inet_aton ();
12024 ;
12025 return 0;
12026 }
12027 _ACEOF
12028 rm -f conftest.$ac_objext conftest$ac_exeext
12029 if { (ac_try="$ac_link"
12030 case "(($ac_try" in
12031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12032 *) ac_try_echo=$ac_try;;
12033 esac
12034 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12035 $as_echo "$ac_try_echo") >&5
12036 (eval "$ac_link") 2>conftest.er1
12037 ac_status=$?
12038 grep -v '^ *+' conftest.er1 >conftest.err
12039 rm -f conftest.er1
12040 cat conftest.err >&5
12041 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12042 (exit $ac_status); } && {
12043 test -z "$ac_c_werror_flag" ||
12044 test ! -s conftest.err
12045 } && test -s conftest$ac_exeext && {
12046 test "$cross_compiling" = yes ||
12047 $as_test_x conftest$ac_exeext
12048 }; then
12049 ac_cv_lib_resolv_inet_aton=yes
12050 else
12051 $as_echo "$as_me: failed program was:" >&5
12052 sed 's/^/| /' conftest.$ac_ext >&5
12053
12054 ac_cv_lib_resolv_inet_aton=no
12055 fi
12056
12057 rm -rf conftest.dSYM
12058 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12059 conftest$ac_exeext conftest.$ac_ext
12060 LIBS=$ac_check_lib_save_LIBS
12061 fi
12062 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
12063 $as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
12064 if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then
12065 cat >>confdefs.h <<_ACEOF
12066 #define HAVE_LIBRESOLV 1
12067 _ACEOF
12068
12069 LIBS="-lresolv $LIBS"
12070
12071 fi
12072
12073
12074 { $as_echo "$as_me:$LINENO: checking to include LDAP support" >&5
12075 $as_echo_n "checking to include LDAP support... " >&6; }
12076
12077 # Check whether --with-ldap was given.
12078 if test "${with_ldap+set}" = set; then
12079 withval=$with_ldap; with_ldap=$withval
12080 else
12081 with_ldap=no
12082 fi
12083
12084 { $as_echo "$as_me:$LINENO: result: $with_ldap" >&5
12085 $as_echo "$with_ldap" >&6; }
12086
12087 if test -d $with_ldap; then
12088 CPPFLAGS="$CPPFLAGS -I${with_ldap}/include"
12089
12090 # this is CMU ADD LIBPATH
12091 if test "$andrew_cv_runpath_switch" = "none" ; then
12092 LDFLAGS="-L${with_ldap}/lib ${LDFLAGS}"
12093 else
12094 LDFLAGS="-L${with_ldap}/lib $andrew_cv_runpath_switch${with_ldap}/lib ${LDFLAGS}"
12095 fi
12096
12097 fi
12098
12099 LDAP_LIBS=""
12100 if test "$with_ldap" != no; then
12101 { $as_echo "$as_me:$LINENO: checking for ldap_initialize in -lldap" >&5
12102 $as_echo_n "checking for ldap_initialize in -lldap... " >&6; }
12103 if test "${ac_cv_lib_ldap_ldap_initialize+set}" = set; then
12104 $as_echo_n "(cached) " >&6
12105 else
12106 ac_check_lib_save_LIBS=$LIBS
12107 LIBS="-lldap -llber $LIBS"
12108 cat >conftest.$ac_ext <<_ACEOF
12109 /* confdefs.h. */
12110 _ACEOF
12111 cat confdefs.h >>conftest.$ac_ext
12112 cat >>conftest.$ac_ext <<_ACEOF
12113 /* end confdefs.h. */
12114
12115 /* Override any GCC internal prototype to avoid an error.
12116 Use char because int might match the return type of a GCC
12117 builtin and then its argument prototype would still apply. */
12118 #ifdef __cplusplus
12119 extern "C"
12120 #endif
12121 char ldap_initialize ();
12122 int
12123 main ()
12124 {
12125 return ldap_initialize ();
12126 ;
12127 return 0;
12128 }
12129 _ACEOF
12130 rm -f conftest.$ac_objext conftest$ac_exeext
12131 if { (ac_try="$ac_link"
12132 case "(($ac_try" in
12133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12134 *) ac_try_echo=$ac_try;;
12135 esac
12136 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12137 $as_echo "$ac_try_echo") >&5
12138 (eval "$ac_link") 2>conftest.er1
12139 ac_status=$?
12140 grep -v '^ *+' conftest.er1 >conftest.err
12141 rm -f conftest.er1
12142 cat conftest.err >&5
12143 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12144 (exit $ac_status); } && {
12145 test -z "$ac_c_werror_flag" ||
12146 test ! -s conftest.err
12147 } && test -s conftest$ac_exeext && {
12148 test "$cross_compiling" = yes ||
12149 $as_test_x conftest$ac_exeext
12150 }; then
12151 ac_cv_lib_ldap_ldap_initialize=yes
12152 else
12153 $as_echo "$as_me: failed program was:" >&5
12154 sed 's/^/| /' conftest.$ac_ext >&5
12155
12156 ac_cv_lib_ldap_ldap_initialize=no
12157 fi
12158
12159 rm -rf conftest.dSYM
12160 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12161 conftest$ac_exeext conftest.$ac_ext
12162 LIBS=$ac_check_lib_save_LIBS
12163 fi
12164 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_initialize" >&5
12165 $as_echo "$ac_cv_lib_ldap_ldap_initialize" >&6; }
12166 if test "x$ac_cv_lib_ldap_ldap_initialize" = x""yes; then
12167
12168 cat >>confdefs.h <<\_ACEOF
12169 #define HAVE_LDAP /**/
12170 _ACEOF
12171
12172 LDAP_LIBS="-lldap -llber"
12173 if test "$with_openssl" != "no"; then
12174 LDAP_LIBS="$LDAP_LIBS -lcrypto $LIB_RSAREF"
12175 fi
12176 fi
12177
12178
12179 fi
12180
12181
12182
12183 { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
12184 $as_echo_n "checking for ANSI C header files... " >&6; }
12185 if test "${ac_cv_header_stdc+set}" = set; then
12186 $as_echo_n "(cached) " >&6
12187 else
12188 cat >conftest.$ac_ext <<_ACEOF
12189 /* confdefs.h. */
12190 _ACEOF
12191 cat confdefs.h >>conftest.$ac_ext
12192 cat >>conftest.$ac_ext <<_ACEOF
12193 /* end confdefs.h. */
12194 #include <stdlib.h>
12195 #include <stdarg.h>
12196 #include <string.h>
12197 #include <float.h>
12198
12199 int
12200 main ()
12201 {
12202
12203 ;
12204 return 0;
12205 }
12206 _ACEOF
12207 rm -f conftest.$ac_objext
12208 if { (ac_try="$ac_compile"
12209 case "(($ac_try" in
12210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12211 *) ac_try_echo=$ac_try;;
12212 esac
12213 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12214 $as_echo "$ac_try_echo") >&5
12215 (eval "$ac_compile") 2>conftest.er1
12216 ac_status=$?
12217 grep -v '^ *+' conftest.er1 >conftest.err
12218 rm -f conftest.er1
12219 cat conftest.err >&5
12220 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12221 (exit $ac_status); } && {
12222 test -z "$ac_c_werror_flag" ||
12223 test ! -s conftest.err
12224 } && test -s conftest.$ac_objext; then
12225 ac_cv_header_stdc=yes
12226 else
12227 $as_echo "$as_me: failed program was:" >&5
12228 sed 's/^/| /' conftest.$ac_ext >&5
12229
12230 ac_cv_header_stdc=no
12231 fi
12232
12233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12234
12235 if test $ac_cv_header_stdc = yes; then
12236 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12237 cat >conftest.$ac_ext <<_ACEOF
12238 /* confdefs.h. */
12239 _ACEOF
12240 cat confdefs.h >>conftest.$ac_ext
12241 cat >>conftest.$ac_ext <<_ACEOF
12242 /* end confdefs.h. */
12243 #include <string.h>
12244
12245 _ACEOF
12246 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12247 $EGREP "memchr" >/dev/null 2>&1; then
12248 :
12249 else
12250 ac_cv_header_stdc=no
12251 fi
12252 rm -f conftest*
12253
12254 fi
12255
12256 if test $ac_cv_header_stdc = yes; then
12257 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12258 cat >conftest.$ac_ext <<_ACEOF
12259 /* confdefs.h. */
12260 _ACEOF
12261 cat confdefs.h >>conftest.$ac_ext
12262 cat >>conftest.$ac_ext <<_ACEOF
12263 /* end confdefs.h. */
12264 #include <stdlib.h>
12265
12266 _ACEOF
12267 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12268 $EGREP "free" >/dev/null 2>&1; then
12269 :
12270 else
12271 ac_cv_header_stdc=no
12272 fi
12273 rm -f conftest*
12274
12275 fi
12276
12277 if test $ac_cv_header_stdc = yes; then
12278 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12279 if test "$cross_compiling" = yes; then
12280 :
12281 else
12282 cat >conftest.$ac_ext <<_ACEOF
12283 /* confdefs.h. */
12284 _ACEOF
12285 cat confdefs.h >>conftest.$ac_ext
12286 cat >>conftest.$ac_ext <<_ACEOF
12287 /* end confdefs.h. */
12288 #include <ctype.h>
12289 #include <stdlib.h>
12290 #if ((' ' & 0x0FF) == 0x020)
12291 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12292 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12293 #else
12294 # define ISLOWER(c) \
12295 (('a' <= (c) && (c) <= 'i') \
12296 || ('j' <= (c) && (c) <= 'r') \
12297 || ('s' <= (c) && (c) <= 'z'))
12298 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12299 #endif
12300
12301 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12302 int
12303 main ()
12304 {
12305 int i;
12306 for (i = 0; i < 256; i++)
12307 if (XOR (islower (i), ISLOWER (i))
12308 || toupper (i) != TOUPPER (i))
12309 return 2;
12310 return 0;
12311 }
12312 _ACEOF
12313 rm -f conftest$ac_exeext
12314 if { (ac_try="$ac_link"
12315 case "(($ac_try" in
12316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12317 *) ac_try_echo=$ac_try;;
12318 esac
12319 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12320 $as_echo "$ac_try_echo") >&5
12321 (eval "$ac_link") 2>&5
12322 ac_status=$?
12323 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12324 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12325 { (case "(($ac_try" in
12326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12327 *) ac_try_echo=$ac_try;;
12328 esac
12329 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12330 $as_echo "$ac_try_echo") >&5
12331 (eval "$ac_try") 2>&5
12332 ac_status=$?
12333 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12334 (exit $ac_status); }; }; then
12335 :
12336 else
12337 $as_echo "$as_me: program exited with status $ac_status" >&5
12338 $as_echo "$as_me: failed program was:" >&5
12339 sed 's/^/| /' conftest.$ac_ext >&5
12340
12341 ( exit $ac_status )
12342 ac_cv_header_stdc=no
12343 fi
12344 rm -rf conftest.dSYM
12345 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12346 fi
12347
12348
12349 fi
12350 fi
12351 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
12352 $as_echo "$ac_cv_header_stdc" >&6; }
12353 if test $ac_cv_header_stdc = yes; then
12354
12355 cat >>confdefs.h <<\_ACEOF
12356 #define STDC_HEADERS 1
12357 _ACEOF
12358
12359 fi
12360
12361 { $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
12362 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
12363 if test "${ac_cv_header_sys_wait_h+set}" = set; then
12364 $as_echo_n "(cached) " >&6
12365 else
12366 cat >conftest.$ac_ext <<_ACEOF
12367 /* confdefs.h. */
12368 _ACEOF
12369 cat confdefs.h >>conftest.$ac_ext
12370 cat >>conftest.$ac_ext <<_ACEOF
12371 /* end confdefs.h. */
12372 #include <sys/types.h>
12373 #include <sys/wait.h>
12374 #ifndef WEXITSTATUS
12375 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
12376 #endif
12377 #ifndef WIFEXITED
12378 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
12379 #endif
12380
12381 int
12382 main ()
12383 {
12384 int s;
12385 wait (&s);
12386 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
12387 ;
12388 return 0;
12389 }
12390 _ACEOF
12391 rm -f conftest.$ac_objext
12392 if { (ac_try="$ac_compile"
12393 case "(($ac_try" in
12394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12395 *) ac_try_echo=$ac_try;;
12396 esac
12397 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12398 $as_echo "$ac_try_echo") >&5
12399 (eval "$ac_compile") 2>conftest.er1
12400 ac_status=$?
12401 grep -v '^ *+' conftest.er1 >conftest.err
12402 rm -f conftest.er1
12403 cat conftest.err >&5
12404 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12405 (exit $ac_status); } && {
12406 test -z "$ac_c_werror_flag" ||
12407 test ! -s conftest.err
12408 } && test -s conftest.$ac_objext; then
12409 ac_cv_header_sys_wait_h=yes
12410 else
12411 $as_echo "$as_me: failed program was:" >&5
12412 sed 's/^/| /' conftest.$ac_ext >&5
12413
12414 ac_cv_header_sys_wait_h=no
12415 fi
12416
12417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12418 fi
12419 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
12420 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
12421 if test $ac_cv_header_sys_wait_h = yes; then
12422
12423 cat >>confdefs.h <<\_ACEOF
12424 #define HAVE_SYS_WAIT_H 1
12425 _ACEOF
12426
12427 fi
12428
12429 { $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
12430 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
12431 if test "${ac_cv_header_time+set}" = set; then
12432 $as_echo_n "(cached) " >&6
12433 else
12434 cat >conftest.$ac_ext <<_ACEOF
12435 /* confdefs.h. */
12436 _ACEOF
12437 cat confdefs.h >>conftest.$ac_ext
12438 cat >>conftest.$ac_ext <<_ACEOF
12439 /* end confdefs.h. */
12440 #include <sys/types.h>
12441 #include <sys/time.h>
12442 #include <time.h>
12443
12444 int
12445 main ()
12446 {
12447 if ((struct tm *) 0)
12448 return 0;
12449 ;
12450 return 0;
12451 }
12452 _ACEOF
12453 rm -f conftest.$ac_objext
12454 if { (ac_try="$ac_compile"
12455 case "(($ac_try" in
12456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12457 *) ac_try_echo=$ac_try;;
12458 esac
12459 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12460 $as_echo "$ac_try_echo") >&5
12461 (eval "$ac_compile") 2>conftest.er1
12462 ac_status=$?
12463 grep -v '^ *+' conftest.er1 >conftest.err
12464 rm -f conftest.er1
12465 cat conftest.err >&5
12466 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12467 (exit $ac_status); } && {
12468 test -z "$ac_c_werror_flag" ||
12469 test ! -s conftest.err
12470 } && test -s conftest.$ac_objext; then
12471 ac_cv_header_time=yes
12472 else
12473 $as_echo "$as_me: failed program was:" >&5
12474 sed 's/^/| /' conftest.$ac_ext >&5
12475
12476 ac_cv_header_time=no
12477 fi
12478
12479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12480 fi
12481 { $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
12482 $as_echo "$ac_cv_header_time" >&6; }
12483 if test $ac_cv_header_time = yes; then
12484
12485 cat >>confdefs.h <<\_ACEOF
12486 #define TIME_WITH_SYS_TIME 1
12487 _ACEOF
12488
12489 fi
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499 for ac_header in crypt.h fcntl.h krb5.h strings.h syslog.h unistd.h sys/time.h sys/uio.h
12500 do
12501 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12502 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12503 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12504 $as_echo_n "checking for $ac_header... " >&6; }
12505 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12506 $as_echo_n "(cached) " >&6
12507 fi
12508 ac_res=`eval 'as_val=${'$as_ac_Header'}
12509 $as_echo "$as_val"'`
12510 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12511 $as_echo "$ac_res" >&6; }
12512 else
12513 # Is the header compilable?
12514 { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
12515 $as_echo_n "checking $ac_header usability... " >&6; }
12516 cat >conftest.$ac_ext <<_ACEOF
12517 /* confdefs.h. */
12518 _ACEOF
12519 cat confdefs.h >>conftest.$ac_ext
12520 cat >>conftest.$ac_ext <<_ACEOF
12521 /* end confdefs.h. */
12522 $ac_includes_default
12523 #include <$ac_header>
12524 _ACEOF
12525 rm -f conftest.$ac_objext
12526 if { (ac_try="$ac_compile"
12527 case "(($ac_try" in
12528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12529 *) ac_try_echo=$ac_try;;
12530 esac
12531 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12532 $as_echo "$ac_try_echo") >&5
12533 (eval "$ac_compile") 2>conftest.er1
12534 ac_status=$?
12535 grep -v '^ *+' conftest.er1 >conftest.err
12536 rm -f conftest.er1
12537 cat conftest.err >&5
12538 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12539 (exit $ac_status); } && {
12540 test -z "$ac_c_werror_flag" ||
12541 test ! -s conftest.err
12542 } && test -s conftest.$ac_objext; then
12543 ac_header_compiler=yes
12544 else
12545 $as_echo "$as_me: failed program was:" >&5
12546 sed 's/^/| /' conftest.$ac_ext >&5
12547
12548 ac_header_compiler=no
12549 fi
12550
12551 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12552 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12553 $as_echo "$ac_header_compiler" >&6; }
12554
12555 # Is the header present?
12556 { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
12557 $as_echo_n "checking $ac_header presence... " >&6; }
12558 cat >conftest.$ac_ext <<_ACEOF
12559 /* confdefs.h. */
12560 _ACEOF
12561 cat confdefs.h >>conftest.$ac_ext
12562 cat >>conftest.$ac_ext <<_ACEOF
12563 /* end confdefs.h. */
12564 #include <$ac_header>
12565 _ACEOF
12566 if { (ac_try="$ac_cpp conftest.$ac_ext"
12567 case "(($ac_try" in
12568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12569 *) ac_try_echo=$ac_try;;
12570 esac
12571 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12572 $as_echo "$ac_try_echo") >&5
12573 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12574 ac_status=$?
12575 grep -v '^ *+' conftest.er1 >conftest.err
12576 rm -f conftest.er1
12577 cat conftest.err >&5
12578 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12579 (exit $ac_status); } >/dev/null && {
12580 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12581 test ! -s conftest.err
12582 }; then
12583 ac_header_preproc=yes
12584 else
12585 $as_echo "$as_me: failed program was:" >&5
12586 sed 's/^/| /' conftest.$ac_ext >&5
12587
12588 ac_header_preproc=no
12589 fi
12590
12591 rm -f conftest.err conftest.$ac_ext
12592 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12593 $as_echo "$ac_header_preproc" >&6; }
12594
12595 # So? What about this header?
12596 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12597 yes:no: )
12598 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12599 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12600 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12601 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12602 ac_header_preproc=yes
12603 ;;
12604 no:yes:* )
12605 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12606 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12607 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12608 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12609 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12610 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12611 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12612 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
12613 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12614 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12615 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12616 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12617
12618 ;;
12619 esac
12620 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
12621 $as_echo_n "checking for $ac_header... " >&6; }
12622 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12623 $as_echo_n "(cached) " >&6
12624 else
12625 eval "$as_ac_Header=\$ac_header_preproc"
12626 fi
12627 ac_res=`eval 'as_val=${'$as_ac_Header'}
12628 $as_echo "$as_val"'`
12629 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
12630 $as_echo "$ac_res" >&6; }
12631
12632 fi
12633 as_val=`eval 'as_val=${'$as_ac_Header'}
12634 $as_echo "$as_val"'`
12635 if test "x$as_val" = x""yes; then
12636 cat >>confdefs.h <<_ACEOF
12637 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12638 _ACEOF
12639
12640 fi
12641
12642 done
12643
12644
12645 { $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
12646 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12647 if test "${ac_cv_c_const+set}" = set; then
12648 $as_echo_n "(cached) " >&6
12649 else
12650 cat >conftest.$ac_ext <<_ACEOF
12651 /* confdefs.h. */
12652 _ACEOF
12653 cat confdefs.h >>conftest.$ac_ext
12654 cat >>conftest.$ac_ext <<_ACEOF
12655 /* end confdefs.h. */
12656
12657 int
12658 main ()
12659 {
12660 /* FIXME: Include the comments suggested by Paul. */
12661 #ifndef __cplusplus
12662 /* Ultrix mips cc rejects this. */
12663 typedef int charset[2];
12664 const charset cs;
12665 /* SunOS 4.1.1 cc rejects this. */
12666 char const *const *pcpcc;
12667 char **ppc;
12668 /* NEC SVR4.0.2 mips cc rejects this. */
12669 struct point {int x, y;};
12670 static struct point const zero = {0,0};
12671 /* AIX XL C 1.02.0.0 rejects this.
12672 It does not let you subtract one const X* pointer from another in
12673 an arm of an if-expression whose if-part is not a constant
12674 expression */
12675 const char *g = "string";
12676 pcpcc = &g + (g ? g-g : 0);
12677 /* HPUX 7.0 cc rejects these. */
12678 ++pcpcc;
12679 ppc = (char**) pcpcc;
12680 pcpcc = (char const *const *) ppc;
12681 { /* SCO 3.2v4 cc rejects this. */
12682 char *t;
12683 char const *s = 0 ? (char *) 0 : (char const *) 0;
12684
12685 *t++ = 0;
12686 if (s) return 0;
12687 }
12688 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12689 int x[] = {25, 17};
12690 const int *foo = &x[0];
12691 ++foo;
12692 }
12693 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12694 typedef const int *iptr;
12695 iptr p = 0;
12696 ++p;
12697 }
12698 { /* AIX XL C 1.02.0.0 rejects this saying
12699 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12700 struct s { int j; const int *ap[3]; };
12701 struct s *b; b->j = 5;
12702 }
12703 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12704 const int foo = 10;
12705 if (!foo) return 0;
12706 }
12707 return !cs[0] && !zero.x;
12708 #endif
12709
12710 ;
12711 return 0;
12712 }
12713 _ACEOF
12714 rm -f conftest.$ac_objext
12715 if { (ac_try="$ac_compile"
12716 case "(($ac_try" in
12717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12718 *) ac_try_echo=$ac_try;;
12719 esac
12720 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12721 $as_echo "$ac_try_echo") >&5
12722 (eval "$ac_compile") 2>conftest.er1
12723 ac_status=$?
12724 grep -v '^ *+' conftest.er1 >conftest.err
12725 rm -f conftest.er1
12726 cat conftest.err >&5
12727 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12728 (exit $ac_status); } && {
12729 test -z "$ac_c_werror_flag" ||
12730 test ! -s conftest.err
12731 } && test -s conftest.$ac_objext; then
12732 ac_cv_c_const=yes
12733 else
12734 $as_echo "$as_me: failed program was:" >&5
12735 sed 's/^/| /' conftest.$ac_ext >&5
12736
12737 ac_cv_c_const=no
12738 fi
12739
12740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12741 fi
12742 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
12743 $as_echo "$ac_cv_c_const" >&6; }
12744 if test $ac_cv_c_const = no; then
12745
12746 cat >>confdefs.h <<\_ACEOF
12747 #define const /**/
12748 _ACEOF
12749
12750 fi
12751
12752 { $as_echo "$as_me:$LINENO: checking for pid_t" >&5
12753 $as_echo_n "checking for pid_t... " >&6; }
12754 if test "${ac_cv_type_pid_t+set}" = set; then
12755 $as_echo_n "(cached) " >&6
12756 else
12757 ac_cv_type_pid_t=no
12758 cat >conftest.$ac_ext <<_ACEOF
12759 /* confdefs.h. */
12760 _ACEOF
12761 cat confdefs.h >>conftest.$ac_ext
12762 cat >>conftest.$ac_ext <<_ACEOF
12763 /* end confdefs.h. */
12764 $ac_includes_default
12765 int
12766 main ()
12767 {
12768 if (sizeof (pid_t))
12769 return 0;
12770 ;
12771 return 0;
12772 }
12773 _ACEOF
12774 rm -f conftest.$ac_objext
12775 if { (ac_try="$ac_compile"
12776 case "(($ac_try" in
12777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12778 *) ac_try_echo=$ac_try;;
12779 esac
12780 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12781 $as_echo "$ac_try_echo") >&5
12782 (eval "$ac_compile") 2>conftest.er1
12783 ac_status=$?
12784 grep -v '^ *+' conftest.er1 >conftest.err
12785 rm -f conftest.er1
12786 cat conftest.err >&5
12787 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12788 (exit $ac_status); } && {
12789 test -z "$ac_c_werror_flag" ||
12790 test ! -s conftest.err
12791 } && test -s conftest.$ac_objext; then
12792 cat >conftest.$ac_ext <<_ACEOF
12793 /* confdefs.h. */
12794 _ACEOF
12795 cat confdefs.h >>conftest.$ac_ext
12796 cat >>conftest.$ac_ext <<_ACEOF
12797 /* end confdefs.h. */
12798 $ac_includes_default
12799 int
12800 main ()
12801 {
12802 if (sizeof ((pid_t)))
12803 return 0;
12804 ;
12805 return 0;
12806 }
12807 _ACEOF
12808 rm -f conftest.$ac_objext
12809 if { (ac_try="$ac_compile"
12810 case "(($ac_try" in
12811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12812 *) ac_try_echo=$ac_try;;
12813 esac
12814 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12815 $as_echo "$ac_try_echo") >&5
12816 (eval "$ac_compile") 2>conftest.er1
12817 ac_status=$?
12818 grep -v '^ *+' conftest.er1 >conftest.err
12819 rm -f conftest.er1
12820 cat conftest.err >&5
12821 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12822 (exit $ac_status); } && {
12823 test -z "$ac_c_werror_flag" ||
12824 test ! -s conftest.err
12825 } && test -s conftest.$ac_objext; then
12826 :
12827 else
12828 $as_echo "$as_me: failed program was:" >&5
12829 sed 's/^/| /' conftest.$ac_ext >&5
12830
12831 ac_cv_type_pid_t=yes
12832 fi
12833
12834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12835 else
12836 $as_echo "$as_me: failed program was:" >&5
12837 sed 's/^/| /' conftest.$ac_ext >&5
12838
12839
12840 fi
12841
12842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12843 fi
12844 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
12845 $as_echo "$ac_cv_type_pid_t" >&6; }
12846 if test "x$ac_cv_type_pid_t" = x""yes; then
12847 :
12848 else
12849
12850 cat >>confdefs.h <<_ACEOF
12851 #define pid_t int
12852 _ACEOF
12853
12854 fi
12855
12856
12857 LTLIBOBJS=`echo "$LIBOBJS" | sed 's,\.[^.]* ,.lo ,g;s,\.[^.]*$,.lo,'`
12858
12859
12860 { $as_echo "$as_me:$LINENO: checking whether $CC implements __func__" >&5
12861 $as_echo_n "checking whether $CC implements __func__... " >&6; }
12862 if test "${have_func+set}" = set; then
12863 $as_echo_n "(cached) " >&6
12864 else
12865 cat >conftest.$ac_ext <<_ACEOF
12866 /* confdefs.h. */
12867 _ACEOF
12868 cat confdefs.h >>conftest.$ac_ext
12869 cat >>conftest.$ac_ext <<_ACEOF
12870 /* end confdefs.h. */
12871 #include <stdio.h>
12872 int
12873 main ()
12874 {
12875 printf("%s", __func__);
12876 ;
12877 return 0;
12878 }
12879 _ACEOF
12880 rm -f conftest.$ac_objext conftest$ac_exeext
12881 if { (ac_try="$ac_link"
12882 case "(($ac_try" in
12883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12884 *) ac_try_echo=$ac_try;;
12885 esac
12886 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12887 $as_echo "$ac_try_echo") >&5
12888 (eval "$ac_link") 2>conftest.er1
12889 ac_status=$?
12890 grep -v '^ *+' conftest.er1 >conftest.err
12891 rm -f conftest.er1
12892 cat conftest.err >&5
12893 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12894 (exit $ac_status); } && {
12895 test -z "$ac_c_werror_flag" ||
12896 test ! -s conftest.err
12897 } && test -s conftest$ac_exeext && {
12898 test "$cross_compiling" = yes ||
12899 $as_test_x conftest$ac_exeext
12900 }; then
12901 have_func=yes
12902 else
12903 $as_echo "$as_me: failed program was:" >&5
12904 sed 's/^/| /' conftest.$ac_ext >&5
12905
12906 have_func=no
12907 fi
12908
12909 rm -rf conftest.dSYM
12910 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12911 conftest$ac_exeext conftest.$ac_ext
12912 fi
12913
12914 { $as_echo "$as_me:$LINENO: result: $have_func" >&5
12915 $as_echo "$have_func" >&6; }
12916 if test "$have_func" = yes; then
12917
12918 cat >>confdefs.h <<\_ACEOF
12919 #define HAVE_FUNC /**/
12920 _ACEOF
12921
12922 else
12923 { $as_echo "$as_me:$LINENO: checking whether $CC implements __PRETTY_FUNCTION__" >&5
12924 $as_echo_n "checking whether $CC implements __PRETTY_FUNCTION__... " >&6; }
12925 if test "${have_pretty_function+set}" = set; then
12926 $as_echo_n "(cached) " >&6
12927 else
12928 cat >conftest.$ac_ext <<_ACEOF
12929 /* confdefs.h. */
12930 _ACEOF
12931 cat confdefs.h >>conftest.$ac_ext
12932 cat >>conftest.$ac_ext <<_ACEOF
12933 /* end confdefs.h. */
12934 #include <stdio.h>
12935 int
12936 main ()
12937 {
12938 printf("%s", __PRETTY_FUNCTION__);
12939 ;
12940 return 0;
12941 }
12942 _ACEOF
12943 rm -f conftest.$ac_objext conftest$ac_exeext
12944 if { (ac_try="$ac_link"
12945 case "(($ac_try" in
12946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12947 *) ac_try_echo=$ac_try;;
12948 esac
12949 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12950 $as_echo "$ac_try_echo") >&5
12951 (eval "$ac_link") 2>conftest.er1
12952 ac_status=$?
12953 grep -v '^ *+' conftest.er1 >conftest.err
12954 rm -f conftest.er1
12955 cat conftest.err >&5
12956 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12957 (exit $ac_status); } && {
12958 test -z "$ac_c_werror_flag" ||
12959 test ! -s conftest.err
12960 } && test -s conftest$ac_exeext && {
12961 test "$cross_compiling" = yes ||
12962 $as_test_x conftest$ac_exeext
12963 }; then
12964 have_pretty_function=yes
12965 else
12966 $as_echo "$as_me: failed program was:" >&5
12967 sed 's/^/| /' conftest.$ac_ext >&5
12968
12969 have_pretty_function=no
12970 fi
12971
12972 rm -rf conftest.dSYM
12973 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12974 conftest$ac_exeext conftest.$ac_ext
12975 fi
12976
12977 { $as_echo "$as_me:$LINENO: result: $have_pretty_function" >&5
12978 $as_echo "$have_pretty_function" >&6; }
12979 if test "$have_pretty_function" = yes; then
12980
12981 cat >>confdefs.h <<\_ACEOF
12982 #define HAVE_PRETTY_FUNCTION /**/
12983 _ACEOF
12984
12985 else
12986 { $as_echo "$as_me:$LINENO: checking whether $CC implements __FUNCTION__" >&5
12987 $as_echo_n "checking whether $CC implements __FUNCTION__... " >&6; }
12988 if test "${have_function+set}" = set; then
12989 $as_echo_n "(cached) " >&6
12990 else
12991 cat >conftest.$ac_ext <<_ACEOF
12992 /* confdefs.h. */
12993 _ACEOF
12994 cat confdefs.h >>conftest.$ac_ext
12995 cat >>conftest.$ac_ext <<_ACEOF
12996 /* end confdefs.h. */
12997 #include <stdio.h>
12998 int
12999 main ()
13000 {
13001 printf("%s", __FUNCTION__);
13002 ;
13003 return 0;
13004 }
13005 _ACEOF
13006 rm -f conftest.$ac_objext conftest$ac_exeext
13007 if { (ac_try="$ac_link"
13008 case "(($ac_try" in
13009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13010 *) ac_try_echo=$ac_try;;
13011 esac
13012 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13013 $as_echo "$ac_try_echo") >&5
13014 (eval "$ac_link") 2>conftest.er1
13015 ac_status=$?
13016 grep -v '^ *+' conftest.er1 >conftest.err
13017 rm -f conftest.er1
13018 cat conftest.err >&5
13019 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13020 (exit $ac_status); } && {
13021 test -z "$ac_c_werror_flag" ||
13022 test ! -s conftest.err
13023 } && test -s conftest$ac_exeext && {
13024 test "$cross_compiling" = yes ||
13025 $as_test_x conftest$ac_exeext
13026 }; then
13027 have_function=yes
13028 else
13029 $as_echo "$as_me: failed program was:" >&5
13030 sed 's/^/| /' conftest.$ac_ext >&5
13031
13032 have_function=no
13033 fi
13034
13035 rm -rf conftest.dSYM
13036 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13037 conftest$ac_exeext conftest.$ac_ext
13038 fi
13039
13040 { $as_echo "$as_me:$LINENO: result: $have_function" >&5
13041 $as_echo "$have_function" >&6; }
13042 if test "$have_function" = yes; then
13043
13044 cat >>confdefs.h <<\_ACEOF
13045 #define HAVE_FUNCTION /**/
13046 _ACEOF
13047
13048 fi
13049 fi
13050 fi
13051
13052 { $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
13053 $as_echo_n "checking return type of signal handlers... " >&6; }
13054 if test "${ac_cv_type_signal+set}" = set; then
13055 $as_echo_n "(cached) " >&6
13056 else
13057 cat >conftest.$ac_ext <<_ACEOF
13058 /* confdefs.h. */
13059 _ACEOF
13060 cat confdefs.h >>conftest.$ac_ext
13061 cat >>conftest.$ac_ext <<_ACEOF
13062 /* end confdefs.h. */
13063 #include <sys/types.h>
13064 #include <signal.h>
13065
13066 int
13067 main ()
13068 {
13069 return *(signal (0, 0)) (0) == 1;
13070 ;
13071 return 0;
13072 }
13073 _ACEOF
13074 rm -f conftest.$ac_objext
13075 if { (ac_try="$ac_compile"
13076 case "(($ac_try" in
13077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13078 *) ac_try_echo=$ac_try;;
13079 esac
13080 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13081 $as_echo "$ac_try_echo") >&5
13082 (eval "$ac_compile") 2>conftest.er1
13083 ac_status=$?
13084 grep -v '^ *+' conftest.er1 >conftest.err
13085 rm -f conftest.er1
13086 cat conftest.err >&5
13087 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13088 (exit $ac_status); } && {
13089 test -z "$ac_c_werror_flag" ||
13090 test ! -s conftest.err
13091 } && test -s conftest.$ac_objext; then
13092 ac_cv_type_signal=int
13093 else
13094 $as_echo "$as_me: failed program was:" >&5
13095 sed 's/^/| /' conftest.$ac_ext >&5
13096
13097 ac_cv_type_signal=void
13098 fi
13099
13100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13101 fi
13102 { $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
13103 $as_echo "$ac_cv_type_signal" >&6; }
13104
13105 cat >>confdefs.h <<_ACEOF
13106 #define RETSIGTYPE $ac_cv_type_signal
13107 _ACEOF
13108
13109
13110
13111
13112
13113
13114 for ac_func in gethostname mkdir socket strdup
13115 do
13116 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13117 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
13118 $as_echo_n "checking for $ac_func... " >&6; }
13119 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13120 $as_echo_n "(cached) " >&6
13121 else
13122 cat >conftest.$ac_ext <<_ACEOF
13123 /* confdefs.h. */
13124 _ACEOF
13125 cat confdefs.h >>conftest.$ac_ext
13126 cat >>conftest.$ac_ext <<_ACEOF
13127 /* end confdefs.h. */
13128 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13129 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13130 #define $ac_func innocuous_$ac_func
13131
13132 /* System header to define __stub macros and hopefully few prototypes,
13133 which can conflict with char $ac_func (); below.
13134 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13135 <limits.h> exists even on freestanding compilers. */
13136
13137 #ifdef __STDC__
13138 # include <limits.h>
13139 #else
13140 # include <assert.h>
13141 #endif
13142
13143 #undef $ac_func
13144
13145 /* Override any GCC internal prototype to avoid an error.
13146 Use char because int might match the return type of a GCC
13147 builtin and then its argument prototype would still apply. */
13148 #ifdef __cplusplus
13149 extern "C"
13150 #endif
13151 char $ac_func ();
13152 /* The GNU C library defines this for functions which it implements
13153 to always fail with ENOSYS. Some functions are actually named
13154 something starting with __ and the normal name is an alias. */
13155 #if defined __stub_$ac_func || defined __stub___$ac_func
13156 choke me
13157 #endif
13158
13159 int
13160 main ()
13161 {
13162 return $ac_func ();
13163 ;
13164 return 0;
13165 }
13166 _ACEOF
13167 rm -f conftest.$ac_objext conftest$ac_exeext
13168 if { (ac_try="$ac_link"
13169 case "(($ac_try" in
13170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13171 *) ac_try_echo=$ac_try;;
13172 esac
13173 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13174 $as_echo "$ac_try_echo") >&5
13175 (eval "$ac_link") 2>conftest.er1
13176 ac_status=$?
13177 grep -v '^ *+' conftest.er1 >conftest.err
13178 rm -f conftest.er1
13179 cat conftest.err >&5
13180 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13181 (exit $ac_status); } && {
13182 test -z "$ac_c_werror_flag" ||
13183 test ! -s conftest.err
13184 } && test -s conftest$ac_exeext && {
13185 test "$cross_compiling" = yes ||
13186 $as_test_x conftest$ac_exeext
13187 }; then
13188 eval "$as_ac_var=yes"
13189 else
13190 $as_echo "$as_me: failed program was:" >&5
13191 sed 's/^/| /' conftest.$ac_ext >&5
13192
13193 eval "$as_ac_var=no"
13194 fi
13195
13196 rm -rf conftest.dSYM
13197 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13198 conftest$ac_exeext conftest.$ac_ext
13199 fi
13200 ac_res=`eval 'as_val=${'$as_ac_var'}
13201 $as_echo "$as_val"'`
13202 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13203 $as_echo "$ac_res" >&6; }
13204 as_val=`eval 'as_val=${'$as_ac_var'}
13205 $as_echo "$as_val"'`
13206 if test "x$as_val" = x""yes; then
13207 cat >>confdefs.h <<_ACEOF
13208 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13209 _ACEOF
13210
13211 fi
13212 done
13213
13214
13215
13216 for ac_func in getspnam getuserpw
13217 do
13218 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13219 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
13220 $as_echo_n "checking for $ac_func... " >&6; }
13221 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13222 $as_echo_n "(cached) " >&6
13223 else
13224 cat >conftest.$ac_ext <<_ACEOF
13225 /* confdefs.h. */
13226 _ACEOF
13227 cat confdefs.h >>conftest.$ac_ext
13228 cat >>conftest.$ac_ext <<_ACEOF
13229 /* end confdefs.h. */
13230 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13231 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13232 #define $ac_func innocuous_$ac_func
13233
13234 /* System header to define __stub macros and hopefully few prototypes,
13235 which can conflict with char $ac_func (); below.
13236 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13237 <limits.h> exists even on freestanding compilers. */
13238
13239 #ifdef __STDC__
13240 # include <limits.h>
13241 #else
13242 # include <assert.h>
13243 #endif
13244
13245 #undef $ac_func
13246
13247 /* Override any GCC internal prototype to avoid an error.
13248 Use char because int might match the return type of a GCC
13249 builtin and then its argument prototype would still apply. */
13250 #ifdef __cplusplus
13251 extern "C"
13252 #endif
13253 char $ac_func ();
13254 /* The GNU C library defines this for functions which it implements
13255 to always fail with ENOSYS. Some functions are actually named
13256 something starting with __ and the normal name is an alias. */
13257 #if defined __stub_$ac_func || defined __stub___$ac_func
13258 choke me
13259 #endif
13260
13261 int
13262 main ()
13263 {
13264 return $ac_func ();
13265 ;
13266 return 0;
13267 }
13268 _ACEOF
13269 rm -f conftest.$ac_objext conftest$ac_exeext
13270 if { (ac_try="$ac_link"
13271 case "(($ac_try" in
13272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13273 *) ac_try_echo=$ac_try;;
13274 esac
13275 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13276 $as_echo "$ac_try_echo") >&5
13277 (eval "$ac_link") 2>conftest.er1
13278 ac_status=$?
13279 grep -v '^ *+' conftest.er1 >conftest.err
13280 rm -f conftest.er1
13281 cat conftest.err >&5
13282 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13283 (exit $ac_status); } && {
13284 test -z "$ac_c_werror_flag" ||
13285 test ! -s conftest.err
13286 } && test -s conftest$ac_exeext && {
13287 test "$cross_compiling" = yes ||
13288 $as_test_x conftest$ac_exeext
13289 }; then
13290 eval "$as_ac_var=yes"
13291 else
13292 $as_echo "$as_me: failed program was:" >&5
13293 sed 's/^/| /' conftest.$ac_ext >&5
13294
13295 eval "$as_ac_var=no"
13296 fi
13297
13298 rm -rf conftest.dSYM
13299 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13300 conftest$ac_exeext conftest.$ac_ext
13301 fi
13302 ac_res=`eval 'as_val=${'$as_ac_var'}
13303 $as_echo "$as_val"'`
13304 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13305 $as_echo "$ac_res" >&6; }
13306 as_val=`eval 'as_val=${'$as_ac_var'}
13307 $as_echo "$as_val"'`
13308 if test "x$as_val" = x""yes; then
13309 cat >>confdefs.h <<_ACEOF
13310 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13311 _ACEOF
13312 break
13313 fi
13314 done
13315
13316
13317
13318
13319 for ac_func in asprintf strlcat strlcpy
13320 do
13321 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13322 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
13323 $as_echo_n "checking for $ac_func... " >&6; }
13324 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13325 $as_echo_n "(cached) " >&6
13326 else
13327 cat >conftest.$ac_ext <<_ACEOF
13328 /* confdefs.h. */
13329 _ACEOF
13330 cat confdefs.h >>conftest.$ac_ext
13331 cat >>conftest.$ac_ext <<_ACEOF
13332 /* end confdefs.h. */
13333 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13334 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13335 #define $ac_func innocuous_$ac_func
13336
13337 /* System header to define __stub macros and hopefully few prototypes,
13338 which can conflict with char $ac_func (); below.
13339 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13340 <limits.h> exists even on freestanding compilers. */
13341
13342 #ifdef __STDC__
13343 # include <limits.h>
13344 #else
13345 # include <assert.h>
13346 #endif
13347
13348 #undef $ac_func
13349
13350 /* Override any GCC internal prototype to avoid an error.
13351 Use char because int might match the return type of a GCC
13352 builtin and then its argument prototype would still apply. */
13353 #ifdef __cplusplus
13354 extern "C"
13355 #endif
13356 char $ac_func ();
13357 /* The GNU C library defines this for functions which it implements
13358 to always fail with ENOSYS. Some functions are actually named
13359 something starting with __ and the normal name is an alias. */
13360 #if defined __stub_$ac_func || defined __stub___$ac_func
13361 choke me
13362 #endif
13363
13364 int
13365 main ()
13366 {
13367 return $ac_func ();
13368 ;
13369 return 0;
13370 }
13371 _ACEOF
13372 rm -f conftest.$ac_objext conftest$ac_exeext
13373 if { (ac_try="$ac_link"
13374 case "(($ac_try" in
13375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13376 *) ac_try_echo=$ac_try;;
13377 esac
13378 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13379 $as_echo "$ac_try_echo") >&5
13380 (eval "$ac_link") 2>conftest.er1
13381 ac_status=$?
13382 grep -v '^ *+' conftest.er1 >conftest.err
13383 rm -f conftest.er1
13384 cat conftest.err >&5
13385 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13386 (exit $ac_status); } && {
13387 test -z "$ac_c_werror_flag" ||
13388 test ! -s conftest.err
13389 } && test -s conftest$ac_exeext && {
13390 test "$cross_compiling" = yes ||
13391 $as_test_x conftest$ac_exeext
13392 }; then
13393 eval "$as_ac_var=yes"
13394 else
13395 $as_echo "$as_me: failed program was:" >&5
13396 sed 's/^/| /' conftest.$ac_ext >&5
13397
13398 eval "$as_ac_var=no"
13399 fi
13400
13401 rm -rf conftest.dSYM
13402 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13403 conftest$ac_exeext conftest.$ac_ext
13404 fi
13405 ac_res=`eval 'as_val=${'$as_ac_var'}
13406 $as_echo "$as_val"'`
13407 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13408 $as_echo "$ac_res" >&6; }
13409 as_val=`eval 'as_val=${'$as_ac_var'}
13410 $as_echo "$as_val"'`
13411 if test "x$as_val" = x""yes; then
13412 cat >>confdefs.h <<_ACEOF
13413 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13414 _ACEOF
13415
13416 fi
13417 done
13418
13419
13420 if test $ac_cv_func_getspnam = yes; then
13421 { $as_echo "$as_me:$LINENO: checking if getpwnam_r/getspnam_r take 5 arguments" >&5
13422 $as_echo_n "checking if getpwnam_r/getspnam_r take 5 arguments... " >&6; }
13423 cat >conftest.$ac_ext <<_ACEOF
13424 /* confdefs.h. */
13425 _ACEOF
13426 cat confdefs.h >>conftest.$ac_ext
13427 cat >>conftest.$ac_ext <<_ACEOF
13428 /* end confdefs.h. */
13429
13430 #include <sys/types.h>
13431 #include <pwd.h>
13432 #include <shadow.h>
13433
13434 int
13435 main ()
13436 {
13437
13438 struct passwd *pw;
13439 struct passwd pwbuf;
13440 char pwdata[512];
13441 (void) getpwnam_r("bin", &pwbuf, pwdata, sizeof(pwdata), &pw);
13442
13443 ;
13444 return 0;
13445 }
13446 _ACEOF
13447 rm -f conftest.$ac_objext
13448 if { (ac_try="$ac_compile"
13449 case "(($ac_try" in
13450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13451 *) ac_try_echo=$ac_try;;
13452 esac
13453 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13454 $as_echo "$ac_try_echo") >&5
13455 (eval "$ac_compile") 2>conftest.er1
13456 ac_status=$?
13457 grep -v '^ *+' conftest.er1 >conftest.err
13458 rm -f conftest.er1
13459 cat conftest.err >&5
13460 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13461 (exit $ac_status); } && {
13462 test -z "$ac_c_werror_flag" ||
13463 test ! -s conftest.err
13464 } && test -s conftest.$ac_objext; then
13465 { $as_echo "$as_me:$LINENO: result: yes" >&5
13466 $as_echo "yes" >&6; }
13467
13468 cat >>confdefs.h <<\_ACEOF
13469 #define GETXXNAM_R_5ARG 1
13470 _ACEOF
13471
13472 else
13473 $as_echo "$as_me: failed program was:" >&5
13474 sed 's/^/| /' conftest.$ac_ext >&5
13475
13476 { $as_echo "$as_me:$LINENO: result: no" >&5
13477 $as_echo "no" >&6; }
13478
13479 fi
13480
13481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13482 fi
13483
13484 GETADDRINFOOBJS=""
13485 sasl_cv_getaddrinfo=no
13486
13487 { $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5
13488 $as_echo_n "checking for getaddrinfo... " >&6; }
13489 if test "${ac_cv_func_getaddrinfo+set}" = set; then
13490 $as_echo_n "(cached) " >&6
13491 else
13492 cat >conftest.$ac_ext <<_ACEOF
13493 /* confdefs.h. */
13494 _ACEOF
13495 cat confdefs.h >>conftest.$ac_ext
13496 cat >>conftest.$ac_ext <<_ACEOF
13497 /* end confdefs.h. */
13498 /* Define getaddrinfo to an innocuous variant, in case <limits.h> declares getaddrinfo.
13499 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13500 #define getaddrinfo innocuous_getaddrinfo
13501
13502 /* System header to define __stub macros and hopefully few prototypes,
13503 which can conflict with char getaddrinfo (); below.
13504 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13505 <limits.h> exists even on freestanding compilers. */
13506
13507 #ifdef __STDC__
13508 # include <limits.h>
13509 #else
13510 # include <assert.h>
13511 #endif
13512
13513 #undef getaddrinfo
13514
13515 /* Override any GCC internal prototype to avoid an error.
13516 Use char because int might match the return type of a GCC
13517 builtin and then its argument prototype would still apply. */
13518 #ifdef __cplusplus
13519 extern "C"
13520 #endif
13521 char getaddrinfo ();
13522 /* The GNU C library defines this for functions which it implements
13523 to always fail with ENOSYS. Some functions are actually named
13524 something starting with __ and the normal name is an alias. */
13525 #if defined __stub_getaddrinfo || defined __stub___getaddrinfo
13526 choke me
13527 #endif
13528
13529 int
13530 main ()
13531 {
13532 return getaddrinfo ();
13533 ;
13534 return 0;
13535 }
13536 _ACEOF
13537 rm -f conftest.$ac_objext conftest$ac_exeext
13538 if { (ac_try="$ac_link"
13539 case "(($ac_try" in
13540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13541 *) ac_try_echo=$ac_try;;
13542 esac
13543 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13544 $as_echo "$ac_try_echo") >&5
13545 (eval "$ac_link") 2>conftest.er1
13546 ac_status=$?
13547 grep -v '^ *+' conftest.er1 >conftest.err
13548 rm -f conftest.er1
13549 cat conftest.err >&5
13550 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13551 (exit $ac_status); } && {
13552 test -z "$ac_c_werror_flag" ||
13553 test ! -s conftest.err
13554 } && test -s conftest$ac_exeext && {
13555 test "$cross_compiling" = yes ||
13556 $as_test_x conftest$ac_exeext
13557 }; then
13558 ac_cv_func_getaddrinfo=yes
13559 else
13560 $as_echo "$as_me: failed program was:" >&5
13561 sed 's/^/| /' conftest.$ac_ext >&5
13562
13563 ac_cv_func_getaddrinfo=no
13564 fi
13565
13566 rm -rf conftest.dSYM
13567 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13568 conftest$ac_exeext conftest.$ac_ext
13569 fi
13570 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
13571 $as_echo "$ac_cv_func_getaddrinfo" >&6; }
13572 if test "x$ac_cv_func_getaddrinfo" = x""yes; then
13573 ac_cv_lib_socket_getaddrinfo=no
13574 ac_cv_lib_inet6_getaddrinfo=no
13575
13576 else
13577 { $as_echo "$as_me:$LINENO: checking for getaddrinfo in -lsocket" >&5
13578 $as_echo_n "checking for getaddrinfo in -lsocket... " >&6; }
13579 if test "${ac_cv_lib_socket_getaddrinfo+set}" = set; then
13580 $as_echo_n "(cached) " >&6
13581 else
13582 ac_check_lib_save_LIBS=$LIBS
13583 LIBS="-lsocket $LIBS"
13584 cat >conftest.$ac_ext <<_ACEOF
13585 /* confdefs.h. */
13586 _ACEOF
13587 cat confdefs.h >>conftest.$ac_ext
13588 cat >>conftest.$ac_ext <<_ACEOF
13589 /* end confdefs.h. */
13590
13591 /* Override any GCC internal prototype to avoid an error.
13592 Use char because int might match the return type of a GCC
13593 builtin and then its argument prototype would still apply. */
13594 #ifdef __cplusplus
13595 extern "C"
13596 #endif
13597 char getaddrinfo ();
13598 int
13599 main ()
13600 {
13601 return getaddrinfo ();
13602 ;
13603 return 0;
13604 }
13605 _ACEOF
13606 rm -f conftest.$ac_objext conftest$ac_exeext
13607 if { (ac_try="$ac_link"
13608 case "(($ac_try" in
13609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13610 *) ac_try_echo=$ac_try;;
13611 esac
13612 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13613 $as_echo "$ac_try_echo") >&5
13614 (eval "$ac_link") 2>conftest.er1
13615 ac_status=$?
13616 grep -v '^ *+' conftest.er1 >conftest.err
13617 rm -f conftest.er1
13618 cat conftest.err >&5
13619 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13620 (exit $ac_status); } && {
13621 test -z "$ac_c_werror_flag" ||
13622 test ! -s conftest.err
13623 } && test -s conftest$ac_exeext && {
13624 test "$cross_compiling" = yes ||
13625 $as_test_x conftest$ac_exeext
13626 }; then
13627 ac_cv_lib_socket_getaddrinfo=yes
13628 else
13629 $as_echo "$as_me: failed program was:" >&5
13630 sed 's/^/| /' conftest.$ac_ext >&5
13631
13632 ac_cv_lib_socket_getaddrinfo=no
13633 fi
13634
13635 rm -rf conftest.dSYM
13636 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13637 conftest$ac_exeext conftest.$ac_ext
13638 LIBS=$ac_check_lib_save_LIBS
13639 fi
13640 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getaddrinfo" >&5
13641 $as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; }
13642 if test "x$ac_cv_lib_socket_getaddrinfo" = x""yes; then
13643 LIBS="$LIBS -lsocket"
13644 ac_cv_lib_inet6_getaddrinfo=no
13645
13646 else
13647 { $as_echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
13648 $as_echo_n "checking whether your system has IPv6 directory... " >&6; }
13649 if test "${ipv6_cv_dir+set}" = set; then
13650 $as_echo_n "(cached) " >&6
13651 else
13652 for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
13653 if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
13654 break
13655 fi
13656 done
13657 fi
13658 { $as_echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
13659 $as_echo "$ipv6_cv_dir" >&6; }
13660 if test $ipv6_cv_dir = no; then
13661 ac_cv_lib_inet6_getaddrinfo=no
13662 else
13663 if test x$ipv6_libinet6 = x; then
13664 ipv6_libinet6=no
13665 SAVELDFLAGS="$LDFLAGS"
13666 LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
13667 fi
13668 { $as_echo "$as_me:$LINENO: checking for getaddrinfo in -linet6" >&5
13669 $as_echo_n "checking for getaddrinfo in -linet6... " >&6; }
13670 if test "${ac_cv_lib_inet6_getaddrinfo+set}" = set; then
13671 $as_echo_n "(cached) " >&6
13672 else
13673 ac_check_lib_save_LIBS=$LIBS
13674 LIBS="-linet6 $LIBS"
13675 cat >conftest.$ac_ext <<_ACEOF
13676 /* confdefs.h. */
13677 _ACEOF
13678 cat confdefs.h >>conftest.$ac_ext
13679 cat >>conftest.$ac_ext <<_ACEOF
13680 /* end confdefs.h. */
13681
13682 /* Override any GCC internal prototype to avoid an error.
13683 Use char because int might match the return type of a GCC
13684 builtin and then its argument prototype would still apply. */
13685 #ifdef __cplusplus
13686 extern "C"
13687 #endif
13688 char getaddrinfo ();
13689 int
13690 main ()
13691 {
13692 return getaddrinfo ();
13693 ;
13694 return 0;
13695 }
13696 _ACEOF
13697 rm -f conftest.$ac_objext conftest$ac_exeext
13698 if { (ac_try="$ac_link"
13699 case "(($ac_try" in
13700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13701 *) ac_try_echo=$ac_try;;
13702 esac
13703 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13704 $as_echo "$ac_try_echo") >&5
13705 (eval "$ac_link") 2>conftest.er1
13706 ac_status=$?
13707 grep -v '^ *+' conftest.er1 >conftest.err
13708 rm -f conftest.er1
13709 cat conftest.err >&5
13710 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13711 (exit $ac_status); } && {
13712 test -z "$ac_c_werror_flag" ||
13713 test ! -s conftest.err
13714 } && test -s conftest$ac_exeext && {
13715 test "$cross_compiling" = yes ||
13716 $as_test_x conftest$ac_exeext
13717 }; then
13718 ac_cv_lib_inet6_getaddrinfo=yes
13719 else
13720 $as_echo "$as_me: failed program was:" >&5
13721 sed 's/^/| /' conftest.$ac_ext >&5
13722
13723 ac_cv_lib_inet6_getaddrinfo=no
13724 fi
13725
13726 rm -rf conftest.dSYM
13727 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13728 conftest$ac_exeext conftest.$ac_ext
13729 LIBS=$ac_check_lib_save_LIBS
13730 fi
13731 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getaddrinfo" >&5
13732 $as_echo "$ac_cv_lib_inet6_getaddrinfo" >&6; }
13733 if test "x$ac_cv_lib_inet6_getaddrinfo" = x""yes; then
13734 if test $ipv6_libinet6 = no; then
13735 ipv6_libinet6=yes
13736 LIBS="$LIBS -linet6"
13737 fi
13738 fi
13739 if test $ipv6_libinet6 = no; then
13740 LDFLAGS="$SAVELDFLAGS"
13741 fi
13742 fi
13743 fi
13744
13745 fi
13746 ipv6_cv_getaddrinfo=no
13747 if test $ac_cv_func_getaddrinfo = yes -o $ac_cv_lib_socket_getaddrinfo = yes \
13748 -o $ac_cv_lib_inet6_getaddrinfo = yes
13749 then
13750 ipv6_cv_getaddrinfo=yes
13751 fi
13752 if test $ipv6_cv_getaddrinfo = no; then
13753 if test getaddrinfo = getaddrinfo; then
13754 for ipv6_cv_pfx in o n; do
13755 cat >conftest.$ac_ext <<_ACEOF
13756 /* confdefs.h. */
13757 _ACEOF
13758 cat confdefs.h >>conftest.$ac_ext
13759 cat >>conftest.$ac_ext <<_ACEOF
13760 /* end confdefs.h. */
13761 #include <netdb.h>
13762
13763 _ACEOF
13764 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13765 $EGREP "${ipv6_cv_pfx}getaddrinfo" >/dev/null 2>&1; then
13766 as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}getaddrinfo" | $as_tr_sh`
13767 { $as_echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getaddrinfo" >&5
13768 $as_echo_n "checking for ${ipv6_cv_pfx}getaddrinfo... " >&6; }
13769 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13770 $as_echo_n "(cached) " >&6
13771 else
13772 cat >conftest.$ac_ext <<_ACEOF
13773 /* confdefs.h. */
13774 _ACEOF
13775 cat confdefs.h >>conftest.$ac_ext
13776 cat >>conftest.$ac_ext <<_ACEOF
13777 /* end confdefs.h. */
13778 /* Define ${ipv6_cv_pfx}getaddrinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getaddrinfo.
13779 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13780 #define ${ipv6_cv_pfx}getaddrinfo innocuous_${ipv6_cv_pfx}getaddrinfo
13781
13782 /* System header to define __stub macros and hopefully few prototypes,
13783 which can conflict with char ${ipv6_cv_pfx}getaddrinfo (); below.
13784 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13785 <limits.h> exists even on freestanding compilers. */
13786
13787 #ifdef __STDC__
13788 # include <limits.h>
13789 #else
13790 # include <assert.h>
13791 #endif
13792
13793 #undef ${ipv6_cv_pfx}getaddrinfo
13794
13795 /* Override any GCC internal prototype to avoid an error.
13796 Use char because int might match the return type of a GCC
13797 builtin and then its argument prototype would still apply. */
13798 #ifdef __cplusplus
13799 extern "C"
13800 #endif
13801 char ${ipv6_cv_pfx}getaddrinfo ();
13802 /* The GNU C library defines this for functions which it implements
13803 to always fail with ENOSYS. Some functions are actually named
13804 something starting with __ and the normal name is an alias. */
13805 #if defined __stub_${ipv6_cv_pfx}getaddrinfo || defined __stub___${ipv6_cv_pfx}getaddrinfo
13806 choke me
13807 #endif
13808
13809 int
13810 main ()
13811 {
13812 return ${ipv6_cv_pfx}getaddrinfo ();
13813 ;
13814 return 0;
13815 }
13816 _ACEOF
13817 rm -f conftest.$ac_objext conftest$ac_exeext
13818 if { (ac_try="$ac_link"
13819 case "(($ac_try" in
13820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13821 *) ac_try_echo=$ac_try;;
13822 esac
13823 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13824 $as_echo "$ac_try_echo") >&5
13825 (eval "$ac_link") 2>conftest.er1
13826 ac_status=$?
13827 grep -v '^ *+' conftest.er1 >conftest.err
13828 rm -f conftest.er1
13829 cat conftest.err >&5
13830 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13831 (exit $ac_status); } && {
13832 test -z "$ac_c_werror_flag" ||
13833 test ! -s conftest.err
13834 } && test -s conftest$ac_exeext && {
13835 test "$cross_compiling" = yes ||
13836 $as_test_x conftest$ac_exeext
13837 }; then
13838 eval "$as_ac_var=yes"
13839 else
13840 $as_echo "$as_me: failed program was:" >&5
13841 sed 's/^/| /' conftest.$ac_ext >&5
13842
13843 eval "$as_ac_var=no"
13844 fi
13845
13846 rm -rf conftest.dSYM
13847 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13848 conftest$ac_exeext conftest.$ac_ext
13849 fi
13850 ac_res=`eval 'as_val=${'$as_ac_var'}
13851 $as_echo "$as_val"'`
13852 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
13853 $as_echo "$ac_res" >&6; }
13854 as_val=`eval 'as_val=${'$as_ac_var'}
13855 $as_echo "$as_val"'`
13856
13857 fi
13858 rm -f conftest*
13859
13860 if eval test X\$ac_cv_func_${ipv6_cv_pfx}getaddrinfo = Xyes; then
13861
13862 cat >>confdefs.h <<\_ACEOF
13863 #define HAVE_GETADDRINFO /**/
13864 _ACEOF
13865
13866 ipv6_cv_getaddrinfo=yes
13867 break
13868 fi
13869 done
13870 fi
13871 fi
13872 if test $ipv6_cv_getaddrinfo = yes; then
13873
13874 cat >>confdefs.h <<\_ACEOF
13875 #define HAVE_GETADDRINFO /**/
13876 _ACEOF
13877
13878 else
13879 sasl_cv_getaddrinfo=yes
13880 fi
13881 if test $sasl_cv_getaddrinfo = yes; then
13882 case " $LIBOBJS " in
13883 *" getaddrinfo.$ac_objext "* ) ;;
13884 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13885 ;;
13886 esac
13887
13888 fi
13889
13890 GETNAMEINFOOBJS=""
13891 sasl_cv_getnameinfo=no
13892
13893 { $as_echo "$as_me:$LINENO: checking for getnameinfo" >&5
13894 $as_echo_n "checking for getnameinfo... " >&6; }
13895 if test "${ac_cv_func_getnameinfo+set}" = set; then
13896 $as_echo_n "(cached) " >&6
13897 else
13898 cat >conftest.$ac_ext <<_ACEOF
13899 /* confdefs.h. */
13900 _ACEOF
13901 cat confdefs.h >>conftest.$ac_ext
13902 cat >>conftest.$ac_ext <<_ACEOF
13903 /* end confdefs.h. */
13904 /* Define getnameinfo to an innocuous variant, in case <limits.h> declares getnameinfo.
13905 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13906 #define getnameinfo innocuous_getnameinfo
13907
13908 /* System header to define __stub macros and hopefully few prototypes,
13909 which can conflict with char getnameinfo (); below.
13910 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13911 <limits.h> exists even on freestanding compilers. */
13912
13913 #ifdef __STDC__
13914 # include <limits.h>
13915 #else
13916 # include <assert.h>
13917 #endif
13918
13919 #undef getnameinfo
13920
13921 /* Override any GCC internal prototype to avoid an error.
13922 Use char because int might match the return type of a GCC
13923 builtin and then its argument prototype would still apply. */
13924 #ifdef __cplusplus
13925 extern "C"
13926 #endif
13927 char getnameinfo ();
13928 /* The GNU C library defines this for functions which it implements
13929 to always fail with ENOSYS. Some functions are actually named
13930 something starting with __ and the normal name is an alias. */
13931 #if defined __stub_getnameinfo || defined __stub___getnameinfo
13932 choke me
13933 #endif
13934
13935 int
13936 main ()
13937 {
13938 return getnameinfo ();
13939 ;
13940 return 0;
13941 }
13942 _ACEOF
13943 rm -f conftest.$ac_objext conftest$ac_exeext
13944 if { (ac_try="$ac_link"
13945 case "(($ac_try" in
13946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13947 *) ac_try_echo=$ac_try;;
13948 esac
13949 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13950 $as_echo "$ac_try_echo") >&5
13951 (eval "$ac_link") 2>conftest.er1
13952 ac_status=$?
13953 grep -v '^ *+' conftest.er1 >conftest.err
13954 rm -f conftest.er1
13955 cat conftest.err >&5
13956 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13957 (exit $ac_status); } && {
13958 test -z "$ac_c_werror_flag" ||
13959 test ! -s conftest.err
13960 } && test -s conftest$ac_exeext && {
13961 test "$cross_compiling" = yes ||
13962 $as_test_x conftest$ac_exeext
13963 }; then
13964 ac_cv_func_getnameinfo=yes
13965 else
13966 $as_echo "$as_me: failed program was:" >&5
13967 sed 's/^/| /' conftest.$ac_ext >&5
13968
13969 ac_cv_func_getnameinfo=no
13970 fi
13971
13972 rm -rf conftest.dSYM
13973 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13974 conftest$ac_exeext conftest.$ac_ext
13975 fi
13976 { $as_echo "$as_me:$LINENO: result: $ac_cv_func_getnameinfo" >&5
13977 $as_echo "$ac_cv_func_getnameinfo" >&6; }
13978 if test "x$ac_cv_func_getnameinfo" = x""yes; then
13979 ac_cv_lib_socket_getnameinfo=no
13980 ac_cv_lib_inet6_getnameinfo=no
13981
13982 else
13983 { $as_echo "$as_me:$LINENO: checking for getnameinfo in -lsocket" >&5
13984 $as_echo_n "checking for getnameinfo in -lsocket... " >&6; }
13985 if test "${ac_cv_lib_socket_getnameinfo+set}" = set; then
13986 $as_echo_n "(cached) " >&6
13987 else
13988 ac_check_lib_save_LIBS=$LIBS
13989 LIBS="-lsocket $LIBS"
13990 cat >conftest.$ac_ext <<_ACEOF
13991 /* confdefs.h. */
13992 _ACEOF
13993 cat confdefs.h >>conftest.$ac_ext
13994 cat >>conftest.$ac_ext <<_ACEOF
13995 /* end confdefs.h. */
13996
13997 /* Override any GCC internal prototype to avoid an error.
13998 Use char because int might match the return type of a GCC
13999 builtin and then its argument prototype would still apply. */
14000 #ifdef __cplusplus
14001 extern "C"
14002 #endif
14003 char getnameinfo ();
14004 int
14005 main ()
14006 {
14007 return getnameinfo ();
14008 ;
14009 return 0;
14010 }
14011 _ACEOF
14012 rm -f conftest.$ac_objext conftest$ac_exeext
14013 if { (ac_try="$ac_link"
14014 case "(($ac_try" in
14015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14016 *) ac_try_echo=$ac_try;;
14017 esac
14018 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14019 $as_echo "$ac_try_echo") >&5
14020 (eval "$ac_link") 2>conftest.er1
14021 ac_status=$?
14022 grep -v '^ *+' conftest.er1 >conftest.err
14023 rm -f conftest.er1
14024 cat conftest.err >&5
14025 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14026 (exit $ac_status); } && {
14027 test -z "$ac_c_werror_flag" ||
14028 test ! -s conftest.err
14029 } && test -s conftest$ac_exeext && {
14030 test "$cross_compiling" = yes ||
14031 $as_test_x conftest$ac_exeext
14032 }; then
14033 ac_cv_lib_socket_getnameinfo=yes
14034 else
14035 $as_echo "$as_me: failed program was:" >&5
14036 sed 's/^/| /' conftest.$ac_ext >&5
14037
14038 ac_cv_lib_socket_getnameinfo=no
14039 fi
14040
14041 rm -rf conftest.dSYM
14042 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14043 conftest$ac_exeext conftest.$ac_ext
14044 LIBS=$ac_check_lib_save_LIBS
14045 fi
14046 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getnameinfo" >&5
14047 $as_echo "$ac_cv_lib_socket_getnameinfo" >&6; }
14048 if test "x$ac_cv_lib_socket_getnameinfo" = x""yes; then
14049 LIBS="$LIBS -lsocket"
14050 ac_cv_lib_inet6_getnameinfo=no
14051
14052 else
14053 { $as_echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5
14054 $as_echo_n "checking whether your system has IPv6 directory... " >&6; }
14055 if test "${ipv6_cv_dir+set}" = set; then
14056 $as_echo_n "(cached) " >&6
14057 else
14058 for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do
14059 if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then
14060 break
14061 fi
14062 done
14063 fi
14064 { $as_echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5
14065 $as_echo "$ipv6_cv_dir" >&6; }
14066 if test $ipv6_cv_dir = no; then
14067 ac_cv_lib_inet6_getnameinfo=no
14068 else
14069 if test x$ipv6_libinet6 = x; then
14070 ipv6_libinet6=no
14071 SAVELDFLAGS="$LDFLAGS"
14072 LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib"
14073 fi
14074 { $as_echo "$as_me:$LINENO: checking for getnameinfo in -linet6" >&5
14075 $as_echo_n "checking for getnameinfo in -linet6... " >&6; }
14076 if test "${ac_cv_lib_inet6_getnameinfo+set}" = set; then
14077 $as_echo_n "(cached) " >&6
14078 else
14079 ac_check_lib_save_LIBS=$LIBS
14080 LIBS="-linet6 $LIBS"
14081 cat >conftest.$ac_ext <<_ACEOF
14082 /* confdefs.h. */
14083 _ACEOF
14084 cat confdefs.h >>conftest.$ac_ext
14085 cat >>conftest.$ac_ext <<_ACEOF
14086 /* end confdefs.h. */
14087
14088 /* Override any GCC internal prototype to avoid an error.
14089 Use char because int might match the return type of a GCC
14090 builtin and then its argument prototype would still apply. */
14091 #ifdef __cplusplus
14092 extern "C"
14093 #endif
14094 char getnameinfo ();
14095 int
14096 main ()
14097 {
14098 return getnameinfo ();
14099 ;
14100 return 0;
14101 }
14102 _ACEOF
14103 rm -f conftest.$ac_objext conftest$ac_exeext
14104 if { (ac_try="$ac_link"
14105 case "(($ac_try" in
14106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14107 *) ac_try_echo=$ac_try;;
14108 esac
14109 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14110 $as_echo "$ac_try_echo") >&5
14111 (eval "$ac_link") 2>conftest.er1
14112 ac_status=$?
14113 grep -v '^ *+' conftest.er1 >conftest.err
14114 rm -f conftest.er1
14115 cat conftest.err >&5
14116 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14117 (exit $ac_status); } && {
14118 test -z "$ac_c_werror_flag" ||
14119 test ! -s conftest.err
14120 } && test -s conftest$ac_exeext && {
14121 test "$cross_compiling" = yes ||
14122 $as_test_x conftest$ac_exeext
14123 }; then
14124 ac_cv_lib_inet6_getnameinfo=yes
14125 else
14126 $as_echo "$as_me: failed program was:" >&5
14127 sed 's/^/| /' conftest.$ac_ext >&5
14128
14129 ac_cv_lib_inet6_getnameinfo=no
14130 fi
14131
14132 rm -rf conftest.dSYM
14133 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14134 conftest$ac_exeext conftest.$ac_ext
14135 LIBS=$ac_check_lib_save_LIBS
14136 fi
14137 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getnameinfo" >&5
14138 $as_echo "$ac_cv_lib_inet6_getnameinfo" >&6; }
14139 if test "x$ac_cv_lib_inet6_getnameinfo" = x""yes; then
14140 if test $ipv6_libinet6 = no; then
14141 ipv6_libinet6=yes
14142 LIBS="$LIBS -linet6"
14143 fi
14144 fi
14145 if test $ipv6_libinet6 = no; then
14146 LDFLAGS="$SAVELDFLAGS"
14147 fi
14148 fi
14149 fi
14150
14151 fi
14152 ipv6_cv_getnameinfo=no
14153 if test $ac_cv_func_getnameinfo = yes -o $ac_cv_lib_socket_getnameinfo = yes \
14154 -o $ac_cv_lib_inet6_getnameinfo = yes
14155 then
14156 ipv6_cv_getnameinfo=yes
14157 fi
14158 if test $ipv6_cv_getnameinfo = no; then
14159 if test getnameinfo = getaddrinfo; then
14160 for ipv6_cv_pfx in o n; do
14161 cat >conftest.$ac_ext <<_ACEOF
14162 /* confdefs.h. */
14163 _ACEOF
14164 cat confdefs.h >>conftest.$ac_ext
14165 cat >>conftest.$ac_ext <<_ACEOF
14166 /* end confdefs.h. */
14167 #include <netdb.h>
14168
14169 _ACEOF
14170 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14171 $EGREP "${ipv6_cv_pfx}getnameinfo" >/dev/null 2>&1; then
14172 as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}getnameinfo" | $as_tr_sh`
14173 { $as_echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getnameinfo" >&5
14174 $as_echo_n "checking for ${ipv6_cv_pfx}getnameinfo... " >&6; }
14175 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
14176 $as_echo_n "(cached) " >&6
14177 else
14178 cat >conftest.$ac_ext <<_ACEOF
14179 /* confdefs.h. */
14180 _ACEOF
14181 cat confdefs.h >>conftest.$ac_ext
14182 cat >>conftest.$ac_ext <<_ACEOF
14183 /* end confdefs.h. */
14184 /* Define ${ipv6_cv_pfx}getnameinfo to an innocuous variant, in case <limits.h> declares ${ipv6_cv_pfx}getnameinfo.
14185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14186 #define ${ipv6_cv_pfx}getnameinfo innocuous_${ipv6_cv_pfx}getnameinfo
14187
14188 /* System header to define __stub macros and hopefully few prototypes,
14189 which can conflict with char ${ipv6_cv_pfx}getnameinfo (); below.
14190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14191 <limits.h> exists even on freestanding compilers. */
14192
14193 #ifdef __STDC__
14194 # include <limits.h>
14195 #else
14196 # include <assert.h>
14197 #endif
14198
14199 #undef ${ipv6_cv_pfx}getnameinfo
14200
14201 /* Override any GCC internal prototype to avoid an error.
14202 Use char because int might match the return type of a GCC
14203 builtin and then its argument prototype would still apply. */
14204 #ifdef __cplusplus
14205 extern "C"
14206 #endif
14207 char ${ipv6_cv_pfx}getnameinfo ();
14208 /* The GNU C library defines this for functions which it implements
14209 to always fail with ENOSYS. Some functions are actually named
14210 something starting with __ and the normal name is an alias. */
14211 #if defined __stub_${ipv6_cv_pfx}getnameinfo || defined __stub___${ipv6_cv_pfx}getnameinfo
14212 choke me
14213 #endif
14214
14215 int
14216 main ()
14217 {
14218 return ${ipv6_cv_pfx}getnameinfo ();
14219 ;
14220 return 0;
14221 }
14222 _ACEOF
14223 rm -f conftest.$ac_objext conftest$ac_exeext
14224 if { (ac_try="$ac_link"
14225 case "(($ac_try" in
14226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14227 *) ac_try_echo=$ac_try;;
14228 esac
14229 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14230 $as_echo "$ac_try_echo") >&5
14231 (eval "$ac_link") 2>conftest.er1
14232 ac_status=$?
14233 grep -v '^ *+' conftest.er1 >conftest.err
14234 rm -f conftest.er1
14235 cat conftest.err >&5
14236 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14237 (exit $ac_status); } && {
14238 test -z "$ac_c_werror_flag" ||
14239 test ! -s conftest.err
14240 } && test -s conftest$ac_exeext && {
14241 test "$cross_compiling" = yes ||
14242 $as_test_x conftest$ac_exeext
14243 }; then
14244 eval "$as_ac_var=yes"
14245 else
14246 $as_echo "$as_me: failed program was:" >&5
14247 sed 's/^/| /' conftest.$ac_ext >&5
14248
14249 eval "$as_ac_var=no"
14250 fi
14251
14252 rm -rf conftest.dSYM
14253 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14254 conftest$ac_exeext conftest.$ac_ext
14255 fi
14256 ac_res=`eval 'as_val=${'$as_ac_var'}
14257 $as_echo "$as_val"'`
14258 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
14259 $as_echo "$ac_res" >&6; }
14260 as_val=`eval 'as_val=${'$as_ac_var'}
14261 $as_echo "$as_val"'`
14262
14263 fi
14264 rm -f conftest*
14265
14266 if eval test X\$ac_cv_func_${ipv6_cv_pfx}getnameinfo = Xyes; then
14267
14268 cat >>confdefs.h <<\_ACEOF
14269 #define HAVE_GETADDRINFO /**/
14270 _ACEOF
14271
14272 ipv6_cv_getnameinfo=yes
14273 break
14274 fi
14275 done
14276 fi
14277 fi
14278 if test $ipv6_cv_getnameinfo = yes; then
14279
14280 cat >>confdefs.h <<\_ACEOF
14281 #define HAVE_GETNAMEINFO /**/
14282 _ACEOF
14283
14284 else
14285 sasl_cv_getnameinfo=yes
14286 fi
14287 if test $sasl_cv_getnameinfo = yes; then
14288 case " $LIBOBJS " in
14289 *" getnameinfo.$ac_objext "* ) ;;
14290 *) LIBOBJS="$LIBOBJS getnameinfo.$ac_objext"
14291 ;;
14292 esac
14293
14294 fi
14295
14296
14297 { $as_echo "$as_me:$LINENO: checking whether you have ss_family in struct sockaddr_storage" >&5
14298 $as_echo_n "checking whether you have ss_family in struct sockaddr_storage... " >&6; }
14299 if test "${ipv6_cv_ss_family+set}" = set; then
14300 $as_echo_n "(cached) " >&6
14301 else
14302 cat >conftest.$ac_ext <<_ACEOF
14303 /* confdefs.h. */
14304 _ACEOF
14305 cat confdefs.h >>conftest.$ac_ext
14306 cat >>conftest.$ac_ext <<_ACEOF
14307 /* end confdefs.h. */
14308 #include <sys/types.h>
14309 #include <sys/socket.h>
14310 int
14311 main ()
14312 {
14313 struct sockaddr_storage ss; int i = ss.ss_family;
14314 ;
14315 return 0;
14316 }
14317 _ACEOF
14318 rm -f conftest.$ac_objext
14319 if { (ac_try="$ac_compile"
14320 case "(($ac_try" in
14321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14322 *) ac_try_echo=$ac_try;;
14323 esac
14324 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14325 $as_echo "$ac_try_echo") >&5
14326 (eval "$ac_compile") 2>conftest.er1
14327 ac_status=$?
14328 grep -v '^ *+' conftest.er1 >conftest.err
14329 rm -f conftest.er1
14330 cat conftest.err >&5
14331 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14332 (exit $ac_status); } && {
14333 test -z "$ac_c_werror_flag" ||
14334 test ! -s conftest.err
14335 } && test -s conftest.$ac_objext; then
14336 ipv6_cv_ss_family=yes
14337 else
14338 $as_echo "$as_me: failed program was:" >&5
14339 sed 's/^/| /' conftest.$ac_ext >&5
14340
14341 ipv6_cv_ss_family=no
14342 fi
14343
14344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14345 fi
14346 if test $ipv6_cv_ss_family = yes; then
14347
14348 cat >>confdefs.h <<\_ACEOF
14349 #define HAVE_SS_FAMILY /**/
14350 _ACEOF
14351
14352 else
14353 :
14354 fi
14355 { $as_echo "$as_me:$LINENO: result: $ipv6_cv_ss_family" >&5
14356 $as_echo "$ipv6_cv_ss_family" >&6; }
14357
14358 { $as_echo "$as_me:$LINENO: checking whether you have sa_len in struct sockaddr" >&5
14359 $as_echo_n "checking whether you have sa_len in struct sockaddr... " >&6; }
14360 if test "${ipv6_cv_sa_len+set}" = set; then
14361 $as_echo_n "(cached) " >&6
14362 else
14363 cat >conftest.$ac_ext <<_ACEOF
14364 /* confdefs.h. */
14365 _ACEOF
14366 cat confdefs.h >>conftest.$ac_ext
14367 cat >>conftest.$ac_ext <<_ACEOF
14368 /* end confdefs.h. */
14369 #include <sys/types.h>
14370 #include <sys/socket.h>
14371 int
14372 main ()
14373 {
14374 struct sockaddr sa; int i = sa.sa_len;
14375 ;
14376 return 0;
14377 }
14378 _ACEOF
14379 rm -f conftest.$ac_objext
14380 if { (ac_try="$ac_compile"
14381 case "(($ac_try" in
14382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14383 *) ac_try_echo=$ac_try;;
14384 esac
14385 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14386 $as_echo "$ac_try_echo") >&5
14387 (eval "$ac_compile") 2>conftest.er1
14388 ac_status=$?
14389 grep -v '^ *+' conftest.er1 >conftest.err
14390 rm -f conftest.er1
14391 cat conftest.err >&5
14392 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14393 (exit $ac_status); } && {
14394 test -z "$ac_c_werror_flag" ||
14395 test ! -s conftest.err
14396 } && test -s conftest.$ac_objext; then
14397 ipv6_cv_sa_len=yes
14398 else
14399 $as_echo "$as_me: failed program was:" >&5
14400 sed 's/^/| /' conftest.$ac_ext >&5
14401
14402 ipv6_cv_sa_len=no
14403 fi
14404
14405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14406 fi
14407 if test $ipv6_cv_sa_len = yes; then
14408
14409 cat >>confdefs.h <<\_ACEOF
14410 #define HAVE_SOCKADDR_SA_LEN /**/
14411 _ACEOF
14412
14413 else
14414 :
14415 fi
14416 { $as_echo "$as_me:$LINENO: result: $ipv6_cv_sa_len" >&5
14417 $as_echo "$ipv6_cv_sa_len" >&6; }
14418
14419 { $as_echo "$as_me:$LINENO: checking for socklen_t" >&5
14420 $as_echo_n "checking for socklen_t... " >&6; }
14421 if test "${ipv6_cv_socklen_t+set}" = set; then
14422 $as_echo_n "(cached) " >&6
14423 else
14424 cat >conftest.$ac_ext <<_ACEOF
14425 /* confdefs.h. */
14426 _ACEOF
14427 cat confdefs.h >>conftest.$ac_ext
14428 cat >>conftest.$ac_ext <<_ACEOF
14429 /* end confdefs.h. */
14430 #include <sys/types.h>
14431 #include <sys/socket.h>
14432 int
14433 main ()
14434 {
14435 socklen_t len = 0;
14436 ;
14437 return 0;
14438 }
14439 _ACEOF
14440 rm -f conftest.$ac_objext conftest$ac_exeext
14441 if { (ac_try="$ac_link"
14442 case "(($ac_try" in
14443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14444 *) ac_try_echo=$ac_try;;
14445 esac
14446 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14447 $as_echo "$ac_try_echo") >&5
14448 (eval "$ac_link") 2>conftest.er1
14449 ac_status=$?
14450 grep -v '^ *+' conftest.er1 >conftest.err
14451 rm -f conftest.er1
14452 cat conftest.err >&5
14453 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14454 (exit $ac_status); } && {
14455 test -z "$ac_c_werror_flag" ||
14456 test ! -s conftest.err
14457 } && test -s conftest$ac_exeext && {
14458 test "$cross_compiling" = yes ||
14459 $as_test_x conftest$ac_exeext
14460 }; then
14461 ipv6_cv_socklen_t=yes
14462 else
14463 $as_echo "$as_me: failed program was:" >&5
14464 sed 's/^/| /' conftest.$ac_ext >&5
14465
14466 ipv6_cv_socklen_t=no
14467 fi
14468
14469 rm -rf conftest.dSYM
14470 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14471 conftest$ac_exeext conftest.$ac_ext
14472 fi
14473 if test $ipv6_cv_socklen_t = yes; then
14474
14475 cat >>confdefs.h <<\_ACEOF
14476 #define HAVE_SOCKLEN_T /**/
14477 _ACEOF
14478
14479 else
14480 :
14481 fi
14482 { $as_echo "$as_me:$LINENO: result: $ipv6_cv_socklen_t" >&5
14483 $as_echo "$ipv6_cv_socklen_t" >&6; }
14484
14485 cat >conftest.$ac_ext <<_ACEOF
14486 /* confdefs.h. */
14487 _ACEOF
14488 cat confdefs.h >>conftest.$ac_ext
14489 cat >>conftest.$ac_ext <<_ACEOF
14490 /* end confdefs.h. */
14491 #include <sys/socket.h>
14492
14493 _ACEOF
14494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14495 $EGREP "sockaddr_storage" >/dev/null 2>&1; then
14496
14497 cat >>confdefs.h <<\_ACEOF
14498 #define HAVE_STRUCT_SOCKADDR_STORAGE /**/
14499 _ACEOF
14500
14501 fi
14502 rm -f conftest*
14503
14504
14505
14506
14507
14508
14509
14510
14511 ac_config_headers="$ac_config_headers saslauthd.h"
14512
14513
14514 ac_config_files="$ac_config_files Makefile"
14515
14516 cat >confcache <<\_ACEOF
14517 # This file is a shell script that caches the results of configure
14518 # tests run on this system so they can be shared between configure
14519 # scripts and configure runs, see configure's option --config-cache.
14520 # It is not useful on other systems. If it contains results you don't
14521 # want to keep, you may remove or edit it.
14522 #
14523 # config.status only pays attention to the cache file if you give it
14524 # the --recheck option to rerun configure.
14525 #
14526 # `ac_cv_env_foo' variables (set or unset) will be overridden when
14527 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14528 # following values.
14529
14530 _ACEOF
14531
14532 # The following way of writing the cache mishandles newlines in values,
14533 # but we know of no workaround that is simple, portable, and efficient.
14534 # So, we kill variables containing newlines.
14535 # Ultrix sh set writes to stderr and can't be redirected directly,
14536 # and sets the high bit in the cache file unless we assign to the vars.
14537 (
14538 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14539 eval ac_val=\$$ac_var
14540 case $ac_val in #(
14541 *${as_nl}*)
14542 case $ac_var in #(
14543 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
14544 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14545 esac
14546 case $ac_var in #(
14547 _ | IFS | as_nl) ;; #(
14548 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14549 *) $as_unset $ac_var ;;
14550 esac ;;
14551 esac
14552 done
14553
14554 (set) 2>&1 |
14555 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14556 *${as_nl}ac_space=\ *)
14557 # `set' does not quote correctly, so add quotes (double-quote
14558 # substitution turns \\\\ into \\, and sed turns \\ into \).
14559 sed -n \
14560 "s/'/'\\\\''/g;
14561 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14562 ;; #(
14563 *)
14564 # `set' quotes correctly as required by POSIX, so do not add quotes.
14565 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14566 ;;
14567 esac |
14568 sort
14569 ) |
14570 sed '
14571 /^ac_cv_env_/b end
14572 t clear
14573 :clear
14574 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14575 t end
14576 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14577 :end' >>confcache
14578 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14579 if test -w "$cache_file"; then
14580 test "x$cache_file" != "x/dev/null" &&
14581 { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
14582 $as_echo "$as_me: updating cache $cache_file" >&6;}
14583 cat confcache >$cache_file
14584 else
14585 { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
14586 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14587 fi
14588 fi
14589 rm -f confcache
14590
14591 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14592 # Let make expand exec_prefix.
14593 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14594
14595 DEFS=-DHAVE_CONFIG_H
14596
14597 ac_libobjs=
14598 ac_ltlibobjs=
14599 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14600 # 1. Remove the extension, and $U if already installed.
14601 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14602 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14603 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14604 # will be set to the directory where LIBOBJS objects are built.
14605 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14606 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
14607 done
14608 LIBOBJS=$ac_libobjs
14609
14610 LTLIBOBJS=$ac_ltlibobjs
14611
14612
14613 if test -z "${SASLAUTHD_TRUE}" && test -z "${SASLAUTHD_FALSE}"; then
14614 { { $as_echo "$as_me:$LINENO: error: conditional \"SASLAUTHD\" was never defined.
14615 Usually this means the macro was only invoked conditionally." >&5
14616 $as_echo "$as_me: error: conditional \"SASLAUTHD\" was never defined.
14617 Usually this means the macro was only invoked conditionally." >&2;}
14618 { (exit 1); exit 1; }; }
14619 fi
14620 if test -n "$EXEEXT"; then
14621 am__EXEEXT_TRUE=
14622 am__EXEEXT_FALSE='#'
14623 else
14624 am__EXEEXT_TRUE='#'
14625 am__EXEEXT_FALSE=
14626 fi
14627
14628 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
14629 { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
14630 Usually this means the macro was only invoked conditionally." >&5
14631 $as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
14632 Usually this means the macro was only invoked conditionally." >&2;}
14633 { (exit 1); exit 1; }; }
14634 fi
14635 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
14636 { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
14637 Usually this means the macro was only invoked conditionally." >&5
14638 $as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
14639 Usually this means the macro was only invoked conditionally." >&2;}
14640 { (exit 1); exit 1; }; }
14641 fi
14642
14643 : ${CONFIG_STATUS=./config.status}
14644 ac_write_fail=0
14645 ac_clean_files_save=$ac_clean_files
14646 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14647 { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
14648 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14649 cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14650 #! $SHELL
14651 # Generated by $as_me.
14652 # Run this file to recreate the current configuration.
14653 # Compiler output produced by configure, useful for debugging
14654 # configure, is in config.log if it exists.
14655
14656 debug=false
14657 ac_cs_recheck=false
14658 ac_cs_silent=false
14659 SHELL=\${CONFIG_SHELL-$SHELL}
14660 _ACEOF
14661
14662 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14663 ## --------------------- ##
14664 ## M4sh Initialization. ##
14665 ## --------------------- ##
14666
14667 # Be more Bourne compatible
14668 DUALCASE=1; export DUALCASE # for MKS sh
14669 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14670 emulate sh
14671 NULLCMD=:
14672 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14673 # is contrary to our usage. Disable this feature.
14674 alias -g '${1+"$@"}'='"$@"'
14675 setopt NO_GLOB_SUBST
14676 else
14677 case `(set -o) 2>/dev/null` in
14678 *posix*) set -o posix ;;
14679 esac
14680
14681 fi
14682
14683
14684
14685
14686 # PATH needs CR
14687 # Avoid depending upon Character Ranges.
14688 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14689 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14690 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14691 as_cr_digits='0123456789'
14692 as_cr_alnum=$as_cr_Letters$as_cr_digits
14693
14694 as_nl='
14695 '
14696 export as_nl
14697 # Printing a long string crashes Solaris 7 /usr/bin/printf.
14698 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14699 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14700 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14701 if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14702 as_echo='printf %s\n'
14703 as_echo_n='printf %s'
14704 else
14705 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14706 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14707 as_echo_n='/usr/ucb/echo -n'
14708 else
14709 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14710 as_echo_n_body='eval
14711 arg=$1;
14712 case $arg in
14713 *"$as_nl"*)
14714 expr "X$arg" : "X\\(.*\\)$as_nl";
14715 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14716 esac;
14717 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14718 '
14719 export as_echo_n_body
14720 as_echo_n='sh -c $as_echo_n_body as_echo'
14721 fi
14722 export as_echo_body
14723 as_echo='sh -c $as_echo_body as_echo'
14724 fi
14725
14726 # The user is always right.
14727 if test "${PATH_SEPARATOR+set}" != set; then
14728 PATH_SEPARATOR=:
14729 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14730 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14731 PATH_SEPARATOR=';'
14732 }
14733 fi
14734
14735 # Support unset when possible.
14736 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
14737 as_unset=unset
14738 else
14739 as_unset=false
14740 fi
14741
14742
14743 # IFS
14744 # We need space, tab and new line, in precisely that order. Quoting is
14745 # there to prevent editors from complaining about space-tab.
14746 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
14747 # splitting by setting IFS to empty value.)
14748 IFS=" "" $as_nl"
14749
14750 # Find who we are. Look in the path if we contain no directory separator.
14751 case $0 in
14752 *[\\/]* ) as_myself=$0 ;;
14753 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14754 for as_dir in $PATH
14755 do
14756 IFS=$as_save_IFS
14757 test -z "$as_dir" && as_dir=.
14758 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14759 done
14760 IFS=$as_save_IFS
14761
14762 ;;
14763 esac
14764 # We did not find ourselves, most probably we were run as `sh COMMAND'
14765 # in which case we are not to be found in the path.
14766 if test "x$as_myself" = x; then
14767 as_myself=$0
14768 fi
14769 if test ! -f "$as_myself"; then
14770 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14771 { (exit 1); exit 1; }
14772 fi
14773
14774 # Work around bugs in pre-3.0 UWIN ksh.
14775 for as_var in ENV MAIL MAILPATH
14776 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
14777 done
14778 PS1='$ '
14779 PS2='> '
14780 PS4='+ '
14781
14782 # NLS nuisances.
14783 LC_ALL=C
14784 export LC_ALL
14785 LANGUAGE=C
14786 export LANGUAGE
14787
14788 # Required to use basename.
14789 if expr a : '\(a\)' >/dev/null 2>&1 &&
14790 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14791 as_expr=expr
14792 else
14793 as_expr=false
14794 fi
14795
14796 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14797 as_basename=basename
14798 else
14799 as_basename=false
14800 fi
14801
14802
14803 # Name of the executable.
14804 as_me=`$as_basename -- "$0" ||
14805 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14806 X"$0" : 'X\(//\)$' \| \
14807 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
14808 $as_echo X/"$0" |
14809 sed '/^.*\/\([^/][^/]*\)\/*$/{
14810 s//\1/
14811 q
14812 }
14813 /^X\/\(\/\/\)$/{
14814 s//\1/
14815 q
14816 }
14817 /^X\/\(\/\).*/{
14818 s//\1/
14819 q
14820 }
14821 s/.*/./; q'`
14822
14823 # CDPATH.
14824 $as_unset CDPATH
14825
14826
14827
14828 as_lineno_1=$LINENO
14829 as_lineno_2=$LINENO
14830 test "x$as_lineno_1" != "x$as_lineno_2" &&
14831 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
14832
14833 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
14834 # uniformly replaced by the line number. The first 'sed' inserts a
14835 # line-number line after each line using $LINENO; the second 'sed'
14836 # does the real work. The second script uses 'N' to pair each
14837 # line-number line with the line containing $LINENO, and appends
14838 # trailing '-' during substitution so that $LINENO is not a special
14839 # case at line end.
14840 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
14841 # scripts with optimization help from Paolo Bonzini. Blame Lee
14842 # E. McMahon (1931-1989) for sed's syntax. :-)
14843 sed -n '
14844 p
14845 /[$]LINENO/=
14846 ' <$as_myself |
14847 sed '
14848 s/[$]LINENO.*/&-/
14849 t lineno
14850 b
14851 :lineno
14852 N
14853 :loop
14854 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
14855 t loop
14856 s/-\n.*//
14857 ' >$as_me.lineno &&
14858 chmod +x "$as_me.lineno" ||
14859 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
14860 { (exit 1); exit 1; }; }
14861
14862 # Don't try to exec as it changes $[0], causing all sort of problems
14863 # (the dirname of $[0] is not the place where we might find the
14864 # original and so on. Autoconf is especially sensitive to this).
14865 . "./$as_me.lineno"
14866 # Exit status is that of the last command.
14867 exit
14868 }
14869
14870
14871 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14872 as_dirname=dirname
14873 else
14874 as_dirname=false
14875 fi
14876
14877 ECHO_C= ECHO_N= ECHO_T=
14878 case `echo -n x` in
14879 -n*)
14880 case `echo 'x\c'` in
14881 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
14882 *) ECHO_C='\c';;
14883 esac;;
14884 *)
14885 ECHO_N='-n';;
14886 esac
14887 if expr a : '\(a\)' >/dev/null 2>&1 &&
14888 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14889 as_expr=expr
14890 else
14891 as_expr=false
14892 fi
14893
14894 rm -f conf$$ conf$$.exe conf$$.file
14895 if test -d conf$$.dir; then
14896 rm -f conf$$.dir/conf$$.file
14897 else
14898 rm -f conf$$.dir
14899 mkdir conf$$.dir 2>/dev/null
14900 fi
14901 if (echo >conf$$.file) 2>/dev/null; then
14902 if ln -s conf$$.file conf$$ 2>/dev/null; then
14903 as_ln_s='ln -s'
14904 # ... but there are two gotchas:
14905 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14906 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14907 # In both cases, we have to default to `cp -p'.
14908 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14909 as_ln_s='cp -p'
14910 elif ln conf$$.file conf$$ 2>/dev/null; then
14911 as_ln_s=ln
14912 else
14913 as_ln_s='cp -p'
14914 fi
14915 else
14916 as_ln_s='cp -p'
14917 fi
14918 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14919 rmdir conf$$.dir 2>/dev/null
14920
14921 if mkdir -p . 2>/dev/null; then
14922 as_mkdir_p=:
14923 else
14924 test -d ./-p && rmdir ./-p
14925 as_mkdir_p=false
14926 fi
14927
14928 if test -x / >/dev/null 2>&1; then
14929 as_test_x='test -x'
14930 else
14931 if ls -dL / >/dev/null 2>&1; then
14932 as_ls_L_option=L
14933 else
14934 as_ls_L_option=
14935 fi
14936 as_test_x='
14937 eval sh -c '\''
14938 if test -d "$1"; then
14939 test -d "$1/.";
14940 else
14941 case $1 in
14942 -*)set "./$1";;
14943 esac;
14944 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
14945 ???[sx]*):;;*)false;;esac;fi
14946 '\'' sh
14947 '
14948 fi
14949 as_executable_p=$as_test_x
14950
14951 # Sed expression to map a string onto a valid CPP name.
14952 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14953
14954 # Sed expression to map a string onto a valid variable name.
14955 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
14956
14957
14958 exec 6>&1
14959
14960 # Save the log message, to keep $[0] and so on meaningful, and to
14961 # report actual input values of CONFIG_FILES etc. instead of their
14962 # values after options handling.
14963 ac_log="
14964 This file was extended by $as_me, which was
14965 generated by GNU Autoconf 2.63. Invocation command line was
14966
14967 CONFIG_FILES = $CONFIG_FILES
14968 CONFIG_HEADERS = $CONFIG_HEADERS
14969 CONFIG_LINKS = $CONFIG_LINKS
14970 CONFIG_COMMANDS = $CONFIG_COMMANDS
14971 $ $0 $@
14972
14973 on `(hostname || uname -n) 2>/dev/null | sed 1q`
14974 "
14975
14976 _ACEOF
14977
14978 case $ac_config_files in *"
14979 "*) set x $ac_config_files; shift; ac_config_files=$*;;
14980 esac
14981
14982 case $ac_config_headers in *"
14983 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14984 esac
14985
14986
14987 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14988 # Files that config.status was made for.
14989 config_files="$ac_config_files"
14990 config_headers="$ac_config_headers"
14991 config_commands="$ac_config_commands"
14992
14993 _ACEOF
14994
14995 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14996 ac_cs_usage="\
14997 \`$as_me' instantiates files from templates according to the
14998 current configuration.
14999
15000 Usage: $0 [OPTION]... [FILE]...
15001
15002 -h, --help print this help, then exit
15003 -V, --version print version number and configuration settings, then exit
15004 -q, --quiet, --silent
15005 do not print progress messages
15006 -d, --debug don't remove temporary files
15007 --recheck update $as_me by reconfiguring in the same conditions
15008 --file=FILE[:TEMPLATE]
15009 instantiate the configuration file FILE
15010 --header=FILE[:TEMPLATE]
15011 instantiate the configuration header FILE
15012
15013 Configuration files:
15014 $config_files
15015
15016 Configuration headers:
15017 $config_headers
15018
15019 Configuration commands:
15020 $config_commands
15021
15022 Report bugs to <bug-autoconf@gnu.org>."
15023
15024 _ACEOF
15025 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15026 ac_cs_version="\\
15027 config.status
15028 configured by $0, generated by GNU Autoconf 2.63,
15029 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
15030
15031 Copyright (C) 2008 Free Software Foundation, Inc.
15032 This config.status script is free software; the Free Software Foundation
15033 gives unlimited permission to copy, distribute and modify it."
15034
15035 ac_pwd='$ac_pwd'
15036 srcdir='$srcdir'
15037 INSTALL='$INSTALL'
15038 MKDIR_P='$MKDIR_P'
15039 AWK='$AWK'
15040 test -n "\$AWK" || AWK=awk
15041 _ACEOF
15042
15043 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15044 # The default lists apply if the user does not specify any file.
15045 ac_need_defaults=:
15046 while test $# != 0
15047 do
15048 case $1 in
15049 --*=*)
15050 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15051 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15052 ac_shift=:
15053 ;;
15054 *)
15055 ac_option=$1
15056 ac_optarg=$2
15057 ac_shift=shift
15058 ;;
15059 esac
15060
15061 case $ac_option in
15062 # Handling of the options.
15063 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15064 ac_cs_recheck=: ;;
15065 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15066 $as_echo "$ac_cs_version"; exit ;;
15067 --debug | --debu | --deb | --de | --d | -d )
15068 debug=: ;;
15069 --file | --fil | --fi | --f )
15070 $ac_shift
15071 case $ac_optarg in
15072 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15073 esac
15074 CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
15075 ac_need_defaults=false;;
15076 --header | --heade | --head | --hea )
15077 $ac_shift
15078 case $ac_optarg in
15079 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15080 esac
15081 CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
15082 ac_need_defaults=false;;
15083 --he | --h)
15084 # Conflict between --help and --header
15085 { $as_echo "$as_me: error: ambiguous option: $1
15086 Try \`$0 --help' for more information." >&2
15087 { (exit 1); exit 1; }; };;
15088 --help | --hel | -h )
15089 $as_echo "$ac_cs_usage"; exit ;;
15090 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15091 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15092 ac_cs_silent=: ;;
15093
15094 # This is an error.
15095 -*) { $as_echo "$as_me: error: unrecognized option: $1
15096 Try \`$0 --help' for more information." >&2
15097 { (exit 1); exit 1; }; } ;;
15098
15099 *) ac_config_targets="$ac_config_targets $1"
15100 ac_need_defaults=false ;;
15101
15102 esac
15103 shift
15104 done
15105
15106 ac_configure_extra_args=
15107
15108 if $ac_cs_silent; then
15109 exec 6>/dev/null
15110 ac_configure_extra_args="$ac_configure_extra_args --silent"
15111 fi
15112
15113 _ACEOF
15114 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15115 if \$ac_cs_recheck; then
15116 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15117 shift
15118 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15119 CONFIG_SHELL='$SHELL'
15120 export CONFIG_SHELL
15121 exec "\$@"
15122 fi
15123
15124 _ACEOF
15125 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15126 exec 5>>config.log
15127 {
15128 echo
15129 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15130 ## Running $as_me. ##
15131 _ASBOX
15132 $as_echo "$ac_log"
15133 } >&5
15134
15135 _ACEOF
15136 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15137 #
15138 # INIT-COMMANDS
15139 #
15140 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
15141
15142 _ACEOF
15143
15144 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15145
15146 # Handling of arguments.
15147 for ac_config_target in $ac_config_targets
15148 do
15149 case $ac_config_target in
15150 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
15151 "saslauthd.h") CONFIG_HEADERS="$CONFIG_HEADERS saslauthd.h" ;;
15152 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15153
15154 *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
15155 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15156 { (exit 1); exit 1; }; };;
15157 esac
15158 done
15159
15160
15161 # If the user did not use the arguments to specify the items to instantiate,
15162 # then the envvar interface is used. Set only those that are not.
15163 # We use the long form for the default assignment because of an extremely
15164 # bizarre bug on SunOS 4.1.3.
15165 if $ac_need_defaults; then
15166 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15167 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15168 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15169 fi
15170
15171 # Have a temporary directory for convenience. Make it in the build tree
15172 # simply because there is no reason against having it here, and in addition,
15173 # creating and moving files from /tmp can sometimes cause problems.
15174 # Hook for its removal unless debugging.
15175 # Note that there is a small window in which the directory will not be cleaned:
15176 # after its creation but before its name has been assigned to `$tmp'.
15177 $debug ||
15178 {
15179 tmp=
15180 trap 'exit_status=$?
15181 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
15182 ' 0
15183 trap '{ (exit 1); exit 1; }' 1 2 13 15
15184 }
15185 # Create a (secure) tmp directory for tmp files.
15186
15187 {
15188 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15189 test -n "$tmp" && test -d "$tmp"
15190 } ||
15191 {
15192 tmp=./conf$$-$RANDOM
15193 (umask 077 && mkdir "$tmp")
15194 } ||
15195 {
15196 $as_echo "$as_me: cannot create a temporary directory in ." >&2
15197 { (exit 1); exit 1; }
15198 }
15199
15200 # Set up the scripts for CONFIG_FILES section.
15201 # No need to generate them if there are no CONFIG_FILES.
15202 # This happens for instance with `./config.status config.h'.
15203 if test -n "$CONFIG_FILES"; then
15204
15205
15206 ac_cr='
15207 '
15208 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15209 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15210 ac_cs_awk_cr='\\r'
15211 else
15212 ac_cs_awk_cr=$ac_cr
15213 fi
15214
15215 echo 'BEGIN {' >"$tmp/subs1.awk" &&
15216 _ACEOF
15217
15218
15219 {
15220 echo "cat >conf$$subs.awk <<_ACEOF" &&
15221 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15222 echo "_ACEOF"
15223 } >conf$$subs.sh ||
15224 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
15225 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
15226 { (exit 1); exit 1; }; }
15227 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
15228 ac_delim='%!_!# '
15229 for ac_last_try in false false false false false :; do
15230 . ./conf$$subs.sh ||
15231 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
15232 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
15233 { (exit 1); exit 1; }; }
15234
15235 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15236 if test $ac_delim_n = $ac_delim_num; then
15237 break
15238 elif $ac_last_try; then
15239 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
15240 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
15241 { (exit 1); exit 1; }; }
15242 else
15243 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15244 fi
15245 done
15246 rm -f conf$$subs.sh
15247
15248 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15249 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
15250 _ACEOF
15251 sed -n '
15252 h
15253 s/^/S["/; s/!.*/"]=/
15254 p
15255 g
15256 s/^[^!]*!//
15257 :repl
15258 t repl
15259 s/'"$ac_delim"'$//
15260 t delim
15261 :nl
15262 h
15263 s/\(.\{148\}\).*/\1/
15264 t more1
15265 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15266 p
15267 n
15268 b repl
15269 :more1
15270 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15271 p
15272 g
15273 s/.\{148\}//
15274 t nl
15275 :delim
15276 h
15277 s/\(.\{148\}\).*/\1/
15278 t more2
15279 s/["\\]/\\&/g; s/^/"/; s/$/"/
15280 p
15281 b
15282 :more2
15283 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15284 p
15285 g
15286 s/.\{148\}//
15287 t delim
15288 ' <conf$$subs.awk | sed '
15289 /^[^""]/{
15290 N
15291 s/\n//
15292 }
15293 ' >>$CONFIG_STATUS || ac_write_fail=1
15294 rm -f conf$$subs.awk
15295 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15296 _ACAWK
15297 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
15298 for (key in S) S_is_set[key] = 1
15299 FS = ""
15300
15301 }
15302 {
15303 line = $ 0
15304 nfields = split(line, field, "@")
15305 substed = 0
15306 len = length(field[1])
15307 for (i = 2; i < nfields; i++) {
15308 key = field[i]
15309 keylen = length(key)
15310 if (S_is_set[key]) {
15311 value = S[key]
15312 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15313 len += length(value) + length(field[++i])
15314 substed = 1
15315 } else
15316 len += 1 + keylen
15317 }
15318
15319 print line
15320 }
15321
15322 _ACAWK
15323 _ACEOF
15324 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15325 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15326 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15327 else
15328 cat
15329 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
15330 || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
15331 $as_echo "$as_me: error: could not setup config files machinery" >&2;}
15332 { (exit 1); exit 1; }; }
15333 _ACEOF
15334
15335 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15336 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15337 # trailing colons and then remove the whole line if VPATH becomes empty
15338 # (actually we leave an empty line to preserve line numbers).
15339 if test "x$srcdir" = x.; then
15340 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15341 s/:*\$(srcdir):*/:/
15342 s/:*\${srcdir}:*/:/
15343 s/:*@srcdir@:*/:/
15344 s/^\([^=]*=[ ]*\):*/\1/
15345 s/:*$//
15346 s/^[^=]*=[ ]*$//
15347 }'
15348 fi
15349
15350 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15351 fi # test -n "$CONFIG_FILES"
15352
15353 # Set up the scripts for CONFIG_HEADERS section.
15354 # No need to generate them if there are no CONFIG_HEADERS.
15355 # This happens for instance with `./config.status Makefile'.
15356 if test -n "$CONFIG_HEADERS"; then
15357 cat >"$tmp/defines.awk" <<\_ACAWK ||
15358 BEGIN {
15359 _ACEOF
15360
15361 # Transform confdefs.h into an awk script `defines.awk', embedded as
15362 # here-document in config.status, that substitutes the proper values into
15363 # config.h.in to produce config.h.
15364
15365 # Create a delimiter string that does not exist in confdefs.h, to ease
15366 # handling of long lines.
15367 ac_delim='%!_!# '
15368 for ac_last_try in false false :; do
15369 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
15370 if test -z "$ac_t"; then
15371 break
15372 elif $ac_last_try; then
15373 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
15374 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
15375 { (exit 1); exit 1; }; }
15376 else
15377 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15378 fi
15379 done
15380
15381 # For the awk script, D is an array of macro values keyed by name,
15382 # likewise P contains macro parameters if any. Preserve backslash
15383 # newline sequences.
15384
15385 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15386 sed -n '
15387 s/.\{148\}/&'"$ac_delim"'/g
15388 t rset
15389 :rset
15390 s/^[ ]*#[ ]*define[ ][ ]*/ /
15391 t def
15392 d
15393 :def
15394 s/\\$//
15395 t bsnl
15396 s/["\\]/\\&/g
15397 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15398 D["\1"]=" \3"/p
15399 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15400 d
15401 :bsnl
15402 s/["\\]/\\&/g
15403 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15404 D["\1"]=" \3\\\\\\n"\\/p
15405 t cont
15406 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15407 t cont
15408 d
15409 :cont
15410 n
15411 s/.\{148\}/&'"$ac_delim"'/g
15412 t clear
15413 :clear
15414 s/\\$//
15415 t bsnlc
15416 s/["\\]/\\&/g; s/^/"/; s/$/"/p
15417 d
15418 :bsnlc
15419 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15420 b cont
15421 ' <confdefs.h | sed '
15422 s/'"$ac_delim"'/"\\\
15423 "/g' >>$CONFIG_STATUS || ac_write_fail=1
15424
15425 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15426 for (key in D) D_is_set[key] = 1
15427 FS = ""
15428 }
15429 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15430 line = \$ 0
15431 split(line, arg, " ")
15432 if (arg[1] == "#") {
15433 defundef = arg[2]
15434 mac1 = arg[3]
15435 } else {
15436 defundef = substr(arg[1], 2)
15437 mac1 = arg[2]
15438 }
15439 split(mac1, mac2, "(") #)
15440 macro = mac2[1]
15441 prefix = substr(line, 1, index(line, defundef) - 1)
15442 if (D_is_set[macro]) {
15443 # Preserve the white space surrounding the "#".
15444 print prefix "define", macro P[macro] D[macro]
15445 next
15446 } else {
15447 # Replace #undef with comments. This is necessary, for example,
15448 # in the case of _POSIX_SOURCE, which is predefined and required
15449 # on some systems where configure will not decide to define it.
15450 if (defundef == "undef") {
15451 print "/*", prefix defundef, macro, "*/"
15452 next
15453 }
15454 }
15455 }
15456 { print }
15457 _ACAWK
15458 _ACEOF
15459 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15460 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
15461 $as_echo "$as_me: error: could not setup config headers machinery" >&2;}
15462 { (exit 1); exit 1; }; }
15463 fi # test -n "$CONFIG_HEADERS"
15464
15465
15466 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
15467 shift
15468 for ac_tag
15469 do
15470 case $ac_tag in
15471 :[FHLC]) ac_mode=$ac_tag; continue;;
15472 esac
15473 case $ac_mode$ac_tag in
15474 :[FHL]*:*);;
15475 :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
15476 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
15477 { (exit 1); exit 1; }; };;
15478 :[FH]-) ac_tag=-:-;;
15479 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15480 esac
15481 ac_save_IFS=$IFS
15482 IFS=:
15483 set x $ac_tag
15484 IFS=$ac_save_IFS
15485 shift
15486 ac_file=$1
15487 shift
15488
15489 case $ac_mode in
15490 :L) ac_source=$1;;
15491 :[FH])
15492 ac_file_inputs=
15493 for ac_f
15494 do
15495 case $ac_f in
15496 -) ac_f="$tmp/stdin";;
15497 *) # Look for the file first in the build tree, then in the source tree
15498 # (if the path is not absolute). The absolute path cannot be DOS-style,
15499 # because $ac_f cannot contain `:'.
15500 test -f "$ac_f" ||
15501 case $ac_f in
15502 [\\/$]*) false;;
15503 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15504 esac ||
15505 { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
15506 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
15507 { (exit 1); exit 1; }; };;
15508 esac
15509 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15510 ac_file_inputs="$ac_file_inputs '$ac_f'"
15511 done
15512
15513 # Let's still pretend it is `configure' which instantiates (i.e., don't
15514 # use $as_me), people would be surprised to read:
15515 # /* config.h. Generated by config.status. */
15516 configure_input='Generated from '`
15517 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15518 `' by configure.'
15519 if test x"$ac_file" != x-; then
15520 configure_input="$ac_file. $configure_input"
15521 { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
15522 $as_echo "$as_me: creating $ac_file" >&6;}
15523 fi
15524 # Neutralize special characters interpreted by sed in replacement strings.
15525 case $configure_input in #(
15526 *\&* | *\|* | *\\* )
15527 ac_sed_conf_input=`$as_echo "$configure_input" |
15528 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15529 *) ac_sed_conf_input=$configure_input;;
15530 esac
15531
15532 case $ac_tag in
15533 *:-:* | *:-) cat >"$tmp/stdin" \
15534 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
15535 $as_echo "$as_me: error: could not create $ac_file" >&2;}
15536 { (exit 1); exit 1; }; } ;;
15537 esac
15538 ;;
15539 esac
15540
15541 ac_dir=`$as_dirname -- "$ac_file" ||
15542 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15543 X"$ac_file" : 'X\(//\)[^/]' \| \
15544 X"$ac_file" : 'X\(//\)$' \| \
15545 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15546 $as_echo X"$ac_file" |
15547 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15548 s//\1/
15549 q
15550 }
15551 /^X\(\/\/\)[^/].*/{
15552 s//\1/
15553 q
15554 }
15555 /^X\(\/\/\)$/{
15556 s//\1/
15557 q
15558 }
15559 /^X\(\/\).*/{
15560 s//\1/
15561 q
15562 }
15563 s/.*/./; q'`
15564 { as_dir="$ac_dir"
15565 case $as_dir in #(
15566 -*) as_dir=./$as_dir;;
15567 esac
15568 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
15569 as_dirs=
15570 while :; do
15571 case $as_dir in #(
15572 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15573 *) as_qdir=$as_dir;;
15574 esac
15575 as_dirs="'$as_qdir' $as_dirs"
15576 as_dir=`$as_dirname -- "$as_dir" ||
15577 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15578 X"$as_dir" : 'X\(//\)[^/]' \| \
15579 X"$as_dir" : 'X\(//\)$' \| \
15580 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15581 $as_echo X"$as_dir" |
15582 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15583 s//\1/
15584 q
15585 }
15586 /^X\(\/\/\)[^/].*/{
15587 s//\1/
15588 q
15589 }
15590 /^X\(\/\/\)$/{
15591 s//\1/
15592 q
15593 }
15594 /^X\(\/\).*/{
15595 s//\1/
15596 q
15597 }
15598 s/.*/./; q'`
15599 test -d "$as_dir" && break
15600 done
15601 test -z "$as_dirs" || eval "mkdir $as_dirs"
15602 } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
15603 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
15604 { (exit 1); exit 1; }; }; }
15605 ac_builddir=.
15606
15607 case "$ac_dir" in
15608 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15609 *)
15610 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15611 # A ".." for each directory in $ac_dir_suffix.
15612 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15613 case $ac_top_builddir_sub in
15614 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15615 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15616 esac ;;
15617 esac
15618 ac_abs_top_builddir=$ac_pwd
15619 ac_abs_builddir=$ac_pwd$ac_dir_suffix
15620 # for backward compatibility:
15621 ac_top_builddir=$ac_top_build_prefix
15622
15623 case $srcdir in
15624 .) # We are building in place.
15625 ac_srcdir=.
15626 ac_top_srcdir=$ac_top_builddir_sub
15627 ac_abs_top_srcdir=$ac_pwd ;;
15628 [\\/]* | ?:[\\/]* ) # Absolute name.
15629 ac_srcdir=$srcdir$ac_dir_suffix;
15630 ac_top_srcdir=$srcdir
15631 ac_abs_top_srcdir=$srcdir ;;
15632 *) # Relative name.
15633 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15634 ac_top_srcdir=$ac_top_build_prefix$srcdir
15635 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15636 esac
15637 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15638
15639
15640 case $ac_mode in
15641 :F)
15642 #
15643 # CONFIG_FILE
15644 #
15645
15646 case $INSTALL in
15647 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15648 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
15649 esac
15650 ac_MKDIR_P=$MKDIR_P
15651 case $MKDIR_P in
15652 [\\/$]* | ?:[\\/]* ) ;;
15653 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15654 esac
15655 _ACEOF
15656
15657 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15658 # If the template does not know about datarootdir, expand it.
15659 # FIXME: This hack should be removed a few years after 2.60.
15660 ac_datarootdir_hack=; ac_datarootdir_seen=
15661
15662 ac_sed_dataroot='
15663 /datarootdir/ {
15664 p
15665 q
15666 }
15667 /@datadir@/p
15668 /@docdir@/p
15669 /@infodir@/p
15670 /@localedir@/p
15671 /@mandir@/p
15672 '
15673 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15674 *datarootdir*) ac_datarootdir_seen=yes;;
15675 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15676 { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15677 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15678 _ACEOF
15679 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15680 ac_datarootdir_hack='
15681 s&@datadir@&$datadir&g
15682 s&@docdir@&$docdir&g
15683 s&@infodir@&$infodir&g
15684 s&@localedir@&$localedir&g
15685 s&@mandir@&$mandir&g
15686 s&\\\${datarootdir}&$datarootdir&g' ;;
15687 esac
15688 _ACEOF
15689
15690 # Neutralize VPATH when `$srcdir' = `.'.
15691 # Shell code in configure.ac might set extrasub.
15692 # FIXME: do we really want to maintain this feature?
15693 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15694 ac_sed_extra="$ac_vpsub
15695 $extrasub
15696 _ACEOF
15697 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15698 :t
15699 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15700 s|@configure_input@|$ac_sed_conf_input|;t t
15701 s&@top_builddir@&$ac_top_builddir_sub&;t t
15702 s&@top_build_prefix@&$ac_top_build_prefix&;t t
15703 s&@srcdir@&$ac_srcdir&;t t
15704 s&@abs_srcdir@&$ac_abs_srcdir&;t t
15705 s&@top_srcdir@&$ac_top_srcdir&;t t
15706 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15707 s&@builddir@&$ac_builddir&;t t
15708 s&@abs_builddir@&$ac_abs_builddir&;t t
15709 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15710 s&@INSTALL@&$ac_INSTALL&;t t
15711 s&@MKDIR_P@&$ac_MKDIR_P&;t t
15712 $ac_datarootdir_hack
15713 "
15714 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15715 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
15716 $as_echo "$as_me: error: could not create $ac_file" >&2;}
15717 { (exit 1); exit 1; }; }
15718
15719 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15720 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15721 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
15722 { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15723 which seems to be undefined. Please make sure it is defined." >&5
15724 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15725 which seems to be undefined. Please make sure it is defined." >&2;}
15726
15727 rm -f "$tmp/stdin"
15728 case $ac_file in
15729 -) cat "$tmp/out" && rm -f "$tmp/out";;
15730 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
15731 esac \
15732 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
15733 $as_echo "$as_me: error: could not create $ac_file" >&2;}
15734 { (exit 1); exit 1; }; }
15735 ;;
15736 :H)
15737 #
15738 # CONFIG_HEADER
15739 #
15740 if test x"$ac_file" != x-; then
15741 {
15742 $as_echo "/* $configure_input */" \
15743 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15744 } >"$tmp/config.h" \
15745 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
15746 $as_echo "$as_me: error: could not create $ac_file" >&2;}
15747 { (exit 1); exit 1; }; }
15748 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
15749 { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
15750 $as_echo "$as_me: $ac_file is unchanged" >&6;}
15751 else
15752 rm -f "$ac_file"
15753 mv "$tmp/config.h" "$ac_file" \
15754 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
15755 $as_echo "$as_me: error: could not create $ac_file" >&2;}
15756 { (exit 1); exit 1; }; }
15757 fi
15758 else
15759 $as_echo "/* $configure_input */" \
15760 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
15761 || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
15762 $as_echo "$as_me: error: could not create -" >&2;}
15763 { (exit 1); exit 1; }; }
15764 fi
15765 # Compute "$ac_file"'s index in $config_headers.
15766 _am_arg="$ac_file"
15767 _am_stamp_count=1
15768 for _am_header in $config_headers :; do
15769 case $_am_header in
15770 $_am_arg | $_am_arg:* )
15771 break ;;
15772 * )
15773 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
15774 esac
15775 done
15776 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
15777 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15778 X"$_am_arg" : 'X\(//\)[^/]' \| \
15779 X"$_am_arg" : 'X\(//\)$' \| \
15780 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
15781 $as_echo X"$_am_arg" |
15782 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15783 s//\1/
15784 q
15785 }
15786 /^X\(\/\/\)[^/].*/{
15787 s//\1/
15788 q
15789 }
15790 /^X\(\/\/\)$/{
15791 s//\1/
15792 q
15793 }
15794 /^X\(\/\).*/{
15795 s//\1/
15796 q
15797 }
15798 s/.*/./; q'`/stamp-h$_am_stamp_count
15799 ;;
15800
15801 :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
15802 $as_echo "$as_me: executing $ac_file commands" >&6;}
15803 ;;
15804 esac
15805
15806
15807 case $ac_file$ac_mode in
15808 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
15809 # Autoconf 2.62 quotes --file arguments for eval, but not when files
15810 # are listed without --file. Let's play safe and only enable the eval
15811 # if we detect the quoting.
15812 case $CONFIG_FILES in
15813 *\'*) eval set x "$CONFIG_FILES" ;;
15814 *) set x $CONFIG_FILES ;;
15815 esac
15816 shift
15817 for mf
15818 do
15819 # Strip MF so we end up with the name of the file.
15820 mf=`echo "$mf" | sed -e 's/:.*$//'`
15821 # Check whether this is an Automake generated Makefile or not.
15822 # We used to match only the files named `Makefile.in', but
15823 # some people rename them; so instead we look at the file content.
15824 # Grep'ing the first line is not enough: some people post-process
15825 # each Makefile.in and add a new line on top of each file to say so.
15826 # Grep'ing the whole file is not good either: AIX grep has a line
15827 # limit of 2048, but all sed's we know have understand at least 4000.
15828 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
15829 dirpart=`$as_dirname -- "$mf" ||
15830 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15831 X"$mf" : 'X\(//\)[^/]' \| \
15832 X"$mf" : 'X\(//\)$' \| \
15833 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
15834 $as_echo X"$mf" |
15835 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15836 s//\1/
15837 q
15838 }
15839 /^X\(\/\/\)[^/].*/{
15840 s//\1/
15841 q
15842 }
15843 /^X\(\/\/\)$/{
15844 s//\1/
15845 q
15846 }
15847 /^X\(\/\).*/{
15848 s//\1/
15849 q
15850 }
15851 s/.*/./; q'`
15852 else
15853 continue
15854 fi
15855 # Extract the definition of DEPDIR, am__include, and am__quote
15856 # from the Makefile without running `make'.
15857 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
15858 test -z "$DEPDIR" && continue
15859 am__include=`sed -n 's/^am__include = //p' < "$mf"`
15860 test -z "am__include" && continue
15861 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
15862 # When using ansi2knr, U may be empty or an underscore; expand it
15863 U=`sed -n 's/^U = //p' < "$mf"`
15864 # Find all dependency output files, they are included files with
15865 # $(DEPDIR) in their names. We invoke sed twice because it is the
15866 # simplest approach to changing $(DEPDIR) to its actual value in the
15867 # expansion.
15868 for file in `sed -n "
15869 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
15870 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
15871 # Make sure the directory exists.
15872 test -f "$dirpart/$file" && continue
15873 fdir=`$as_dirname -- "$file" ||
15874 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15875 X"$file" : 'X\(//\)[^/]' \| \
15876 X"$file" : 'X\(//\)$' \| \
15877 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
15878 $as_echo X"$file" |
15879 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15880 s//\1/
15881 q
15882 }
15883 /^X\(\/\/\)[^/].*/{
15884 s//\1/
15885 q
15886 }
15887 /^X\(\/\/\)$/{
15888 s//\1/
15889 q
15890 }
15891 /^X\(\/\).*/{
15892 s//\1/
15893 q
15894 }
15895 s/.*/./; q'`
15896 { as_dir=$dirpart/$fdir
15897 case $as_dir in #(
15898 -*) as_dir=./$as_dir;;
15899 esac
15900 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
15901 as_dirs=
15902 while :; do
15903 case $as_dir in #(
15904 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15905 *) as_qdir=$as_dir;;
15906 esac
15907 as_dirs="'$as_qdir' $as_dirs"
15908 as_dir=`$as_dirname -- "$as_dir" ||
15909 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15910 X"$as_dir" : 'X\(//\)[^/]' \| \
15911 X"$as_dir" : 'X\(//\)$' \| \
15912 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15913 $as_echo X"$as_dir" |
15914 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15915 s//\1/
15916 q
15917 }
15918 /^X\(\/\/\)[^/].*/{
15919 s//\1/
15920 q
15921 }
15922 /^X\(\/\/\)$/{
15923 s//\1/
15924 q
15925 }
15926 /^X\(\/\).*/{
15927 s//\1/
15928 q
15929 }
15930 s/.*/./; q'`
15931 test -d "$as_dir" && break
15932 done
15933 test -z "$as_dirs" || eval "mkdir $as_dirs"
15934 } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
15935 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
15936 { (exit 1); exit 1; }; }; }
15937 # echo "creating $dirpart/$file"
15938 echo '# dummy' > "$dirpart/$file"
15939 done
15940 done
15941 }
15942 ;;
15943
15944 esac
15945 done # for ac_tag
15946
15947
15948 { (exit 0); exit 0; }
15949 _ACEOF
15950 chmod +x $CONFIG_STATUS
15951 ac_clean_files=$ac_clean_files_save
15952
15953 test $ac_write_fail = 0 ||
15954 { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
15955 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
15956 { (exit 1); exit 1; }; }
15957
15958
15959 # configure is writing to config.log, and then calls config.status.
15960 # config.status does its own redirection, appending to config.log.
15961 # Unfortunately, on DOS this fails, as config.log is still kept open
15962 # by configure, so config.status won't be able to write to it; its
15963 # output is simply discarded. So we exec the FD to /dev/null,
15964 # effectively closing config.log, so it can be properly (re)opened and
15965 # appended to by config.status. When coming back to configure, we
15966 # need to make the FD available again.
15967 if test "$no_create" != yes; then
15968 ac_cs_success=:
15969 ac_config_status_args=
15970 test "$silent" = yes &&
15971 ac_config_status_args="$ac_config_status_args --quiet"
15972 exec 5>/dev/null
15973 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
15974 exec 5>>config.log
15975 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15976 # would make configure fail if this is the last instruction.
15977 $ac_cs_success || { (exit 1); exit 1; }
15978 fi
15979 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15980 { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15981 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
15982 fi
15983
+0
-340
saslauthd/configure.in less more
0 AC_INIT(mechanisms.h)
1 AC_PREREQ([2.54])
2
3 AC_CONFIG_AUX_DIR(config)
4 AC_CANONICAL_HOST
5
6 dnl Should we enable SASLAUTHd at all?
7 AC_ARG_WITH(saslauthd, [ --with-saslauthd=DIR enable use of the saslauth daemon using state dir DIR ],
8 with_saslauthd=$withval,
9 with_saslauthd=yes)
10 if test "$with_saslauthd" = yes; then
11 with_saslauthd="/var/state/saslauthd"
12 fi
13 AC_DEFINE(HAVE_SASLAUTHD,[],[Include support for saslauthd?])
14 AC_DEFINE_UNQUOTED(PATH_SASLAUTHD_RUNDIR, "$with_saslauthd",[Location of saslauthd socket])
15 AM_CONDITIONAL(SASLAUTHD, test "$with_saslauthd" != no)
16
17 AM_INIT_AUTOMAKE(saslauthd,2.1.26)
18 CMU_INIT_AUTOMAKE
19
20 dnl Checks for programs.
21 AC_PROG_CC
22 AC_PROG_CPP
23 AC_PROG_AWK
24 AC_PROG_MAKE_SET
25 AC_PROG_LN_S
26 AC_PROG_INSTALL
27
28 dnl Checks for build foo
29 CMU_C___ATTRIBUTE__
30 CMU_GUESS_RUNPATH_SWITCH
31
32 dnl Checks for libraries.
33 CMU_SOCKETS
34
35 CMU_HAVE_OPENSSL
36 AC_MSG_CHECKING(for OpenSSL)
37 AC_MSG_RESULT($with_openssl)
38
39 SASL_DES_CHK
40
41 dnl mechanism-related checking
42 SASL_KERBEROS_V4_CHK
43 SASL_GSSAPI_CHK
44
45 if test "$gssapi" != no; then
46 if test "$gss_impl" = "heimdal"; then
47 AC_DEFINE(KRB5_HEIMDAL,[],[Using Heimdal])
48 fi
49 AC_DEFINE(HAVE_GSSAPI,[],[Include GSSAPI/Kerberos 5 Support])
50 fi
51
52 SASL2_CRYPT_CHK
53
54 AC_ARG_ENABLE(sia, [ --enable-sia enable SIA authentication [no] ],
55 sia=$enableval,
56 sia=no)
57 LIB_SIA=""
58 if test "$sia" != no; then
59 if test -f /etc/sia/matrix.conf; then
60 AC_DEFINE(HAVE_SIA,[],[Include SIA Support])
61 LIB_SIA="-lsecurity -ldb -lm -laud"
62 else
63 AC_ERROR([No support for SIA found])
64 fi
65 fi
66 AC_SUBST(LIB_SIA)
67
68 AC_ARG_ENABLE(auth-sasldb, [ --enable-auth-sasldb enable experimental SASLdb authentication module [no] ],
69 authsasldb=$enableval,
70 authsasldb=no)
71 if test "$authsasldb" != no; then
72 if test ! -d "../sasldb"; then
73 echo "ERROR: Cannot build sasldb module outside of the full SASL source tree."
74 exit 0;
75 fi
76 AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support])
77 SASL_DB_PATH_CHECK()
78 SASL_DB_CHECK()
79 SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al"
80 fi
81
82 AC_ARG_ENABLE(httpform, [ --enable-httpform enable HTTP form authentication [[no]] ],
83 httpform=$enableval,
84 httpform=no)
85 if test "$httpform" != no; then
86 AC_DEFINE(HAVE_HTTPFORM,[],[Include HTTP form Support])
87 fi
88
89 AC_ARG_WITH(pam, [ --with-pam=DIR use PAM (rooted in DIR) [yes] ],
90 with_pam=$withval,
91 with_pam=yes)
92 if test "$with_pam" != no; then
93 if test -d $with_pam; then
94 CPPFLAGS="$CPPFLAGS -I${with_pam}/include"
95 LDFLAGS="$LDFLAGS -L${with_pam}/lib"
96 fi
97 cmu_save_LIBS="$LIBS"
98 AC_CHECK_LIB(pam, pam_start, [
99 AC_CHECK_HEADER(security/pam_appl.h,,
100 with_pam=no)],
101 with_pam=no, $SASL_DL_LIB)
102 LIBS="$cmu_save_LIBS"
103 fi
104
105 AC_ARG_WITH(ipctype, [ --with-ipctype={unix,doors} use ipctype [unix] ],
106 with_ipctype=$withval,
107 with_ipctype="unix")
108 MAIN_COMPAT_OBJ="saslauthd-${with_ipctype}.o"
109 AC_SUBST(MAIN_COMPAT_OBJ)
110 if test "$with_ipctype" = "doors"; then
111 AC_DEFINE(USE_DOORS,[],[Use the doors IPC API])
112 AC_DEFINE(SASLAUTHD_THREADED,[],[Saslauthd runs threaded?])
113 LIBS="$LIBS -ldoor -lpthread"
114 fi
115
116 AC_MSG_CHECKING(for PAM support)
117 AC_MSG_RESULT($with_pam)
118 LIB_PAM=""
119 if test "$with_pam" != no; then
120 AC_DEFINE(HAVE_PAM,[],[Support for PAM?])
121 LIB_PAM="-lpam"
122 fi
123 AC_SUBST(LIB_PAM)
124
125 AC_CHECK_LIB(resolv, inet_aton)
126
127 AC_MSG_CHECKING(to include LDAP support)
128 AC_ARG_WITH(ldap, [ --with-ldap=DIR use LDAP (in DIR) [no] ],
129 with_ldap=$withval,
130 with_ldap=no)
131 AC_MSG_RESULT($with_ldap)
132
133 if test -d $with_ldap; then
134 CPPFLAGS="$CPPFLAGS -I${with_ldap}/include"
135 CMU_ADD_LIBPATH(${with_ldap}/lib)
136 fi
137
138 LDAP_LIBS=""
139 if test "$with_ldap" != no; then
140 AC_CHECK_LIB(ldap, ldap_initialize, [ AC_DEFINE(HAVE_LDAP,[],[Support for LDAP?])
141 LDAP_LIBS="-lldap -llber"
142 if test "$with_openssl" != "no"; then
143 LDAP_LIBS="$LDAP_LIBS -lcrypto $LIB_RSAREF"
144 fi],,-llber)
145
146 fi
147 AC_SUBST(LDAP_LIBS)
148
149
150 dnl Checks for header files.
151 AC_HEADER_STDC
152 AC_HEADER_SYS_WAIT
153 AC_HEADER_TIME
154 AC_CHECK_HEADERS(crypt.h fcntl.h krb5.h strings.h syslog.h unistd.h sys/time.h sys/uio.h)
155
156 dnl Checks for typedefs, structures, and compiler characteristics.
157 AC_C_CONST
158 AC_TYPE_PID_T
159
160 LTLIBOBJS=`echo "$LIB@&t@OBJS" | sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
161 AC_SUBST(LTLIBOBJS)
162
163 dnl Checks for which function macros exist
164 AC_MSG_CHECKING(whether $CC implements __func__)
165 AC_CACHE_VAL(have_func,
166 [AC_TRY_LINK([#include <stdio.h>],[printf("%s", __func__);],
167 have_func=yes,
168 have_func=no)])
169 AC_MSG_RESULT($have_func)
170 if test "$have_func" = yes; then
171 AC_DEFINE(HAVE_FUNC,[],[Does the compiler understand __func__])
172 else
173 AC_MSG_CHECKING(whether $CC implements __PRETTY_FUNCTION__)
174 AC_CACHE_VAL(have_pretty_function,
175 [AC_TRY_LINK([#include <stdio.h>],[printf("%s", __PRETTY_FUNCTION__);],
176 have_pretty_function=yes,
177 have_pretty_function=no)])
178 AC_MSG_RESULT($have_pretty_function)
179 if test "$have_pretty_function" = yes; then
180 AC_DEFINE(HAVE_PRETTY_FUNCTION,[],[Does compiler understand __PRETTY_FUNCTION__])
181 else
182 AC_MSG_CHECKING(whether $CC implements __FUNCTION__)
183 AC_CACHE_VAL(have_function,
184 [AC_TRY_LINK([#include <stdio.h>],[printf("%s", __FUNCTION__);],
185 have_function=yes,
186 have_function=no)])
187 AC_MSG_RESULT($have_function)
188 if test "$have_function" = yes; then
189 AC_DEFINE(HAVE_FUNCTION,[],[Does compiler understand __FUNCTION__])
190 fi
191 fi
192 fi
193
194 dnl Checks for library functions.
195 AC_TYPE_SIGNAL
196 AC_CHECK_FUNCS(gethostname mkdir socket strdup)
197 dnl Only look for one or the other
198 AC_CHECK_FUNCS(getspnam getuserpw, break)
199 AC_CHECK_FUNCS(asprintf strlcat strlcpy)
200
201 if test $ac_cv_func_getspnam = yes; then
202 AC_MSG_CHECKING(if getpwnam_r/getspnam_r take 5 arguments)
203 AC_TRY_COMPILE(
204 [
205 #include <sys/types.h>
206 #include <pwd.h>
207 #include <shadow.h>
208 ],
209 [
210 struct passwd *pw;
211 struct passwd pwbuf;
212 char pwdata[512];
213 (void) getpwnam_r("bin", &pwbuf, pwdata, sizeof(pwdata), &pw);
214 ],
215 [AC_MSG_RESULT(yes)
216 AC_DEFINE(GETXXNAM_R_5ARG, 1,
217 [Define if your getpwnam_r()/getspnam_r()
218 functions take 5 arguments])],
219 [AC_MSG_RESULT(no)]
220 )
221 fi
222
223 dnl Check for getaddrinfo
224 GETADDRINFOOBJS=""
225 sasl_cv_getaddrinfo=no
226 IPv6_CHECK_FUNC(getaddrinfo,
227 [AC_DEFINE(HAVE_GETADDRINFO,[],[Do we have a getaddrinfo() function?])], [sasl_cv_getaddrinfo=yes])
228 if test $sasl_cv_getaddrinfo = yes; then
229 AC_LIBOBJ(getaddrinfo)
230 fi
231
232 dnl Check for getnameinfo
233 GETNAMEINFOOBJS=""
234 sasl_cv_getnameinfo=no
235 IPv6_CHECK_FUNC(getnameinfo,
236 [AC_DEFINE(HAVE_GETNAMEINFO,[],[Do we have a getnameinfo() function?])], [sasl_cv_getnameinfo=yes])
237 if test $sasl_cv_getnameinfo = yes; then
238 AC_LIBOBJ(getnameinfo)
239 fi
240
241 IPv6_CHECK_SS_FAMILY()
242 IPv6_CHECK_SA_LEN()
243 IPv6_CHECK_SOCKLEN_T()
244
245 AC_EGREP_HEADER(sockaddr_storage, sys/socket.h,
246 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE,[],[Do we have a sockaddr_storage struct?]))
247
248 AH_TOP([
249 #ifndef _SASLAUTHD_H
250 #define _SASLAUTHD_H
251
252 #include <stdio.h>
253 ])
254
255 AH_BOTTOM([
256
257 #ifndef HAVE___ATTRIBUTE__
258 /* Can't use attributes... */
259 #define __attribute__(foo)
260 #endif
261
262 #include <stdlib.h>
263 #include <sys/types.h>
264 #include <sys/socket.h>
265 #ifndef WIN32
266 # include <netdb.h>
267 # include <sys/param.h>
268 #else /* WIN32 */
269 # include <winsock2.h>
270 #endif /* WIN32 */
271 #include <string.h>
272
273 #include <netinet/in.h>
274
275 #ifndef HAVE_SOCKLEN_T
276 typedef unsigned int socklen_t;
277 #endif /* HAVE_SOCKLEN_T */
278
279 #ifndef HAVE_STRUCT_SOCKADDR_STORAGE
280 #define _SS_MAXSIZE 128 /* Implementation specific max size */
281 #define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
282
283 struct sockaddr_storage {
284 struct sockaddr ss_sa;
285 char __ss_pad2[_SS_PADSIZE];
286 };
287 # define ss_family ss_sa.sa_family
288 #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
289
290 #ifndef AF_INET6
291 /* Define it to something that should never appear */
292 #define AF_INET6 AF_MAX
293 #endif
294
295 /* Create a struct iovec if we need one */
296 #if !defined(HAVE_SYS_UIO_H)
297 struct iovec {
298 long iov_len;
299 char *iov_base;
300 };
301 #else
302 #include <sys/types.h>
303 #include <sys/uio.h>
304 #endif
305
306 #ifndef HAVE_GETADDRINFO
307 #define getaddrinfo sasl_getaddrinfo
308 #define freeaddrinfo sasl_freeaddrinfo
309 #define getnameinfo sasl_getnameinfo
310 #define gai_strerror sasl_gai_strerror
311 #include "gai.h"
312 #endif
313
314 #ifndef AI_NUMERICHOST /* support glibc 2.0.x */
315 #define AI_NUMERICHOST 4
316 #define NI_NUMERICHOST 2
317 #define NI_NAMEREQD 4
318 #define NI_NUMERICSERV 8
319 #endif
320
321 /* handy string manipulation functions */
322 #ifndef HAVE_STRLCPY
323 extern size_t saslauthd_strlcpy(char *dst, const char *src, size_t len);
324 #define strlcpy(x,y,z) saslauthd_strlcpy((x),(y),(z))
325 #endif
326 #ifndef HAVE_STRLCAT
327 extern size_t saslauthd_strlcat(char *dst, const char *src, size_t len);
328 #define strlcat(x,y,z) saslauthd_strlcat((x),(y),(z))
329 #endif
330 #ifndef HAVE_ASPRINTF
331 extern int asprintf(char **str, const char *fmt, ...);
332 #endif
333
334 #endif
335 ])
336
337 AC_CONFIG_HEADERS(saslauthd.h)
338
339 AC_OUTPUT(Makefile)
231231 continue;
232232 }
233233
234 conn_fd = accept(sock_fd, (struct sockaddr *)&client, &len);
234 conn_fd = accept(sock_fd, (struct sockaddr *)&client, (unsigned int *) &len);
235235 rc = errno;
236236
237237 rel_accept_lock();
5555
5656 /* PUBLIC DEPENDENCIES */
5757 #include <unistd.h>
58 #include <stdio.h>
5859 #include <stdlib.h>
5960 #include <errno.h>
6061
8990 static char *tfn_cookie = 0;
9091 static int tfn_cookie_len = 0;
9192 static char pidstring[80];
92 int pidstring_len = 0;
93 size_t pidstring_len = 0;
9394 /* END PRIVATE DEPENDENCIES */
9495
9596 #endif /* WANT_KRBTF */
834834
835835 rc = ldap_set_option(lak->ld, LDAP_OPT_NETWORK_TIMEOUT, &(lak->conf->timeout));
836836 if (rc != LDAP_OPT_SUCCESS) {
837 syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_NETWORK_TIMEOUT %d.%d.", lak->conf->timeout.tv_sec, lak->conf->timeout.tv_usec);
837 syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_NETWORK_TIMEOUT %ld.%ld.", lak->conf->timeout.tv_sec, lak->conf->timeout.tv_usec);
838 }
839
840 rc = ldap_set_option(lak->ld, LDAP_OPT_TIMEOUT, &(lak->conf->timeout));
841 if (rc != LDAP_OPT_SUCCESS) {
842 syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_TIMEOUT %ld.%ld.", lak->conf->timeout.tv_sec, lak->conf->timeout.tv_usec);
838843 }
839844
840845 rc = ldap_set_option(lak->ld, LDAP_OPT_TIMELIMIT, &(lak->conf->time_limit));
17211726 return LAK_NOMEM;
17221727
17231728 EVP_DecodeInit(&EVP_ctx);
1724 rc = EVP_DecodeUpdate(&EVP_ctx, text, &i, (char *)src, strlen(src));
1729 rc = EVP_DecodeUpdate(&EVP_ctx, (unsigned char *) text, &i, (const unsigned char *)src, strlen(src));
17251730 if (rc < 0) {
17261731 free(text);
17271732 return LAK_FAIL;
17281733 }
17291734 tlen += i;
1730 EVP_DecodeFinal(&EVP_ctx, text, &i);
1735 EVP_DecodeFinal(&EVP_ctx, (unsigned char *) text, &i);
17311736
17321737 *ret = text;
17331738 if (rlen != NULL)
3131 #ifndef _MECHANISMS_H
3232 #define _MECHANISMS_H
3333
34 #include "saslauthd.h"
34 #include <config.h>
3535
3636 /* PUBLIC DEPENDENCIES */
3737 /* Authentication mechanism dispatch table definition */
630630 int null_fd;
631631 int exit_result;
632632 pid_t pid;
633 char pid_buf[100];
634633 struct flock lockinfo;
635634
636635 /**************************************************************
892891 * Do some final cleanup here.
893892 **************************************************************/
894893 void server_exit() {
895 struct flock lock_st;
896894
897895 /*********************************************************
898896 * If we're not the master process, don't do anything
4444 #ifndef _SASLAUTHDMAIN_H
4545 #define _SASLAUTHDMAIN_H
4646
47 #include <config.h>
48
4749 #include <sys/types.h>
48 #include "saslauthd.h"
4950
5051 /****************************************************************
5152 * Plug in some autoconf magic to determine what IPC method
+0
-191
saslauthd/saslauthd.8 less more
0 SASLAUTHD(8) BSD System Manager’s Manual SASLAUTHD(8)
1
2 NNAAMMEE
3 ssaassllaauutthhdd - sasl authentication server
4
5 SSYYNNOOPPSSIISS
6 ssaassllaauutthhdd --aa _a_u_t_h_m_e_c_h [--TTvvddcchhllrr] [--OO _o_p_t_i_o_n] [--mm _m_u_x___p_a_t_h] [--nn _t_h_r_e_a_d_s]
7 [--ss _s_i_z_e] [--tt _t_i_m_e_o_u_t]
8
9 DDEESSCCRRIIPPTTIIOONN
10 ssaassllaauutthhdd is a daemon process that handles plaintext authentication
11 requests on behalf of the SASL library.
12
13 The server fulfills two roles: it isolates all code requiring superuser
14 privileges into a single process, and it can be used to provide _p_r_o_x_y
15 authentication services to clients that do not understand SASL based
16 authentication.
17
18 ssaassllaauutthhdd should be started from the system boot scripts when going to
19 multi-user mode. When running against a protected authentication database
20 (e.g. the shadow mechanism), it must be run as the superuser.
21
22 OOppttiioonnss
23 Options named by lower-case letters configure the server itself.
24 Upper-case options control the behavior of specific authentication mecha-
25 nisms; their applicability to a particular authentication mechanism is
26 described in the _A_U_T_H_E_N_T_I_C_A_T_I_O_N _M_E_C_H_A_N_I_S_M_S section.
27
28 --aa _a_u_t_h_m_e_c_h
29 Use _a_u_t_h_m_e_c_h as the authentication mechanism. (See the
30 _A_U_T_H_E_N_T_I_C_A_T_I_O_N _M_E_C_H_A_N_I_S_M_S section below.) This parameter is
31 mandatory.
32
33 --OO _o_p_t_i_o_n
34 A mechanism specific option (e.g. rimap hostname or config file
35 path)
36
37 --HH _h_o_s_t_n_a_m_e
38 The remote host to be contacted by the rimap authentication mech-
39 anism. (Deprecated, use -O instead)
40
41 --mm _p_a_t_h
42 Use _p_a_t_h as the pathname to the named socket to listen on for
43 connection requests. This must be an absolute pathname, and MUST
44 NOT include the trailing "/mux". Note that the default for this
45 value is "/var/state/saslauthd" (or what was specified at compile
46 time) and that this directory must exist for saslauthd to func-
47 tion.
48
49 --nn _t_h_r_e_a_d_s
50 Use _t_h_r_e_a_d_s processes for responding to authentication queries.
51 (default: 5) A value of zero will indicate that saslauthd should
52 fork an individual process for each connection. This can solve
53 leaks that occur in some deployments.
54
55 --ss _s_i_z_e
56 Use _s_i_z_e as the table size of the hash table (in kilobytes)
57
58 --tt _t_i_m_e_o_u_t
59 Use _t_i_m_e_o_u_t as the expiration time of the authentication cache
60 (in seconds)
61
62 --TT Honour time-of-day login restrictions.
63
64 --hh Show usage information
65
66 --cc Enable caching of authentication credentials
67
68 --ll Disable the use of a lock file for controlling access to
69 accept().
70
71 --rr Combine the realm with the login (with an ’@’ sign in between).
72 e.g. login: "foo" realm: "bar" will get passed as login:
73 "foo@bar". Note that the realm will still be passed, which may
74 lead to unexpected behavior for authentication mechanisms that
75 make use of the realm, however for mechanisms which don’t, such
76 as _g_e_t_p_w_e_n_t, this is the only way to authenticate domain-specific
77 users sharing the same userid.
78
79 --vv Print the version number and available authentication mechanisms
80 on standard error, then exit.
81
82 --dd Debugging mode.
83
84 LLooggggiinngg
85 ssaassllaauutthhdd logs its activities via ssyyssllooggdd using the LOG_AUTH facility.
86
87 AAUUTTHHEENNTTIICCAATTIIOONN MMEECCHHAANNIISSMMSS
88 ssaassllaauutthhdd supports one or more "authentication mechanisms", dependent
89 upon the facilities provided by the underlying operating system. The
90 mechanism is selected by the --aa flag from the following list of choices:
91
92 dce _(_A_I_X_)
93
94 Authenticate using the DCE authentication environment.
95
96 getpwent _(_A_l_l _p_l_a_t_f_o_r_m_s_)
97
98 Authenticate using the ggeettppwweenntt() library function. Typically
99 this authenticates against the local password file. See your
100 system’s getpwent(3) man page for details.
101
102 kerberos4 _(_A_l_l _p_l_a_t_f_o_r_m_s_)
103
104 Authenticate against the local Kerberos 4 realm. (See the
105 _N_O_T_E_S section for caveats about this driver.)
106
107 kerberos5 _(_A_l_l _p_l_a_t_f_o_r_m_s_)
108
109 Authenticate against the local Kerberos 5 realm.
110
111 pam _(_L_i_n_u_x_, _S_o_l_a_r_i_s_)
112
113 Authenticate using Pluggable Authentication Modules (PAM).
114
115 rimap _(_A_l_l _p_l_a_t_f_o_r_m_s_)
116
117 Forward authentication requests to a remote IMAP server. This
118 driver connects to a remote IMAP server, specified using the
119 -O flag, and attempts to login (via an IMAP ‘LOGIN’ command)
120 using the credentials supplied to the local server. If the
121 remote authentication succeeds the local connection is also
122 considered to be authenticated. The remote connection is
123 closed as soon as the tagged response from the ‘LOGIN’ command
124 is received from the remote server.
125
126 The _o_p_t_i_o_n parameter to the --OO flag describes the remote
127 server to forward authentication requests to. _h_o_s_t_n_a_m_e can be
128 a hostname (imap.example.com) or a dotted-quad IP address
129 (192.168.0.1). The latter is useful if the remote server is
130 multi-homed and has network interfaces that are unreachable
131 from the local IMAP server. The remote host is contacted on
132 the ‘imap’ service port. A non-default port can be specified
133 by appending a slash and the port name or number to the
134 _h_o_s_t_n_a_m_e argument.
135
136 The --OO flag and argument are mandatory when using the rimap
137 mechanism.
138
139 shadow _(_A_I_X_, _I_r_i_x_, _L_i_n_u_x_, _S_o_l_a_r_i_s_)
140
141 Authenticate against the local "shadow password file". The
142 exact mechanism is system dependent. ssaassllaauutthhdd currently
143 understands the ggeettssppnnaamm() and ggeettuusseerrppww() library routines.
144 Some systems honour the --TT flag.
145
146 sasldb _(_A_l_l _p_l_a_t_f_o_r_m_s_)
147
148 Authenticate against the SASL authentication database. Note
149 that this is probably not what you want to use, and is even
150 disabled at compile-time by default. If you want to use
151 sasldb with the SASL library, you probably want to use the
152 pwcheck_method of "auxprop" along with the sasldb auxprop plu-
153 gin instead.
154
155 ldap _(_A_l_l _p_l_a_t_f_o_r_m_s _t_h_a_t _s_u_p_p_o_r_t _O_p_e_n_L_D_A_P _2_._0 _o_r _h_i_g_h_e_r_)
156
157 Authenticate against an ldap server. The ldap configuration
158 parameters are read from /usr/local/etc/saslauthd.conf. The
159 location of this file can be changed with the -O parameter.
160 See the LDAP_SASLAUTHD file included with the distribution for
161 the list of available parameters.
162
163 sia _(_D_i_g_i_t_a_l _U_N_I_X_)
164
165 Authenticate using the Digital UNIX Security Integration
166 Architecture (a.k.a. "enhanced security").
167
168 NNOOTTEESS
169 The kerberos4 authentication driver consumes considerable resources. To
170 perform an authentication it must obtain a ticket granting ticket from
171 the TGT server oonn eevveerryy aauutthheennttiiccaattiioonn rreeqquueesstt.. The Kerberos library rou-
172 tines that obtain the TGT also create a local ticket file, on the reason-
173 able assumption that you will want to save the TGT for use by other Ker-
174 beros applications. These ticket files are unusable by ssaassllaauutthhdd , how-
175 ever there is no way not to create them. The overhead of creating and
176 removing these ticket files can cause serious performance degradation on
177 busy servers. (Kerberos was never intended to be used in this manner,
178 anyway.)
179
180 FFIILLEESS
181 /var/run/saslauthd/mux The default communications socket.
182
183 /usr/local/etc/saslauthd.conf
184 The default configuration file for ldap support.
185
186 SSEEEE AALLSSOO
187 passwd(1), getpwent(3), getspnam(3), getuserpw(3), sasl_checkpass(3)
188 sia_authenticate_user(3),
189
190 CMU-SASL 12 12 2005 CMU-SASL
+0
-343
saslauthd/saslauthd.h.in less more
0 /* saslauthd.h.in. Generated from configure.in by autoheader. */
1
2
3 #ifndef _SASLAUTHD_H
4 #define _SASLAUTHD_H
5
6 #include <stdio.h>
7
8
9 /* Include SASLdb Support */
10 #undef AUTH_SASLDB
11
12 /* Define if your getpwnam_r()/getspnam_r() functions take 5 arguments */
13 #undef GETXXNAM_R_5ARG
14
15 /* Define to 1 if you have the `asprintf' function. */
16 #undef HAVE_ASPRINTF
17
18 /* Define to 1 if you have the <crypt.h> header file. */
19 #undef HAVE_CRYPT_H
20
21 /* Define to 1 if you have the `dns_lookup' function. */
22 #undef HAVE_DNS_LOOKUP
23
24 /* Define to 1 if you have the `dn_expand' function. */
25 #undef HAVE_DN_EXPAND
26
27 /* Define to 1 if you have the <fcntl.h> header file. */
28 #undef HAVE_FCNTL_H
29
30 /* Does the compiler understand __func__ */
31 #undef HAVE_FUNC
32
33 /* Does compiler understand __FUNCTION__ */
34 #undef HAVE_FUNCTION
35
36 /* Do we have a getaddrinfo? */
37 #undef HAVE_GETADDRINFO
38
39 /* Define to 1 if you have the `gethostname' function. */
40 #undef HAVE_GETHOSTNAME
41
42 /* Do we have a getnameinfo() function? */
43 #undef HAVE_GETNAMEINFO
44
45 /* Define to 1 if you have the `getspnam' function. */
46 #undef HAVE_GETSPNAM
47
48 /* Define to 1 if you have the `getuserpw' function. */
49 #undef HAVE_GETUSERPW
50
51 /* Include GSSAPI/Kerberos 5 Support */
52 #undef HAVE_GSSAPI
53
54 /* Define to 1 if you have the <gssapi/gssapi_ext.h> header file. */
55 #undef HAVE_GSSAPI_GSSAPI_EXT_H
56
57 /* Define if you have the gssapi.h header file */
58 #undef HAVE_GSSAPI_H
59
60 /* Define to 1 if you have the `gsskrb5_register_acceptor_identity' function.
61 */
62 #undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
63
64 /* Define if your GSSAPI implementation defines GSS_C_NT_HOSTBASED_SERVICE */
65 #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
66
67 /* Define if your GSSAPI implementation defines GSS_C_NT_USER_NAME */
68 #undef HAVE_GSS_C_NT_USER_NAME
69
70 /* Define to 1 if you have the `gss_decapsulate_token' function. */
71 #undef HAVE_GSS_DECAPSULATE_TOKEN
72
73 /* Define to 1 if you have the `gss_encapsulate_token' function. */
74 #undef HAVE_GSS_ENCAPSULATE_TOKEN
75
76 /* Define to 1 if you have the `gss_get_name_attribute' function. */
77 #undef HAVE_GSS_GET_NAME_ATTRIBUTE
78
79 /* Define to 1 if you have the `gss_oid_equal' function. */
80 #undef HAVE_GSS_OID_EQUAL
81
82 /* Define if your GSSAPI implementation supports SPNEGO */
83 #undef HAVE_GSS_SPNEGO
84
85 /* Include HTTP form Support */
86 #undef HAVE_HTTPFORM
87
88 /* Define to 1 if you have the <inttypes.h> header file. */
89 #undef HAVE_INTTYPES_H
90
91 /* Do we have Kerberos 4 Support? */
92 #undef HAVE_KRB
93
94 /* Define to 1 if you have the <krb5.h> header file. */
95 #undef HAVE_KRB5_H
96
97 /* Define to 1 if you have the `krb_get_err_text' function. */
98 #undef HAVE_KRB_GET_ERR_TEXT
99
100 /* Support for LDAP? */
101 #undef HAVE_LDAP
102
103 /* Define to 1 if you have the `resolv' library (-lresolv). */
104 #undef HAVE_LIBRESOLV
105
106 /* Define to 1 if you have the <memory.h> header file. */
107 #undef HAVE_MEMORY_H
108
109 /* Define to 1 if you have the `mkdir' function. */
110 #undef HAVE_MKDIR
111
112 /* Do we have OpenSSL? */
113 #undef HAVE_OPENSSL
114
115 /* Support for PAM? */
116 #undef HAVE_PAM
117
118 /* Does compiler understand __PRETTY_FUNCTION__ */
119 #undef HAVE_PRETTY_FUNCTION
120
121 /* Include support for saslauthd? */
122 #undef HAVE_SASLAUTHD
123
124 /* Include SIA Support */
125 #undef HAVE_SIA
126
127 /* Does sockaddr have an sa_len? */
128 #undef HAVE_SOCKADDR_SA_LEN
129
130 /* Define to 1 if you have the `socket' function. */
131 #undef HAVE_SOCKET
132
133 /* Do we have a socklen_t? */
134 #undef HAVE_SOCKLEN_T
135
136 /* Is there an ss_family in sockaddr_storage? */
137 #undef HAVE_SS_FAMILY
138
139 /* Define to 1 if you have the <stdint.h> header file. */
140 #undef HAVE_STDINT_H
141
142 /* Define to 1 if you have the <stdlib.h> header file. */
143 #undef HAVE_STDLIB_H
144
145 /* Define to 1 if you have the `strdup' function. */
146 #undef HAVE_STRDUP
147
148 /* Define to 1 if you have the <strings.h> header file. */
149 #undef HAVE_STRINGS_H
150
151 /* Define to 1 if you have the <string.h> header file. */
152 #undef HAVE_STRING_H
153
154 /* Define to 1 if you have the `strlcat' function. */
155 #undef HAVE_STRLCAT
156
157 /* Define to 1 if you have the `strlcpy' function. */
158 #undef HAVE_STRLCPY
159
160 /* Do we have a sockaddr_storage struct? */
161 #undef HAVE_STRUCT_SOCKADDR_STORAGE
162
163 /* Define to 1 if you have the <syslog.h> header file. */
164 #undef HAVE_SYSLOG_H
165
166 /* Define to 1 if you have the <sys/stat.h> header file. */
167 #undef HAVE_SYS_STAT_H
168
169 /* Define to 1 if you have the <sys/time.h> header file. */
170 #undef HAVE_SYS_TIME_H
171
172 /* Define to 1 if you have the <sys/types.h> header file. */
173 #undef HAVE_SYS_TYPES_H
174
175 /* Define to 1 if you have the <sys/uio.h> header file. */
176 #undef HAVE_SYS_UIO_H
177
178 /* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
179 #undef HAVE_SYS_WAIT_H
180
181 /* Define to 1 if you have the <unistd.h> header file. */
182 #undef HAVE_UNISTD_H
183
184 /* define if your compiler has __attribute__ */
185 #undef HAVE___ATTRIBUTE__
186
187 /* Using Heimdal */
188 #undef KRB5_HEIMDAL
189
190 /* Name of package */
191 #undef PACKAGE
192
193 /* Define to the address where bug reports for this package should be sent. */
194 #undef PACKAGE_BUGREPORT
195
196 /* Define to the full name of this package. */
197 #undef PACKAGE_NAME
198
199 /* Define to the full name and version of this package. */
200 #undef PACKAGE_STRING
201
202 /* Define to the one symbol short name of this package. */
203 #undef PACKAGE_TARNAME
204
205 /* Define to the version of this package. */
206 #undef PACKAGE_VERSION
207
208 /* Location of saslauthd socket */
209 #undef PATH_SASLAUTHD_RUNDIR
210
211 /* Define as the return type of signal handlers (`int' or `void'). */
212 #undef RETSIGTYPE
213
214 /* Saslauthd runs threaded? */
215 #undef SASLAUTHD_THREADED
216
217 /* Use BerkeleyDB for SASLdb */
218 #undef SASL_BERKELEYDB
219
220 /* Path to default SASLdb database */
221 #undef SASL_DB_PATH
222
223 /* Use GDBM for SASLdb */
224 #undef SASL_GDBM
225
226 /* Use NDBM for SASLdb */
227 #undef SASL_NDBM
228
229 /* The size of `long', as computed by sizeof. */
230 #undef SIZEOF_LONG
231
232 /* User KERBEROS_V4 Staticly */
233 #undef STATIC_KERBEROS4
234
235 /* Link SASLdb Staticly */
236 #undef STATIC_SASLDB
237
238 /* Define to 1 if you have the ANSI C header files. */
239 #undef STDC_HEADERS
240
241 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
242 #undef TIME_WITH_SYS_TIME
243
244 /* Use the doors IPC API */
245 #undef USE_DOORS
246
247 /* Version number of package */
248 #undef VERSION
249
250 /* Use DES */
251 #undef WITH_DES
252
253 /* Use OpenSSL DES Implementation */
254 #undef WITH_SSL_DES
255
256 /* Define to empty if `const' does not conform to ANSI C. */
257 #undef const
258
259 /* Define to `int' if <sys/types.h> does not define. */
260 #undef pid_t
261
262
263
264 #ifndef HAVE___ATTRIBUTE__
265 /* Can't use attributes... */
266 #define __attribute__(foo)
267 #endif
268
269 #include <stdlib.h>
270 #include <sys/types.h>
271 #include <sys/socket.h>
272 #ifndef WIN32
273 # include <netdb.h>
274 # include <sys/param.h>
275 #else /* WIN32 */
276 # include <winsock2.h>
277 #endif /* WIN32 */
278 #include <string.h>
279
280 #include <netinet/in.h>
281
282 #ifndef HAVE_SOCKLEN_T
283 typedef unsigned int socklen_t;
284 #endif /* HAVE_SOCKLEN_T */
285
286 #ifndef HAVE_STRUCT_SOCKADDR_STORAGE
287 #define _SS_MAXSIZE 128 /* Implementation specific max size */
288 #define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
289
290 struct sockaddr_storage {
291 struct sockaddr ss_sa;
292 char __ss_pad2[_SS_PADSIZE];
293 };
294 # define ss_family ss_sa.sa_family
295 #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
296
297 #ifndef AF_INET6
298 /* Define it to something that should never appear */
299 #define AF_INET6 AF_MAX
300 #endif
301
302 /* Create a struct iovec if we need one */
303 #if !defined(HAVE_SYS_UIO_H)
304 struct iovec {
305 long iov_len;
306 char *iov_base;
307 };
308 #else
309 #include <sys/types.h>
310 #include <sys/uio.h>
311 #endif
312
313 #ifndef HAVE_GETADDRINFO
314 #define getaddrinfo sasl_getaddrinfo
315 #define freeaddrinfo sasl_freeaddrinfo
316 #define getnameinfo sasl_getnameinfo
317 #define gai_strerror sasl_gai_strerror
318 #include "gai.h"
319 #endif
320
321 #ifndef AI_NUMERICHOST /* support glibc 2.0.x */
322 #define AI_NUMERICHOST 4
323 #define NI_NUMERICHOST 2
324 #define NI_NAMEREQD 4
325 #define NI_NUMERICSERV 8
326 #endif
327
328 /* handy string manipulation functions */
329 #ifndef HAVE_STRLCPY
330 extern size_t saslauthd_strlcpy(char *dst, const char *src, size_t len);
331 #define strlcpy(x,y,z) saslauthd_strlcpy((x),(y),(z))
332 #endif
333 #ifndef HAVE_STRLCAT
334 extern size_t saslauthd_strlcat(char *dst, const char *src, size_t len);
335 #define strlcat(x,y,z) saslauthd_strlcat((x),(y),(z))
336 #endif
337 #ifndef HAVE_ASPRINTF
338 extern int asprintf(char **str, const char *fmt, ...);
339 #endif
340
341 #endif
342
0 .\" testsaslauthd - SASL2 test tool
1 .\" Dima Barsky 23/12/2002
2 .\"
3
4 .\"
5 .TH TESTSASLAUTHD 8 "December 23, 2002" "CMU SASL"
6 .SH NAME
7 testsaslauthd \- a test tool for saslauthd
8 .SH SYNOPSIS
9 .B testsaslauthd -u username -p password
10 [-r realm] [-s servicename]
11 [-f socket path] [-R repeatnum]
12
13 .SH DESCRIPTION
14 This tool is for testing the saslauthd daemon. Do not use it unless you
15 know what you are doing. Read the source code if you need more information.
4040 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4141 */
4242
43 #include <saslauthd.h>
43 #include <config.h>
4444 #include <stdio.h>
4545
4646 #include <errno.h>
104104 struct sockaddr_un srvaddr;
105105 int r;
106106 unsigned short count;
107 void *context;
108107 char pwpath[sizeof(srvaddr.sun_path)];
109 const char *p = NULL;
110108 #ifdef USE_DOORS
111109 door_arg_t arg;
112110 #endif
132130 */
133131 {
134132 unsigned short u_len, p_len, s_len, r_len;
135 struct iovec iov[8];
136133
137134 u_len = htons(strlen(userid));
138135 p_len = htons(strlen(passwd));
252249 const char *realm = NULL, *service = NULL, *path = NULL;
253250 int c;
254251 int flag_error = 0;
255 unsigned passlen, verifylen;
256 const char *errstr = NULL;
257 int result;
258 char *user_domain = NULL;
252 int result = 0;
259253 int repeat = 0;
260254
261255 while ((c = getopt(argc, argv, "p:u:r:s:f:R:")) != EOF)
4444 #ifndef _UTILS_H
4545 #define _UTILS_H
4646
47 #include <config.h>
4748
4849 #include <syslog.h>
4950 #include <sys/types.h>
5051 #include <sys/uio.h>
51 #include "saslauthd.h"
52
5352
5453 /* log prioities */
5554 #define L_ERR LOG_ERR
0 Makefile.in
1 Makefile
2 .deps
3 .libs
4 *.l[ao]
5 *.o
4343 # Note that this doesn't necessaraly follow the libsasl2 verison info
4444 sasl_version = 1:25:0
4545
46 INCLUDES=-I$(top_srcdir)/include -I$(top_builddir)/include @SASL_DB_INC@
46 AM_CPPFLAGS=-fPIC -I$(top_srcdir)/include -I$(top_builddir)/include @SASL_DB_INC@
4747
48 extra_common_sources = db_none.c db_ndbm.c db_gdbm.c db_berkeley.c
48 extra_common_sources = db_none.c db_lmdb.c db_ndbm.c db_gdbm.c db_berkeley.c
4949
5050 EXTRA_DIST = NTMakefile
5151
5252 noinst_LTLIBRARIES = libsasldb.la
53 noinst_LIBRARIES = libsasldb.a
5453
5554 libsasldb_la_SOURCES = allockey.c sasldb.h
5655 EXTRA_libsasldb_la_SOURCES = $(extra_common_sources)
5756 libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND)
58 libsasldb_la_LIBADD = $(SASL_DB_BACKEND)
59
60 # Prevent make dist stupidity
61 libsasldb_a_SOURCES =
62 EXTRA_libsasldb_a_SOURCES =
63
64 libsasldb.a: libsasldb.la $(SASL_DB_BACKEND_STATIC)
65 $(AR) cru .libs/$@ $(SASL_DB_BACKEND_STATIC)
66
67
57 libsasldb_la_LIBADD = $(SASL_DB_BACKEND)
58 libsasldb_la_LDFLAGS = -no-undefined
+0
-599
sasldb/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 # Makefile.am for the SASLdb library
18 # Rob Siemborski
19 # $Id: Makefile.am,v 1.33 2011/09/05 14:18:10 murch Exp $
20 # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
21 #
22 # Redistribution and use in source and binary forms, with or without
23 # modification, are permitted provided that the following conditions
24 # are met:
25 #
26 # 1. Redistributions of source code must retain the above copyright
27 # notice, this list of conditions and the following disclaimer.
28 #
29 # 2. Redistributions in binary form must reproduce the above copyright
30 # notice, this list of conditions and the following disclaimer in
31 # the documentation and/or other materials provided with the
32 # distribution.
33 #
34 # 3. The name "Carnegie Mellon University" must not be used to
35 # endorse or promote products derived from this software without
36 # prior written permission. For permission or any other legal
37 # details, please contact
38 # Office of Technology Transfer
39 # Carnegie Mellon University
40 # 5000 Forbes Avenue
41 # Pittsburgh, PA 15213-3890
42 # (412) 268-4387, fax: (412) 268-7395
43 # tech-transfer@andrew.cmu.edu
44 #
45 # 4. Redistributions of any form whatsoever must retain the following
46 # acknowledgment:
47 # "This product includes software developed by Computing Services
48 # at Carnegie Mellon University (http://www.cmu.edu/computing/)."
49 #
50 # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
51 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
52 # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
53 # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
54 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
55 # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
56 # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
57 #
58
59
60 VPATH = @srcdir@
61 pkgdatadir = $(datadir)/@PACKAGE@
62 pkgincludedir = $(includedir)/@PACKAGE@
63 pkglibdir = $(libdir)/@PACKAGE@
64 pkglibexecdir = $(libexecdir)/@PACKAGE@
65 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
66 install_sh_DATA = $(install_sh) -c -m 644
67 install_sh_PROGRAM = $(install_sh) -c
68 install_sh_SCRIPT = $(install_sh) -c
69 INSTALL_HEADER = $(INSTALL_DATA)
70 transform = $(program_transform_name)
71 NORMAL_INSTALL = :
72 PRE_INSTALL = :
73 POST_INSTALL = :
74 NORMAL_UNINSTALL = :
75 PRE_UNINSTALL = :
76 POST_UNINSTALL = :
77 build_triplet = @build@
78 host_triplet = @host@
79 target_triplet = @target@
80 subdir = sasldb
81 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
82 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
83 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
84 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
85 $(top_srcdir)/config/sasldb.m4 \
86 $(top_srcdir)/cmulocal/berkdb.m4 \
87 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
88 $(top_srcdir)/cmulocal/c-attribute.m4 \
89 $(top_srcdir)/cmulocal/common.m4 \
90 $(top_srcdir)/cmulocal/cyrus.m4 \
91 $(top_srcdir)/cmulocal/init_automake.m4 \
92 $(top_srcdir)/cmulocal/ipv6.m4 \
93 $(top_srcdir)/cmulocal/openldap.m4 \
94 $(top_srcdir)/cmulocal/openssl.m4 \
95 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
96 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
97 $(ACLOCAL_M4)
98 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
99 CONFIG_HEADER = $(top_builddir)/config.h
100 CONFIG_CLEAN_FILES =
101 CONFIG_CLEAN_VPATH_FILES =
102 LIBRARIES = $(noinst_LIBRARIES)
103 AR = ar
104 ARFLAGS = cru
105 libsasldb_a_AR = $(AR) $(ARFLAGS)
106 libsasldb_a_LIBADD =
107 am_libsasldb_a_OBJECTS =
108 libsasldb_a_OBJECTS = $(am_libsasldb_a_OBJECTS)
109 LTLIBRARIES = $(noinst_LTLIBRARIES)
110 am__DEPENDENCIES_1 =
111 am_libsasldb_la_OBJECTS = allockey.lo
112 libsasldb_la_OBJECTS = $(am_libsasldb_la_OBJECTS)
113 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
114 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
115 am__depfiles_maybe = depfiles
116 am__mv = mv -f
117 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
118 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
119 LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
120 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
121 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
122 CCLD = $(CC)
123 LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
124 $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
125 SOURCES = $(libsasldb_a_SOURCES) $(EXTRA_libsasldb_a_SOURCES) \
126 $(libsasldb_la_SOURCES) $(EXTRA_libsasldb_la_SOURCES)
127 DIST_SOURCES = $(libsasldb_a_SOURCES) $(EXTRA_libsasldb_a_SOURCES) \
128 $(libsasldb_la_SOURCES) $(EXTRA_libsasldb_la_SOURCES)
129 ETAGS = etags
130 CTAGS = ctags
131 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
132 ACLOCAL = @ACLOCAL@
133 AMTAR = @AMTAR@
134 AUTOCONF = @AUTOCONF@
135 AUTOHEADER = @AUTOHEADER@
136 AUTOMAKE = @AUTOMAKE@
137 AWK = @AWK@
138 CC = @CC@
139 CCDEPMODE = @CCDEPMODE@
140 CFLAGS = @CFLAGS@
141 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
142 CPP = @CPP@
143 CPPFLAGS = @CPPFLAGS@
144 CYGPATH_W = @CYGPATH_W@
145 DEFS = @DEFS@
146 DEPDIR = @DEPDIR@
147 DIRS = @DIRS@
148 DMALLOC_LIBS = @DMALLOC_LIBS@
149 ECHO_C = @ECHO_C@
150 ECHO_N = @ECHO_N@
151 ECHO_T = @ECHO_T@
152 EGREP = @EGREP@
153 EXEEXT = @EXEEXT@
154 GETADDRINFOOBJS = @GETADDRINFOOBJS@
155 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
156 GETSUBOPT = @GETSUBOPT@
157 GREP = @GREP@
158 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
159 GSSAPI_LIBS = @GSSAPI_LIBS@
160 INSTALL = @INSTALL@
161 INSTALL_DATA = @INSTALL_DATA@
162 INSTALL_PROGRAM = @INSTALL_PROGRAM@
163 INSTALL_SCRIPT = @INSTALL_SCRIPT@
164 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
165 IPCTYPE = @IPCTYPE@
166 JAVAC = @JAVAC@
167 JAVADOC = @JAVADOC@
168 JAVAH = @JAVAH@
169 JAVAROOT = @JAVAROOT@
170 JAVA_INCLUDES = @JAVA_INCLUDES@
171 LDFLAGS = @LDFLAGS@
172 LIBOBJS = @LIBOBJS@
173 LIBS = @LIBS@
174 LIBTOOL = @LIBTOOL@
175 LIB_CRYPT = @LIB_CRYPT@
176 LIB_DES = @LIB_DES@
177 LIB_DOOR = @LIB_DOOR@
178 LIB_LDAP = @LIB_LDAP@
179 LIB_MYSQL = @LIB_MYSQL@
180 LIB_PGSQL = @LIB_PGSQL@
181 LIB_SOCKET = @LIB_SOCKET@
182 LIB_SQLITE = @LIB_SQLITE@
183 LIB_SQLITE3 = @LIB_SQLITE3@
184 LN_S = @LN_S@
185 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
186 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
187 LTLIBOBJS = @LTLIBOBJS@
188 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
189 MAKEINFO = @MAKEINFO@
190 MKDIR_P = @MKDIR_P@
191 NM = @NM@
192 NTLM_LIBS = @NTLM_LIBS@
193 OBJEXT = @OBJEXT@
194 OTP_LIBS = @OTP_LIBS@
195 PACKAGE = @PACKAGE@
196 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
197 PACKAGE_NAME = @PACKAGE_NAME@
198 PACKAGE_STRING = @PACKAGE_STRING@
199 PACKAGE_TARNAME = @PACKAGE_TARNAME@
200 PACKAGE_VERSION = @PACKAGE_VERSION@
201 PASSDSS_LIBS = @PASSDSS_LIBS@
202 PATH_SEPARATOR = @PATH_SEPARATOR@
203 PLAIN_LIBS = @PLAIN_LIBS@
204 PURECOV = @PURECOV@
205 PURIFY = @PURIFY@
206 PWCHECKMETH = @PWCHECKMETH@
207 RANLIB = @RANLIB@
208 SASL_DB_BACKEND = @SASL_DB_BACKEND@
209 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
210 SASL_DB_INC = @SASL_DB_INC@
211 SASL_DB_LIB = @SASL_DB_LIB@
212 SASL_DB_MANS = @SASL_DB_MANS@
213 SASL_DB_UTILS = @SASL_DB_UTILS@
214 SASL_DL_LIB = @SASL_DL_LIB@
215 SASL_KRB_LIB = @SASL_KRB_LIB@
216 SASL_MECHS = @SASL_MECHS@
217 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
218 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
219 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
220 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
221 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
222 SCRAM_LIBS = @SCRAM_LIBS@
223 SET_MAKE = @SET_MAKE@
224 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
225 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
226 SHELL = @SHELL@
227 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
228 SNPRINTFOBJS = @SNPRINTFOBJS@
229 SRP_LIBS = @SRP_LIBS@
230 STRIP = @STRIP@
231 VERSION = @VERSION@
232 abs_builddir = @abs_builddir@
233 abs_srcdir = @abs_srcdir@
234 abs_top_builddir = @abs_top_builddir@
235 abs_top_srcdir = @abs_top_srcdir@
236 ac_ct_CC = @ac_ct_CC@
237 am__include = @am__include@
238 am__leading_dot = @am__leading_dot@
239 am__quote = @am__quote@
240 am__tar = @am__tar@
241 am__untar = @am__untar@
242 bindir = @bindir@
243 build = @build@
244 build_alias = @build_alias@
245 build_cpu = @build_cpu@
246 build_os = @build_os@
247 build_vendor = @build_vendor@
248 builddir = @builddir@
249 configdir = @configdir@
250 datadir = @datadir@
251 datarootdir = @datarootdir@
252 docdir = @docdir@
253 dvidir = @dvidir@
254 exec_prefix = @exec_prefix@
255 host = @host@
256 host_alias = @host_alias@
257 host_cpu = @host_cpu@
258 host_os = @host_os@
259 host_vendor = @host_vendor@
260 htmldir = @htmldir@
261 includedir = @includedir@
262 infodir = @infodir@
263 install_sh = @install_sh@
264 libdir = @libdir@
265 libexecdir = @libexecdir@
266 localedir = @localedir@
267 localstatedir = @localstatedir@
268 mandir = @mandir@
269 mkdir_p = @mkdir_p@
270 oldincludedir = @oldincludedir@
271 pdfdir = @pdfdir@
272 plugindir = @plugindir@
273 prefix = @prefix@
274 program_transform_name = @program_transform_name@
275 psdir = @psdir@
276 sbindir = @sbindir@
277 sharedstatedir = @sharedstatedir@
278 srcdir = @srcdir@
279 subdirs = @subdirs@
280 sysconfdir = @sysconfdir@
281 target = @target@
282 target_alias = @target_alias@
283 target_cpu = @target_cpu@
284 target_os = @target_os@
285 target_vendor = @target_vendor@
286 top_build_prefix = @top_build_prefix@
287 top_builddir = @top_builddir@
288 top_srcdir = @top_srcdir@
289
290 # Library version info - here at the top, for sanity
291 # Note that this doesn't necessaraly follow the libsasl2 verison info
292 sasl_version = 1:25:0
293 INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include @SASL_DB_INC@
294 extra_common_sources = db_none.c db_ndbm.c db_gdbm.c db_berkeley.c
295 EXTRA_DIST = NTMakefile
296 noinst_LTLIBRARIES = libsasldb.la
297 noinst_LIBRARIES = libsasldb.a
298 libsasldb_la_SOURCES = allockey.c sasldb.h
299 EXTRA_libsasldb_la_SOURCES = $(extra_common_sources)
300 libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND)
301 libsasldb_la_LIBADD = $(SASL_DB_BACKEND)
302
303 # Prevent make dist stupidity
304 libsasldb_a_SOURCES =
305 EXTRA_libsasldb_a_SOURCES =
306 all: all-am
307
308 .SUFFIXES:
309 .SUFFIXES: .c .lo .o .obj
310 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
311 @for dep in $?; do \
312 case '$(am__configure_deps)' in \
313 *$$dep*) \
314 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
315 && { if test -f $@; then exit 0; else break; fi; }; \
316 exit 1;; \
317 esac; \
318 done; \
319 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu sasldb/Makefile'; \
320 $(am__cd) $(top_srcdir) && \
321 $(AUTOMAKE) --gnu sasldb/Makefile
322 .PRECIOUS: Makefile
323 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
324 @case '$?' in \
325 *config.status*) \
326 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
327 *) \
328 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
329 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
330 esac;
331
332 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
333 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
334
335 $(top_srcdir)/configure: $(am__configure_deps)
336 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
337 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
338 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
339 $(am__aclocal_m4_deps):
340
341 clean-noinstLIBRARIES:
342 -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
343
344 clean-noinstLTLIBRARIES:
345 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
346 @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
347 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
348 test "$$dir" != "$$p" || dir=.; \
349 echo "rm -f \"$${dir}/so_locations\""; \
350 rm -f "$${dir}/so_locations"; \
351 done
352 libsasldb.la: $(libsasldb_la_OBJECTS) $(libsasldb_la_DEPENDENCIES)
353 $(LINK) $(libsasldb_la_OBJECTS) $(libsasldb_la_LIBADD) $(LIBS)
354
355 mostlyclean-compile:
356 -rm -f *.$(OBJEXT)
357
358 distclean-compile:
359 -rm -f *.tab.c
360
361 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allockey.Plo@am__quote@
362 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/db_berkeley.Plo@am__quote@
363 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/db_gdbm.Plo@am__quote@
364 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/db_ndbm.Plo@am__quote@
365 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/db_none.Plo@am__quote@
366
367 .c.o:
368 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
369 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
370 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
371 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
372 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
373
374 .c.obj:
375 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
376 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
377 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
378 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
379 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
380
381 .c.lo:
382 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
383 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
384 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
385 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
386 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
387
388 mostlyclean-libtool:
389 -rm -f *.lo
390
391 clean-libtool:
392 -rm -rf .libs _libs
393
394 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
395 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
396 unique=`for i in $$list; do \
397 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
398 done | \
399 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
400 END { if (nonempty) { for (i in files) print i; }; }'`; \
401 mkid -fID $$unique
402 tags: TAGS
403
404 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
405 $(TAGS_FILES) $(LISP)
406 set x; \
407 here=`pwd`; \
408 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
409 unique=`for i in $$list; do \
410 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
411 done | \
412 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
413 END { if (nonempty) { for (i in files) print i; }; }'`; \
414 shift; \
415 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
416 test -n "$$unique" || unique=$$empty_fix; \
417 if test $$# -gt 0; then \
418 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
419 "$$@" $$unique; \
420 else \
421 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
422 $$unique; \
423 fi; \
424 fi
425 ctags: CTAGS
426 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
427 $(TAGS_FILES) $(LISP)
428 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
429 unique=`for i in $$list; do \
430 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
431 done | \
432 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
433 END { if (nonempty) { for (i in files) print i; }; }'`; \
434 test -z "$(CTAGS_ARGS)$$unique" \
435 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
436 $$unique
437
438 GTAGS:
439 here=`$(am__cd) $(top_builddir) && pwd` \
440 && $(am__cd) $(top_srcdir) \
441 && gtags -i $(GTAGS_ARGS) "$$here"
442
443 distclean-tags:
444 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
445
446 distdir: $(DISTFILES)
447 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
448 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
449 list='$(DISTFILES)'; \
450 dist_files=`for file in $$list; do echo $$file; done | \
451 sed -e "s|^$$srcdirstrip/||;t" \
452 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
453 case $$dist_files in \
454 */*) $(MKDIR_P) `echo "$$dist_files" | \
455 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
456 sort -u` ;; \
457 esac; \
458 for file in $$dist_files; do \
459 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
460 if test -d $$d/$$file; then \
461 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
462 if test -d "$(distdir)/$$file"; then \
463 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
464 fi; \
465 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
466 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
467 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
468 fi; \
469 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
470 else \
471 test -f "$(distdir)/$$file" \
472 || cp -p $$d/$$file "$(distdir)/$$file" \
473 || exit 1; \
474 fi; \
475 done
476 check-am: all-am
477 check: check-am
478 all-am: Makefile $(LIBRARIES) $(LTLIBRARIES)
479 installdirs:
480 install: install-am
481 install-exec: install-exec-am
482 install-data: install-data-am
483 uninstall: uninstall-am
484
485 install-am: all-am
486 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
487
488 installcheck: installcheck-am
489 install-strip:
490 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
491 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
492 `test -z '$(STRIP)' || \
493 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
494 mostlyclean-generic:
495
496 clean-generic:
497
498 distclean-generic:
499 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
500 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
501
502 maintainer-clean-generic:
503 @echo "This command is intended for maintainers to use"
504 @echo "it deletes files that may require special tools to rebuild."
505 clean: clean-am
506
507 clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
508 clean-noinstLTLIBRARIES mostlyclean-am
509
510 distclean: distclean-am
511 -rm -rf ./$(DEPDIR)
512 -rm -f Makefile
513 distclean-am: clean-am distclean-compile distclean-generic \
514 distclean-tags
515
516 dvi: dvi-am
517
518 dvi-am:
519
520 html: html-am
521
522 html-am:
523
524 info: info-am
525
526 info-am:
527
528 install-data-am:
529
530 install-dvi: install-dvi-am
531
532 install-dvi-am:
533
534 install-exec-am:
535
536 install-html: install-html-am
537
538 install-html-am:
539
540 install-info: install-info-am
541
542 install-info-am:
543
544 install-man:
545
546 install-pdf: install-pdf-am
547
548 install-pdf-am:
549
550 install-ps: install-ps-am
551
552 install-ps-am:
553
554 installcheck-am:
555
556 maintainer-clean: maintainer-clean-am
557 -rm -rf ./$(DEPDIR)
558 -rm -f Makefile
559 maintainer-clean-am: distclean-am maintainer-clean-generic
560
561 mostlyclean: mostlyclean-am
562
563 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
564 mostlyclean-libtool
565
566 pdf: pdf-am
567
568 pdf-am:
569
570 ps: ps-am
571
572 ps-am:
573
574 uninstall-am:
575
576 .MAKE: install-am install-strip
577
578 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
579 clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \
580 ctags distclean distclean-compile distclean-generic \
581 distclean-libtool distclean-tags distdir dvi dvi-am html \
582 html-am info info-am install install-am install-data \
583 install-data-am install-dvi install-dvi-am install-exec \
584 install-exec-am install-html install-html-am install-info \
585 install-info-am install-man install-pdf install-pdf-am \
586 install-ps install-ps-am install-strip installcheck \
587 installcheck-am installdirs maintainer-clean \
588 maintainer-clean-generic mostlyclean mostlyclean-compile \
589 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
590 tags uninstall uninstall-am
591
592
593 libsasldb.a: libsasldb.la $(SASL_DB_BACKEND_STATIC)
594 $(AR) cru .libs/$@ $(SASL_DB_BACKEND_STATIC)
595
596 # Tell versions [3.59,3.63) of GNU make to not export all variables.
597 # Otherwise a system limit (for SysV at least) may be exceeded.
598 .NOEXPORT:
0 /* db_lmdb.c--SASL OpenLDAP LMDB interface
1 * Howard Chu
2 * $Id$
3 */
4 /*
5 * Copyright (C) 2011-2012 Howard Chu, All rights reserved. <hyc@symas.com>
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 *
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in
16 * the documentation and/or other materials provided with the
17 * distribution.
18 *
19 * 3. The name "Carnegie Mellon University" must not be used to
20 * endorse or promote products derived from this software without
21 * prior written permission. For permission or any other legal
22 * details, please contact
23 * Office of Technology Transfer
24 * Carnegie Mellon University
25 * 5000 Forbes Avenue
26 * Pittsburgh, PA 15213-3890
27 * (412) 268-4387, fax: (412) 268-7395
28 * tech-transfer@andrew.cmu.edu
29 *
30 * 4. Redistributions of any form whatsoever must retain the following
31 * acknowledgment:
32 * "This product includes software developed by Computing Services
33 * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
34 *
35 * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
36 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
37 * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
38 * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
39 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
40 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
41 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
42 */
43
44 #include <config.h>
45
46 #include <lmdb.h>
47
48 #include <sys/stat.h>
49 #include <stdlib.h>
50 #include <assert.h>
51 #include <errno.h>
52 #include "sasldb.h"
53
54 static int db_ok = 0;
55 static MDB_env *db_env;
56 static MDB_dbi db_dbi;
57
58 #define KILO 1024
59
60 /*
61 * Open the environment
62 */
63 static int do_open(const sasl_utils_t *utils,
64 sasl_conn_t *conn,
65 int rdwr, MDB_txn **mtxn)
66 {
67 const char *path = SASL_DB_PATH;
68 void *cntxt;
69 MDB_env *env;
70 MDB_txn *txn;
71 sasl_getopt_t *getopt;
72 size_t mapsize = 0;
73 int readers = 0;
74 int ret;
75 int flags;
76
77 if (!db_env) {
78
79 if (utils->getcallback(conn, SASL_CB_GETOPT,
80 (sasl_callback_ft *)&getopt, &cntxt) == SASL_OK) {
81 const char *p;
82 if (getopt(cntxt, NULL, "sasldb_path", &p, NULL) == SASL_OK
83 && p != NULL && *p != 0) {
84 path = p;
85 }
86 if (getopt(cntxt, NULL, "sasldb_maxreaders", &p, NULL) == SASL_OK
87 && p != NULL && *p != 0) {
88 readers = atoi(p);
89 }
90 if (getopt(cntxt, NULL, "sasldb_mapsize", &p, NULL) == SASL_OK
91 && p != NULL && *p != 0) {
92 mapsize = atoi(p);
93 mapsize *= KILO;
94 }
95 }
96
97 ret = mdb_env_create(&env);
98 if (ret) {
99 utils->log(conn, SASL_LOG_ERR,
100 "unable to create MDB environment: %s",
101 mdb_strerror(ret));
102 utils->seterror(conn, SASL_NOLOG, "Unable to create MDB environment");
103 return SASL_FAIL;
104 }
105
106 if (readers) {
107 ret = mdb_env_set_maxreaders(env, readers);
108 if (ret) {
109 utils->log(conn, SASL_LOG_ERR,
110 "unable to set MDB maxreaders: %s",
111 mdb_strerror(ret));
112 utils->seterror(conn, SASL_NOLOG, "Unable to set MDB maxreaders");
113 return SASL_FAIL;
114 }
115 }
116
117 if (mapsize) {
118 ret = mdb_env_set_mapsize(env, mapsize);
119 if (ret) {
120 utils->log(conn, SASL_LOG_ERR,
121 "unable to set MDB mapsize: %s",
122 mdb_strerror(ret));
123 utils->seterror(conn, SASL_NOLOG, "Unable to set MDB mapsize");
124 return SASL_FAIL;
125 }
126 }
127
128 flags = MDB_NOSUBDIR;
129 if (!rdwr) flags |= MDB_RDONLY;
130 ret = mdb_env_open(env, path, flags, 0660);
131 if (ret) {
132 mdb_env_close(env);
133 if (!rdwr && ret == ENOENT) {
134 /* File not found and we are only reading the data.
135 Treat as SASL_NOUSER. */
136 return SASL_NOUSER;
137 }
138 utils->log(conn, SASL_LOG_ERR,
139 "unable to open MDB environment %s: %s",
140 path, mdb_strerror(ret));
141 utils->seterror(conn, SASL_NOLOG, "Unable to open MDB environment");
142 return SASL_FAIL;
143 }
144 } else {
145 env = db_env;
146 }
147
148 ret = mdb_txn_begin(env, NULL, rdwr ? 0 : MDB_RDONLY, &txn);
149 if (ret) {
150 mdb_env_close(env);
151 utils->log(conn, SASL_LOG_ERR,
152 "unable to open MDB transaction: %s",
153 mdb_strerror(ret));
154 utils->seterror(conn, SASL_NOLOG, "Unable to open MDB transaction");
155 return SASL_FAIL;
156 }
157
158 if (!db_dbi) {
159 ret = mdb_open(txn, NULL, 0, &db_dbi);
160 if (ret) {
161 mdb_txn_abort(txn);
162 mdb_env_close(env);
163 utils->log(conn, SASL_LOG_ERR,
164 "unable to open MDB database: %s",
165 mdb_strerror(ret));
166 utils->seterror(conn, SASL_NOLOG, "Unable to open MDB database");
167 return SASL_FAIL;
168 }
169 }
170
171 if (!db_env)
172 db_env = env;
173 *mtxn = txn;
174
175 return SASL_OK;
176 }
177
178 /*
179 * Close the environment
180 */
181 static void do_close()
182 {
183 mdb_env_close(db_env);
184 db_env = NULL;
185 }
186
187
188 /*
189 * Retrieve the secret from the database.
190 *
191 * Return SASL_NOUSER if the entry doesn't exist,
192 * SASL_OK on success.
193 *
194 */
195 int _sasldb_getdata(const sasl_utils_t *utils,
196 sasl_conn_t *context,
197 const char *auth_identity,
198 const char *realm,
199 const char *propName,
200 char *out, const size_t max_out, size_t *out_len)
201 {
202 int result = SASL_OK;
203 char *key;
204 size_t key_len;
205 MDB_val dbkey, data;
206 MDB_txn *txn = NULL;
207
208 if(!utils) return SASL_BADPARAM;
209
210 /* check parameters */
211 if (!auth_identity || !realm || !propName || !out || !max_out) {
212 utils->seterror(context, 0,
213 "Bad parameter in db_lmdb.c: _sasldb_getdata");
214 return SASL_BADPARAM;
215 }
216
217 if (!db_ok) {
218 utils->seterror(context, 0,
219 "Database not checked");
220 return SASL_FAIL;
221 }
222
223 /* allocate a key */
224 result = _sasldb_alloc_key(utils, auth_identity, realm, propName,
225 &key, &key_len);
226 if (result != SASL_OK) {
227 utils->seterror(context, 0,
228 "Could not allocate key in _sasldb_getdata");
229 return result;
230 }
231
232 /* open the db */
233 result = do_open(utils, context, 0, &txn);
234 if (result != SASL_OK) goto cleanup;
235
236 /* create the key to search for */
237 dbkey.mv_data = key;
238 dbkey.mv_size = key_len;
239
240 /* ask MDB for the entry */
241 result = mdb_get(txn, db_dbi, &dbkey, &data);
242
243 switch (result) {
244 case 0:
245 /* success */
246 break;
247
248 case MDB_NOTFOUND:
249 result = SASL_NOUSER;
250 utils->seterror(context, SASL_NOLOG,
251 "user: %s@%s property: %s not found in sasldb",
252 auth_identity,realm,propName);
253 goto cleanup;
254 break;
255 default:
256 utils->seterror(context, 0,
257 "error fetching from sasldb: %s",
258 mdb_strerror(result));
259 result = SASL_FAIL;
260 goto cleanup;
261 break;
262 }
263
264 if(data.mv_size > max_out + 1)
265 return SASL_BUFOVER;
266
267 if(out_len) *out_len = data.mv_size;
268 memcpy(out, data.mv_data, data.mv_size);
269 out[data.mv_size] = '\0';
270
271 cleanup:
272
273 mdb_txn_abort(txn);
274 utils->free(key);
275
276 return result;
277 }
278
279 /*
280 * Put or delete an entry
281 *
282 *
283 */
284
285 int _sasldb_putdata(const sasl_utils_t *utils,
286 sasl_conn_t *context,
287 const char *authid,
288 const char *realm,
289 const char *propName,
290 const char *data_in, size_t data_len)
291 {
292 int result = SASL_OK;
293 char *key;
294 size_t key_len;
295 MDB_val dbkey;
296 MDB_txn *txn = NULL;
297
298 if (!utils) return SASL_BADPARAM;
299
300 if (!authid || !realm || !propName) {
301 utils->seterror(context, 0,
302 "Bad parameter in db_lmdb.c: _sasldb_putdata");
303 return SASL_BADPARAM;
304 }
305
306 if (!db_ok) {
307 utils->seterror(context, 0,
308 "Database not checked");
309 return SASL_FAIL;
310 }
311
312 result = _sasldb_alloc_key(utils, authid, realm, propName,
313 &key, &key_len);
314 if (result != SASL_OK) {
315 utils->seterror(context, 0,
316 "Could not allocate key in _sasldb_putdata");
317 return result;
318 }
319
320 /* open the db */
321 result=do_open(utils, context, 1, &txn);
322 if (result!=SASL_OK) goto cleanup;
323
324 /* create the db key */
325 dbkey.mv_data = key;
326 dbkey.mv_size = key_len;
327
328 if (data_in) { /* putting secret */
329 MDB_val data;
330
331 data.mv_data = (char *)data_in;
332 if(!data_len) data_len = strlen(data_in);
333 data.mv_size = data_len;
334
335 result = mdb_put(txn, db_dbi, &dbkey, &data, 0);
336
337 if (result != 0)
338 {
339 utils->log(NULL, SASL_LOG_ERR,
340 "error updating sasldb: %s", mdb_strerror(result));
341 utils->seterror(context, SASL_NOLOG,
342 "Couldn't update db");
343 result = SASL_FAIL;
344 goto cleanup;
345 }
346 } else { /* removing secret */
347 result=mdb_del(txn, db_dbi, &dbkey, NULL);
348
349 if (result != 0)
350 {
351 utils->log(NULL, SASL_LOG_ERR,
352 "error deleting entry from sasldb: %s", mdb_strerror(result));
353 utils->seterror(context, SASL_NOLOG,
354 "Couldn't update db");
355 if (result == MDB_NOTFOUND)
356 result = SASL_NOUSER;
357 else
358 result = SASL_FAIL;
359 goto cleanup;
360 }
361 }
362 result = mdb_txn_commit(txn);
363 if (result) {
364 utils->log(NULL, SASL_LOG_ERR,
365 "error committing to sasldb: %s", mdb_strerror(result));
366 utils->seterror(context, SASL_NOLOG,
367 "Couldn't update db");
368 result = SASL_FAIL;
369 }
370 txn = NULL;
371
372 cleanup:
373
374 mdb_txn_abort(txn);
375 utils->free(key);
376
377 return result;
378 }
379
380 int _sasl_check_db(const sasl_utils_t *utils,
381 sasl_conn_t *conn)
382 {
383 const char *path = SASL_DB_PATH;
384 int ret;
385 void *cntxt;
386 sasl_getopt_t *getopt;
387 sasl_verifyfile_t *vf;
388
389 if (!utils) return SASL_BADPARAM;
390
391 if (utils->getcallback(conn, SASL_CB_GETOPT,
392 (sasl_callback_ft *)&getopt, &cntxt) == SASL_OK) {
393 const char *p;
394 if (getopt(cntxt, NULL, "sasldb_path", &p, NULL) == SASL_OK
395 && p != NULL && *p != 0) {
396 path = p;
397 }
398 }
399
400 ret = utils->getcallback(conn, SASL_CB_VERIFYFILE,
401 (sasl_callback_ft *)&vf, &cntxt);
402 if (ret != SASL_OK) {
403 utils->seterror(conn, 0, "verifyfile failed");
404 return ret;
405 }
406
407 ret = vf(cntxt, path, SASL_VRFY_PASSWD);
408
409 if (ret == SASL_OK) {
410 db_ok = 1;
411 }
412
413 if (ret == SASL_OK || ret == SASL_CONTINUE) {
414 return SASL_OK;
415 } else {
416 return ret;
417 }
418 }
419
420 #if defined(KEEP_DB_OPEN)
421 void sasldb_auxprop_free (void *glob_context,
422 const sasl_utils_t *utils)
423 {
424 do_close();
425 }
426 #endif
427
428 sasldb_handle _sasldb_getkeyhandle(const sasl_utils_t *utils,
429 sasl_conn_t *conn)
430 {
431 int ret;
432 MDB_txn *txn;
433 MDB_cursor *mc;
434
435 if(!utils || !conn) return NULL;
436
437 if(!db_ok) {
438 utils->seterror(conn, 0, "Database not OK in _sasldb_getkeyhandle");
439 return NULL;
440 }
441
442 ret = do_open(utils, conn, 0, &txn);
443
444 if (ret != SASL_OK) {
445 return NULL;
446 }
447
448 ret = mdb_cursor_open(txn, db_dbi, &mc);
449 if (ret) {
450 utils->seterror(conn, 0, "cursor_open failed in _sasldb_gekeythandle");
451 return NULL;
452 }
453
454 return (sasldb_handle)mc;
455 }
456
457 int _sasldb_getnextkey(const sasl_utils_t *utils __attribute__((unused)),
458 sasldb_handle handle, char *out,
459 const size_t max_out, size_t *out_len)
460 {
461 int result;
462 MDB_cursor *mc = (MDB_cursor *)handle;
463 MDB_val key;
464
465 if(!utils || !handle || !out || !max_out)
466 return SASL_BADPARAM;
467
468 result = mdb_cursor_get(mc, &key, NULL, MDB_NEXT);
469
470 if (result == MDB_NOTFOUND) return SASL_OK;
471
472 if (result != 0) {
473 return SASL_FAIL;
474 }
475
476 if (key.mv_size > max_out) {
477 return SASL_BUFOVER;
478 }
479
480 memcpy(out, key.mv_data, key.mv_size);
481 if (out_len) *out_len = key.mv_size;
482
483 return SASL_CONTINUE;
484 }
485
486
487 int _sasldb_releasekeyhandle(const sasl_utils_t *utils,
488 sasldb_handle handle)
489 {
490 MDB_cursor *mc = (MDB_cursor *)handle;
491
492 if (!utils || !handle) return SASL_BADPARAM;
493
494 mdb_cursor_close(mc);
495
496 return SASL_OK;
497 }
7272 const char *data, size_t data_len);
7373
7474 /* Should be run before any db access is attempted */
75 LIBSASL_API int _sasl_check_db(const sasl_utils_t *utils,
75 int _sasl_check_db(const sasl_utils_t *utils,
7676 sasl_conn_t *conn);
7777
7878 /* These allow iterating through the keys of the database */
8383 const char *property,
8484 void *rock);
8585
86 LIBSASL_API sasldb_handle _sasldb_getkeyhandle(const sasl_utils_t *utils,
86 sasldb_handle _sasldb_getkeyhandle(const sasl_utils_t *utils,
8787 sasl_conn_t *conn);
88 LIBSASL_API int _sasldb_getnextkey(const sasl_utils_t *utils,
88 int _sasldb_getnextkey(const sasl_utils_t *utils,
8989 sasldb_handle handle, char *out,
9090 const size_t max_out, size_t *out_len);
91 LIBSASL_API int _sasldb_releasekeyhandle(const sasl_utils_t *utils,
91 int _sasldb_releasekeyhandle(const sasl_utils_t *utils,
9292 sasldb_handle handle);
9393
94 LIBSASL_API int _sasldb_listusers(const sasl_utils_t *utils,
94 int _sasldb_listusers(const sasl_utils_t *utils,
9595 sasl_conn_t *context,
9696 sasldb_list_callback_t callback,
9797 void *callback_rock);
0 Makefile.in
1 Makefile
2 .deps
3 .libs
4 *.l[ao]
5 *.o
6 smtptest
7 testsuite
8 testsuitestatic
9 sasldblistusers2
10 dbconverter-2
11 dbconverter-1.5.9
12 saslpasswd2
13 pluginviewer
8888 libsfsasl2_la_LIBADD = sfsasl.lo
8989 libsfsasl2_la_LDFLAGS = -version-info 1:0:0 -export-dynamic -rpath $(libdir)
9090
91 INCLUDES=-I$(top_srcdir)/include -I$(top_builddir)/include @SASL_DB_INC@
91 AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_builddir)/include @SASL_DB_INC@
9292 EXTRA_DIST = saslpasswd2.8 sasldblistusers2.8 pluginviewer.8 sfsasl.h sfsasl.c smtptest.c testsuite.c pluginviewer.c NTMakefile
9393
9494 sfsasl.lo: sfsasl.c
+0
-859
utils/Makefile.in less more
0 # Makefile.in generated by automake 1.11 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 # Makefile.am for the SASL utilities
18 # Rob Earhart
19 #
20 ################################################################
21 # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
22 #
23 # Redistribution and use in source and binary forms, with or without
24 # modification, are permitted provided that the following conditions
25 # are met:
26 #
27 # 1. Redistributions of source code must retain the above copyright
28 # notice, this list of conditions and the following disclaimer.
29 #
30 # 2. Redistributions in binary form must reproduce the above copyright
31 # notice, this list of conditions and the following disclaimer in
32 # the documentation and/or other materials provided with the
33 # distribution.
34 #
35 # 3. The name "Carnegie Mellon University" must not be used to
36 # endorse or promote products derived from this software without
37 # prior written permission. For permission or any other legal
38 # details, please contact
39 # Office of Technology Transfer
40 # Carnegie Mellon University
41 # 5000 Forbes Avenue
42 # Pittsburgh, PA 15213-3890
43 # (412) 268-4387, fax: (412) 268-7395
44 # tech-transfer@andrew.cmu.edu
45 #
46 # 4. Redistributions of any form whatsoever must retain the following
47 # acknowledgment:
48 # "This product includes software developed by Computing Services
49 # at Carnegie Mellon University (http://www.cmu.edu/computing/)."
50 #
51 # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
52 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
53 # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
54 # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
55 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
56 # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
57 # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
58 #
59 ################################################################
60
61
62
63 VPATH = @srcdir@
64 pkgdatadir = $(datadir)/@PACKAGE@
65 pkgincludedir = $(includedir)/@PACKAGE@
66 pkglibdir = $(libdir)/@PACKAGE@
67 pkglibexecdir = $(libexecdir)/@PACKAGE@
68 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
69 install_sh_DATA = $(install_sh) -c -m 644
70 install_sh_PROGRAM = $(install_sh) -c
71 install_sh_SCRIPT = $(install_sh) -c
72 INSTALL_HEADER = $(INSTALL_DATA)
73 transform = $(program_transform_name)
74 NORMAL_INSTALL = :
75 PRE_INSTALL = :
76 POST_INSTALL = :
77 NORMAL_UNINSTALL = :
78 PRE_UNINSTALL = :
79 POST_UNINSTALL = :
80 build_triplet = @build@
81 host_triplet = @host@
82 target_triplet = @target@
83 sbin_PROGRAMS = @SASL_DB_UTILS@ @SMTPTEST_PROGRAM@ \
84 pluginviewer$(EXEEXT)
85 EXTRA_PROGRAMS = saslpasswd2$(EXEEXT) sasldblistusers2$(EXEEXT) \
86 testsuite$(EXEEXT) testsuitestatic$(EXEEXT) smtptest$(EXEEXT) \
87 pluginviewer$(EXEEXT)
88 noinst_PROGRAMS = dbconverter-2$(EXEEXT)
89 subdir = utils
90 DIST_COMMON = $(saslinclude_HEADERS) $(srcdir)/Makefile.am \
91 $(srcdir)/Makefile.in
92 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
93 am__aclocal_m4_deps = $(top_srcdir)/config/kerberos_v4.m4 \
94 $(top_srcdir)/config/libtool.m4 $(top_srcdir)/config/plain.m4 \
95 $(top_srcdir)/config/sasldb.m4 \
96 $(top_srcdir)/cmulocal/berkdb.m4 \
97 $(top_srcdir)/cmulocal/bsd_sockets.m4 \
98 $(top_srcdir)/cmulocal/c-attribute.m4 \
99 $(top_srcdir)/cmulocal/common.m4 \
100 $(top_srcdir)/cmulocal/cyrus.m4 \
101 $(top_srcdir)/cmulocal/init_automake.m4 \
102 $(top_srcdir)/cmulocal/ipv6.m4 \
103 $(top_srcdir)/cmulocal/openldap.m4 \
104 $(top_srcdir)/cmulocal/openssl.m4 \
105 $(top_srcdir)/cmulocal/sasl2.m4 $(top_srcdir)/configure.in
106 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
107 $(ACLOCAL_M4)
108 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
109 CONFIG_HEADER = $(top_builddir)/config.h
110 CONFIG_CLEAN_FILES =
111 CONFIG_CLEAN_VPATH_FILES =
112 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
113 am__vpath_adj = case $$p in \
114 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
115 *) f=$$p;; \
116 esac;
117 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
118 am__install_max = 40
119 am__nobase_strip_setup = \
120 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
121 am__nobase_strip = \
122 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
123 am__nobase_list = $(am__nobase_strip_setup); \
124 for p in $$list; do echo "$$p $$p"; done | \
125 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
126 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
127 if (++n[$$2] == $(am__install_max)) \
128 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
129 END { for (dir in files) print dir, files[dir] }'
130 am__base_list = \
131 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
132 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
133 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sbindir)" \
134 "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(saslincludedir)"
135 LTLIBRARIES = $(lib_LTLIBRARIES)
136 libsfsasl2_la_DEPENDENCIES = sfsasl.lo
137 am_libsfsasl2_la_OBJECTS =
138 libsfsasl2_la_OBJECTS = $(am_libsfsasl2_la_OBJECTS)
139 libsfsasl2_la_LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
140 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
141 $(libsfsasl2_la_LDFLAGS) $(LDFLAGS) -o $@
142 PROGRAMS = $(noinst_PROGRAMS) $(sbin_PROGRAMS)
143 dbconverter_2_SOURCES = dbconverter-2.c
144 dbconverter_2_OBJECTS = dbconverter-2.$(OBJEXT)
145 am__DEPENDENCIES_1 =
146 am__DEPENDENCIES_2 = ../lib/libsasl2.la $(am__DEPENDENCIES_1) \
147 $(am__DEPENDENCIES_1)
148 dbconverter_2_DEPENDENCIES = ../sasldb/libsasldb.la \
149 $(am__DEPENDENCIES_2)
150 am_pluginviewer_OBJECTS = pluginviewer.$(OBJEXT)
151 pluginviewer_OBJECTS = $(am_pluginviewer_OBJECTS)
152 pluginviewer_DEPENDENCIES = $(am__DEPENDENCIES_2)
153 am_sasldblistusers2_OBJECTS = sasldblistusers.$(OBJEXT)
154 sasldblistusers2_OBJECTS = $(am_sasldblistusers2_OBJECTS)
155 sasldblistusers2_DEPENDENCIES = ../sasldb/libsasldb.la \
156 $(am__DEPENDENCIES_2)
157 am_saslpasswd2_OBJECTS = saslpasswd.$(OBJEXT)
158 saslpasswd2_OBJECTS = $(am_saslpasswd2_OBJECTS)
159 saslpasswd2_DEPENDENCIES = ../sasldb/libsasldb.la \
160 $(am__DEPENDENCIES_2)
161 am_smtptest_OBJECTS =
162 smtptest_OBJECTS = $(am_smtptest_OBJECTS)
163 testsuite_SOURCES = testsuite.c
164 testsuite_OBJECTS = testsuite.$(OBJEXT)
165 testsuite_DEPENDENCIES = $(am__DEPENDENCIES_2)
166 am_testsuitestatic_OBJECTS = testsuite.$(OBJEXT)
167 testsuitestatic_OBJECTS = $(am_testsuitestatic_OBJECTS)
168 am__DEPENDENCIES_3 = ../lib/.libs/libsasl2.a $(am__DEPENDENCIES_1) \
169 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
170 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
171 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
172 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
173 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
174 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
175 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
176 am__depfiles_maybe = depfiles
177 am__mv = mv -f
178 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
179 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
180 LTCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
181 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
182 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
183 CCLD = $(CC)
184 LINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
185 $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
186 SOURCES = $(libsfsasl2_la_SOURCES) dbconverter-2.c \
187 $(pluginviewer_SOURCES) $(sasldblistusers2_SOURCES) \
188 $(saslpasswd2_SOURCES) $(smtptest_SOURCES) testsuite.c \
189 $(testsuitestatic_SOURCES)
190 DIST_SOURCES = $(libsfsasl2_la_SOURCES) dbconverter-2.c \
191 $(pluginviewer_SOURCES) $(sasldblistusers2_SOURCES) \
192 $(saslpasswd2_SOURCES) $(smtptest_SOURCES) testsuite.c \
193 $(testsuitestatic_SOURCES)
194 man8dir = $(mandir)/man8
195 NROFF = nroff
196 MANS = $(man_MANS)
197 HEADERS = $(saslinclude_HEADERS)
198 ETAGS = etags
199 CTAGS = ctags
200 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
201 ACLOCAL = @ACLOCAL@
202 AMTAR = @AMTAR@
203 AUTOCONF = @AUTOCONF@
204 AUTOHEADER = @AUTOHEADER@
205 AUTOMAKE = @AUTOMAKE@
206 AWK = @AWK@
207 CC = @CC@
208 CCDEPMODE = @CCDEPMODE@
209 CFLAGS = @CFLAGS@
210 CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@
211 CPP = @CPP@
212 CPPFLAGS = @CPPFLAGS@
213 CYGPATH_W = @CYGPATH_W@
214 DEFS = @DEFS@
215 DEPDIR = @DEPDIR@
216 DIRS = @DIRS@
217 DMALLOC_LIBS = @DMALLOC_LIBS@
218 ECHO_C = @ECHO_C@
219 ECHO_N = @ECHO_N@
220 ECHO_T = @ECHO_T@
221 EGREP = @EGREP@
222 EXEEXT = @EXEEXT@
223 GETADDRINFOOBJS = @GETADDRINFOOBJS@
224 GETNAMEINFOOBJS = @GETNAMEINFOOBJS@
225 GETSUBOPT = @GETSUBOPT@
226 GREP = @GREP@
227 GSSAPIBASE_LIBS = @GSSAPIBASE_LIBS@
228 GSSAPI_LIBS = @GSSAPI_LIBS@
229 INSTALL = @INSTALL@
230 INSTALL_DATA = @INSTALL_DATA@
231 INSTALL_PROGRAM = @INSTALL_PROGRAM@
232 INSTALL_SCRIPT = @INSTALL_SCRIPT@
233 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
234 IPCTYPE = @IPCTYPE@
235 JAVAC = @JAVAC@
236 JAVADOC = @JAVADOC@
237 JAVAH = @JAVAH@
238 JAVAROOT = @JAVAROOT@
239 JAVA_INCLUDES = @JAVA_INCLUDES@
240 LDFLAGS = @LDFLAGS@
241 LIBOBJS = @LIBOBJS@
242 LIBS = @LIBS@
243 LIBTOOL = @LIBTOOL@
244 LIB_CRYPT = @LIB_CRYPT@
245 LIB_DES = @LIB_DES@
246 LIB_DOOR = @LIB_DOOR@
247 LIB_LDAP = @LIB_LDAP@
248 LIB_MYSQL = @LIB_MYSQL@
249 LIB_PGSQL = @LIB_PGSQL@
250 LIB_SOCKET = @LIB_SOCKET@
251 LIB_SQLITE = @LIB_SQLITE@
252 LIB_SQLITE3 = @LIB_SQLITE3@
253 LN_S = @LN_S@
254 LTGETADDRINFOOBJS = @LTGETADDRINFOOBJS@
255 LTGETNAMEINFOOBJS = @LTGETNAMEINFOOBJS@
256 LTLIBOBJS = @LTLIBOBJS@
257 LTSNPRINTFOBJS = @LTSNPRINTFOBJS@
258 MAKEINFO = @MAKEINFO@
259 MKDIR_P = @MKDIR_P@
260 NM = @NM@
261 NTLM_LIBS = @NTLM_LIBS@
262 OBJEXT = @OBJEXT@
263 OTP_LIBS = @OTP_LIBS@
264 PACKAGE = @PACKAGE@
265 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
266 PACKAGE_NAME = @PACKAGE_NAME@
267 PACKAGE_STRING = @PACKAGE_STRING@
268 PACKAGE_TARNAME = @PACKAGE_TARNAME@
269 PACKAGE_VERSION = @PACKAGE_VERSION@
270 PASSDSS_LIBS = @PASSDSS_LIBS@
271 PATH_SEPARATOR = @PATH_SEPARATOR@
272 PLAIN_LIBS = @PLAIN_LIBS@
273 PURECOV = @PURECOV@
274 PURIFY = @PURIFY@
275 PWCHECKMETH = @PWCHECKMETH@
276 RANLIB = @RANLIB@
277 SASL_DB_BACKEND = @SASL_DB_BACKEND@
278 SASL_DB_BACKEND_STATIC = @SASL_DB_BACKEND_STATIC@
279 SASL_DB_INC = @SASL_DB_INC@
280 SASL_DB_LIB = @SASL_DB_LIB@
281 SASL_DB_MANS = @SASL_DB_MANS@
282 SASL_DB_UTILS = @SASL_DB_UTILS@
283 SASL_DL_LIB = @SASL_DL_LIB@
284 SASL_KRB_LIB = @SASL_KRB_LIB@
285 SASL_MECHS = @SASL_MECHS@
286 SASL_STATIC_LIBS = @SASL_STATIC_LIBS@
287 SASL_STATIC_OBJS = @SASL_STATIC_OBJS@
288 SASL_STATIC_SRCS = @SASL_STATIC_SRCS@
289 SASL_UTIL_HEADERS_EXTRA = @SASL_UTIL_HEADERS_EXTRA@
290 SASL_UTIL_LIBS_EXTRA = @SASL_UTIL_LIBS_EXTRA@
291 SCRAM_LIBS = @SCRAM_LIBS@
292 SET_MAKE = @SET_MAKE@
293 SFIO_INC_FLAGS = @SFIO_INC_FLAGS@
294 SFIO_LIB_FLAGS = @SFIO_LIB_FLAGS@
295 SHELL = @SHELL@
296 SMTPTEST_PROGRAM = @SMTPTEST_PROGRAM@
297 SNPRINTFOBJS = @SNPRINTFOBJS@
298 SRP_LIBS = @SRP_LIBS@
299 STRIP = @STRIP@
300 VERSION = @VERSION@
301 abs_builddir = @abs_builddir@
302 abs_srcdir = @abs_srcdir@
303 abs_top_builddir = @abs_top_builddir@
304 abs_top_srcdir = @abs_top_srcdir@
305 ac_ct_CC = @ac_ct_CC@
306 am__include = @am__include@
307 am__leading_dot = @am__leading_dot@
308 am__quote = @am__quote@
309 am__tar = @am__tar@
310 am__untar = @am__untar@
311 bindir = @bindir@
312 build = @build@
313 build_alias = @build_alias@
314 build_cpu = @build_cpu@
315 build_os = @build_os@
316 build_vendor = @build_vendor@
317 builddir = @builddir@
318 configdir = @configdir@
319 datadir = @datadir@
320 datarootdir = @datarootdir@
321 docdir = @docdir@
322 dvidir = @dvidir@
323 exec_prefix = @exec_prefix@
324 host = @host@
325 host_alias = @host_alias@
326 host_cpu = @host_cpu@
327 host_os = @host_os@
328 host_vendor = @host_vendor@
329 htmldir = @htmldir@
330 includedir = @includedir@
331 infodir = @infodir@
332 install_sh = @install_sh@
333 libdir = @libdir@
334 libexecdir = @libexecdir@
335 localedir = @localedir@
336 localstatedir = @localstatedir@
337 mandir = @mandir@
338 mkdir_p = @mkdir_p@
339 oldincludedir = @oldincludedir@
340 pdfdir = @pdfdir@
341 plugindir = @plugindir@
342 prefix = @prefix@
343 program_transform_name = @program_transform_name@
344 psdir = @psdir@
345 sbindir = @sbindir@
346 sharedstatedir = @sharedstatedir@
347 srcdir = @srcdir@
348 subdirs = @subdirs@
349 sysconfdir = @sysconfdir@
350 target = @target@
351 target_alias = @target_alias@
352 target_cpu = @target_cpu@
353 target_os = @target_os@
354 target_vendor = @target_vendor@
355 top_build_prefix = @top_build_prefix@
356 top_builddir = @top_builddir@
357 top_srcdir = @top_srcdir@
358 all_sasl_libs = ../lib/libsasl2.la $(SASL_DB_LIB) $(LIB_SOCKET)
359 all_sasl_static_libs = ../lib/.libs/libsasl2.a $(SASL_DB_LIB) $(LIB_SOCKET) $(GSSAPIBASE_LIBS) $(GSSAPI_LIBS) $(SASL_KRB_LIB) $(LIB_DES) $(PLAIN_LIBS) $(SRP_LIBS) $(LIB_MYSQL) $(LIB_PGSQL) $(LIB_SQLITE)
360 @NO_SASL_DB_MANS_FALSE@man_MANS = saslpasswd2.8 sasldblistusers2.8 pluginviewer.8
361 @NO_SASL_DB_MANS_TRUE@man_MANS =
362 saslpasswd2_LDADD = ../sasldb/libsasldb.la $(all_sasl_libs)
363 saslpasswd2_SOURCES = saslpasswd.c
364 sasldblistusers2_LDADD = ../sasldb/libsasldb.la $(all_sasl_libs)
365 sasldblistusers2_SOURCES = sasldblistusers.c
366 dbconverter_2_LDADD = ../sasldb/libsasldb.la $(all_sasl_libs)
367 pluginviewer_LDADD = $(all_sasl_libs)
368 pluginviewer_SOURCES = pluginviewer.c
369 testsuite_LDADD = $(all_sasl_libs) @DMALLOC_LIBS@
370 CLEANFILES = $(EXTRA_PROGRAMS)
371 testsuitestatic_SOURCES = testsuite.c
372 testsuitestatic_LDADD = $(all_sasl_static_libs) @DMALLOC_LIBS@ @SASL_DL_LIB@
373 testsuitestatic_DEPENDENCIES = ../lib/.libs/libsasl2.a
374 smtptest_SOURCES =
375 smtptest_DEPENDENCIES = ./smtptest.lo ./libsfsasl2.la
376 smtptest_LDADD = ./smtptest.lo ./libsfsasl2.la @SFIO_LIB_FLAGS@ @DMALLOC_LIBS@ $(all_sasl_libs)
377 saslincludedir = $(includedir)/sasl
378 saslinclude_HEADERS = @SASL_UTIL_HEADERS_EXTRA@
379 EXTRA_HEADERS = sfsasl.h
380
381 # Note: we explicitly do *not* link to libsfio, as people will need to
382 # link to that anyway if they want to use this.
383 lib_LTLIBRARIES = @SASL_UTIL_LIBS_EXTRA@
384 EXTRA_LTLIBRARIES = libsfsasl2.la
385 libsfsasl2_la_SOURCES =
386 libsfsasl2_la_LIBADD = sfsasl.lo
387 libsfsasl2_la_LDFLAGS = -version-info 1:0:0 -export-dynamic -rpath $(libdir)
388 INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include @SASL_DB_INC@
389 EXTRA_DIST = saslpasswd2.8 sasldblistusers2.8 pluginviewer.8 sfsasl.h sfsasl.c smtptest.c testsuite.c pluginviewer.c NTMakefile
390 all: all-am
391
392 .SUFFIXES:
393 .SUFFIXES: .c .lo .o .obj
394 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
395 @for dep in $?; do \
396 case '$(am__configure_deps)' in \
397 *$$dep*) \
398 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
399 && { if test -f $@; then exit 0; else break; fi; }; \
400 exit 1;; \
401 esac; \
402 done; \
403 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/Makefile'; \
404 $(am__cd) $(top_srcdir) && \
405 $(AUTOMAKE) --gnu utils/Makefile
406 .PRECIOUS: Makefile
407 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
408 @case '$?' in \
409 *config.status*) \
410 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
411 *) \
412 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
413 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
414 esac;
415
416 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
417 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
418
419 $(top_srcdir)/configure: $(am__configure_deps)
420 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
421 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
422 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
423 $(am__aclocal_m4_deps):
424 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
425 @$(NORMAL_INSTALL)
426 test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
427 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
428 list2=; for p in $$list; do \
429 if test -f $$p; then \
430 list2="$$list2 $$p"; \
431 else :; fi; \
432 done; \
433 test -z "$$list2" || { \
434 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
435 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
436 }
437
438 uninstall-libLTLIBRARIES:
439 @$(NORMAL_UNINSTALL)
440 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
441 for p in $$list; do \
442 $(am__strip_dir) \
443 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
444 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
445 done
446
447 clean-libLTLIBRARIES:
448 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
449 @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
450 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
451 test "$$dir" != "$$p" || dir=.; \
452 echo "rm -f \"$${dir}/so_locations\""; \
453 rm -f "$${dir}/so_locations"; \
454 done
455 libsfsasl2.la: $(libsfsasl2_la_OBJECTS) $(libsfsasl2_la_DEPENDENCIES)
456 $(libsfsasl2_la_LINK) $(libsfsasl2_la_OBJECTS) $(libsfsasl2_la_LIBADD) $(LIBS)
457
458 clean-noinstPROGRAMS:
459 @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
460 echo " rm -f" $$list; \
461 rm -f $$list || exit $$?; \
462 test -n "$(EXEEXT)" || exit 0; \
463 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
464 echo " rm -f" $$list; \
465 rm -f $$list
466 install-sbinPROGRAMS: $(sbin_PROGRAMS)
467 @$(NORMAL_INSTALL)
468 test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
469 @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
470 for p in $$list; do echo "$$p $$p"; done | \
471 sed 's/$(EXEEXT)$$//' | \
472 while read p p1; do if test -f $$p || test -f $$p1; \
473 then echo "$$p"; echo "$$p"; else :; fi; \
474 done | \
475 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
476 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
477 sed 'N;N;N;s,\n, ,g' | \
478 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
479 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
480 if ($$2 == $$4) files[d] = files[d] " " $$1; \
481 else { print "f", $$3 "/" $$4, $$1; } } \
482 END { for (d in files) print "f", d, files[d] }' | \
483 while read type dir files; do \
484 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
485 test -z "$$files" || { \
486 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
487 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
488 } \
489 ; done
490
491 uninstall-sbinPROGRAMS:
492 @$(NORMAL_UNINSTALL)
493 @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
494 files=`for p in $$list; do echo "$$p"; done | \
495 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
496 -e 's/$$/$(EXEEXT)/' `; \
497 test -n "$$list" || exit 0; \
498 echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
499 cd "$(DESTDIR)$(sbindir)" && rm -f $$files
500
501 clean-sbinPROGRAMS:
502 @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
503 echo " rm -f" $$list; \
504 rm -f $$list || exit $$?; \
505 test -n "$(EXEEXT)" || exit 0; \
506 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
507 echo " rm -f" $$list; \
508 rm -f $$list
509 dbconverter-2$(EXEEXT): $(dbconverter_2_OBJECTS) $(dbconverter_2_DEPENDENCIES)
510 @rm -f dbconverter-2$(EXEEXT)
511 $(LINK) $(dbconverter_2_OBJECTS) $(dbconverter_2_LDADD) $(LIBS)
512 pluginviewer$(EXEEXT): $(pluginviewer_OBJECTS) $(pluginviewer_DEPENDENCIES)
513 @rm -f pluginviewer$(EXEEXT)
514 $(LINK) $(pluginviewer_OBJECTS) $(pluginviewer_LDADD) $(LIBS)
515 sasldblistusers2$(EXEEXT): $(sasldblistusers2_OBJECTS) $(sasldblistusers2_DEPENDENCIES)
516 @rm -f sasldblistusers2$(EXEEXT)
517 $(LINK) $(sasldblistusers2_OBJECTS) $(sasldblistusers2_LDADD) $(LIBS)
518 saslpasswd2$(EXEEXT): $(saslpasswd2_OBJECTS) $(saslpasswd2_DEPENDENCIES)
519 @rm -f saslpasswd2$(EXEEXT)
520 $(LINK) $(saslpasswd2_OBJECTS) $(saslpasswd2_LDADD) $(LIBS)
521 smtptest$(EXEEXT): $(smtptest_OBJECTS) $(smtptest_DEPENDENCIES)
522 @rm -f smtptest$(EXEEXT)
523 $(LINK) $(smtptest_OBJECTS) $(smtptest_LDADD) $(LIBS)
524 testsuite$(EXEEXT): $(testsuite_OBJECTS) $(testsuite_DEPENDENCIES)
525 @rm -f testsuite$(EXEEXT)
526 $(LINK) $(testsuite_OBJECTS) $(testsuite_LDADD) $(LIBS)
527 testsuitestatic$(EXEEXT): $(testsuitestatic_OBJECTS) $(testsuitestatic_DEPENDENCIES)
528 @rm -f testsuitestatic$(EXEEXT)
529 $(LINK) $(testsuitestatic_OBJECTS) $(testsuitestatic_LDADD) $(LIBS)
530
531 mostlyclean-compile:
532 -rm -f *.$(OBJEXT)
533
534 distclean-compile:
535 -rm -f *.tab.c
536
537 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbconverter-2.Po@am__quote@
538 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pluginviewer.Po@am__quote@
539 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sasldblistusers.Po@am__quote@
540 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/saslpasswd.Po@am__quote@
541 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testsuite.Po@am__quote@
542
543 .c.o:
544 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
545 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
546 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
547 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
548 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
549
550 .c.obj:
551 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
552 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
553 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
554 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
555 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
556
557 .c.lo:
558 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
559 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
560 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
561 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
562 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
563
564 mostlyclean-libtool:
565 -rm -f *.lo
566
567 clean-libtool:
568 -rm -rf .libs _libs
569 install-man8: $(man_MANS)
570 @$(NORMAL_INSTALL)
571 test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
572 @list=''; test -n "$(man8dir)" || exit 0; \
573 { for i in $$list; do echo "$$i"; done; \
574 l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
575 sed -n '/\.8[a-z]*$$/p'; \
576 } | while read p; do \
577 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
578 echo "$$d$$p"; echo "$$p"; \
579 done | \
580 sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
581 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
582 sed 'N;N;s,\n, ,g' | { \
583 list=; while read file base inst; do \
584 if test "$$base" = "$$inst"; then list="$$list $$file"; else \
585 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
586 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
587 fi; \
588 done; \
589 for i in $$list; do echo "$$i"; done | $(am__base_list) | \
590 while read files; do \
591 test -z "$$files" || { \
592 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
593 $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
594 done; }
595
596 uninstall-man8:
597 @$(NORMAL_UNINSTALL)
598 @list=''; test -n "$(man8dir)" || exit 0; \
599 files=`{ for i in $$list; do echo "$$i"; done; \
600 l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
601 sed -n '/\.8[a-z]*$$/p'; \
602 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
603 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
604 test -z "$$files" || { \
605 echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
606 cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
607 install-saslincludeHEADERS: $(saslinclude_HEADERS)
608 @$(NORMAL_INSTALL)
609 test -z "$(saslincludedir)" || $(MKDIR_P) "$(DESTDIR)$(saslincludedir)"
610 @list='$(saslinclude_HEADERS)'; test -n "$(saslincludedir)" || list=; \
611 for p in $$list; do \
612 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
613 echo "$$d$$p"; \
614 done | $(am__base_list) | \
615 while read files; do \
616 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(saslincludedir)'"; \
617 $(INSTALL_HEADER) $$files "$(DESTDIR)$(saslincludedir)" || exit $$?; \
618 done
619
620 uninstall-saslincludeHEADERS:
621 @$(NORMAL_UNINSTALL)
622 @list='$(saslinclude_HEADERS)'; test -n "$(saslincludedir)" || list=; \
623 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
624 test -n "$$files" || exit 0; \
625 echo " ( cd '$(DESTDIR)$(saslincludedir)' && rm -f" $$files ")"; \
626 cd "$(DESTDIR)$(saslincludedir)" && rm -f $$files
627
628 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
629 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
630 unique=`for i in $$list; do \
631 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
632 done | \
633 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
634 END { if (nonempty) { for (i in files) print i; }; }'`; \
635 mkid -fID $$unique
636 tags: TAGS
637
638 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
639 $(TAGS_FILES) $(LISP)
640 set x; \
641 here=`pwd`; \
642 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
643 unique=`for i in $$list; do \
644 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
645 done | \
646 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
647 END { if (nonempty) { for (i in files) print i; }; }'`; \
648 shift; \
649 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
650 test -n "$$unique" || unique=$$empty_fix; \
651 if test $$# -gt 0; then \
652 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
653 "$$@" $$unique; \
654 else \
655 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
656 $$unique; \
657 fi; \
658 fi
659 ctags: CTAGS
660 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
661 $(TAGS_FILES) $(LISP)
662 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
663 unique=`for i in $$list; do \
664 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
665 done | \
666 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
667 END { if (nonempty) { for (i in files) print i; }; }'`; \
668 test -z "$(CTAGS_ARGS)$$unique" \
669 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
670 $$unique
671
672 GTAGS:
673 here=`$(am__cd) $(top_builddir) && pwd` \
674 && $(am__cd) $(top_srcdir) \
675 && gtags -i $(GTAGS_ARGS) "$$here"
676
677 distclean-tags:
678 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
679
680 distdir: $(DISTFILES)
681 @list='$(MANS)'; if test -n "$$list"; then \
682 list=`for p in $$list; do \
683 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
684 if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
685 if test -n "$$list" && \
686 grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
687 echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
688 grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
689 echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
690 echo " typically \`make maintainer-clean' will remove them" >&2; \
691 exit 1; \
692 else :; fi; \
693 else :; fi
694 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
695 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
696 list='$(DISTFILES)'; \
697 dist_files=`for file in $$list; do echo $$file; done | \
698 sed -e "s|^$$srcdirstrip/||;t" \
699 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
700 case $$dist_files in \
701 */*) $(MKDIR_P) `echo "$$dist_files" | \
702 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
703 sort -u` ;; \
704 esac; \
705 for file in $$dist_files; do \
706 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
707 if test -d $$d/$$file; then \
708 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
709 if test -d "$(distdir)/$$file"; then \
710 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
711 fi; \
712 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
713 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
714 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
715 fi; \
716 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
717 else \
718 test -f "$(distdir)/$$file" \
719 || cp -p $$d/$$file "$(distdir)/$$file" \
720 || exit 1; \
721 fi; \
722 done
723 check-am: all-am
724 check: check-am
725 all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(HEADERS)
726 installdirs:
727 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(saslincludedir)"; do \
728 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
729 done
730 install: install-am
731 install-exec: install-exec-am
732 install-data: install-data-am
733 uninstall: uninstall-am
734
735 install-am: all-am
736 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
737
738 installcheck: installcheck-am
739 install-strip:
740 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
741 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
742 `test -z '$(STRIP)' || \
743 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
744 mostlyclean-generic:
745
746 clean-generic:
747 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
748
749 distclean-generic:
750 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
751 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
752
753 maintainer-clean-generic:
754 @echo "This command is intended for maintainers to use"
755 @echo "it deletes files that may require special tools to rebuild."
756 clean: clean-am
757
758 clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
759 clean-noinstPROGRAMS clean-sbinPROGRAMS mostlyclean-am
760
761 distclean: distclean-am
762 -rm -rf ./$(DEPDIR)
763 -rm -f Makefile
764 distclean-am: clean-am distclean-compile distclean-generic \
765 distclean-tags
766
767 dvi: dvi-am
768
769 dvi-am:
770
771 html: html-am
772
773 html-am:
774
775 info: info-am
776
777 info-am:
778
779 install-data-am: install-man install-saslincludeHEADERS
780
781 install-dvi: install-dvi-am
782
783 install-dvi-am:
784
785 install-exec-am: install-libLTLIBRARIES install-sbinPROGRAMS
786
787 install-html: install-html-am
788
789 install-html-am:
790
791 install-info: install-info-am
792
793 install-info-am:
794
795 install-man: install-man8
796
797 install-pdf: install-pdf-am
798
799 install-pdf-am:
800
801 install-ps: install-ps-am
802
803 install-ps-am:
804
805 installcheck-am:
806
807 maintainer-clean: maintainer-clean-am
808 -rm -rf ./$(DEPDIR)
809 -rm -f Makefile
810 maintainer-clean-am: distclean-am maintainer-clean-generic
811
812 mostlyclean: mostlyclean-am
813
814 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
815 mostlyclean-libtool
816
817 pdf: pdf-am
818
819 pdf-am:
820
821 ps: ps-am
822
823 ps-am:
824
825 uninstall-am: uninstall-libLTLIBRARIES uninstall-man \
826 uninstall-saslincludeHEADERS uninstall-sbinPROGRAMS
827
828 uninstall-man: uninstall-man8
829
830 .MAKE: install-am install-strip
831
832 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
833 clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS \
834 clean-sbinPROGRAMS ctags distclean distclean-compile \
835 distclean-generic distclean-libtool distclean-tags distdir dvi \
836 dvi-am html html-am info info-am install install-am \
837 install-data install-data-am install-dvi install-dvi-am \
838 install-exec install-exec-am install-html install-html-am \
839 install-info install-info-am install-libLTLIBRARIES \
840 install-man install-man8 install-pdf install-pdf-am install-ps \
841 install-ps-am install-saslincludeHEADERS install-sbinPROGRAMS \
842 install-strip installcheck installcheck-am installdirs \
843 maintainer-clean maintainer-clean-generic mostlyclean \
844 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
845 pdf pdf-am ps ps-am tags uninstall uninstall-am \
846 uninstall-libLTLIBRARIES uninstall-man uninstall-man8 \
847 uninstall-saslincludeHEADERS uninstall-sbinPROGRAMS
848
849
850 sfsasl.lo: sfsasl.c
851 $(LIBTOOL) --mode=compile $(COMPILE) @SFIO_INC_FLAGS@ -c $(srcdir)/sfsasl.c
852
853 smtptest.lo: smtptest.c
854 $(LIBTOOL) --mode=compile $(COMPILE) @SFIO_INC_FLAGS@ -c $(srcdir)/smtptest.c
855
856 # Tell versions [3.59,3.63) of GNU make to not export all variables.
857 # Otherwise a system limit (for SysV at least) may be exceeded.
858 .NOEXPORT:
375375 }
376376
377377 static struct sasl_callback goodsasl_cb[] = {
378 { SASL_CB_GETOPT, &good_getopt, NULL },
378 { SASL_CB_GETOPT, (int (*)(void))&good_getopt, NULL },
379379 { SASL_CB_LIST_END, NULL, NULL }
380380 };
381381
208208
209209 static int
210210 plugview_sasl_getopt (
211 void *context,
212 const char *plugin_name,
211 void *context __attribute__((unused)),
212 const char *plugin_name __attribute__((unused)),
213213 const char *option,
214214 const char **result,
215215 unsigned *len
421421 case 'b':
422422 options = optarg;
423423 while (*options != '\0') {
424 switch(getsubopt(&options, (const char * const *)bit_subopts, &value)) {
424 switch(getsubopt(&options, (char * const *)bit_subopts, &value)) {
425425 case OPT_MIN:
426426 if (! value) {
427427 errflag = 1;
446446 case 'e':
447447 options = optarg;
448448 while (*options != '\0') {
449 switch(getsubopt(&options, (const char * const *)ext_subopts, &value)) {
449 switch(getsubopt(&options, (char * const *)ext_subopts, &value)) {
450450 case OPT_EXT_SSF:
451451 if (! value) {
452452 errflag = 1;
475475 case 'f':
476476 options = optarg;
477477 while (*options != '\0') {
478 switch(getsubopt(&options, (const char * const *)flag_subopts, &value)) {
478 switch(getsubopt(&options, (char * const *)flag_subopts, &value)) {
479479 case OPT_NOPLAIN:
480480 secprops.security_flags |= SASL_SEC_NOPLAINTEXT;
481481 break;
0 .\" sasldbconverter-2 - Convert sasldb file into the new format
1 .\" Original version by Dima Barsky 25/10/2002
2 .\"
3
4 .\" Copyright (c) 2009 Carnegie Mellon University. All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\"
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\"
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in
15 .\" the documentation and/or other materials provided with the
16 .\" distribution.
17 .\"
18 .\" 3. The name ""Carnegie Mellon University"" must not be used to
19 .\" endorse or promote products derived from this software without
20 .\" prior written permission. For permission or any other legal
21 .\" details, please contact
22 .\" Office of Technology Transfer
23 .\" Carnegie Mellon University
24 .\" 5000 Forbes Avenue
25 .\" Pittsburgh, PA 15213-3890
26 .\" (412) 268-4387, fax: (412) 268-7395
27 .\" tech-transfer@andrew.cmu.edu
28 .\"
29 .\" 4. Redistributions of any form whatsoever must retain the following
30 .\" acknowledgment:
31 .\" ""This product includes software developed by Computing Services
32 .\" at Carnegie Mellon University (http://www.cmu.edu/computing/).""
33 .\"
34 .\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
35 .\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
36 .\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
37 .\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
38 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
39 .\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
40 .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
41
42 .\"
43 .TH SASLDBCONVERTER2 8 "April 11, 2009" "CMU SASL"
44 .SH NAME
45 sasldbconverter2 \- Convert sasldb file into the new format
46 .SH SYNOPSIS
47 .B sasldbconverter2 [old_sasldb_file [new_sasldb_file]]
48 .SH DESCRIPTION
49 .I sasldbconverter2
50 takes the sasldb file specified on the
51 command line and convert it to a new sasldb file in the default
52 location (usually /etc/sasldb2). It is STRONGLY RECOMMENDED that you
53 backup sasldb before allowing this program to run.
54 .SH OPTIONS
55 .TP
56 .SH KNOWN BUGS
57 This only works for sasldb files that use the gdbm library.
58 .TP
59 .SH SEE ALSO
60 rfc4422 \- Simple Authentication and Security Layer (SASL)
5656
5757 #ifdef WIN32
5858 #include <saslutil.h>
59 #if defined(__MINGW64_VERSION_MAJOR)
60 #include <getopt.h>
61 #else
5962 __declspec(dllimport) char *optarg;
6063 __declspec(dllimport) int optind;
64 #endif
6165 #endif
6266
6367 /* Cheating to make the utils work out right */
5757 #include <io.h>
5858
5959 #include <saslutil.h>
60 #if defined(__MINGW64_VERSION_MAJOR)
61 #include <getopt.h>
62 #else
6063 __declspec(dllimport) char *optarg;
6164 __declspec(dllimport) int optind;
62
65 #endif
6366 /* perror can't be used on Windows system calls, so we define a new macro to underline this */
6467 void p_oserror (const char *string);
6568 #endif /*WIN32*/
0 .\" sasltestsuite - SASL2 test tool
1 .\" Dima Barsky 23/11/2002
2 .\"
3
4 .\"
5 .TH SASLTESTSUITE 8 "December 23, 2002" "CMU SASL"
6 .SH NAME
7 sasltestsuite \- SASL2 test tool
8 .SH SYNOPSIS
9 .B sasltestsuite [-g name] [-s seed] [-r tests] -a -M
10 g -- gssapi service name to use (default: host)
11 r -- # of random tests to do (default: 25)
12 a -- do all corruption tests (and ignores random ones unless -r specified)
13 n -- skip the initial "do correctly" tests
14 h -- show this screen
15 s -- random seed to use
16 M -- detailed memory debugging ON
17
18 .SH DESCRIPTION
19 This tool is for testing the SASL2 installation. Do not use it
20 unless you know what you are doing. Read the source code if you need
21 more information.
7878 !ENDIF
7979 !ENDIF
8080
81 !IF "$(LMDB_INCLUDE)" == ""
82 LMDB_INCLUDE=c:\work\isode\lmdb\libraries\liblmdb
83 !IF "$(VERBOSE)" != "0"
84 !MESSAGE Defaulting LMDB include path to $(LMDB_INCLUDE).
85 !ENDIF
86 !ENDIF
87
88 !IF "$(LMDB_LIBPATH)" == ""
89 LMDB_LIBPATH=c:\work\isode\lmdb\libraries\liblmdb\Release
90 !IF "$(VERBOSE)" != "0"
91 !MESSAGE Defaulting LMDB library path to $(LMDB_LIBPATH).
92 !ENDIF
93 !ENDIF
94
8195 !IF "$(OPENSSL_INCLUDE)" == ""
8296 OPENSSL_INCLUDE="D:\openssl\engine-0.9.6g-md3\include"
8397 !IF "$(VERBOSE)" != "0"
193207 !ENDIF
194208 !ENDIF
195209
196 CPP_PROJ=$(CODEGEN) /W3 /Gm $(EXCEPTHANDLING) /ZI /Od /D "_DEBUG" /D _CRT_SECURE_NO_DEPRECATE=1 $(CPPFLAGS) /FD /GZ /c
210 CPP_PROJ=$(CODEGEN) /W3 /Gm $(EXCEPTHANDLING) /ZI /Od /D "_DEBUG" /D _CRT_SECURE_NO_DEPRECATE=1 $(CPPFLAGS) /FD /RTC1 /c
197211
198212 incremental=yes
199213
9090 /* #undef SASL_NDBM */
9191 #define SASL_BERKELEYDB 1
9292
93 /* which mechs can we link staticly? */
93 /* which mechs can we link statically? */
9494 #define STATIC_ANONYMOUS 1
9595 #define STATIC_CRAMMD5 1
9696 #define STATIC_DIGESTMD5 1